Use DEADMONSTER instead of checking mhp

This commit is contained in:
Pasi Kallinen
2018-08-30 20:05:18 +03:00
parent f1d0636ba0
commit d2eba695c8
24 changed files with 125 additions and 125 deletions

View File

@@ -525,7 +525,7 @@ int *dmg_p; /* for dishing out extra damage in lieu of Int loss */
if (visflag && canseemon(magr))
pline("%s turns to stone!", Monnam(magr));
monstone(magr);
if (magr->mhp > 0) {
if (!DEADMONSTER(magr)) {
/* life-saved; don't continue eating the brains */
return MM_MISS;
} else {
@@ -612,7 +612,7 @@ int *dmg_p; /* for dishing out extra damage in lieu of Int loss */
return MM_MISS;
} else if (is_rider(pd)) {
mondied(magr);
if (magr->mhp <= 0)
if (DEADMONSTER(magr))
result = MM_AGR_DIED;
/* Rider takes extra damage regardless of whether attacker dies */
*dmg_p += xtra_dmg;