diff options
Diffstat (limited to 'crawl-ref/source/spl-util.cc')
-rw-r--r-- | crawl-ref/source/spl-util.cc | 25 |
1 files changed, 8 insertions, 17 deletions
diff --git a/crawl-ref/source/spl-util.cc b/crawl-ref/source/spl-util.cc index 0cb60d16af..05c623631c 100644 --- a/crawl-ref/source/spl-util.cc +++ b/crawl-ref/source/spl-util.cc @@ -984,25 +984,20 @@ int spell_power_cap(spell_type spell) return (_seekspell(spell)->power_cap); } -// Sandblast range is 1 if not wielding rocks, 2 if you are. -static int _sandblast_range(int pow, bool real_cast) -{ - int res = 1; - - if (wielding_rocks()) - res = 2; - - return (res); -} - - int spell_range(spell_type spell, int pow, bool real_cast, bool player_spell) { int minrange = _seekspell(spell)->min_range; int maxrange = _seekspell(spell)->max_range; ASSERT(maxrange >= minrange); - if(player_spell + // Sandblast is a special case. + if ((spell == SPELL_SANDBLAST) && wielding_rocks()) + { + minrange++; + maxrange++; + } + + if(player_spell && vehumet_supports_spell(spell) && you.religion == GOD_VEHUMET && !player_under_penance() @@ -1015,10 +1010,6 @@ int spell_range(spell_type spell, int pow, bool real_cast, bool player_spell) minrange++; } - // Some cases need to be handled specially. - if (spell == SPELL_SANDBLAST) - return _sandblast_range(pow, real_cast); - if (minrange == maxrange) return minrange; |