From a49dcd1e12d3e4ff9aebc1f5e8b8616e415d5d60 Mon Sep 17 00:00:00 2001 From: PatR Date: Tue, 7 Jan 2020 04:40:20 -0800 Subject: [PATCH] tethered aklys description Recent object formatting changes for wielded weapon put some pline arguments in the wrong order. a - aklys (weapontethered in hand) or worse, when dual-wielding a - aklys (wieldedtethered in right hand) Change back to a - aklys (tethered weapon in hand) or a - aklys (tethered weapon in right hand) I considered (tethered weapon wielded in right hand) for the two- weapon case, but I think that's too verbose. --- doc/fixes37.0 | 3 ++- src/objnam.c | 11 +++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 296007d4f..1aff7a2f9 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.55 $ $NHDT-Date: 1578394755 2020/01/07 10:59:15 $ +$NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.56 $ $NHDT-Date: 1578400811 2020/01/07 12:40:11 $ General Fixes and Modified Features ----------------------------------- @@ -53,6 +53,7 @@ autounlock with artifact unlocking tool didn't do touch check on that tool autounlock picked Rogue's artifact key over lock-pick or credit card (or ordinary key depending upon invent order) even for non-rogues who would be blasted when touching it +wielded aklys had its "(tethered weapon...)" description scrambled Platform- and/or Interface-Specific Fixes diff --git a/src/objnam.c b/src/objnam.c index 05a8958ad..c86d55d22 100644 --- a/src/objnam.c +++ b/src/objnam.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 objnam.c $NHDT-Date: 1578394756 2020/01/07 10:59:16 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.281 $ */ +/* NetHack 3.7 objnam.c $NHDT-Date: 1578400811 2020/01/07 12:40:11 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.282 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2011. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1174,7 +1174,9 @@ unsigned doname_flags; } if ((obj->owornmask & W_WEP) && !g.mrg_to_wielded) { - boolean twoweap_primary = (obj == uwep && u.twoweap); + boolean twoweap_primary = (obj == uwep && u.twoweap), + tethered = (obj->otyp == AKLYS); + /* use alternate phrasing for non-weapons and for wielded ammo (arrows, bolts), or missiles (darts, shuriken, boomerangs) @@ -1195,8 +1197,9 @@ unsigned doname_flags; /* note: Sting's glow message, if added, will insert text in front of "(weapon in hand)"'s closing paren */ Sprintf(eos(bp), " (%s%s in %s%s)", - twoweap_primary ? "wielded" : "weapon", - (obj->otyp == AKLYS) ? "tethered " : "", + tethered ? "tethered " : "", /* aklys */ + /* avoid "tethered wielded in right hand" for twoweapon */ + (twoweap_primary && !tethered) ? "wielded" : "weapon", twoweap_primary ? "right " : "", hand_s); if (g.warn_obj_cnt && obj == uwep