fix message when monster's two-handed weapon welds

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.
This commit is contained in:
nhmall
2022-06-02 19:20:21 -04:00
parent afbb7e2827
commit 516df172d0
2 changed files with 7 additions and 1 deletions

View 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 the pickup_burden prompt and declined to continue, the item remained
split rather be recombined, making it possible to create multiple split rather be recombined, making it possible to create multiple
stacks of gold inside a container 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 Fixes to 3.7.0-x Problems that Were Exposed Via git Repository

View File

@@ -836,9 +836,13 @@ mon_wield_item(struct monst *mon)
newly_welded = mwelded(obj); newly_welded = mwelded(obj);
obj->owornmask &= ~W_WEP; obj->owornmask &= ~W_WEP;
if (newly_welded) { 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"), pline("%s %s to %s %s!", Tobjnam(obj, "weld"),
is_plural(obj) ? "themselves" : "itself", is_plural(obj) ? "themselves" : "itself",
s_suffix(mon_nam(mon)), mbodypart(mon, HAND)); s_suffix(mon_nam(mon)), mon_hand);
obj->bknown = 1; obj->bknown = 1;
} }
} }