diff options
Diffstat (limited to 'crawl-ref/source/spl-util.cc')
-rw-r--r-- | crawl-ref/source/spl-util.cc | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/crawl-ref/source/spl-util.cc b/crawl-ref/source/spl-util.cc index 9b01324ddc..15e355f103 100644 --- a/crawl-ref/source/spl-util.cc +++ b/crawl-ref/source/spl-util.cc @@ -37,6 +37,7 @@ REVISION("$Rev$"); #include "spl-util.h" #include "terrain.h" #include "view.h" +#include "religion.h" #ifdef DOS @@ -387,6 +388,15 @@ bool spell_sanctuary_castable(spell_type spell) // for Xom acting (more power = more likely to grab his attention) {dlb} int spell_mana(spell_type which_spell) { + if(spell_typematch(which_spell, SPTYP_CONJURATION | SPTYP_SUMMONING) + && you.religion == GOD_VEHUMET + && !player_under_penance() + && you.piety >= piety_breakpoint(3) + && _seekspell(which_spell)->level >= 5) + { + return _seekspell(which_spell)->level -1; + } + return (_seekspell(which_spell)->level); } @@ -986,12 +996,25 @@ static int _sandblast_range(int pow, bool real_cast) } -int spell_range(spell_type spell, int pow, bool real_cast) +int spell_range(spell_type spell, int pow, bool real_cast, bool player_spell) { - const int minrange = _seekspell(spell)->min_range; - const int maxrange = _seekspell(spell)->max_range; + int minrange = _seekspell(spell)->min_range; + int maxrange = _seekspell(spell)->max_range; ASSERT(maxrange >= minrange); + if(player_spell + && spell_typematch(spell, SPTYP_CONJURATION) + && you.religion == GOD_VEHUMET + && !player_under_penance() + && you.piety >= piety_breakpoint(2)) + { + if(maxrange < LOS_RADIUS) + maxrange++; + + if(minrange < LOS_RADIUS) + minrange++; + } + // Some cases need to be handled specially. if (spell == SPELL_SANDBLAST) return _sandblast_range(pow, real_cast); |