Teleport region

From NetHackWiki
Jump to navigation Jump to search

A teleport region is a region on a level that controls the possible locations of teleports, and random placement when arriving to a level via hole, trap door, levelport, and branchport. Teleport regions are defined in level definition files using the TELEPORT_REGION directive.

It is not possible to teleport from inside to outside, or from outside to inside, a teleport region.[1][2][3]

Teleport regions may specify whether they are possible arrival destinations for a particular direction of arrival (upwards, downwards, or both). When arriving at a level via hole, trap door, levelport, or branchport, the hero is randomly placed, and will be subject to the teleport region of their arrival direction.[4][5] Monsters and objects are also subject to the teleport region when arriving.[6][7]

The following special levels contain teleport regions:

A user has suggested improving this page or section as follows:

"Add the missing boundary descriptions"

  • The Castle has two teleport regions, one each for upward and downward arrival. The maze containing the upstair is for downward arrival, while the opposite-side maze is for upward arrival.
  • Medusa's Island, all four versions, in order to place arrival locations near the appropriate stairs. The third version only has a teleport region for downward arrival, while the others have both upward and downward regions.
  • Big Room #10, preventing downwards arrival into the fog maze.
  • Endgame levels, controlling arrival location.
  • Wizard's Tower levels
  • Fake Wizard's Tower levels, excluding the central towers as arrival locations.
  • Valley of the Dead
  • Juiblex's Swamp
  • Orcus-town
  • Asmodeus' Lair
  • Baalzebub's Lair
  • Moloch's Sanctum
  • Fort Ludios: although it is not possible to arrive here by falling or levelport, it is possible to arrive by branchport, and the teleport region will ensure placement in the small room containing the portal.
  • Orctown, to prevent arriving inside the town when being randomly placed on the level.

The following information pertains to an upcoming version (NetHack 3.7.0). If this version is now released, please verify that it is still accurate, then update the page to incorporate this information.

As of commit c4c31ae6, the wine cellar version of Mines' End has a teleport region to exclude the treasure chamber as an arrival location.

References

  1. src/teleport.c in NetHack 3.6.7, line 222: tele_jump_ok() prevents teleporting across a dndest or updest region boundary
  2. util/lev_comp.y in NetHack 3.6.7, line 1820-L1833: The DES file parser converts the TELEPORT_REGION directive into a LR_TELE, LR_UPTELE, or LR_DOWNTELE value
  3. src/mkmaze.c in NetHack 3.6.7, line 505-L530: fixup_special() converts the LR_*TELE into updest and dndest regions
  4. src/dungeon.c in NetHack 3.6.7, line 1214: u_on_rndspot() is called when hero is randomly placed while entering a level
  5. src/do.c in NetHack 3.6.7, line 1540: u_on_rndspot() call from goto_level()
  6. src/teleport.c in NetHack 3.6.7, line 1132: monster arrival
  7. src/teleport.c in NetHack 3.6.7, line 1446: object arrival