diff --git a/doc/fixes34.4 b/doc/fixes34.4 index f03f13122..f503f22c1 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -48,6 +48,7 @@ fractured boulders or statues produced inconsistent object settings on the resulting rocks really fix rolling boulder bug C340-18, the previous "fix" reversed the test monster throwing greased weapon has same chance for slip/misfire as player +killing a pet by displacing it into a trap now yields experience Platform- and/or Interface-Specific Fixes diff --git a/src/hack.c b/src/hack.c index bc504494a..4ce1db40e 100644 --- a/src/hack.c +++ b/src/hack.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)hack.c 3.4 2004/01/03 */ +/* SCCS Id: @(#)hack.c 3.4 2004/08/16 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1392,19 +1392,33 @@ domove() adjalign(-3); break; case 2: - /* it may have drowned or died. that's no way to - * treat a pet! your god gets angry. + /* drowned or died... + * you killed your pet by direct action, so get experience + * and possibly penalties; + * we want the level gain message, if it happens, to occur + * before the guilt message below + */ + { + /* minliquid() and mintrap() call mondead() rather than + killed() so we duplicate some of the latter here */ + int tmp, mndx; + + u.uconduct.killer++; + mndx = monsndx(mtmp->data); + tmp = experience(mtmp, (int)mvitals[mndx].died + 1); + more_experienced(tmp, 0); + newexplevel(); /* will decide if you go up */ + } + /* That's no way to treat a pet! Your god gets angry. + * + * [This has always been pretty iffy. Why does your + * patron deity care at all, let alone enough to get mad?] */ if (rn2(4)) { You_feel("guilty about losing your pet like this."); u.ugangr++; adjalign(-15); } - - /* you killed your pet by direct action. - * minliquid and mintrap don't know to do this - */ - u.uconduct.killer++; break; default: pline("that's strange, unknown mintrap result!");