From b363b702d755a3c84e003d2dd66d0be9c9598d91 Mon Sep 17 00:00:00 2001 From: Michael Meyer Date: Wed, 20 Dec 2023 12:00:13 -0500 Subject: [PATCH] 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. --- src/dog.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dog.c b/src/dog.c index cf9adc4f2..1aab95644 100644 --- a/src/dog.c +++ b/src/dog.c @@ -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;