fix issue #1378 - brain eaten after flayer's death
Issue reported by Umbire: if a mind flayer got turned to stone by hitting a hero who is polymorphed into a cockatrice and the first tentacle drain missed but a subsequent one hit, any remaining ones would keep being applied even though the mind flayer was dead. This works but doesn't feel right to me. A more substantial change to mhitm_ad_drin() didn't work as expected so I've settled for this. Fixes #1378
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.7 eat.c $NHDT-Date: 1715177703 2024/05/08 14:15:03 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.334 $ */
|
||||
/* NetHack 3.7 eat.c $NHDT-Date: 1740534854 2025/02/25 17:54:14 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.344 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -610,6 +610,12 @@ eat_brains(
|
||||
boolean give_nutrit = FALSE;
|
||||
int result = M_ATTK_HIT, xtra_dmg = rnd(10);
|
||||
|
||||
/* previous tentacle attack might have triggered fatal passive
|
||||
counterattack [callers ought to be updated to avoid this situation] */
|
||||
if (magr != &gy.youmonst && DEADMONSTER(magr)) {
|
||||
return M_ATTK_AGR_DIED;
|
||||
}
|
||||
|
||||
if (noncorporeal(pd)) {
|
||||
if (visflag)
|
||||
pline("%s brain is unharmed.",
|
||||
|
||||
Reference in New Issue
Block a user