summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-util.cc
diff options
context:
space:
mode:
authorCharles Otto <ottochar@gmail.com>2009-09-27 20:53:33 -0400
committerevktalo <evktalo@users.sourceforge.net>2009-09-30 11:31:13 +0300
commite7514fb6833394a5bc0a4c428666fb16ff947d29 (patch)
treef4dc3ceac8d441168d18ebbeb5d38f724593ad8a /crawl-ref/source/spl-util.cc
parent5c67594c4d192cdd9c5490969d261da1e5244a75 (diff)
downloadcrawl-ref-e7514fb6833394a5bc0a4c428666fb16ff947d29.tar.gz
crawl-ref-e7514fb6833394a5bc0a4c428666fb16ff947d29.zip
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 <evktalo@users.sourceforge.net>
Diffstat (limited to 'crawl-ref/source/spl-util.cc')
-rw-r--r--crawl-ref/source/spl-util.cc29
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);