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.
This commit is contained in:
Michael Meyer
2024-07-15 23:42:29 -07:00
committed by PatR
parent 61affaed37
commit d09a5beab3
4 changed files with 4 additions and 4 deletions
+1 -1
View File
@@ -306,7 +306,7 @@ struct obj {
#define ofood(o) ((o)->otyp == CORPSE || (o)->otyp == EGG || (o)->otyp == TIN) #define ofood(o) ((o)->otyp == CORPSE || (o)->otyp == EGG || (o)->otyp == TIN)
/* note: sometimes eggs and tins have special corpsenm values that /* note: sometimes eggs and tins have special corpsenm values that
shouldn't be used as an index into mons[] */ shouldn't be used as an index into mons[] */
#define polyfodder(obj) \ #define polyfood(obj) \
(ofood(obj) && (obj)->corpsenm >= LOW_PM \ (ofood(obj) && (obj)->corpsenm >= LOW_PM \
&& (pm_to_cham((obj)->corpsenm) != NON_PM \ && (pm_to_cham((obj)->corpsenm) != NON_PM \
|| dmgtype(&mons[(obj)->corpsenm], AD_POLY))) || dmgtype(&mons[(obj)->corpsenm], AD_POLY)))
+1 -1
View File
@@ -850,7 +850,7 @@ engulfer_digests_food(struct obj *obj)
if (obj->otyp == CORPSE) { if (obj->otyp == CORPSE) {
could_petrify = touch_petrifies(&mons[obj->corpsenm]); could_petrify = touch_petrifies(&mons[obj->corpsenm]);
could_poly = polyfodder(obj); could_poly = polyfood(obj);
could_grow = (obj->corpsenm == PM_WRAITH); could_grow = (obj->corpsenm == PM_WRAITH);
could_heal = (obj->corpsenm == PM_NURSE); could_heal = (obj->corpsenm == PM_NURSE);
} else if (obj->otyp == GLOB_OF_GREEN_SLIME) { } else if (obj->otyp == GLOB_OF_GREEN_SLIME) {
+1 -1
View File
@@ -3865,7 +3865,7 @@ Popeye(int threat)
&& (mndx == PM_LIZARD || acidic(&mons[mndx]))); && (mndx == PM_LIZARD || acidic(&mons[mndx])));
/* polymorph into a fiery monster */ /* polymorph into a fiery monster */
case SLIMED: case SLIMED:
return (boolean) polyfodder(otin); return (boolean) polyfood(otin);
/* no tins can cure these (yet?) */ /* no tins can cure these (yet?) */
case SICK: case SICK:
case VOMITING: case VOMITING:
+1 -1
View File
@@ -1374,7 +1374,7 @@ m_consume_obj(struct monst *mtmp, struct obj *otmp)
|| corpsenm == PM_LARGE_MIMIC || corpsenm == PM_LARGE_MIMIC
|| corpsenm == PM_GIANT_MIMIC)); || corpsenm == PM_GIANT_MIMIC));
slimer = (otmp->otyp == GLOB_OF_GREEN_SLIME); slimer = (otmp->otyp == GLOB_OF_GREEN_SLIME);
poly = polyfodder(otmp); poly = polyfood(otmp);
grow = mlevelgain(otmp); grow = mlevelgain(otmp);
heal = mhealup(otmp); heal = mhealup(otmp);
eyes = (otmp->otyp == CARROT); eyes = (otmp->otyp == CARROT);