From: nhmall Date: Thu, 2 Jun 2022 13:41:47 +0000 (-0400) Subject: restrict stunning effect to is_xport trap types X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8848a819902ecfda44d7d5b96b8f4364e95f737a;p=nethack restrict stunning effect to is_xport trap types The issue first arose in commit 6a65b412. Reported to devteam via email by entrez. --- diff --git a/doc/fixes3-7-0.txt b/doc/fixes3-7-0.txt index f80ead36c..e48455bed 100644 --- a/doc/fixes3-7-0.txt +++ b/doc/fixes3-7-0.txt @@ -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 diff --git a/src/teleport.c b/src/teleport.c index 71fd37777..abeb63f19 100644 --- a/src/teleport.c +++ b/src/teleport.c @@ -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 */ }