diff options
author | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-13 00:35:52 +0000 |
---|---|---|
committer | zelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573> | 2009-01-13 00:35:52 +0000 |
commit | 86d73e66d588cf5c885014064d7c44e1a21a4b61 (patch) | |
tree | 96e410a375dbbb872945cca23e6dece83e455abd /crawl-ref/source/fight.cc | |
parent | 244f45bc068e50ae854ae5fbd70ffc04d8ec03dd (diff) | |
download | crawl-ref-86d73e66d588cf5c885014064d7c44e1a21a4b61.tar.gz crawl-ref-86d73e66d588cf5c885014064d7c44e1a21a4b61.zip |
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
Diffstat (limited to 'crawl-ref/source/fight.cc')
-rw-r--r-- | crawl-ref/source/fight.cc | 10 |
1 files changed, 6 insertions, 4 deletions
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); |