From ea7f0c49e59faf35180ff2aa48a91087d27c49f2 Mon Sep 17 00:00:00 2001 From: dolorous Date: Thu, 22 Jan 2009 02:15:10 +0000 Subject: In melee_attack::player_apply_aux_unarmed(), explicitly return true if _monster_die() was called, or false if it wasn't, instead of returning !defender->alive(). The latter could return true if the monster avoided death (from e.g. conversion to Beogh by force), leading to an erroneous wounds display afterward, or to your erroneously making an unarmed attack on the monster and angering it. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8669 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/fight.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'crawl-ref/source/fight.cc') diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index d1556307a8..422af83ad8 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -1287,9 +1287,13 @@ bool melee_attack::player_apply_aux_unarmed() } if (defender_as_monster()->hit_points < 1) + { _monster_die(defender_as_monster(), KILL_YOU, NON_MONSTER); - return (!defender->alive()); + return (true); + } + + return (false); } std::string melee_attack::debug_damage_number() -- cgit v1.2.3-54-g00ecf