diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-02 01:10:42 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2008-06-02 01:10:42 +0000 |
commit | 695043d0e495b29b0a7aa9e24acd93bdbf2e3e9f (patch) | |
tree | 2cb5e0ac7a399a90d678fad13f03a7f4262cd81d /crawl-ref/source/directn.cc | |
parent | f861f518dc8853c8a6e28a9a8902b8cf3b85e2f3 (diff) | |
download | crawl-ref-695043d0e495b29b0a7aa9e24acd93bdbf2e3e9f.tar.gz crawl-ref-695043d0e495b29b0a7aa9e24acd93bdbf2e3e9f.zip |
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
Diffstat (limited to 'crawl-ref/source/directn.cc')
-rw-r--r-- | crawl-ref/source/directn.cc | 11 |
1 files changed, 11 insertions, 0 deletions
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; |