-/* SCCS Id: @(#)apply.c 3.4 2002/08/01 */
+/* SCCS Id: @(#)apply.c 3.4 2002/09/25 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
if (mintrap(mtmp) == 2) change_luck(-1);
}
}
- if (pet_cnt > 0) makeknown(MAGIC_WHISTLE);
+ if (pet_cnt > 0) makeknown(obj->otyp);
}
}
{
register struct obj *obj;
register int res = 1;
- char class_list[MAXOCLASSES];
+ char class_list[MAXOCLASSES+2];
if(check_capacity((char *)0)) return (0);
Strcpy(class_list, tools_too);
else
Strcpy(class_list, tools);
- if (carrying(CREAM_PIE)) add_class(class_list, FOOD_CLASS);
+ if (carrying(CREAM_PIE) || carrying(EUCALYPTUS_LEAF))
+ add_class(class_list, FOOD_CLASS);
obj = getobj(class_list, "use or apply");
if(!obj) return 0;
case TIN_WHISTLE:
use_whistle(obj);
break;
+ case EUCALYPTUS_LEAF:
+ /* MRKR: Every Australian knows that a gum leaf makes an */
+ /* excellent whistle, especially if your pet is a */
+ /* tame kangaroo named Skippy. */
+ if (obj->blessed) {
+ use_magic_whistle(obj);
+ /* sometimes the blessing will be worn off */
+ if (!rn2(49)) {
+ if (!Blind) {
+ char buf[BUFSZ];
+
+ pline("%s %s %s.", Shk_Your(buf, obj),
+ aobjnam(obj, "glow"), hcolor("brown"));
+ obj->bknown = 1;
+ }
+ unbless(obj);
+ }
+ } else {
+ use_whistle(obj);
+ }
+ break;
case STETHOSCOPE:
res = use_stethoscope(obj);
break;
!strcmp(word, "untrap with")) &&
/* Picks, axes, pole-weapons, bullwhips */
((otmp->oclass == WEAPON_CLASS && !is_pick(otmp) &&
- !is_axe(otmp) && !is_pole(otmp) && otyp != BULLWHIP)
- || (otmp->oclass == POTION_CLASS &&
+ !is_axe(otmp) && !is_pole(otmp) && otyp != BULLWHIP) ||
+ (otmp->oclass == POTION_CLASS &&
/* only applicable potion is oil, and it will only
be offered as a choice when already discovered */
(otyp != POT_OIL || !otmp->dknown ||
- !objects[POT_OIL].oc_name_known))
- || (otmp->oclass == FOOD_CLASS && otyp != CREAM_PIE)
- || (otmp->oclass == GEM_CLASS && !is_graystone(otmp))))
+ !objects[POT_OIL].oc_name_known)) ||
+ (otmp->oclass == FOOD_CLASS &&
+ otyp != CREAM_PIE && otyp != EUCALYPTUS_LEAF) ||
+ (otmp->oclass == GEM_CLASS && !is_graystone(otmp))))
|| (!strcmp(word, "invoke") &&
(!otmp->oartifact && !objects[otyp].oc_unique &&
(otyp != FAKE_AMULET_OF_YENDOR || otmp->known) &&