From d96a6c804f2602b5792428e0f932641ae536f281 Mon Sep 17 00:00:00 2001 From: Adam Borowski Date: Thu, 17 Dec 2009 23:57:37 +0100 Subject: 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. --- crawl-ref/source/cmd-keys.h | 1 + crawl-ref/source/cmd-name.h | 1 + crawl-ref/source/command.cc | 1 + crawl-ref/source/directn.cc | 10 ++++++++++ crawl-ref/source/enum.h | 1 + 5 files changed, 14 insertions(+) (limited to 'crawl-ref/source') 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: calculate shortest path to any point on the map\n" "D: get debugging information about the monster\n" "~: polymorph monster to specific type\n" + ",: 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, -- cgit v1.2.3-54-g00ecf