diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 42e7a49cf..2a267fe74 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -1,4 +1,4 @@ -$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.43 $ $NHDT-Date: 1559994620 2019/06/08 11:50:20 $ +$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.44 $ $NHDT-Date: 1559998716 2019/06/08 12:58:36 $ This fixes36.3 file is here to capture information about updates in the 3.6.x lineage following the release of 3.6.2 in May 2019. Please note, however, @@ -63,6 +63,9 @@ thrown or kicked light source (lit lamp, candle, oil) should emit light as it traverses the map; dungeon features, objects, or monsters seen while it's in transit will become part of hero's memory of the level, and any messages delivered won't have stale light from it around the hero +unlike watching a monster trying to swap out a cursed weapon for some other + weapon and failing, watching it wield a cursed weapon didn't report + that weapon becoming welded to the monster's hand/claw/whatever Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/src/weapon.c b/src/weapon.c index 3e817a7a3..102740933 100644 --- a/src/weapon.c +++ b/src/weapon.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 weapon.c $NHDT-Date: 1548209744 2019/01/23 02:15:44 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.69 $ */ +/* NetHack 3.6 weapon.c $NHDT-Date: 1559998716 2019/06/08 12:58:36 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.70 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2011. */ /* NetHack may be freely redistributed. See license for details. */ @@ -831,8 +831,18 @@ register struct monst *mon; setmnotwielded(mon, mw_tmp); mon->weapon_check = NEED_WEAPON; if (canseemon(mon)) { + boolean newly_welded; + pline("%s wields %s!", Monnam(mon), doname(obj)); - if (mwelded(mw_tmp)) { + /* 3.6.3: mwelded() predicate expects the object to have its + W_WEP bit set in owormmask, but the pline here and for + artifact_light don't want that because they'd have '(weapon + in hand/claw)' appended; so we set it for the mwelded test + and then clear it, until finally setting it for good below */ + obj->owornmask |= W_WEP; + newly_welded = mwelded(obj); + obj->owornmask &= ~W_WEP; + if (newly_welded) { pline("%s %s to %s %s!", Tobjnam(obj, "weld"), is_plural(obj) ? "themselves" : "itself", s_suffix(mon_nam(mon)), mbodypart(mon, HAND)); @@ -845,6 +855,12 @@ register struct monst *mon; pline("%s %s in %s %s!", Tobjnam(obj, "shine"), arti_light_description(obj), s_suffix(mon_nam(mon)), mbodypart(mon, HAND)); + /* 3.6.3: artifact might be getting wielded by invisible monst */ + else if (cansee(mon->mx, mon->my)) + pline("Light begins shining %s.", + (distu(mon->mx, mon->my) <= 5 * 5) + ? "nearby" + : "in the distance"); } obj->owornmask = W_WEP; return 1;