Make monsters not scared of the Sokoban rolling boulder traps

They aren't initially loaded with boulders, thus aren't dangerous.

This is particularly relevant for pets, who would otherwise be very
reluctant to follow their owners up to the level above.
This commit is contained in:
Alex Smith
2026-06-08 04:41:31 +01:00
parent 9f7a9d2c88
commit 738aa5c076
2 changed files with 4 additions and 0 deletions
+1
View File
@@ -56,6 +56,7 @@ if the hero has already been told that an engraving vanished, ensure that
aklys path shouldn't be shown for locations that the hero cannot see aklys path shouldn't be shown for locations that the hero cannot see
keep the player better-informed about status of the tether on their weapon keep the player better-informed about status of the tether on their weapon
don't overflow svp.plname on restore (pr #1570 by chasonr) don't overflow svp.plname on restore (pr #1570 by chasonr)
monsters (including pets) aren't scared of the Sokoban rolling boulder traps
Platform- and/or Interface-Specific Fixes Platform- and/or Interface-Specific Fixes
+3
View File
@@ -1129,6 +1129,9 @@ m_harmless_trap(struct monst *mtmp, struct trap *ttmp)
case LANDMINE: case LANDMINE:
break; break;
case ROLLING_BOULDER_TRAP: case ROLLING_BOULDER_TRAP:
/* the Sokoban rolling boulder traps are not dangerous */
if (In_sokoban(&u.uz))
return TRUE;
break; break;
case SLP_GAS_TRAP: case SLP_GAS_TRAP:
if (resists_sleep(mtmp) || defended(mtmp, AD_SLEE)) if (resists_sleep(mtmp) || defended(mtmp, AD_SLEE))