From d09a5beab35612c39259984ccebca3175dc9db67 Mon Sep 17 00:00:00 2001 From: Michael Meyer Date: Wed, 20 Dec 2023 11:55:58 -0500 Subject: [PATCH] Rename polyfodder() to polyfood() 'Polyfodder' is already a term frequently used by players to describe items which are useful to hang on to specifically to zap polymorph at (for example, extra unicorn horns, which can be turned into magic markers). Using it as the name of a macro which tests whether a food item will polymorph the creature consuming it is somewhat confusing, and I think 'polyfood' is a lot clearer. --- include/obj.h | 2 +- src/do.c | 2 +- src/eat.c | 2 +- src/mon.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) 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/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);