killing pets by displacing them into traps
A user pointed out that you lose pacifism conduct if you kill your
pet by displacing it into a trap but you don't gain any experience in
the process. Make this consistent with killing monsters in other ways:
if you get blamed for it then you should also get credit for it.
Probably minliquid() and mintrap() should take another argument so
they can call killed() instead of mondead() when necessary, but I didn't
go to that much effort....
This commit is contained in:
@@ -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
|
||||
|
||||
30
src/hack.c
30
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!");
|
||||
|
||||
Reference in New Issue
Block a user