From 649fc7f9b3b631d94c6286ef09df9ac2808b5d75 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Thu, 11 Aug 2022 08:43:37 +0300 Subject: [PATCH] Monsters "remember" noteleport levels ... using the same hack when zapping themselves: If the level is no-teleport, the monster will learn of teleport traps, and if it knows about them, won't try using teleportation again. --- src/muse.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/muse.c b/src/muse.c index 49ac4940d..61674e19d 100644 --- a/src/muse.c +++ b/src/muse.c @@ -1289,6 +1289,9 @@ find_offensive(struct monst* mtmp) if (obj->otyp == WAN_TELEPORTATION && obj->spe > 0 /* don't give controlled hero a free teleport */ && !Teleport_control + /* same hack as MUSE_WAN_TELEPORTATION_SELF */ + && (!noteleport_level(mtmp) + || !(mtmp->mtrapseen & (1 << (TELEP_TRAP - 1)))) /* do try to move hero to a more vulnerable spot */ && (onscary(u.ux, u.uy, mtmp) || (stairway_at(u.ux, u.uy)))) {