diff options
Diffstat (limited to 'crawl-ref')
-rw-r--r-- | crawl-ref/source/mstuff2.cc | 2 | ||||
-rw-r--r-- | crawl-ref/source/output.cc | 4 | ||||
-rw-r--r-- | crawl-ref/source/player.cc | 8 | ||||
-rw-r--r-- | crawl-ref/source/religion.cc | 8 | ||||
-rw-r--r-- | crawl-ref/source/spl-util.cc | 29 | ||||
-rw-r--r-- | crawl-ref/source/spl-util.h | 3 |
6 files changed, 34 insertions, 20 deletions
diff --git a/crawl-ref/source/mstuff2.cc b/crawl-ref/source/mstuff2.cc index 7e8d0f8a43..f92757b2ab 100644 --- a/crawl-ref/source/mstuff2.cc +++ b/crawl-ref/source/mstuff2.cc @@ -1765,7 +1765,7 @@ bolt mons_spells( monsters *mons, spell_type spell_cast, int power ) // Sandblast is different, and gets range updated later if (spell_cast != SPELL_SANDBLAST) - beam.range = spell_range(spell_cast, power, true); + beam.range = spell_range(spell_cast, power, true, false); const int drac_type = (mons_genus(mons->type) == MONS_DRACONIAN) ? draco_subspecies(mons) : mons->type; diff --git a/crawl-ref/source/output.cc b/crawl-ref/source/output.cc index d2215e893b..da8a9fc8da 100644 --- a/crawl-ref/source/output.cc +++ b/crawl-ref/source/output.cc @@ -2155,9 +2155,7 @@ static std::vector<formatted_string> _get_overview_resistances( const int rinvi = player_see_invis(calc_unid); - const int rward = (wearing_amulet(AMU_WARDING, calc_unid) - || you.religion == GOD_VEHUMET && !player_under_penance() - && you.piety >= piety_breakpoint(2)); + const int rward = wearing_amulet(AMU_WARDING, calc_unid); const int rcons = player_item_conserve(calc_unid); const int rcorr = player_res_acid(calc_unid); const int rclar = player_mental_clarity(calc_unid); diff --git a/crawl-ref/source/player.cc b/crawl-ref/source/player.cc index 8664b450b9..fe56dcf41a 100644 --- a/crawl-ref/source/player.cc +++ b/crawl-ref/source/player.cc @@ -6823,14 +6823,6 @@ int player::warding() const if (wearing_amulet(AMU_WARDING)) return (30); - if (religion == GOD_VEHUMET && !player_under_penance() - && piety >= piety_breakpoint(2)) - { - // Clamp piety at 160 and scale that down to a max of 30. - const int wardpiety = piety > 160 ? 160 : piety; - return (wardpiety * 3 / 16); - } - return (0); } diff --git a/crawl-ref/source/religion.cc b/crawl-ref/source/religion.cc index b4b1b38796..cc0337ce58 100644 --- a/crawl-ref/source/religion.cc +++ b/crawl-ref/source/religion.cc @@ -234,8 +234,8 @@ const char* god_gain_power_messages[NUM_GODS][MAX_GOD_ABILITIES] = // Vehumet { "gain magical power from killing", "Vehumet is aiding your destructive magics.", - "Vehumet is shielding you from summoned creatures.", - "", + "Vehumet is extending the range of your conjurations.", + "Vehumet is reducing the cost of your destructive magics.", "" }, // Okawaru { "give your body great, but temporary strength", @@ -334,8 +334,8 @@ const char* god_lose_power_messages[NUM_GODS][MAX_GOD_ABILITIES] = // Vehumet { "gain magical power from killing", "Vehumet will no longer aid your destructive magics.", - "Vehumet will no longer shield you from summoned creatures.", - "", + "Vehumet will no extend the range of your conjurations.", + "Vehumet will no longer reduce the cost of your destructive magics.", "" }, // Okawaru { "give your body great, but temporary strength", 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); diff --git a/crawl-ref/source/spl-util.h b/crawl-ref/source/spl-util.h index fb53816af8..38d022f946 100644 --- a/crawl-ref/source/spl-util.h +++ b/crawl-ref/source/spl-util.h @@ -54,7 +54,8 @@ int spell_hunger(spell_type which_spell); int spell_mana(spell_type which_spell); int spell_difficulty(spell_type which_spell); int spell_power_cap(spell_type spell); -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=true); int spell_noise(spell_type spell); int spell_noise(unsigned int disciplines, int level); |