diff options
author | Adam Borowski <kilobyte@angband.pl> | 2009-12-17 23:57:37 +0100 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2009-12-18 00:42:50 +0100 |
commit | d96a6c804f2602b5792428e0f932641ae536f281 (patch) | |
tree | e5db72c44f58d561528847e97cc35f2f2d49e4f8 | |
parent | 3a67b94669b555959bbc6f7e074a4d6dc537ce7b (diff) | |
download | crawl-ref-d96a6c804f2602b5792428e0f932641ae536f281.tar.gz crawl-ref-d96a6c804f2602b5792428e0f932641ae536f281.zip |
A wizard command "x,", to bring a mon down to 1hp.
It could be made to ask for a specific number, but I'm too lazy to code that
right now.
-rw-r--r-- | crawl-ref/source/cmd-keys.h | 1 | ||||
-rw-r--r-- | crawl-ref/source/cmd-name.h | 1 | ||||
-rw-r--r-- | crawl-ref/source/command.cc | 1 | ||||
-rw-r--r-- | crawl-ref/source/directn.cc | 10 | ||||
-rw-r--r-- | crawl-ref/source/enum.h | 1 |
5 files changed, 14 insertions, 0 deletions
diff --git a/crawl-ref/source/cmd-keys.h b/crawl-ref/source/cmd-keys.h index d9610d58d3..2d97de7bcf 100644 --- a/crawl-ref/source/cmd-keys.h +++ b/crawl-ref/source/cmd-keys.h @@ -160,6 +160,7 @@ {'S', CMD_TARGET_WIZARD_MAKE_SUMMONED}, {'~', CMD_TARGET_WIZARD_POLYMORPH}, {'D', CMD_TARGET_WIZARD_DEBUG_MONSTER}, +{',', CMD_TARGET_WIZARD_HURT_MONSTER}, #endif {'v', CMD_TARGET_DESCRIBE}, {'?', CMD_TARGET_HELP}, diff --git a/crawl-ref/source/cmd-name.h b/crawl-ref/source/cmd-name.h index 0d58833c4d..239d4d540a 100644 --- a/crawl-ref/source/cmd-name.h +++ b/crawl-ref/source/cmd-name.h @@ -206,6 +206,7 @@ {CMD_TARGET_WIZARD_MAKE_SUMMONED, "CMD_TARGET_WIZARD_MAKE_SUMMONED"}, {CMD_TARGET_WIZARD_POLYMORPH, "CMD_TARGET_WIZARD_POLYMORPH"}, {CMD_TARGET_WIZARD_DEBUG_MONSTER, "CMD_TARGET_WIZARD_DEBUG_MONSTER"}, +{CMD_TARGET_WIZARD_HURT_MONSTER, "CMD_TARGET_WIZARD_HURT_MONSTER"}, {CMD_TARGET_MOUSE_MOVE, "CMD_TARGET_MOUSE_MOVE"}, {CMD_TARGET_MOUSE_SELECT, "CMD_TARGET_MOUSE_SELECT"}, {CMD_TARGET_HELP, "CMD_TARGET_HELP"}, diff --git a/crawl-ref/source/command.cc b/crawl-ref/source/command.cc index 521df47d13..8a27a9ffd0 100644 --- a/crawl-ref/source/command.cc +++ b/crawl-ref/source/command.cc @@ -778,6 +778,7 @@ static const char *targetting_help_1 = "<w>w</w>: calculate shortest path to any point on the map\n" "<w>D</w>: get debugging information about the monster\n" "<w>~</w>: polymorph monster to specific type\n" + "<w>,</w>: bring down the monster to 1hp\n" #endif ; diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc index f4e991f034..1526fd6255 100644 --- a/crawl-ref/source/directn.cc +++ b/crawl-ref/source/directn.cc @@ -1595,6 +1595,16 @@ void direction(dist& moves, const targetting_type restricts, if (monster_at(moves.target)) debug_stethoscope(mgrd(moves.target)); break; + + case CMD_TARGET_WIZARD_HURT_MONSTER: + if (!you.wizard || !in_bounds(moves.target)) + break; + if (monster_at(moves.target)) + { + monster_at(moves.target)->hit_points = 1; + mpr("Brought the mon down to near death."); + } + break; #endif case CMD_TARGET_DESCRIBE: full_describe_square(moves.target); diff --git a/crawl-ref/source/enum.h b/crawl-ref/source/enum.h index 7938b7fa1d..94d2b6328d 100644 --- a/crawl-ref/source/enum.h +++ b/crawl-ref/source/enum.h @@ -687,6 +687,7 @@ enum command_type CMD_TARGET_WIZARD_MAKE_SUMMONED, CMD_TARGET_WIZARD_POLYMORPH, CMD_TARGET_WIZARD_DEBUG_MONSTER, + CMD_TARGET_WIZARD_HURT_MONSTER, CMD_TARGET_MOUSE_MOVE, CMD_TARGET_MOUSE_SELECT, CMD_TARGET_HELP, |