restrict stunning effect to is_xport trap types

The issue first arose in commit 6a65b412.
Reported to devteam via email by entrez.
This commit is contained in:
nhmall
2022-06-02 09:41:47 -04:00
parent 5977fa4481
commit 8848a81990
2 changed files with 9 additions and 1 deletions

View 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

View 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 */
}