From 695043d0e495b29b0a7aa9e24acd93bdbf2e3e9f Mon Sep 17 00:00:00 2001 From: zelgadis Date: Mon, 2 Jun 2008 01:10:42 +0000 Subject: Add new wizard targeting command 'm', to move monsters around (or to move the player like wizard blink if there's no monster at the chosen square). Two monsters can be made to swap positions, and unseen monsters/squares can be targeted. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@5423 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/directn.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'crawl-ref/source/directn.cc') diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc index 30cad152a3..1cb11e4303 100644 --- a/crawl-ref/source/directn.cc +++ b/crawl-ref/source/directn.cc @@ -900,6 +900,16 @@ void direction(dist& moves, targeting_type restricts, wizard_give_monster_item(&menv[mid]); break; + + case CMD_TARGET_WIZARD_MOVE: + if (!you.wizard || !in_bounds(moves.tx, moves.ty)) + break; + wizard_move_player_or_monster(moves.tx, moves.ty); + + loop_done = true; + skip_iter = true; + + break; #endif case CMD_TARGET_DESCRIBE: @@ -2464,6 +2474,7 @@ command_type targeting_behaviour::get_command(int key) case 'P': return CMD_TARGET_WIZARD_BLESS_MONSTER; case 's': return CMD_TARGET_WIZARD_MAKE_SHOUT; case 'g': return CMD_TARGET_WIZARD_GIVE_ITEM; + case 'm': return CMD_TARGET_WIZARD_MOVE; #endif case 'v': return CMD_TARGET_DESCRIBE; case '?': return CMD_TARGET_HELP; -- cgit v1.2.3-54-g00ecf