summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/state.cc
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/state.cc')
-rw-r--r--crawl-ref/source/state.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/crawl-ref/source/state.cc b/crawl-ref/source/state.cc
index c13c2321e9..2c994cd094 100644
--- a/crawl-ref/source/state.cc
+++ b/crawl-ref/source/state.cc
@@ -86,6 +86,23 @@ void game_state::cancel_cmd_repeat(std::string reason)
if (!is_repeating_cmd())
return;
+ if (repeat_cmd == CMD_WIZARD)
+ {
+ // Don't interrupt wizard testing of religion.
+ if (is_god_acting())
+ return;
+
+ // Don't interrupt wizard testing just because we can't
+ // move.
+ if (you.cannot_act())
+ return;
+
+ // We've probably just recovered from being unable to act;
+ // again, don't interrupt.
+ if (you.turn_is_over)
+ return;
+ }
+
if (is_replaying_keys() || cmd_repeat_start)
flush_input_buffer(FLUSH_KEY_REPLAY_CANCEL);