From aaaf25173613a29674b9e86c0cd871c888749639 Mon Sep 17 00:00:00 2001 From: dolorous Date: Wed, 6 May 2009 17:47:45 +0000 Subject: Make Trog's Hand grant both regeneration and magic resistance. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9741 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/spells1.cc | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/spells1.cc') diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc index 292a0a5b10..f6ff7ca7c3 100644 --- a/crawl-ref/source/spells1.cc +++ b/crawl-ref/source/spells1.cc @@ -1301,10 +1301,27 @@ void deflection(int pow) "You feel very safe from missiles."); } -void cast_regen(int pow) +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 magic.", MSGCH_DURATION); + you.attribute[ATTR_DIVINE_REGENERATION] = 0; + } +} + +void cast_regen(int pow, bool divine_ability) { _increase_duration(DUR_REGENERATION, 5 + roll_dice(2, pow / 3 + 1), 100, "Your skin crawls."); + + if (divine_ability) + { + mpr("You feel resistant to magic."); + you.attribute[ATTR_DIVINE_REGENERATION] = 1; + } } void cast_berserk(void) -- cgit v1.2.3-54-g00ecf