decide whether obj can be used to cure green slime */
| 3243 | |
| 3244 | /* decide whether obj can be used to cure green slime */ |
| 3245 | staticfn int |
| 3246 | cures_sliming(struct monst *mon, struct obj *obj) |
| 3247 | { |
| 3248 | /* scroll of fire */ |
| 3249 | if (obj->otyp == SCR_FIRE) |
| 3250 | return (haseyes(mon->data) && mon->mcansee && !nohands(mon->data)); |
| 3251 | |
| 3252 | /* potion of oil; will be set burning if not already */ |
| 3253 | if (obj->otyp == POT_OIL) |
| 3254 | return !nohands(mon->data); |
| 3255 | |
| 3256 | /* non-empty wand or horn of fire; |
| 3257 | hero doesn't need hands or even limbs to zap, so mon doesn't either */ |
| 3258 | return ((obj->otyp == WAN_FIRE |
| 3259 | || (obj->otyp == FIRE_HORN && can_blow(mon))) |
| 3260 | && obj->spe > 0); |
| 3261 | } |
| 3262 | |
| 3263 | /* TRUE if monster appears to be green; we go by the display color. |
| 3264 | The alternative was to just pick things that |