Make pets unwilling to eat all polyfood() corpses

The previous is_shapeshifter() test meant that pets were still perfectly
willing to eat genetic engineer corpses and be polymorphed.  Use
polyfood() instead.

Fixes #1183.
This commit is contained in:
Michael Meyer
2023-12-20 12:00:13 -05:00
committed by PatR
parent d09a5beab3
commit b363b702d7

View File

@@ -1003,7 +1003,7 @@ dogfood(struct monst *mon, struct obj *obj)
return POISON;
/* avoid polymorph unless starving or abused (in which case the
pet will consider it for a chance to become more powerful) */
else if (is_shapeshifter(fptr) && mon->mtame > 1 && !starving)
else if (polyfood(obj) && mon->mtame > 1 && !starving)
return MANFOOD;
else if (vegan(fptr))
return herbi ? CADAVER : MANFOOD;