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

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
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

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. */
/* 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.