more starving pets

The fact that a pet was starving to death got recorded with its
corpse; if that corpse was revived via undead turning, the resulting
monster would immediately starve again if it stayed tame.  Similarly,
if one got petrified while nearly starved, reanimating the statue would
produce a starving pet.  Make revival and reanimation use the same code
as life-saving, where hunger status gets reset.
This commit is contained in:
nethack.rankin
2002-09-14 05:48:40 +00:00
parent 6f63f81b86
commit 6772c3973c
3 changed files with 35 additions and 24 deletions

View File

@@ -1334,14 +1334,6 @@ struct monst *mtmp;
mtmp->mcanmove = 1;
mtmp->mfrozen = 0;
if (mtmp->mtame && !mtmp->isminion) {
struct edog *edog = EDOG(mtmp);
if (edog->hungrytime < moves+500)
edog->hungrytime = moves+500;
if (edog->mhpmax_penalty) {
/* was starving */
mtmp->mhpmax += edog->mhpmax_penalty;
edog->mhpmax_penalty = 0;
}
wary_dog(mtmp, FALSE);
}
if (mtmp->mhpmax <= 0) mtmp->mhpmax = 10;