diff options
-rw-r--r-- | crawl-ref/source/religion.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/spl-util.cc | 25 |
2 files changed, 11 insertions, 18 deletions
diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index a12cc8d63d..22b55c1f0a 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -4287,7 +4287,9 @@ bool vehumet_supports_spell(spell_type spell) { if (spell_typematch(spell, SPTYP_CONJURATION | SPTYP_SUMMONING)) return (true); - if (spell == SPELL_SHATTER || spell == SPELL_FRAGMENTATION) + if (spell == SPELL_SHATTER + || spell == SPELL_FRAGMENTATION + || spell == SPELL_SANDBLAST) return (true); return (false); 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; |