More interesting rolling boulder traps

Rolling boulder traps now react to having boulders pushed onto them;
the boulder will roll until reaching the trap's launch spot
(resetting the trap if the boulder was removed), or until it hits a
wall otherwise.

Because they can now be reset, they aren't removed when stepping on
them with a misplaced boulder (although no boulder moves unless
there's one on the appropriate spot).
This commit is contained in:
Alex Smith
2026-04-14 11:28:07 +01:00
parent 10a47c0713
commit bc94d7a355
3 changed files with 31 additions and 5 deletions

View File

@@ -2671,9 +2671,13 @@ trapeffect_rolling_boulder_trap(
!Deaf ? "Click! " : "");
if (!launch_obj(BOULDER, trap->launch.x, trap->launch.y,
trap->launch2.x, trap->launch2.y, style)) {
deltrap(trap);
newsym(u.ux, u.uy); /* get rid of trap symbol */
pline("Fortunately for you, no boulder was released.");
/* if this is a known trap, the player may have known there wasn't
a lined up boulder, so use a shorter message to avoid --More--
spam */
if (style & LAUNCH_KNOWN)
pline("No boulder was released.");
else
pline("Fortunately for you, no boulder was released.");
}
} else {
if (!m_in_air(mtmp)) {