summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/direct.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2006-12-06 12:44:53 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2006-12-06 12:44:53 +0000
commit81bf3bb8e013301d4d0b2d4b00f069b82b8db536 (patch)
treecfa9c6500f14cb337f8167414c6cb7b5ba20a18a /crawl-ref/source/direct.cc
parent0de70514a24300e94737d9882576cfe8f04abc63 (diff)
downloadcrawl-ref-81bf3bb8e013301d4d0b2d4b00f069b82b8db536.tar.gz
crawl-ref-81bf3bb8e013301d4d0b2d4b00f069b82b8db536.zip
'C' creates monsters on a targeted square in wizmode. 'D' kill-resets targeted
monsters. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@582 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/direct.cc')
-rw-r--r--crawl-ref/source/direct.cc34
1 files changed, 34 insertions, 0 deletions
diff --git a/crawl-ref/source/direct.cc b/crawl-ref/source/direct.cc
index 247632b56a..43422bc458 100644
--- a/crawl-ref/source/direct.cc
+++ b/crawl-ref/source/direct.cc
@@ -486,6 +486,36 @@ void look_around(struct dist &moves, bool justLooking, int first_move, int mode)
switch (keyin)
{
#ifdef WIZARD
+ case 'C':
+ targChosen = true;
+ mx = you.x_pos + cx - VIEW_CX;
+ my = you.y_pos + cy - VIEW_CY;
+ if (!in_bounds(mx, my))
+ break;
+ if (mgrd[mx][my] != NON_MONSTER)
+ {
+ mprf("%s won't like that.",
+ ptr_monam(&menv[mgrd[mx][my]], DESC_CAP_A));
+ break;
+ }
+ create_spec_monster_name(mx, my);
+ viewwindow(true, false);
+ break;
+
+ case 'D':
+ targChosen = true;
+ mx = you.x_pos + cx - VIEW_CX;
+ my = you.y_pos + cy - VIEW_CY;
+ if (!in_bounds(mx, my))
+ break;
+ mid = mgrd[mx][my];
+
+ if (mid == NON_MONSTER)
+ break;
+ monster_die(&menv[mid], KILL_RESET, 0);
+ viewwindow(true, false);
+ break;
+
case 'F':
targChosen = true;
mx = you.x_pos + cx - VIEW_CX;
@@ -1558,5 +1588,9 @@ static void describe_cell(int mx, int my)
}
std::string feature_desc = feature_description(mx, my);
+#ifdef DEBUG_DIAGNOSTICS
+ mprf("(%d,%d): %s", mx, my, feature_desc.c_str());
+#else
mpr(feature_desc.c_str());
+#endif
}