bandaid for #U49

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?
This commit is contained in:
nethack.rankin
2002-09-09 07:36:13 +00:00
parent 727bf172ad
commit b8f368ced4
2 changed files with 17 additions and 6 deletions
+1
View 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 fix enlightenment feedback for bonus or penalty on damage and chance to hit
effects of purple worms consuming special monsters is now more consistent effects of purple worms consuming special monsters is now more consistent
across eating, digesting and dropped corpses while engulfed across eating, digesting and dropped corpses while engulfed
avoid "you finish disrobing" when disarming via the 'A' command
Platform- and/or Interface-Specific Fixes Platform- and/or Interface-Specific Fixes
+16 -6
View 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. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -1782,6 +1782,8 @@ do_takeoff()
return(otmp); return(otmp);
} }
static const char *disrobing = "";
STATIC_PTR STATIC_PTR
int int
take_off() take_off()
@@ -1810,7 +1812,7 @@ take_off()
todelay = 0; todelay = 0;
if (taking_off == 0L) { if (taking_off == 0L) {
You("finish disrobing."); You("finish %s.", disrobing);
return 0; return 0;
} else if (taking_off == W_WEP) { } else if (taking_off == W_WEP) {
todelay = 1; todelay = 1;
@@ -1863,7 +1865,7 @@ take_off()
*/ */
if (todelay>0) todelay--; if (todelay>0) todelay--;
set_occupation(take_off, "disrobing", 0); set_occupation(take_off, disrobing, 0);
return(1); /* get busy */ return(1); /* get busy */
} }
@@ -1871,6 +1873,7 @@ void
reset_remarm() reset_remarm()
{ {
taking_off = takeoff_mask = 0L; taking_off = takeoff_mask = 0L;
disrobing = nul;
} }
/* the 'A' command */ /* the 'A' command */
@@ -1880,8 +1883,8 @@ doddoremarm()
int result = 0; int result = 0;
if (taking_off || takeoff_mask) { if (taking_off || takeoff_mask) {
You("continue disrobing."); You("continue %s.", disrobing);
set_occupation(take_off, "disrobing", 0); set_occupation(take_off, disrobing, 0);
(void) take_off(); (void) take_off();
return 0; return 0;
} else if (!uwep && !uswapwep && !uquiver && !uamul && !ublindf && } else if (!uwep && !uswapwep && !uquiver && !uamul && !ublindf &&
@@ -1895,8 +1898,15 @@ doddoremarm()
(result = ggetobj("take off", select_off, 0, FALSE, (unsigned *)0)) < -1) (result = ggetobj("take off", select_off, 0, FALSE, (unsigned *)0)) < -1)
result = menu_remarm(result); 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(); (void) take_off();
}
/* The time to perform the command is already completely accounted for /* 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 * in take_off(); if we return 1, that would add an extra turn to each
* disrobe. * disrobe.