Monsters can track hero through fixed teleport traps

Also make fixed teleport traps always trigger when entered.
This commit is contained in:
Pasi Kallinen
2024-06-15 18:44:25 +03:00
parent 4e1b6411bf
commit 89ea47f702
6 changed files with 31 additions and 1 deletions

View File

@@ -2897,6 +2897,11 @@ dotrap(struct trap *trap, unsigned trflags)
nomul(0);
if (fixed_tele_trap(trap)) {
trflags |= FORCETRAP;
forcetrap = TRUE;
}
/* KMH -- You can't escape the Sokoban level traps */
if (Sokoban && (is_pit(ttype) || is_hole(ttype))) {
/* The "air currents" message is still appropriate -- even when
@@ -3654,6 +3659,11 @@ mintrap(struct monst *mtmp, unsigned mintrapflags)
boolean already_seen = (mon_knows_traps(mtmp, tt)
|| (tt == HOLE && !mindless(mptr)));
if (fixed_tele_trap(trap)) {
mintrapflags |= FORCETRAP;
forcetrap = TRUE;
}
if (mtmp == u.usteed) {
; /* true when called from dotrap, inescapable is not an option */
} else if (Sokoban && (is_pit(tt) || is_hole(tt)) && !trap->madeby_u) {