]> granicus.if.org Git - nethack/commitdiff
fix B08011 - request for "wield" change
authornethack.rankin <nethack.rankin>
Sat, 28 Sep 2002 06:48:25 +0000 (06:48 +0000)
committernethack.rankin <nethack.rankin>
Sat, 28 Sep 2002 06:48:25 +0000 (06:48 +0000)
     Implement's <Someone>'s suggestion that the currently wielded
weapon be included among the list of inventory candidates for the
wield command.  It affects the list of letters shown in the prompt
and the subset inventory displayed if you respond with '?'; it doesn't
change how wielding works or what item you can pick to wield.

     Do the same thing for quivering:  include any currently quivered
item among the choices.  Also include the secondary weapon as a choice
if you're not actively two-weaponing.

doc/fixes34.1
src/invent.c

index e26d6ce531d1131c59c4bf7ef6a509bf977e280a..1e4f78e307dc89082d1eac10bf5e18f9e37947d8 100644 (file)
@@ -258,6 +258,8 @@ with multiple leashes in use, 2nd had 50/50 chance of having unbounded length
 GOLDOBJ: coins aren't subject to curses/blesses and don't need identification
 can no longer activate a figurine while engulfed
 can't use figurines to get too many erinyes or Nazgul
+include currently wielded weapon among the list of likely choices for 'w'
+likewise for currently quivered ammo among choices for 'Q'
 
 
 Platform- and/or Interface-Specific Fixes
index 4ef66089bdd8e0c80dbbe593e0edc8cd4c5ea15f..bf0a58c5e8cf37b0cdc875ef25d5e85c866e089f 100644 (file)
@@ -829,10 +829,12 @@ register const char *let,*word;
                || (putting_on(word) &&
                     (otmp->owornmask & (W_ARMOR | W_RING | W_AMUL | W_TOOL)))
                                                        /* already worn */
+#if 0  /* 3.4.1 -- include currently wielded weapon among the choices */
                || (!strcmp(word, "wield") &&
                    (otmp->owornmask & W_WEP))
+#endif
                || (!strcmp(word, "ready") &&
-                   (otmp->owornmask & (W_WEP | W_SWAPWEP | W_QUIVER)))
+                   (otmp == uwep || (otmp == uswapwep && u.twoweap)))
                    ) {
                        foo--;
                        foox++;