summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/directn.cc
diff options
context:
space:
mode:
authorAdam Borowski <kilobyte@angband.pl>2009-12-17 23:57:37 +0100
committerAdam Borowski <kilobyte@angband.pl>2009-12-18 00:42:50 +0100
commitd96a6c804f2602b5792428e0f932641ae536f281 (patch)
treee5db72c44f58d561528847e97cc35f2f2d49e4f8 /crawl-ref/source/directn.cc
parent3a67b94669b555959bbc6f7e074a4d6dc537ce7b (diff)
downloadcrawl-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.
Diffstat (limited to 'crawl-ref/source/directn.cc')
-rw-r--r--crawl-ref/source/directn.cc10
1 files changed, 10 insertions, 0 deletions
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);