summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-cast.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/spl-cast.cc')
-rw-r--r--crawl-ref/source/spl-cast.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index 36cc192fd3..2aeb7ab2c0 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -198,6 +198,7 @@ static bool _spell_no_hostile_in_range(spell_type spell, int minRange)
if (minRange < 0)
return (false);
+ bool bonus = 0;
switch (spell)
{
case SPELL_APPORTATION:
@@ -205,6 +206,13 @@ static bool _spell_no_hostile_in_range(spell_type spell, int minRange)
case SPELL_CONJURE_FLAME:
// These don't target monsters.
return (false);
+ case SPELL_MEPHITIC_CLOUD:
+ case SPELL_FIREBALL:
+ case SPELL_FREEZING_CLOUD:
+ case SPELL_POISONOUS_CLOUD:
+ // Increase range by one due to cloud radius.
+ bonus = 1;
+ break;
default:
break;
}
@@ -217,7 +225,7 @@ static bool _spell_no_hostile_in_range(spell_type spell, int minRange)
if (range < 0)
return (false);
- if (range < minRange)
+ if (range + bonus < minRange)
return (true);
return (false);