diff options
author | Bardur Arantsson <bardur@scientician.net> | 2012-04-06 10:52:15 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2012-04-07 15:28:26 +0200 |
commit | 05fedc33f23a2459c4149f2a0970f01ae2602a62 (patch) | |
tree | 2b1912084bfbf6dde0a7c929b0aa69c29bbcb333 /src | |
parent | 0b42d7ebfc1abd8b8620109bb996e2cee18e9f79 (diff) |
Lua: Move uses of HOOK_READ to C
Diffstat (limited to 'src')
-rw-r--r-- | src/cmd6.c | 18 | ||||
-rw-r--r-- | src/defines.h | 1 |
2 files changed, 18 insertions, 1 deletions
@@ -2899,8 +2899,16 @@ void do_cmd_read_scroll(void) /* Assume the scroll will get used up */ used_up = TRUE; + /* Corruption */ + if (player_has_corruption(CORRUPT_BALROG_AURA) && magik(5)) + { + msg_print("Your demon aura burns the scroll before you read it!"); + used_up = TRUE; + ident = FALSE; + } + /* New scripts, can override the ingame code */ - if (process_hooks_ret(HOOK_READ, "dd", "(O)", o_ptr)) + else if (process_hooks_ret(HOOK_READ, "dd", "(O)", o_ptr)) { used_up = process_hooks_return[0].num; ident = process_hooks_return[1].num; @@ -3509,6 +3517,14 @@ void do_cmd_read_scroll(void) break; } + case SV_SCROLL_STERILIZATION: + { + msg_print("A neutralising wave radiates from you!"); + set_no_breeders(randint(100) + 100); + + break; + } + default: { break; diff --git a/src/defines.h b/src/defines.h index 2677008a..3d258caf 100644 --- a/src/defines.h +++ b/src/defines.h @@ -1938,6 +1938,7 @@ #define SV_SCROLL_RUMOR 51 #define SV_SCROLL_ARTIFACT 52 #define SV_SCROLL_NOTHING 53 +#define SV_SCROLL_STERILIZATION 54 /* The "sval" codes for TV_POTION */ #define SV_POTION_WATER 0 |