diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-10-18 16:46:48 +0200 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-10-18 16:46:48 +0200 |
commit | 8420352d20a25c155bc1f00c022f72aee2eadf44 (patch) | |
tree | 227fbc80e49a8875138b42783c7ace8ac6c819f6 /crawl-ref/source/spl-cast.cc | |
parent | 8ed81a833a536bdfa1876c73f655221da2c216fb (diff) | |
download | crawl-ref-8420352d20a25c155bc1f00c022f72aee2eadf44.tar.gz crawl-ref-8420352d20a25c155bc1f00c022f72aee2eadf44.zip |
Don't cap spell power for failure rate calculations.
This means that capped spells continue getting easier to cast
after hitting the cap, which is probably how it should be.
Fixes 2881204.
Diffstat (limited to 'crawl-ref/source/spl-cast.cc')
-rw-r--r-- | crawl-ref/source/spl-cast.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc index 521e84acdd..29e6e1fdc9 100644 --- a/crawl-ref/source/spl-cast.cc +++ b/crawl-ref/source/spl-cast.cc @@ -370,7 +370,8 @@ int spell_fail(spell_type spell) int chance = 60; int chance2 = 0, armour = 0; - chance -= 6 * calc_spell_power( spell, false, true ); + // Don't cap power for failure rate purposes. + chance -= 6 * calc_spell_power(spell, false, true, false); chance -= (you.intel * 2); //chance -= (you.intel - 10) * abs(you.intel - 10); @@ -514,7 +515,8 @@ int spell_fail(spell_type spell) } // end spell_fail() -int calc_spell_power(spell_type spell, bool apply_intel, bool fail_rate_check) +int calc_spell_power(spell_type spell, bool apply_intel, bool fail_rate_check, + bool cap_power) { // When checking failure rates, wizardry is handled after the various // stepping calulations. @@ -563,7 +565,7 @@ int calc_spell_power(spell_type spell, bool apply_intel, bool fail_rate_check) power = stepdown_value( power, 50, 50, 150, 200 ); const int cap = spell_power_cap(spell); - if (cap > 0) + if (cap > 0 && cap_power) power = std::min(power, cap); return (power); |