Merge branch 'NetHack-3.6.2'

This commit is contained in:
nhmall
2018-08-31 07:17:46 -04:00
33 changed files with 712 additions and 446 deletions

View File

@@ -245,7 +245,7 @@ boolean quietly;
if (!quietly && canspotmon(magr))
pline("%s turns to stone!", Monnam(magr));
monstone(magr);
if (magr->mhp > 0)
if (!DEADMONSTER(magr))
return MM_HIT; /* lifesaved */
else if (magr->mtame && !vis)
You(brief_feeling, "peculiarly sad");
@@ -631,7 +631,7 @@ struct attack *mattk;
if (canseemon(magr))
pline("%s is turned to stone!", Monnam(magr));
monstone(magr);
if (magr->mhp > 0)
if (!DEADMONSTER(magr))
return MM_MISS;
return MM_AGR_DIED;
}
@@ -780,7 +780,7 @@ struct attack *mattk;
/* Kill off aggressor if it didn't die. */
if (!(result & MM_AGR_DIED)) {
mondead(magr);
if (magr->mhp > 0)
if (!DEADMONSTER(magr))
return result; /* life saved */
result |= MM_AGR_DIED;
}
@@ -824,7 +824,7 @@ register struct attack *mattk;
if (vis && canspotmon(magr))
pline("%s turns to stone!", Monnam(magr));
monstone(magr);
if (magr->mhp > 0)
if (!DEADMONSTER(magr))
return MM_HIT; /* lifesaved */
else if (magr->mtame && !vis)
You(brief_feeling, "peculiarly sad");
@@ -848,7 +848,7 @@ register struct attack *mattk;
? "coughs spasmodically and collapses"
: "vomits violently and drops dead");
mondied(magr);
if (magr->mhp > 0)
if (!DEADMONSTER(magr))
return 0; /* lifesaved */
else if (magr->mtame && !vis)
You(brief_feeling, "queasy");
@@ -862,7 +862,7 @@ register struct attack *mattk;
m_useup(mdef, obj);
/* Is a corpse for nutrition possible? It may kill magr */
if (!corpse_chance(mdef, magr, TRUE) || magr->mhp < 1)
if (!corpse_chance(mdef, magr, TRUE) || DEADMONSTER(magr))
break;
/* Pets get nutrition from swallowing monster whole.
@@ -922,7 +922,7 @@ register struct attack *mattk;
tmp = 1;
if (otmp->oartifact) {
(void) artifact_hit(magr, mdef, otmp, &tmp, dieroll);
if (mdef->mhp <= 0)
if (DEADMONSTER(mdef))
return (MM_DEF_DIED
| (grow_up(magr, mdef) ? 0 : MM_AGR_DIED));
}
@@ -949,7 +949,7 @@ register struct attack *mattk;
if (vis && canseemon(mdef))
pline("%s burns completely!", Monnam(mdef));
mondead(mdef); /* was mondied() but that dropped paper scrolls */
if (mdef->mhp > 0)
if (!DEADMONSTER(mdef))
return 0;
else if (mdef->mtame && !vis)
pline("May %s roast in peace.", mon_nam(mdef));
@@ -1027,7 +1027,7 @@ register struct attack *mattk;
if (vis && canseemon(mdef))
pline("%s falls to pieces!", Monnam(mdef));
mondied(mdef);
if (mdef->mhp > 0)
if (!DEADMONSTER(mdef))
return 0;
else if (mdef->mtame && !vis)
pline("May %s rust in peace.", mon_nam(mdef));
@@ -1051,7 +1051,7 @@ register struct attack *mattk;
if (vis && canseemon(mdef))
pline("%s falls to pieces!", Monnam(mdef));
mondied(mdef);
if (mdef->mhp > 0)
if (!DEADMONSTER(mdef))
return 0;
else if (mdef->mtame && !vis)
pline("May %s rot in peace.", mon_nam(mdef));
@@ -1078,7 +1078,7 @@ register struct attack *mattk;
pline("%s turns to stone!", Monnam(mdef));
monstone(mdef);
post_stone:
if (mdef->mhp > 0)
if (!DEADMONSTER(mdef))
return 0;
else if (mdef->mtame && !vis)
You(brief_feeling, "peculiarly sad");
@@ -1182,7 +1182,7 @@ register struct attack *mattk;
pline("%s is destroyed!", Monnam(mdef));
}
mondied(mdef);
if (mdef->mhp > 0)
if (!DEADMONSTER(mdef))
return 0;
else if (mdef->mtame && !vis)
You(brief_feeling, "strangely sad");
@@ -1278,7 +1278,7 @@ register struct attack *mattk;
possibly_unwield(mdef, FALSE);
mdef->mstrategy &= ~STRAT_WAITFORU;
mselftouch(mdef, (const char *) 0, FALSE);
if (mdef->mhp <= 0)
if (DEADMONSTER(mdef))
return (MM_DEF_DIED
| (grow_up(magr, mdef) ? 0 : MM_AGR_DIED));
if (pa->mlet == S_NYMPH && !tele_restrict(magr)) {
@@ -1341,7 +1341,7 @@ register struct attack *mattk;
if (cancelled)
break; /* physical damage only */
if (!rn2(4) && !slimeproof(pd)) {
if (!munslime(mdef, FALSE) && mdef->mhp > 0) {
if (!munslime(mdef, FALSE) && !DEADMONSTER(mdef)) {
if (newcham(mdef, &mons[PM_GREEN_SLIME], FALSE, vis && canseemon(mdef)))
pd = mdef->data;
mdef->mstrategy &= ~STRAT_WAITFORU;
@@ -1349,9 +1349,9 @@ register struct attack *mattk;
}
/* munslime attempt could have been fatal,
potentially to multiple monsters (SCR_FIRE) */
if (magr->mhp < 1)
if (DEADMONSTER(magr))
res |= MM_AGR_DIED;
if (mdef->mhp < 1)
if (DEADMONSTER(mdef))
res |= MM_DEF_DIED;
tmp = 0;
}
@@ -1383,7 +1383,7 @@ register struct attack *mattk;
mdef->mhp = 0;
}
monkilled(mdef, "", (int) mattk->adtyp);
if (mdef->mhp > 0)
if (!DEADMONSTER(mdef))
return res; /* mdef lifesaved */
else if (res == MM_AGR_DIED)
return (MM_DEF_DIED | MM_AGR_DIED);
@@ -1398,7 +1398,7 @@ register struct attack *mattk;
} else if (pd == &mons[PM_WRAITH]) {
(void) grow_up(magr, (struct monst *) 0);
/* don't grow up twice */
return (MM_DEF_DIED | (magr->mhp > 0 ? 0 : MM_AGR_DIED));
return (MM_DEF_DIED | (!DEADMONSTER(magr) ? 0 : MM_AGR_DIED));
} else if (pd == &mons[PM_NURSE]) {
magr->mhp = magr->mhpmax;
}