summaryrefslogtreecommitdiff
path: root/src/cmd6.c
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2012-04-06 10:52:15 +0200
committerBardur Arantsson <bardur@scientician.net>2012-04-07 15:28:26 +0200
commit05fedc33f23a2459c4149f2a0970f01ae2602a62 (patch)
tree2b1912084bfbf6dde0a7c929b0aa69c29bbcb333 /src/cmd6.c
parent0b42d7ebfc1abd8b8620109bb996e2cee18e9f79 (diff)
Lua: Move uses of HOOK_READ to C
Diffstat (limited to 'src/cmd6.c')
-rw-r--r--src/cmd6.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/src/cmd6.c b/src/cmd6.c
index 987315af..869ad707 100644
--- a/src/cmd6.c
+++ b/src/cmd6.c
@@ -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;