From e7514fb6833394a5bc0a4c428666fb16ff947d29 Mon Sep 17 00:00:00 2001 From: Charles Otto Date: Sun, 27 Sep 2009 20:53:33 -0400 Subject: Vehumet modifications. Remove the warding effect, replace it with extended range for conjurations spells. Starting at **** piety reduce the cost of high level (>=5) conjurations and summonings spells by 1. (Additional wording tweaks by Eino) Signed-off-by: evktalo --- crawl-ref/source/spl-util.cc | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/spl-util.cc') 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); -- cgit v1.2.3-54-g00ecf