]> granicus.if.org Git - nethack/commitdiff
'R' fix
authorPatR <rankin@nethack.org>
Sun, 17 Apr 2016 00:25:33 +0000 (17:25 -0700)
committerPatR <rankin@nethack.org>
Sun, 17 Apr 2016 00:25:33 +0000 (17:25 -0700)
A patch in late January to suppress suits as likely candidates for
the 'R' command when wearing a cloak also unintentionally suppressed
rings when wearing non-cursed (or not yet known to be cursed) gloves.
Cloak always blocks suit removal; gloves only block ring removal if
cursed.

doc/fixes36.1
src/invent.c

index c6b5bc7cf8ba5426db74550b6a36b50e306d1cf1..78ad1acc26542840ab834bf815fb9214e6bd483a 100644 (file)
@@ -213,6 +213,7 @@ post-3.6.0: fix "object lost" panic during pickup caused by sortloot revamp
 post-3.6.0: more sortloot revisions
 post-3.6.0: fix inventory menu for response of '?' to getobj (more sortloot
        revamp fallout)
+post-3.6.0: rings covered by non-cursed gloves not listed as 'R' candidates
 
 
 Platform- and/or Interface-Specific Fixes
index 920ea77e0bc7f91ca9502df10d9ecf140ea47802..ae1ce3bd0dcb74577c2fcee983daae9bd3066ce0 100644 (file)
@@ -1236,7 +1236,8 @@ register const char *let, *word;
              /* worn armor (shirt, suit) covered by worn armor (suit, cloak)
                 or accessory (ring) covered by cursed worn armor (gloves) */
              || (taking_off(word)
-                 && inaccessible_equipment(otmp, (const char *) 0, FALSE))
+                 && inaccessible_equipment(otmp, (const char *) 0,
+                                      (boolean) (otmp->oclass == RING_CLASS)))
              || (!strcmp(word, "write on")
                  && (!(otyp == SCR_BLANK_PAPER || otyp == SPE_BLANK_PAPER)
                      || !otmp->dknown || !objects[otyp].oc_name_known))