defunct tame engulfer
From the newsgroup: Conflict caused tame engulfer to swallow hero. To try to get out, player hit it (with Magicbane, but that's not relevant other than to provide an alternate "you hit it" message). The magic-absorbing blade probes the invisible Audrey! You get regurgitated! placing defunct monster onto map? Program in disorder, &c [some look_here() feedback] You kill poor invisible Audrey! The problem was caused by hmon_hitmon(): it subtracted damage from the target's hit points, did some bookkeeping and message delivery, then called killed(). One bit of bookkeeping was to call abuse_pet() and monflee() when the target is tame, regardless of whether the damage was fatal. monflee() -> release_hero() -> expels() puts the hero and the engulfer back onto the map, and that warning was triggered because the former engulfer had no hit points left.
This commit is contained in:
@@ -352,6 +352,8 @@ if magically removing steed's saddle is fatal, don't leave it saddled in bones
|
||||
charging prompt used wrong criteria when deciding whether to list rings
|
||||
an orc (or gnome) will respond to #chat if hero is also an orc (or gnome)
|
||||
kicking at "empty space" has side-effects so should use current turn
|
||||
using weapon to kill tame engulfer from inside triggered "placing defunct
|
||||
monster onto map?" warning
|
||||
|
||||
|
||||
Platform- and/or Interface-Specific Fixes
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)monmove.c 3.5 2006/12/13 */
|
||||
/* SCCS Id: @(#)monmove.c 3.5 2007/05/16 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -228,6 +228,9 @@ int fleetime;
|
||||
boolean first;
|
||||
boolean fleemsg;
|
||||
{
|
||||
/* shouldn't happen; maybe warrants impossible()? */
|
||||
if (DEADMONSTER(mtmp)) return;
|
||||
|
||||
if (mtmp == u.ustuck) release_hero(mtmp); /* expels/unstuck */
|
||||
|
||||
if (!first || !mtmp->mflee) {
|
||||
|
||||
10
src/uhitm.c
10
src/uhitm.c
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)uhitm.c 3.5 2007/04/13 */
|
||||
/* SCCS Id: @(#)uhitm.c 3.5 2007/05/16 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1031,8 +1031,12 @@ int thrown; /* HMON_xxx (0 => hand-to-hand, other => ranged) */
|
||||
if (mon->mhp > mon->mhpmax) mon->mhp = mon->mhpmax;
|
||||
if (mon->mhp < 1)
|
||||
destroyed = TRUE;
|
||||
if (mon->mtame && (!mon->mflee || mon->mfleetim) && tmp > 0) {
|
||||
abuse_dog(mon);
|
||||
if (mon->mtame && tmp > 0) {
|
||||
/* do this even if the pet is being killed (affects revival) */
|
||||
abuse_dog(mon); /* reduces tameness */
|
||||
/* flee if still alive and still tame; if already suffering from
|
||||
untimed fleeing, no effect, otherwise increases timed fleeing */
|
||||
if (mon->mtame && !destroyed)
|
||||
monflee(mon, 10 * rnd(tmp), FALSE, FALSE);
|
||||
}
|
||||
if ((mdat == &mons[PM_BLACK_PUDDING] ||
|
||||
|
||||
Reference in New Issue
Block a user