]> granicus.if.org Git - nethack/commitdiff
restrict stunning effect to is_xport trap types
authornhmall <nhmall@nethack.org>
Thu, 2 Jun 2022 13:41:47 +0000 (09:41 -0400)
committernhmall <nhmall@nethack.org>
Thu, 2 Jun 2022 13:41:47 +0000 (09:41 -0400)
The issue first arose in commit 6a65b412.
Reported to devteam via email by entrez.

doc/fixes3-7-0.txt
src/teleport.c

index f80ead36cc90a947eea24517a7d90bdc56996982..e48455bedb6c5ee4bb2a97e9e259756d75bfaec8 100644 (file)
@@ -1228,6 +1228,7 @@ for menustyle:Full, fix the combination of 'A' auto-pick all plus 'P' just
        picked up to limit what "all" means
 for menustyle:Traditional, fix 'P' for just picked up items in inventory when
        filtering what items to put into a container
+restrict stunning effect to is_xport trap types
 
 curses: 'msg_window' option wasn't functional for curses unless the binary
        also included tty support
index 71fd3777773769fa8e8e565bd294658d2ee9caf9..abeb63f19f2e99de93752595441c2747e2c055fb 100644 (file)
@@ -1571,7 +1571,14 @@ mlevel_tele_trap(
             if (trap)
                 seetrap(trap);
         }
-        mtmp->mstun = 1;
+        /*
+         * Commit 6a65b412 stated "Using magic portals and level teleporters
+         * stuns for a few turns. It's taxing to teleport long distances."
+         *
+         * In keeping with that stated intent, restrict the stunning effect.
+         */
+        if (is_xport(tt))
+            mtmp->mstun = 1;
         migrate_to_level(mtmp, ledger_no(&tolevel), migrate_typ, (coord *) 0);
         return Trap_Moved_Mon; /* no longer on this level */
     }