summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spells1.cc
diff options
context:
space:
mode:
authorCharles Otto <ottochar@gmail.com>2009-11-15 00:28:33 -0500
committerCharles Otto <ottochar@gmail.com>2009-11-15 23:46:24 -0500
commit4dc2c63095a1ce190ee3ec8dc39b2b669dab174e (patch)
tree4deaf477bb5a1cad35fb600d468522f4db8abde0 /crawl-ref/source/spells1.cc
parent2cc88f46f53a765e1cfaf7214a08540421f7f694 (diff)
downloadcrawl-ref-4dc2c63095a1ce190ee3ec8dc39b2b669dab174e.tar.gz
crawl-ref-4dc2c63095a1ce190ee3ec8dc39b2b669dab174e.zip
Make _increase_durations set values proportional to delay
_increase_durations is used by ozocubus armour, stonemail, rmissile dmissile, regen, swiftness, fly, insluation, rpoison, control teleport, ring of flames, confusing touch, and sure blade. I modified it to add numbers proportional to normal movement delay instead of using the number of turns an enchantment should last directly.
Diffstat (limited to 'crawl-ref/source/spells1.cc')
-rw-r--r--crawl-ref/source/spells1.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/crawl-ref/source/spells1.cc b/crawl-ref/source/spells1.cc
index f6e386bffc..61303fae0c 100644
--- a/crawl-ref/source/spells1.cc
+++ b/crawl-ref/source/spells1.cc
@@ -1334,7 +1334,9 @@ static void _increase_duration(duration_type dur, int amount, int cap,
{
if (msg)
mpr(msg);
- you.duration[dur] += amount;
+ cap *= BASELINE_DELAY;
+
+ you.duration[dur] += amount * BASELINE_DELAY;
if (you.duration[dur] > cap)
you.duration[dur] = cap;
}