summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex MacDonald <alex@alexjmacdonald.com>2009-11-17 15:38:23 -0500
committerDavid Ploog <dploog@users.sourceforge.net>2009-11-18 00:21:21 +0100
commitb9a8bf470ada7bda89d43d38ca443196c0a0d39c (patch)
tree457bbb069eb9daa56e4ea6eeee3c4e40f3c39c78
parented68368fe1c0ab6d048934ec94509750ba2eafb6 (diff)
downloadcrawl-ref-b9a8bf470ada7bda89d43d38ca443196c0a0d39c.tar.gz
crawl-ref-b9a8bf470ada7bda89d43d38ca443196c0a0d39c.zip
Added wizard command to reveal all traps on level ('}').
Signed-off-by: David Ploog <dploog@users.sourceforge.net>
-rw-r--r--crawl-ref/source/command.cc3
-rw-r--r--crawl-ref/source/main.cc1
-rw-r--r--crawl-ref/source/wiz-dgn.cc6
-rw-r--r--crawl-ref/source/wiz-dgn.h1
4 files changed, 10 insertions, 1 deletions
diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc
index 26be6196f8..f8315cb23b 100644
--- a/crawl-ref/source/command.cc
+++ b/crawl-ref/source/command.cc
@@ -2352,7 +2352,7 @@ void list_commands(int hotkey, bool do_redraw_screen)
int list_wizard_commands(bool do_redraw_screen)
{
// 2 columns
- column_composer cols(2, 43);
+ column_composer cols(2, 44);
// Page size is number of lines - one line for --more-- prompt.
cols.set_pagesize(get_number_of_lines());
@@ -2420,6 +2420,7 @@ int list_wizard_commands(bool do_redraw_screen)
"<w>:</w> : find branches and overflow\n"
" temples in the dungeon\n"
"<w>{</w> : magic mapping\n"
+ "<w>}</w> : detect all traps on level\n"
"\n"
"<yellow>Debugging commands</yellow>\n"
"<w>f</w> : player combat damage stats\n"
diff --git a/crawl-ref/source/main.cc b/crawl-ref/source/main.cc
index bfe10cfc39..f4a745c6d5 100644
--- a/crawl-ref/source/main.cc
+++ b/crawl-ref/source/main.cc
@@ -530,6 +530,7 @@ static void _do_wizard_command(int wiz_command, bool silent_fail)
case ')': wizard_create_feature_name(); break;
case ':': wizard_list_branches(); break;
case '{': wizard_map_level(); break;
+ case '}': wizard_reveal_traps(); break;
case '@': wizard_set_stats(); break;
case '^': wizard_gain_piety(); break;
case '_': wizard_get_religion(); break;
diff --git a/crawl-ref/source/wiz-dgn.cc b/crawl-ref/source/wiz-dgn.cc
index 69f5e1ec2a..cbecfbdfd5 100644
--- a/crawl-ref/source/wiz-dgn.cc
+++ b/crawl-ref/source/wiz-dgn.cc
@@ -412,6 +412,12 @@ void wizard_list_branches()
}
}
+void wizard_reveal_traps()
+{
+ int traps_revealed = reveal_traps(1000);
+ mprf("Revealed %d traps.", traps_revealed);
+}
+
void wizard_map_level()
{
if (testbits(env.level_flags, LFLAG_NOT_MAPPABLE)
diff --git a/crawl-ref/source/wiz-dgn.h b/crawl-ref/source/wiz-dgn.h
index 63e52ed8ae..c8561dcb1f 100644
--- a/crawl-ref/source/wiz-dgn.h
+++ b/crawl-ref/source/wiz-dgn.h
@@ -13,6 +13,7 @@ void wizard_create_portal();
void wizard_create_feature_number();
void wizard_create_feature_name();
void wizard_list_branches();
+void wizard_reveal_traps();
void wizard_map_level();
void wizard_list_items();
void wizard_place_stairs( bool down );