diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-22 02:15:10 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-22 02:15:10 +0000 |
commit | ea7f0c49e59faf35180ff2aa48a91087d27c49f2 (patch) | |
tree | bcd1d99742fc484a448e2599e8cfaef8ff278719 /crawl-ref/source/fight.cc | |
parent | 413367e626e7315ea2310daf60402ae8dde7ee54 (diff) | |
download | crawl-ref-ea7f0c49e59faf35180ff2aa48a91087d27c49f2.tar.gz crawl-ref-ea7f0c49e59faf35180ff2aa48a91087d27c49f2.zip |
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
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r-- | crawl-ref/source/fight.cc | 6 |
1 files changed, 5 insertions, 1 deletions
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() |