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
-/* 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. */
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!");