]> granicus.if.org Git - nethack/commitdiff
gold and touchstones
authorcohrs <cohrs>
Sun, 16 Mar 2003 03:07:48 +0000 (03:07 +0000)
committercohrs <cohrs>
Sun, 16 Mar 2003 03:07:48 +0000 (03:07 +0000)
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.

src/apply.c

index d90beaac0c5673d6af828729ad377ddd5a46e1f6..2858e088006121fefca00d704bbebee325f6c968 100644 (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;