Difference between revisions of "Teleportation"
(did some source diving, added section on valid teleport destinations (should do more wizmode testing to double-check...)) |
(→Valid destinations: a few corrections and additions) |
||
Line 18: | Line 18: | ||
==Valid destinations== | ==Valid destinations== | ||
− | You cannot teleport to a square that is considered unsafe for you to occupy<ref>{{function|teleport.c|teleok}}</ref>, | + | You cannot teleport to a square that is already occupied by a monster,<ref>{{sourcecode|teleport.c|57}}</ref> or to one that is considered unsafe for you to occupy.<ref>{{function|teleport.c|teleok}}</ref> If you try to do so deliberately, with teleport control, you will receive the message '''Sorry...''', and will be teleported randomly instead.<ref>{{sourcecode|teleport.c|444}}</ref> |
In particular: | In particular: | ||
Line 24: | Line 24: | ||
* 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 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 | + | * You also cannot teleport onto [[lava]], unless you have intrinsic levitation.<ref>{{sourcecode|teleport.c|69}}</ref> Again, extrinsic levitation isn't enough, and neither is being polymorphed into a [[fire elemental]] or a [[salamander]] (even though both can be generated in laval). |
* 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> | * 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> | ||
Line 30: | Line 30: | ||
* 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 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. | ||
− | * | + | * Only [[phasing]] monsters can teleport into [[solid rock]], into [[wall]]s, [[tree]]s, [[iron bars]] or a raised [[drawbridge]], or into a [[secret door]] or a [[secret corridor]].<ref>{{sourcecode|teleport.c|75}}; {{sourcecode|teleport.c|77}}; {{sourcecode|rm.h|32}} to line 84</ref> Teleporting onto a closed [[door]] is only possible for phasing or [[amorphous]] monsters,<ref>{{sourcecode|teleport.c|81}}</ref> and only [[giant]]s and phasing monsters can teleport onto [[boulder]]s.<ref>{{sourcecode|teleport.c|83}}</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> | |
− | |||
− | * You cannot teleport into the [[Wizard's | ||
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. | 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. |
Revision as of 01:50, 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:
- ring of teleportation
- scroll of teleportation
- spellbook of teleport away
- wand of teleportation
- teleportitis
- teleport trap
- quantum mechanic attack
- cursed spellbook, especially low-level ones
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 already occupied by a monster,[2] or to one that is considered unsafe for you to occupy.[3] If you try to do so deliberately, with teleport control, you will receive the message Sorry..., and will be teleported randomly instead.[4]
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.[5] Due to what may be a bug, extrinsic levitation (from the boots or ring of levitation) does not count.
- You also cannot teleport onto lava, unless you have intrinsic levitation.[6] Again, extrinsic levitation isn't enough, and neither is being polymorphed into a fire elemental or a salamander (even though both can be generated in laval).
- If you're polymorphed into a sea monster, you only have a 1 in 13 chance of successfully teleporting onto dry land.[7]
- 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[8].) In particular, magic portals are considered traps, so you cannot teleport directly onto your quest portal.
- Only phasing monsters can teleport into solid rock, into walls, trees, iron bars or a raised drawbridge, or into a secret door or a secret corridor.[9] Teleporting onto a closed door is only possible for phasing or amorphous monsters,[10] and only giants and phasing monsters can teleport onto boulders.[11]
- 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
- ↑ http://groups.google.com/group/rec.games.roguelike.nethack/msg/fd6ff9fff482a512
- ↑ teleport.c, line 57
- ↑ teleok in teleport.c
- ↑ teleport.c, line 444
- ↑ teleport.c, line 61; for some reason, the code checks for
HLevitation
, which means intrinsic levitation only, rather thanLevitation
, which means levitation in general. - ↑ teleport.c, line 69
- ↑ teleport.c, line 67
- ↑ safe_teleds in teleport.c
- ↑ teleport.c, line 75; teleport.c, line 77; rm.h, line 32 to line 84
- ↑ teleport.c, line 81
- ↑ teleport.c, line 83
- ↑ tele_jump_ok in teleport.c
- ↑ teleport.c, line 225, in_out_region in region.c