From: nethack.rankin Date: Sat, 3 Dec 2005 04:46:48 +0000 (+0000) Subject: killer reason tweaks X-Git-Tag: MOVE2GIT~1195 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d4c28b30a2770524415a188023b6eb621887100b;p=nethack killer reason tweaks A couple of items pointed out by : the killer reason when hit by mis-return of thrown Mjollnir would vary depending upon whether it was fully identified, unlike several other death-by-missile cases which force the object to be described as if fully ID'd. Also, the killer reason when death is caused by kicking an object would give way too much detail about the object if it was ID'd. Fix both by switching to killer_xname(). Now "killed by a war hammer named Mjollnir" becomes "killed by Mjollnir" (same as when already ID'd), and "killed by kicking 5 cursed poisoned -1 orcish arrows" becomes "killed by kicking orcish arrows" whether ID'd or not. [Trunk only] question? Should being hit by returning Mjollnir really be receiving half-physical-damage reduction when hero has that attribute? It ignores the fact that Mjollnir is also dishing out lightning damage. Are other artifact hits ignoring such things too? --- diff --git a/doc/fixes34.4 b/doc/fixes34.4 index 0ab5916b6..d4459f37f 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -158,6 +158,10 @@ adjust message for gas effect from chest trap if hero resists hallucination cancelling non-shop objects in a shop's entrance would upset the shopkeeper identified touchstone can rub on gold like the data.base entry says restore the capability of rubbing any object against known touchstone +tombstone's reason for death after being killed by mis-returning Mjollnir + varied depending upon whether it was fully identified +tombstone's reason for death from kicking an object could include so much + detail about the object that is was too verbose Platform- and/or Interface-Specific Fixes diff --git a/src/dokick.c b/src/dokick.c index 7d42a1457..6c86d60e0 100644 --- a/src/dokick.c +++ b/src/dokick.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)dokick.c 3.5 2005/06/22 */ +/* SCCS Id: @(#)dokick.c 3.5 2005/12/02 */ /* Copyright (c) Izchak Miller, Mike Stephenson, Steve Linhart, 1989. */ /* NetHack may be freely redistributed. See license for details. */ @@ -603,7 +603,7 @@ char *buf; { const char *what; - if (kickobj) what = distant_name(kickobj,doname); + if (kickobj) what = killer_xname(kickobj); else if (IS_DOOR(maploc->typ)) what = "a door"; else if (IS_TREE(maploc->typ)) what = "a tree"; else if (IS_STWALL(maploc->typ)) what = "a wall"; diff --git a/src/dothrow.c b/src/dothrow.c index 4db1307f4..024201022 100644 --- a/src/dothrow.c +++ b/src/dothrow.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)dothrow.c 3.5 2005/09/04 */ +/* SCCS Id: @(#)dothrow.c 3.5 2005/12/02 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1068,8 +1068,8 @@ boolean twoweap; /* used to restore twoweapon mode if wielded weapon returns */ body_part(ARM)); (void) artifact_hit((struct monst *)0, &youmonst, obj, &dmg, 0); - losehp(Maybe_Half_Phys(dmg), xname(obj), - obj_is_pname(obj) ? KILLED_BY : KILLED_BY_AN); + losehp(Maybe_Half_Phys(dmg), + killer_xname(obj), KILLED_BY); } if (ship_object(obj, u.ux, u.uy, FALSE)) { thrownobj = (struct obj*)0;