summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells1.cc
diff options
context:
space:
mode:
authordolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-05-06 17:47:45 +0000
committerdolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573>2009-05-06 17:47:45 +0000
commitaaaf25173613a29674b9e86c0cd871c888749639 (patch)
treeee6abd8754aed992a1b0f7e2b3894ab4673d984e /crawl-ref/source/spells1.cc
parentdc09560ed3f01a349766baf0a2cfc016041f9a6b (diff)
downloadcrawl-ref-aaaf25173613a29674b9e86c0cd871c888749639.tar.gz
crawl-ref-aaaf25173613a29674b9e86c0cd871c888749639.zip
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
Diffstat (limited to 'crawl-ref/source/spells1.cc')
-rw-r--r--crawl-ref/source/spells1.cc19
1 files changed, 18 insertions, 1 deletions
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)