decide whether obj can cure petrification; also used when picking up */
| 2982 | |
| 2983 | /* decide whether obj can cure petrification; also used when picking up */ |
| 2984 | staticfn boolean |
| 2985 | cures_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 | |
| 3000 | staticfn boolean |
| 3001 | mcould_eat_tin(struct monst *mon) |
no outgoing calls
no test coverage detected