rolling boulder hitting pit which holds monster
From a bug report, a rolling boulder trap could report that the boulder had fallen into the pit with you and then let it keep rolling. flooreffects() only returns true when it uses up the object being manipulated but it doesn't use up boulders that hit pits which hold monsters or the hero. Its caller needs to handle the cases where the boulder ends up sharing the pit with a monster.
This commit is contained in:
@@ -207,6 +207,7 @@ zero entries in DUNGEON, MONSTERS, et al, of config file are now treated
|
||||
as preserving the default rather than being ignored
|
||||
enlightenment: don't misreport polymorphed lycanthrope as "in beast form"
|
||||
remove TIMED_DELAY from the features checked for version compatibility
|
||||
rolling boulder hitting monster stuck in pit should stop even when mon survives
|
||||
|
||||
|
||||
Platform- and/or Interface-Specific Fixes
|
||||
|
||||
15
src/trap.c
15
src/trap.c
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)trap.c 3.4 2002/07/14 */
|
||||
/* SCCS Id: @(#)trap.c 3.4 2002/08/16 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -1310,8 +1310,19 @@ int style;
|
||||
seetrap(t);
|
||||
used_up = TRUE;
|
||||
break;
|
||||
case PIT:
|
||||
case SPIKED_PIT:
|
||||
case HOLE:
|
||||
case TRAPDOOR:
|
||||
/* the boulder won't be used up if there is a
|
||||
monster in the trap; stop rolling anyway */
|
||||
x2 = bhitpos.x, y2 = bhitpos.y; /* stops here */
|
||||
if (flooreffects(singleobj, x2, y2, "fall"))
|
||||
used_up = TRUE;
|
||||
dist = -1; /* stop rolling immediately */
|
||||
break;
|
||||
}
|
||||
if (used_up) break;
|
||||
if (used_up || dist == -1) break;
|
||||
}
|
||||
if (flooreffects(singleobj, bhitpos.x, bhitpos.y, "fall")) {
|
||||
used_up = TRUE;
|
||||
|
||||
Reference in New Issue
Block a user