summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/potion.cc
diff options
context:
space:
mode:
authorreaverb <reaverb.Crawl@gmail.com>2014-05-07 13:08:50 -0400
committerreaverb <reaverb.Crawl@gmail.com>2014-05-08 00:26:47 -0400
commiteddedc8ab317ef6b523e36a79bd349f597861a4a (patch)
treecb959e81f7e8af6586da4d155da939405a68743d /crawl-ref/source/potion.cc
parente99bd4c15d5e8736596669c4b5f3528461b6260c (diff)
downloadcrawl-ref-eddedc8ab317ef6b523e36a79bd349f597861a4a.tar.gz
crawl-ref-eddedc8ab317ef6b523e36a79bd349f597861a4a.zip
Make MUT_NO_DEVICE_HEAL a normal bad mutation with 2 levels
Diffstat (limited to 'crawl-ref/source/potion.cc')
-rw-r--r--crawl-ref/source/potion.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/crawl-ref/source/potion.cc b/crawl-ref/source/potion.cc
index 224762e16d..dba77506b4 100644
--- a/crawl-ref/source/potion.cc
+++ b/crawl-ref/source/potion.cc
@@ -77,7 +77,7 @@ bool potion_effect(potion_type pot_eff, int pow, item_def *potion, bool was_know
break;
}
- if (you.mutation[MUT_NO_DEVICE_HEAL]
+ if (!you.can_device_heal()
&& potion && was_known
&& you.duration[DUR_CONF] == 0
&& you.duration[DUR_POISONING] == 0
@@ -88,7 +88,10 @@ bool potion_effect(potion_type pot_eff, int pow, item_def *potion, bool was_know
return false;
}
- if (!you.mutation[MUT_NO_DEVICE_HEAL])
+ if (you.mutation[MUT_NO_DEVICE_HEAL])
+ factor = 2;
+
+ if (you.can_device_heal())
inc_hp((5 + random2(7)) / factor);
mpr("You feel better.");
@@ -118,7 +121,7 @@ bool potion_effect(potion_type pot_eff, int pow, item_def *potion, bool was_know
break;
}
- if (you.mutation[MUT_NO_DEVICE_HEAL])
+ if (!you.can_device_heal())
{
if (potion && was_known)
{
@@ -129,6 +132,9 @@ bool potion_effect(potion_type pot_eff, int pow, item_def *potion, bool was_know
break;
}
+ if (you.mutation[MUT_NO_DEVICE_HEAL])
+ factor = 2;
+
inc_hp((10 + random2avg(28, 3)) / factor);
mpr("You feel much better.");