From 5deb29bf245d7ff57751f4ea2a2159439a516e42 Mon Sep 17 00:00:00 2001 From: j-p-e-g Date: Mon, 18 May 2009 13:26:18 +0000 Subject: * Fix Bat Form restrictions not applying to choice by clicking (Tiles). * Allow as synonyms for left/right hand in swap_rings(). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9791 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/spl-cast.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/spl-cast.cc') 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); -- cgit v1.2.3-54-g00ecf