diff options
author | pubby <pubby8@gmail.com> | 2013-11-10 16:54:11 +0000 |
---|---|---|
committer | Chris Campbell <chriscampbell89@gmail.com> | 2013-11-10 16:54:23 +0000 |
commit | 82cd9f861486d27ebc2b1097e127c7a20221393e (patch) | |
tree | dae0080e1ff9d6142975e8c5e2d5c029226b42be /crawl-ref/source/spl-selfench.cc | |
parent | 343fe796a6c99ae5962ea31b0c9afe6142ac922d (diff) | |
download | crawl-ref-82cd9f861486d27ebc2b1097e127c7a20221393e.tar.gz crawl-ref-82cd9f861486d27ebc2b1097e127c7a20221393e.zip |
Give Trog's Hand its own duration.
Trog's hand was using DUR_REGENERAITON, and setting
ATTR_DIVINE_REGENERATION to true to specify it was the god ability and
not the spell.
This was silly, so this commit gives trog's hand its own duration:
DUR_TROGS_HAND.
This also fixes a very minor bug: previously if you had trog's hand
active and you tried to cast regen, you got penance but the spell was
immediately canceled. Other duration spells were not canceled.
Diffstat (limited to 'crawl-ref/source/spl-selfench.cc')
-rw-r--r-- | crawl-ref/source/spl-selfench.cc | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/crawl-ref/source/spl-selfench.cc b/crawl-ref/source/spl-selfench.cc index a7f80579f0..905f520872 100644 --- a/crawl-ref/source/spl-selfench.cc +++ b/crawl-ref/source/spl-selfench.cc @@ -126,28 +126,12 @@ spret_type deflection(int pow, bool fail) return SPRET_SUCCESS; } -void remove_regen(bool divine_ability) -{ - mpr("Your skin stops crawling.", MSGCH_DURATION); - you.duration[DUR_REGENERATION] = 0; - if (divine_ability) - { - mpr("You feel less resistant to hostile enchantments.", MSGCH_DURATION); - you.attribute[ATTR_DIVINE_REGENERATION] = 0; - } -} - -spret_type cast_regen(int pow, bool divine_ability, bool fail) +spret_type cast_regen(int pow, bool fail) { fail_check(); you.increase_duration(DUR_REGENERATION, 5 + roll_dice(2, pow / 3 + 1), 100, "Your skin crawls."); - if (divine_ability) - { - mpr("You feel resistant to hostile enchantments."); - you.attribute[ATTR_DIVINE_REGENERATION] = 1; - } return SPRET_SUCCESS; } |