]> granicus.if.org Git - nethack/commitdiff
fix message when monster's two-handed weapon welds
authornhmall <nhmall@nethack.org>
Thu, 2 Jun 2022 23:20:21 +0000 (19:20 -0400)
committernhmall <nhmall@nethack.org>
Thu, 2 Jun 2022 23:20:21 +0000 (19:20 -0400)
K3610 reported to devteam:
When you see a monster wield a cursed two-handed weapon,
the weapon "welds itself to the foo's hand" instead of its "hands."

Observed on hill orcs wielding a cursed two-handed sword.

doc/fixes3-7-0.txt
src/weapon.c

index e90b77e8f56f51d8408bd7b601ea1b19a313a830..bfdc6e9554b9a39299e0b50f3058b406ecc8737c 100644 (file)
@@ -915,6 +915,8 @@ if player gave a subset count when removing an item from a container, then got
        the pickup_burden prompt and declined to continue, the item remained
        split rather be recombined, making it possible to create multiple
        stacks of gold inside a container
+two-handed weapon message stated "welded to monsters hand" instead of
+       "welded to monsters hands"
 
 
 Fixes to 3.7.0-x Problems that Were Exposed Via git Repository
index 4c158abe9df7c97d70f9ff5a50951234cb8e3590..ab41e1fd03892f13eba499fe8149766bbf711d06 100644 (file)
@@ -836,9 +836,13 @@ mon_wield_item(struct monst *mon)
             newly_welded = mwelded(obj);
             obj->owornmask &= ~W_WEP;
             if (newly_welded) {
+                const char *mon_hand = mbodypart(mon, HAND);
+
+                if (bimanual(obj))
+                    mon_hand = makeplural(mon_hand);
                 pline("%s %s to %s %s!", Tobjnam(obj, "weld"),
                       is_plural(obj) ? "themselves" : "itself",
-                      s_suffix(mon_nam(mon)), mbodypart(mon, HAND));
+                      s_suffix(mon_nam(mon)), mon_hand);
                 obj->bknown = 1;
             }
         }