From a30caf80fca726f4d80348f3e785f36c6b78cc7b Mon Sep 17 00:00:00 2001 From: dshaligram Date: Sun, 12 Nov 2006 07:01:33 +0000 Subject: Readjusted wizardry effects. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/branches/stone_soup@380 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/spl-cast.cc | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc index ed4b701003..cc46f82a10 100644 --- a/crawl-ref/source/spl-cast.cc +++ b/crawl-ref/source/spl-cast.cc @@ -247,7 +247,7 @@ static int apply_vehumet_wizardry_boost(int spell, int chance) { int wizardry = player_mag_abil(false); int fail_reduce = 100; - int wiz_factor = 90; + int wiz_factor = 86; if (you.religion == GOD_VEHUMET && you.duration[DUR_PRAYER] @@ -256,8 +256,8 @@ static int apply_vehumet_wizardry_boost(int spell, int chance) || spell_typematch(spell, SPTYP_SUMMONING))) { // [dshaligram] Fail rate multiplier used to be .5, scaled - // back to 2/3. It's still a huge boost. - fail_reduce = fail_reduce * 2 / 3; + // back to 60%. + fail_reduce = fail_reduce * 60 / 100; } // [dshaligram] Apply wizardry factor here, rather than mixed into the @@ -265,13 +265,12 @@ static int apply_vehumet_wizardry_boost(int spell, int chance) while (wizardry-- > 0) { fail_reduce = fail_reduce * wiz_factor / 100; - wiz_factor += (100 - wiz_factor) / 3; + wiz_factor += (100 - wiz_factor) / 5; } - // Hard cap on fail rate reduction. This is still less than the insane - // boost that Vehumet alone provided in 4.0. - if (fail_reduce < 58) - fail_reduce = 58; + // Hard cap on fail rate reduction. + if (fail_reduce < 40) + fail_reduce = 40; return (chance * fail_reduce / 100); } @@ -447,9 +446,6 @@ int spell_fail(int spell) if (chance < -180) chance2 = 0; - // Apply the effects of Vehumet prayer and items of wizardry. - chance2 = apply_vehumet_wizardry_boost(spell, chance2); - if (you.duration[DUR_TRANSFORMATION] > 0) { switch (you.attribute[ATTR_TRANSFORMATION]) @@ -462,8 +458,14 @@ int spell_fail(int spell) chance2 += 10; break; } + + if (chance2 > 100) + chance2 = 100; } + // Apply the effects of Vehumet prayer and items of wizardry. + chance2 = apply_vehumet_wizardry_boost(spell, chance2); + return (chance2); } // end spell_fail() -- cgit v1.2.3-54-g00ecf