summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-cast.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/spl-cast.cc')
-rw-r--r--crawl-ref/source/spl-cast.cc8
1 files changed, 6 insertions, 2 deletions
diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc
index 0ebd18eeed..dbd3d381cc 100644
--- a/crawl-ref/source/spl-cast.cc
+++ b/crawl-ref/source/spl-cast.cc
@@ -497,8 +497,12 @@ 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)
+ power = std::min(power, cap);
+
return (power);
-} // end calc_spell_power()
+}
int spell_enhancement( unsigned int typeflags )
@@ -1444,7 +1448,7 @@ spret_type your_spells(spell_type spell, int powc, bool allow_fail)
break;
case SPELL_TWIST:
- cast_twist(powc);
+ cast_twist(powc, beam.target);
break;
case SPELL_AIRSTRIKE: