From 6708e01a4756b606472d885765fec7324e9aea26 Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Tue, 29 Nov 2005 02:28:52 +0000 Subject: [PATCH] fix #Q235 - rubbing against known touchstones 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 | 2 ++ doc/fixes35.0 | 1 - src/invent.c | 10 ++++++---- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/doc/fixes34.4 b/doc/fixes34.4 index 679086ec2..0ab5916b6 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -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 diff --git a/doc/fixes35.0 b/doc/fixes35.0 index 8d73d9fa5..8177df7e2 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -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 diff --git a/src/invent.c b/src/invent.c index 984d4e1df..3064ae950 100644 --- a/src/invent.c +++ b/src/invent.c @@ -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; -- 2.40.0