MCPcopy Create free account
hub / github.com/NetHack/NetHack / cures_stoning

Function cures_stoning

src/muse.c:2984–2998  ·  view source on GitHub ↗

decide whether obj can cure petrification; also used when picking up */

Source from the content-addressed store, hash-verified

2982
2983/* decide whether obj can cure petrification; also used when picking up */
2984staticfn boolean
2985cures_stoning(struct monst *mon, struct obj *obj, boolean tinok)
2986{
2987 if (obj->otyp == POT_ACID)
2988 return TRUE;
2989 if (obj->otyp == GLOB_OF_GREEN_SLIME)
2990 return (boolean) slimeproof(mon->data);
2991 if (obj->otyp != CORPSE && (obj->otyp != TIN || !tinok))
2992 return FALSE;
2993 /* corpse, or tin that mon can open */
2994 if (obj->corpsenm == NON_PM) /* empty/special tin */
2995 return FALSE;
2996 return (boolean) (obj->corpsenm == PM_LIZARD
2997 || acidic(&mons[obj->corpsenm]));
2998}
2999
3000staticfn boolean
3001mcould_eat_tin(struct monst *mon)

Callers 2

searches_for_itemFunction · 0.85
munstoneFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected