summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/spl-cast.cc
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-18 01:29:33 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2009-01-18 01:29:33 +0000
commite558b0503312ea313b9a0303b74cce435500f119 (patch)
tree6a28390f9b93a307fbc9c90518ce6458533e41f1 /crawl-ref/source/spl-cast.cc
parentdfb4f758b542dac6147dc5284e51b3875469e36e (diff)
downloadcrawl-ref-e558b0503312ea313b9a0303b74cce435500f119.tar.gz
crawl-ref-e558b0503312ea313b9a0303b74cce435500f119.zip
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
Diffstat (limited to 'crawl-ref/source/spl-cast.cc')
-rw-r--r--crawl-ref/source/spl-cast.cc18
1 files changed, 13 insertions, 5 deletions
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;