]> granicus.if.org Git - nethack/commitdiff
killer reason tweaks
authornethack.rankin <nethack.rankin>
Sat, 3 Dec 2005 04:46:48 +0000 (04:46 +0000)
committernethack.rankin <nethack.rankin>
Sat, 3 Dec 2005 04:46:48 +0000 (04:46 +0000)
      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?

doc/fixes34.4
src/dokick.c
src/dothrow.c

index 0ab5916b6b1f12c01c5dc66cb6993da1eb69f1b2..d4459f37f2a1360a5010088194f2453869d45f89 100644 (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
index 7d42a1457ef19324e59894f35648a70424e9fcd3..6c86d60e09082ff8a22f439c9b0ddfb382be4600 100644 (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";
index 4db1307f48a43bb8f4a59f153b003d4731074b3b..0242010228bce5f79612f6e2b0042f4dd657e263 100644 (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;