From 86d73e66d588cf5c885014064d7c44e1a21a4b61 Mon Sep 17 00:00:00 2001 From: zelgadis Date: Tue, 13 Jan 2009 00:35:52 +0000 Subject: Fix bug #2442834: ego blades having no effect when chopping off a hydra's head. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@8436 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/fight.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source') diff --git a/crawl-ref/source/fight.cc b/crawl-ref/source/fight.cc index f9ed4f9f2c..43fe5e3307 100644 --- a/crawl-ref/source/fight.cc +++ b/crawl-ref/source/fight.cc @@ -1876,8 +1876,11 @@ bool melee_attack::player_monattk_hit_effects(bool mondied) // These effects apply only to monsters that are still alive: + // Returns true if a head was cut off *and* the wound was cauterized, + // in which case the cauterization was the ego effect, so don't burn + // the hydra some more. if (decapitate_hydra(damage_done)) - return (true); + return (!defender->alive()); // These two (staff damage and damage brand) are mutually exclusive! player_apply_staff_damage(); @@ -3028,7 +3031,7 @@ bool melee_attack::apply_damage_brand() return (ret); } -// Returns true if a head got lopped off. +// Returns true if the attack cut off a head *and* cauterized it. bool melee_attack::chop_hydra_head( int dam, int dam_type, int wpn_brand ) @@ -3098,6 +3101,7 @@ bool melee_attack::chop_hydra_head( int dam, { if (defender_visible) mpr( "The flame cauterises the wound!" ); + return (true); } else if (def->number < limit - 1) { @@ -3107,8 +3111,6 @@ bool melee_attack::chop_hydra_head( int dam, } } } - - return (true); } return (false); -- cgit v1.2.3-54-g00ecf