]> granicus.if.org Git - nethack/commitdiff
fix #Q235 - rubbing against known touchstones
authornethack.rankin <nethack.rankin>
Tue, 29 Nov 2005 02:28:52 +0000 (02:28 +0000)
committernethack.rankin <nethack.rankin>
Tue, 29 Nov 2005 02:28:52 +0000 (02:28 +0000)
     Allow rubbing any object against any touchstone even when the latter
is known so only gems make sense.  Also, propagate an earlier fix which
allowed rubbing gold against known touchstones to the branch (it had been
trunk only).

doc/fixes34.4
doc/fixes35.0
src/invent.c

index 679086ec2b98a9a31713e00ca93ce33ebf08bdc3..0ab5916b6b1f12c01c5dc66cb6993da1eb69f1b2 100644 (file)
@@ -156,6 +156,8 @@ avoid inappropriate "the guard calms down" if vault guard's magic corridor
        reaches a spot where gold is embedded in the rock
 adjust message for gas effect from chest trap if hero resists hallucination
 cancelling non-shop objects in a shop's entrance would upset the shopkeeper
+identified touchstone can rub on gold like the data.base entry says
+restore the capability of rubbing any object against known touchstone
 
 
 Platform- and/or Interface-Specific Fixes
index 8d73d9fa5e63172715f35bb1bd4cc9bb98696557..8177df7e2eccc862dbe13694f9c110f2135655c2 100644 (file)
@@ -20,7 +20,6 @@ two-weapon combat makes two attacks instead of having one attack hit with
 apply weapon skill to-hit bonus or penalty to bare-handed attacks
 only give monk's "cumbersome armor" message when the armor penalty causes
        an attack to miss
-identified touchstone can rub on gold like the data.base entry says
 dust vortex-induced blindness should kick in immediately when blindfold
        is removed or glop is wiped off
 prayer/unicorn-horn won't fix blindness while still engulfed in a dust
index 984d4e1df5034ddfb81f4f7d759f361f38737e6f..3064ae950ed61298f8b35c48eeb7fc6d7a003eff 100644 (file)
@@ -871,9 +871,6 @@ register const char *let,*word;
                      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 */
@@ -904,7 +901,12 @@ register const char *let,*word;
                        foo--;
                /* ugly check for unworn armor that can't be worn */
                else if (putting_on(word) && *let == ARMOR_CLASS &&
-                        !canwearobj(otmp, &dummymask, FALSE)) {
+                   !canwearobj(otmp, &dummymask, FALSE) 
+               /* or unsuitable items rubbed on known touchstone */
+               || (!strncmp(word, "rub on the stone", 16) &&
+                   *let == GEM_CLASS &&
+                   otmp->dknown && objects[otyp].oc_name_known)
+                   ) {
                        foo--;
                        allowall = TRUE;
                        *ap++ = otmp->invlet;