gold and touchstones

Implement Pat's suggestion of allowing even identified touchstones
to test gold, removing the getobj hack recently added.  This actually
brings the touchstone a bit more in line with the data.base entry.
This commit is contained in:
cohrs
2003-03-16 03:07:48 +00:00
parent 79735fde8b
commit 4cf1b2964d

View File

@@ -1832,7 +1832,7 @@ struct obj *tstone;
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 };
static const char coins_gems[3] = { COIN_CLASS, GEM_CLASS, 0 };
#ifndef GOLDOBJ
struct obj goldobj;
#endif
@@ -1842,7 +1842,7 @@ struct obj *tstone;
/* 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;
objects[TOUCHSTONE].oc_name_known) ? coins_gems : allowall;
Sprintf(stonebuf, "rub on the stone%s", plur(tstone->quan));
if ((obj = getobj(choices, stonebuf)) == 0)
return;