From: Pasi Kallinen Date: Thu, 11 Aug 2022 05:43:37 +0000 (+0300) Subject: Monsters "remember" noteleport levels X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=649fc7f9b3b631d94c6286ef09df9ac2808b5d75;p=nethack 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. --- 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)))) {