summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-21 02:24:18 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-21 02:24:18 +0000
commit1640dccce5b2bab627f03607f80bfc7cd4b57327 (patch)
treed6abf1e099dece72c7773c2e6d4518b21702e09e
parentad9315b8129e6123211e41b94bf9a501a067a20a (diff)
downloadcrawl-ref-1640dccce5b2bab627f03607f80bfc7cd4b57327.tar.gz
crawl-ref-1640dccce5b2bab627f03607f80bfc7cd4b57327.zip
Oops, my "dismiss monsters by regex" change didn't take into account that
the "debug atuoexplore" debug command uses the dismiss-monsters command. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2169 c06c8d41-db1a-0410-9941-cceddc491573
-rw-r--r--crawl-ref/source/debug.cc21
-rw-r--r--crawl-ref/source/debug.h2
2 files changed, 13 insertions, 10 deletions
diff --git a/crawl-ref/source/debug.cc b/crawl-ref/source/debug.cc
index fc85928ab8..c06a9533c8 100644
--- a/crawl-ref/source/debug.cc
+++ b/crawl-ref/source/debug.cc
@@ -2668,20 +2668,23 @@ void debug_place_map()
debug_load_map_by_name(what);
}
-void debug_dismiss_all_monsters()
+void debug_dismiss_all_monsters(bool force_all)
{
char buf[80];
- mpr("Regex of monsters to dismiss (ENTER for all): ", MSGCH_PROMPT);
- bool validline = !cancelable_get_line(buf, sizeof buf, 80);
-
- if (!validline)
+ if (!force_all)
{
- canned_msg( MSG_OK );
- return;
+ mpr("Regex of monsters to dismiss (ENTER for all): ", MSGCH_PROMPT);
+ bool validline = !cancelable_get_line(buf, sizeof buf, 80);
+
+ if (!validline)
+ {
+ canned_msg( MSG_OK );
+ return;
+ }
}
// Dismiss all
- if (buf[0] == '\0')
+ if (buf[0] == '\0' || force_all)
{
// Genocide... "unsummon" all the monsters from the level.
for (int mon = 0; mon < MAX_MONSTERS; mon++)
@@ -2753,7 +2756,7 @@ static void debug_destroy_doors()
// f) Counts number of turns needed to explore the level.
void debug_test_explore()
{
- debug_dismiss_all_monsters();
+ debug_dismiss_all_monsters(true);
debug_kill_traps();
forget_map(100);
diff --git a/crawl-ref/source/debug.h b/crawl-ref/source/debug.h
index 5e8b80ee76..03e9c0353e 100644
--- a/crawl-ref/source/debug.h
+++ b/crawl-ref/source/debug.h
@@ -156,7 +156,7 @@ void debug_card();
void debug_set_xl();
void debug_place_map();
void debug_test_explore();
-void debug_dismiss_all_monsters();
+void debug_dismiss_all_monsters(bool force_all = false);
class monsters;
void debug_make_monster_shout(monsters* mon);