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
2024-07-15 23:42:29 -07:00
committed by PatR
parent d09a5beab3
commit b363b702d7
+1 -1
View File
@@ -1003,7 +1003,7 @@ dogfood(struct monst *mon, struct obj *obj)
return POISON; return POISON;
/* avoid polymorph unless starving or abused (in which case the /* avoid polymorph unless starving or abused (in which case the
pet will consider it for a chance to become more powerful) */ 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; return MANFOOD;
else if (vegan(fptr)) else if (vegan(fptr))
return herbi ? CADAVER : MANFOOD; return herbi ? CADAVER : MANFOOD;