Difference between revisions of "Teleportation"

From NetHackWiki
Jump to navigation Jump to search
(See also)
(did some source diving, added section on valid teleport destinations (should do more wizmode testing to double-check...))
Line 14: Line 14:
 
There are three teleport-related properties: [[teleportitis]], which teleports you horizontally at random; [[teleport control]], which lets you choose where teleports land; and teleport at will, which lets you trigger teleportitis to happen whenever you want at a power cost.
 
There are three teleport-related properties: [[teleportitis]], which teleports you horizontally at random; [[teleport control]], which lets you choose where teleports land; and teleport at will, which lets you trigger teleportitis to happen whenever you want at a power cost.
  
Horizontal teleportation almost always move you away from your current position, but there is a very rare chance to land on the [http://groups.google.com/group/rec.games.roguelike.nethack/msg/fd6ff9fff482a512 exact same square].
+
Horizontal teleportation almost always move you away from your current position, but there is a very rare chance to land on the exact same square.<ref>http://groups.google.com/group/rec.games.roguelike.nethack/msg/fd6ff9fff482a512</ref>
  
{{todo|Add more details about horizontal teleporation. It seems that you never land on a [[trap]], in [[water]] or in [[lava]].}}
+
==Valid destinations==
 +
 
 +
You cannot teleport to a square that is considered unsafe for you to occupy<ref>{{function|teleport.c|teleok}}</ref>, not even deliberately with teleport control. If you try, you will receive the message '''Sorry...''', and will be teleported randomly instead.<ref>{{sourcecode|teleport.c|444}}</ref>
 +
 
 +
In particular:
 +
 
 +
* You cannot teleport into [[water]] unless you're polymorphed into a [[flying]], [[swimming]] or [[amphibious]] monster, or have [[water walking]], [[magical breathing]] or [[intrinsic]] [[levitation]].<ref>{{sourcecode|teleport.c|61}}; for some reason, the code checks for <code>HLevitation</code>, which means intrinsic levitation only, rather than <code>Levitation</code>, which means levitation in general.</ref> Due to what may be a [[bug]], extrinsic levitation (from the [[levitation boots|boots]] or [[ring of levitation]]) does ''not'' count.
 +
 
 +
* You also cannot teleport into [[lava]], unless you have intrinsic levitation.<ref>{{sourcecode|teleport.c|69}}</ref> (Again, extrinsic levitation isn't enough.)
 +
 
 +
* If you're polymorphed into a [[sea monster]], you only have a 1 in 13 chance of successfully teleporting onto dry land.<ref>{{sourcecode|teleport.c|67}}</ref>
 +
 
 +
* You cannot teleport onto a [[trap]], unless there are no other valid locations to teleport to. (The game will try 200 times to pick a safe location for you before considering trapped locations<ref>{{function|teleport.c|safe_teleds}}</ref>.) In particular, [[magic portal]]s are considered traps, so you cannot teleport directly onto your [[quest]] portal.
 +
 
 +
* You cannot teleport into solid rock unless polymorphed into a [[phasing]] monster,<ref>{{sourcecode|teleport.c|75}}</ref> onto closed [[doors]] unless you're [[amorphous]],<ref>{{sourcecode|teleport.c|81}}</ref> or onto a [[boulder]] unless you're a [[giant]].<ref>{{sourcecode|teleport.c|83}}</ref>
 +
 
 +
* You cannot teleport onto [[tree]]s, [[iron bars]] or a raised [[drawbridge]], nor into a [[secret door]] or [[secret corridor]].<ref>{{sourcecode|teleport.c|77}}; {{sourcecode|rm.h|32}} to line 84</ref>
 +
 
 +
* You cannot teleport into the [[Wizard's tower]] from outside it, nor outside it from the inside.<ref>{{function|teleport.c|tele_jump_ok}}</ref>
 +
 
 +
There is also some code the could prevent the player from teleporting in and out of force fields,<ref>{{sourcecode|teleport.c|225}}, {{function|region.c|in_out_region}}</ref> but those [[deferred feature|do not exist]] in vanilla NetHack 3.4.3.
  
 
==See also==
 
==See also==
Line 22: Line 42:
 
* [[Teleport control]]
 
* [[Teleport control]]
 
* [[Non-teleport level]]
 
* [[Non-teleport level]]
 +
 +
==References==
 +
<references/>
  
 
[[Category:Actions]]
 
[[Category:Actions]]

Revision as of 01:09, 15 February 2015

Teleportation provides a quick escape to a different (often random) location. Some escape items can teleport you away from monsters. Some monsters can also teleport themselves to flee from you.

Teleportation comes from:

There are three teleport-related properties: teleportitis, which teleports you horizontally at random; teleport control, which lets you choose where teleports land; and teleport at will, which lets you trigger teleportitis to happen whenever you want at a power cost.

Horizontal teleportation almost always move you away from your current position, but there is a very rare chance to land on the exact same square.[1]

Valid destinations

You cannot teleport to a square that is considered unsafe for you to occupy[2], not even deliberately with teleport control. If you try, you will receive the message Sorry..., and will be teleported randomly instead.[3]

In particular:

  • You also cannot teleport into lava, unless you have intrinsic levitation.[5] (Again, extrinsic levitation isn't enough.)
  • If you're polymorphed into a sea monster, you only have a 1 in 13 chance of successfully teleporting onto dry land.[6]
  • You cannot teleport onto a trap, unless there are no other valid locations to teleport to. (The game will try 200 times to pick a safe location for you before considering trapped locations[7].) In particular, magic portals are considered traps, so you cannot teleport directly onto your quest portal.
  • You cannot teleport into the Wizard's tower from outside it, nor outside it from the inside.[12]

There is also some code the could prevent the player from teleporting in and out of force fields,[13] but those do not exist in vanilla NetHack 3.4.3.

See also

References