can't use figurines to get too many erinyes or Nazgul
include currently wielded weapon among the list of likely choices for 'w'
likewise for currently quivered ammo among choices for 'Q'
+only include unknown gems as likely choices when applying known touchstone
prevent mbodypart() from returning animal parts for lights
removing a ring might relearn what it is after amnesia
{
struct obj *obj;
boolean do_scratch;
- const char *streak_color;
+ const char *streak_color, *choices;
char stonebuf[QBUFSZ];
static const char scritch[] = "\"scritch, scritch\"";
static const char allowall[3] = { COIN_CLASS, ALL_CLASSES, 0 };
+ static const char justgems[3] = { ALLOW_NONE, GEM_CLASS, 0 };
#ifndef GOLDOBJ
struct obj goldobj;
#endif
+ /* in case it was acquired while blinded */
+ if (!Blind) tstone->dknown = 1;
+ /* when the touchstone is fully known, don't bother listing extra
+ junk as likely candidates for rubbing */
+ choices = (tstone->otyp == TOUCHSTONE && tstone->dknown &&
+ objects[TOUCHSTONE].oc_name_known) ? justgems : allowall;
Sprintf(stonebuf, "rub on the stone%s", plur(tstone->quan));
- if ((obj = getobj(allowall, stonebuf)) == 0)
+ if ((obj = getobj(choices, stonebuf)) == 0)
return;
#ifndef GOLDOBJ
if (obj->oclass == COIN_CLASS) {
-/* SCCS Id: @(#)invent.c 3.4 2002/09/16 */
+/* SCCS Id: @(#)invent.c 3.4 2002/09/30 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
otyp != OIL_LAMP && otyp != MAGIC_LAMP &&
otyp != BRASS_LANTERN) ||
(otmp->oclass == GEM_CLASS && !is_graystone(otmp))))
+ || (!strncmp(word, "rub on the stone", 16) &&
+ *let == GEM_CLASS && /* using known touchstone */
+ otmp->dknown && objects[otyp].oc_name_known)
|| ((!strcmp(word, "use or apply") ||
!strcmp(word, "untrap with")) &&
/* Picks, axes, pole-weapons, bullwhips */