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:
nethack.rankin
2005-12-03 04:46:48 +00:00
parent 6955f1ab63
commit d4c28b30a2
3 changed files with 9 additions and 5 deletions

View File

@@ -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

View File

@@ -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";

View File

@@ -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;