diff --git a/doc/fixes34.1 b/doc/fixes34.1 index abbbf68ce..8a38da350 100644 --- a/doc/fixes34.1 +++ b/doc/fixes34.1 @@ -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 diff --git a/src/trap.c b/src/trap.c index 5962ce5a2..250380d63 100644 --- a/src/trap.c +++ b/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;