diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index 7745bb802..bbfc9e775 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -1,4 +1,4 @@ -HDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.940 $ $NHDT-Date: 1654710405 2022/06/08 17:46:45 $ +HDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.941 $ $NHDT-Date: 1654717838 2022/06/08 19:50:38 $ General Fixes and Modified Features ----------------------------------- @@ -919,6 +919,9 @@ two-handed weapon message stated "welds to monster's hand" instead of "welds to monster's hands" when formatting an object, avoid capitalization of "The" in " named The " +be less specific when cause of death is "handling a " that + happened to be silver for current game; list it as "a silver ring" or + "a silver wand" rather than "ring of searching" or "wand of locking" Fixes to 3.7.0-x Problems that Were Exposed Via git Repository diff --git a/src/artifact.c b/src/artifact.c index 2ecbb2bc8..522afd5b6 100644 --- a/src/artifact.c +++ b/src/artifact.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 artifact.c $NHDT-Date: 1646870837 2022/03/10 00:07:17 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.182 $ */ +/* NetHack 3.7 artifact.c $NHDT-Date: 1654717838 2022/06/08 19:50:38 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.190 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2013. */ /* NetHack may be freely redistributed. See license for details. */ @@ -2179,13 +2179,26 @@ retouch_object( obj->owornmask ? " anymore" : ""); /* also inflict damage unless touch_artifact() already did so */ if (!touch_blasted) { + const char *what = killer_xname(obj); + + if (ag && !obj->oartifact && !bane) { + /* 'obj' is silver; for rings and wands it ended up that + way due to randomization at start of game; showing this + game's silver item without stating that it is silver + potentially leads to confusion about cause of death */ + if (obj->oclass == RING_CLASS) + what = "a silver ring"; + else if (obj->oclass == WAND_CLASS) + what = "a silver wand"; + /* for anything else, stick with killer_xname() */ + } /* damage is somewhat arbitrary; half the usual 1d20 physical for silver, 1d10 magical for bane, potentially both */ if (ag) tmp = rnd(10), dmg += Maybe_Half_Phys(tmp); if (bane) dmg += rnd(10); - Sprintf(buf, "handling %s", killer_xname(obj)); + Sprintf(buf, "handling %s", what); losehp(dmg, buf, KILLED_BY); exercise(A_CON, FALSE); }