diff --git a/include/obj.h b/include/obj.h index 7053772d6..f138f4eae 100644 --- a/include/obj.h +++ b/include/obj.h @@ -306,7 +306,7 @@ struct obj { #define ofood(o) ((o)->otyp == CORPSE || (o)->otyp == EGG || (o)->otyp == TIN) /* note: sometimes eggs and tins have special corpsenm values that shouldn't be used as an index into mons[] */ -#define polyfodder(obj) \ +#define polyfood(obj) \ (ofood(obj) && (obj)->corpsenm >= LOW_PM \ && (pm_to_cham((obj)->corpsenm) != NON_PM \ || dmgtype(&mons[(obj)->corpsenm], AD_POLY))) diff --git a/src/do.c b/src/do.c index 41aaadc6d..08b00a9c1 100644 --- a/src/do.c +++ b/src/do.c @@ -850,7 +850,7 @@ engulfer_digests_food(struct obj *obj) if (obj->otyp == CORPSE) { could_petrify = touch_petrifies(&mons[obj->corpsenm]); - could_poly = polyfodder(obj); + could_poly = polyfood(obj); could_grow = (obj->corpsenm == PM_WRAITH); could_heal = (obj->corpsenm == PM_NURSE); } else if (obj->otyp == GLOB_OF_GREEN_SLIME) { 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; diff --git a/src/eat.c b/src/eat.c index dd52fd0b0..707449772 100644 --- a/src/eat.c +++ b/src/eat.c @@ -3865,7 +3865,7 @@ Popeye(int threat) && (mndx == PM_LIZARD || acidic(&mons[mndx]))); /* polymorph into a fiery monster */ case SLIMED: - return (boolean) polyfodder(otin); + return (boolean) polyfood(otin); /* no tins can cure these (yet?) */ case SICK: case VOMITING: diff --git a/src/mon.c b/src/mon.c index 1fb32fd86..a59a8a93f 100644 --- a/src/mon.c +++ b/src/mon.c @@ -1374,7 +1374,7 @@ m_consume_obj(struct monst *mtmp, struct obj *otmp) || corpsenm == PM_LARGE_MIMIC || corpsenm == PM_GIANT_MIMIC)); slimer = (otmp->otyp == GLOB_OF_GREEN_SLIME); - poly = polyfodder(otmp); + poly = polyfood(otmp); grow = mlevelgain(otmp); heal = mhealup(otmp); eyes = (otmp->otyp == CARROT);