From e558b0503312ea313b9a0303b74cce435500f119 Mon Sep 17 00:00:00 2001 From: zelgadis Date: Sun, 18 Jan 2009 01:29:33 +0000 Subject: Tweaks to make it less likely that command repitition will be cancled when it's being used to wizard test Xom acts. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8525 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/spl-cast.cc | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'crawl-ref/source/spl-cast.cc') diff --git a/crawl-ref/source/spl-cast.cc b/crawl-ref/source/spl-cast.cc index 13ceb292d1..528cdf3507 100644 --- a/crawl-ref/source/spl-cast.cc +++ b/crawl-ref/source/spl-cast.cc @@ -1097,6 +1097,9 @@ spret_type your_spells(spell_type spell, int powc, bool allow_fail) (crawl_state.is_god_acting()) ? crawl_state.which_god_acting() : GOD_NO_GOD; + const bool normal_cast = crawl_state.prev_cmd == CMD_CAST_SPELL + && god == GOD_NO_GOD; + // Make some noise if it's actually the player casting. if (god == GOD_NO_GOD) noisy( spell_noise(spell), you.pos() ); @@ -1403,7 +1406,8 @@ spret_type your_spells(spell_type spell, int powc, bool allow_fail) break; case SPELL_DELAYED_FIREBALL: - crawl_state.cant_cmd_repeat("You can't repeat delayed fireball."); + if (normal_cast) + crawl_state.cant_cmd_repeat("You can't repeat delayed fireball."); // This spell has two main advantages over Fireball: // // (1) The release is instantaneous, so monsters will not @@ -1559,7 +1563,8 @@ spret_type your_spells(spell_type spell, int powc, bool allow_fail) case SPELL_TUKIMAS_DANCE: // Temporarily turn a wielded weapon into a dancing weapon. - crawl_state.cant_cmd_repeat("You can't repeat Tukima's Dance."); + if (normal_cast) + crawl_state.cant_cmd_repeat("You can't repeat Tukima's Dance."); cast_tukimas_dance(powc, god); break; @@ -1877,7 +1882,8 @@ spret_type your_spells(spell_type spell, int powc, bool allow_fail) // Trying is already enough, even if it fails. did_god_conduct(DID_DELIBERATE_MUTATING, 10); - crawl_state.cant_cmd_repeat("You can't repeat Alter Self."); + if (normal_cast) + crawl_state.cant_cmd_repeat("You can't repeat Alter Self."); if (!enough_hp( you.hp_max / 2, true )) { mpr( "Your body is in too poor a condition " @@ -2091,7 +2097,8 @@ spret_type your_spells(spell_type spell, int powc, bool allow_fail) break; case SPELL_SWAP: - crawl_state.cant_cmd_repeat("You can't swap."); + if (normal_cast) + crawl_state.cant_cmd_repeat("You can't swap."); cast_swap(powc); break; @@ -2100,7 +2107,8 @@ spret_type your_spells(spell_type spell, int powc, bool allow_fail) break; case SPELL_PORTAL: - crawl_state.cant_cmd_repeat("You can't repeat create portal."); + if (normal_cast) + crawl_state.cant_cmd_repeat("You can't repeat create portal."); if (portal() == -1) return (SPRET_ABORT); break; -- cgit v1.2.3-54-g00ecf