killer reason tweaks
A couple of items pointed out by <Someone>: 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?
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user