summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--crawl-ref/source/spl-cast.cc8
-rw-r--r--crawl-ref/source/spl-cast.h2
2 files changed, 6 insertions, 4 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);
diff --git a/crawl-ref/source/spl-cast.h b/crawl-ref/source/spl-cast.h
index 7595117df3..630334f9b3 100644
--- a/crawl-ref/source/spl-cast.h
+++ b/crawl-ref/source/spl-cast.h
@@ -48,7 +48,7 @@ int list_spells(bool toggle_with_I = true, bool viewing = false,
int minRange = -1);
int spell_fail( spell_type spell );
int calc_spell_power(spell_type spell, bool apply_intel,
- bool fail_rate_chk = false);
+ bool fail_rate_chk = false, bool cap_power = true);
int spell_enhancement( unsigned int typeflags );
// last updaetd 12may2000 {dlb}