From 81bf3bb8e013301d4d0b2d4b00f069b82b8db536 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Wed, 6 Dec 2006 12:44:53 +0000 Subject: '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 --- crawl-ref/source/direct.cc | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'crawl-ref/source/direct.cc') 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 } -- cgit v1.2.3-54-g00ecf