]> granicus.if.org Git - nethack/commitdiff
bandaid for #U49
authornethack.rankin <nethack.rankin>
Mon, 9 Sep 2002 07:36:13 +0000 (07:36 +0000)
committernethack.rankin <nethack.rankin>
Mon, 9 Sep 2002 07:36:13 +0000 (07:36 +0000)
     Partially deal with the reported silly message combination

> Also, when unwielding a weapon using 'A', you get the messages
> "You are empty handed.  You finish disrobing."

by saying "disarming" rather than "disrobing" when manipulating
just the three weapon slots.  Handling weapons in combination
with armor or accessories or both still says "disrobing" though.
The case when dealing with just accessories should pick something
else, but the closest I've thought up so far is "divesting" and
I don't think that works very well.  Is there a better term for
taking off jewelry?  If so, would it end up being out of place
when applied to nethack's selection of eyewear?

doc/fixes34.1
src/do_wear.c

index 1e9ac673f0c8b07bb1206ff991af2d5bd2b16174..1be5488b2493c6437d7dfa2d04bde2ce30512f9d 100644 (file)
@@ -237,6 +237,7 @@ don't state that "you narrowly avoid losing all chance" message if you try
 fix enlightenment feedback for bonus or penalty on damage and chance to hit
 effects of purple worms consuming special monsters is now more consistent
        across eating, digesting and dropped corpses while engulfed
+avoid "you finish disrobing" when disarming via the 'A' command
 
 
 Platform- and/or Interface-Specific Fixes
index 7afc3123f5e390f3b7b94a66d3fdfd4f59ca240f..6f94f5b80dac0a84d292766470e1610d49a1397f 100644 (file)
@@ -1,4 +1,4 @@
-/*     SCCS Id: @(#)do_wear.c  3.4     2002/08/03      */
+/*     SCCS Id: @(#)do_wear.c  3.4     2002/09/08      */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -1782,6 +1782,8 @@ do_takeoff()
        return(otmp);
 }
 
+static const char *disrobing = "";
+
 STATIC_PTR
 int
 take_off()
@@ -1810,7 +1812,7 @@ take_off()
        todelay = 0;
 
        if (taking_off == 0L) {
-         You("finish disrobing.");
+         You("finish %s.", disrobing);
          return 0;
        } else if (taking_off == W_WEP) {
          todelay = 1;
@@ -1863,7 +1865,7 @@ take_off()
         */
        if (todelay>0) todelay--;
 
-       set_occupation(take_off, "disrobing", 0);
+       set_occupation(take_off, disrobing, 0);
        return(1);              /* get busy */
 }
 
@@ -1871,6 +1873,7 @@ void
 reset_remarm()
 {
        taking_off = takeoff_mask = 0L;
+       disrobing = nul;
 }
 
 /* the 'A' command */
@@ -1880,8 +1883,8 @@ doddoremarm()
     int result = 0;
 
     if (taking_off || takeoff_mask) {
-       You("continue disrobing.");
-       set_occupation(take_off, "disrobing", 0);
+       You("continue %s.", disrobing);
+       set_occupation(take_off, disrobing, 0);
        (void) take_off();
        return 0;
     } else if (!uwep && !uswapwep && !uquiver && !uamul && !ublindf &&
@@ -1895,8 +1898,15 @@ doddoremarm()
            (result = ggetobj("take off", select_off, 0, FALSE, (unsigned *)0)) < -1)
        result = menu_remarm(result);
 
-    if (takeoff_mask)
+    if (takeoff_mask) {
+       /* default activity for armor and/or accessories,
+          possibly combined with weapons */
+       disrobing = "disrobing";
+       /* specific activity when handling weapons only */
+       if (!(takeoff_mask & ~(W_WEP|W_SWAPWEP|W_QUIVER)))
+           disrobing = "disarming";
        (void) take_off();
+    }
     /* The time to perform the command is already completely accounted for
      * in take_off(); if we return 1, that would add an extra turn to each
      * disrobe.