diff options
author | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-08-24 15:03:16 +0000 |
---|---|---|
committer | dolorous <dolorous@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-08-24 15:03:16 +0000 |
commit | a8d67581791419036593e56cd2e078d858196a5c (patch) | |
tree | 90a84d324712ce70cd049d4cb135a5e89ba055ee /crawl-ref/source/fight.cc | |
parent | a09593da822f9144a81998a3da0fbbf8a783b8b3 (diff) | |
download | crawl-ref-a8d67581791419036593e56cd2e078d858196a5c.tar.gz crawl-ref-a8d67581791419036593e56cd2e078d858196a5c.zip |
Attempt to fix [2842867] by holding off one more death event properly in
case a monster avoided death.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@10599 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r-- | crawl-ref/source/fight.cc | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index 887eb6c650..a037b25dec 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -1224,8 +1224,8 @@ bool melee_attack::player_aux_unarmed() } // unified to-hit calculation - to_hit = random2( calc_your_to_hit_unarmed(uattack, - damage_brand == SPWPN_VAMPIRICISM) ); + to_hit = random2(calc_your_to_hit_unarmed(uattack, + damage_brand == SPWPN_VAMPIRICISM)); make_hungry(2, true); @@ -1963,9 +1963,16 @@ bool melee_attack::player_monattk_hit_effects(bool mondied) special_damage); #endif - special_damage = defender->hurt(&you, special_damage); + special_damage = defender->hurt(&you, special_damage, BEAM_MISSILE, false); - return (!defender->alive()); + if (!defender->alive()) + { + _monster_die(defender_as_monster(), KILL_YOU, NON_MONSTER); + + return (true); + } + + return (false); } void melee_attack::_monster_die(monsters* monster, killer_type killer, |