summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-util.cc
diff options
context:
space:
mode:
authorRobert Vollmert <vollmert@a12.mi.fu-berlin.de>2009-10-06 10:35:13 +0200
committerRobert Vollmert <vollmert@a12.mi.fu-berlin.de>2009-10-06 10:35:13 +0200
commitcd381a34e051feeec6d481d9fa360044582c8d6f (patch)
treef7ad5d241bfec5dd990778cac746bda8fe08d60b /crawl-ref/source/spl-util.cc
parent16f1079a86d8c94db9c4d6c466271e07eb6c68c1 (diff)
downloadcrawl-ref-cd381a34e051feeec6d481d9fa360044582c8d6f.tar.gz
crawl-ref-cd381a34e051feeec6d481d9fa360044582c8d6f.zip
Don't let Vehumet increase range for spells with no range (-1).
Should fix BR 2873158, 2872867.
Diffstat (limited to 'crawl-ref/source/spl-util.cc')
-rw-r--r--crawl-ref/source/spl-util.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/crawl-ref/source/spl-util.cc b/crawl-ref/source/spl-util.cc
index e250f55931..e7a5503e0e 100644
--- a/crawl-ref/source/spl-util.cc
+++ b/crawl-ref/source/spl-util.cc
@@ -990,6 +990,10 @@ int spell_range(spell_type spell, int pow, bool real_cast, bool player_spell)
int maxrange = _seekspell(spell)->max_range;
ASSERT(maxrange >= minrange);
+ // spells with no range have maxrange == minrange == -1
+ if (maxrange < 0)
+ return maxrange;
+
// Sandblast is a special case.
if (spell == SPELL_SANDBLAST && wielding_rocks())
{