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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user