summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2012-04-06 11:09:30 +0200
committerBardur Arantsson <bardur@scientician.net>2012-04-07 15:28:26 +0200
commit92e717a03262c95983d7a6bcaaa7da4923ce850f (patch)
tree8f01ea14d80d72759d1f8545f3ad3f58d0362605 /src
parent5a91c8e154a9b55fa6ccba342f26d8bd03af140d (diff)
Lua: Remove Lua use of HOOK_QUAFF.
Diffstat (limited to 'src')
-rw-r--r--src/cmd6.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/cmd6.c b/src/cmd6.c
index 63137a69..b70654a9 100644
--- a/src/cmd6.c
+++ b/src/cmd6.c
@@ -2335,6 +2335,17 @@ static bool_ quaff_potion(int tval, int sval, int pval, int pval2)
case SV_POTION_MUTATION:
{
+ /* In Theme, Melkor likes players who quaff
+ potions of corruption. */
+ if (game_module_idx == MODULE_THEME)
+ {
+ GOD(GOD_MELKOR)
+ {
+ msg_print("Your quaffing of this potion pleases Melkor!");
+ set_grace(p_ptr->grace + 2);
+ }
+ }
+
msg_print("You feel the dark corruptions of Morgoth coming over you!");
gain_random_corruption(0);
ident = TRUE;
@@ -2478,8 +2489,15 @@ void do_cmd_quaff_potion(void)
/* Object level */
lev = k_info[o_ptr->k_idx].level;
+ /* Demon Breath corruption can spoil potions. */
+ if (player_has_corruption(CORRUPT_DEMON_BREATH) && magik(9))
+ {
+ msg_print("Your demon breath spoils the potion!");
+ ident = FALSE;
+ }
+
/* Analyze the potion */
- if (process_hooks_ret(HOOK_QUAFF, "d", "(O)", o_ptr))
+ else if (process_hooks_ret(HOOK_QUAFF, "d", "(O)", o_ptr))
{
ident = process_hooks_return[0].num;
}