Difference between revisions of "Trap"

From NetHackWiki
Jump to navigation Jump to search
(Bear trap: Add damage (from Beartrap article) and effect of riding. Update source links to 3.6.2.)
(Added xNetHack section and did some copy-editing)
Line 8: Line 8:
 
Certain types of traps can be disarmed with the #[[untrap]] command.
 
Certain types of traps can be disarmed with the #[[untrap]] command.
  
In both filler levels and most special levels, a "random" trap is selected uniformly from the whole set of eligible traps, subject to level difficulty checks and some exclusions; see below. {{reffunc|mklev.c|mktrap}} Oddly, special levels that contain maze filler (the Castle, Asmodeus, Baalzebub, Orcus, and all real and fake Wizard's Tower levels, but NOT the Big Room or the Catacombs) use a completely separate formula that ignores level difficulty for selecting traps in the mazes. {{reffunc|sp_lev.c|rndtrap}} It nonetheless ends up working much the same way overall, but actually makes fire traps ''less'' common than they would otherwise be in Gehennom on those levels.
+
In both filler levels and most special levels, a "random" trap is selected uniformly from the whole set of eligible traps, subject to level difficulty checks and some exclusions; see below.{{reffunc|mklev.c|mktrap}} Oddly, special levels that contain maze filler (the Castle, Asmodeus, Baalzebub, Orcus, and all real and fake Wizard's Tower levels, but ''not'' the Big Room or the Catacombs) use a completely separate formula that ignores level difficulty for selecting traps in the mazes.{{reffunc|sp_lev.c|rndtrap}} It nonetheless ends up working much the same way overall, but actually makes fire traps ''less'' common than they would otherwise be in Gehennom on those levels.
  
 
Many traps affect [[monster]]s, including [[pet]]s, differently than they affect you. Some traps cannot even be triggered by [[monster]]s.
 
Many traps affect [[monster]]s, including [[pet]]s, differently than they affect you. Some traps cannot even be triggered by [[monster]]s.
  
In [[NetHack 3.6.1]], certain types of traps up to dungeon level 4 may have a pre-aged [[corpse]] generated on top, along with random cursed weapons, tools, food or gems. The chance is 1 - (Dlvl - 1) / 4 {{refsrc|src/mklev.c|1391|version=NetHack 3.6.1}}, so every eligible trap will have a corpse on the first floor. There will always be at least one possession, and there is a 20% chance of placing an additional possession after each one. {{refsrc|src/mklev.c|1458|version=NetHack 3.6.1}} Squeaky boards and rust traps never have a corpse because they are non-lethal, and pits or holes also never generate a corpse (but pits are often seen with corpses of monsters that fell in).
+
In [[NetHack 3.6.1]], certain types of traps up to dungeon level 4 may have a pre-aged [[corpse]] generated on top, along with random cursed weapons, tools, food or gems. The chance is 1 − {{sfrac|Dlvl − 1|4}},{{refsrc|src/mklev.c|1391|version=NetHack 3.6.1}} so every eligible trap will have a corpse on the first floor. There will always be at least one possession, and there is a 20% chance of placing an additional possession after each one.{{refsrc|src/mklev.c|1458|version=NetHack 3.6.1}} Squeaky boards and rust traps never have a corpse because they are non-lethal, and pits or holes also never generate a corpse (but pits are often seen with corpses of monsters that fell in).
  
 
== Anti-magic field ==
 
== Anti-magic field ==
Line 22: Line 22:
 
}}
 
}}
  
This trap will drain between 2 and your [[experience level]] + 1 points of your spell [[power]].
+
Anti-magic fields drain between 2 and your [[experience level]] + 1 points of your spell [[power]]. If this would cause your spell power to go below zero, your ''maximum'' spell power will be permanently reduced by that amount, and your spell power becomes zero.{{refsrc|trap.c|2970}} Anti-magic fields have no effect on your maximum spell power if it is zero.
If this would cause your spell power to go below zero, your ''maximum'' spell power will be permanently reduced by that amount, and your spell power becomes zero.{{refsrc|trap.c|2970}} Anti-magic fields have no effect on your maximum spell power if it is zero.
 
  
 
If you have [[magic resistance]], you take damage instead of losing power.  The damage is at least d4, with an additional d4 each if you:
 
If you have [[magic resistance]], you take damage instead of losing power.  The damage is at least d4, with an additional d4 each if you:
Line 31: Line 30:
 
* are carrying an [[artifact]] which grants magic resistance by being carried; your own [[quest artifact]] is exempt.
 
* are carrying an [[artifact]] which grants magic resistance by being carried; your own [[quest artifact]] is exempt.
  
If you have [[phasing]], you take 1/4 as much damage, rounded up.
+
If you have [[phasing]], you take {{frac|4}} as much damage, rounded up.
  
 
Monsters that have a special attack such as [[Monster spellcasting|spellcasting]] or a [[breath weapon]] will also be affected by this trap. The timeout for their special attack increases by 2d2 turns unless they are magic resistant, in which case they lose HP. This will also reveal the trap. Other monsters do not trigger this trap and do not reveal it when they pass over it.  
 
Monsters that have a special attack such as [[Monster spellcasting|spellcasting]] or a [[breath weapon]] will also be affected by this trap. The timeout for their special attack increases by 2d2 turns unless they are magic resistant, in which case they lose HP. This will also reveal the trap. Other monsters do not trigger this trap and do not reveal it when they pass over it.  
  
 
{{message|You feel your magical energy drain away.|You are not magic resistant, and your Pw was drained.}}
 
{{message|You feel your magical energy drain away.|You are not magic resistant, and your Pw was drained.}}
 +
 
{{message|You feel momentarily lethargic.|You are not magic resistant, but you have zero maximum Pw to drain.}}
 
{{message|You feel momentarily lethargic.|You are not magic resistant, but you have zero maximum Pw to drain.}}
{{message|You feel sluggish.|You are magic resistant, and took less than 1/4 your HP as damage.}}
+
 
{{message|You feel very lethargic.|You are magic resistant, and took more than 1/4 your HP as damage.}}
+
{{message|You feel sluggish.|You are magic resistant, and took less than {{frac|4}} your HP as damage.}}
 +
 
 +
{{message|You feel very lethargic.|You are magic resistant, and took more than {{frac|4}} your HP as damage.}}
 +
 
 
{{message|You feel unbearably torpid!|You are magic resistant, and were killed by HP loss.}}
 
{{message|You feel unbearably torpid!|You are magic resistant, and were killed by HP loss.}}
 +
 
{{message|<monster> seems lethargic.|A monster lost some Pw from an anti-magic field.}}
 
{{message|<monster> seems lethargic.|A monster lost some Pw from an anti-magic field.}}
 +
 
{{message|<monster> is killed by the compression from an anti-magic field!|A magic-resistant monster lost enough HP from an anti-magic field to die.}}
 
{{message|<monster> is killed by the compression from an anti-magic field!|A magic-resistant monster lost enough HP from an anti-magic field to die.}}
  
Line 53: Line 58:
 
}}
 
}}
  
These fire [[arrow]]s at you or whoever else steps on them, which generally do 1d6 damage.  
+
Arrow traps fire [[arrow]]s at you or whoever else steps on them, which generally do 1d6 damage.  
  
These traps can be a useful source of arrows. While standing on or adjacent to the square with the trap, try using the <tt>'''#untrap'''</tt> command. You might fail a few times as a few more arrows hit you, but if you are lucky, you will obtain a large supply of arrows (50 - [[rnl]](50)<ref>{{function|trap.c|disarm_shooting_trap}}</ref>.) Each time you or a monster triggers this trap there is a 1/15 chance that it will disappear. Any arrow that hits you or a monster is guaranteed to be lost. The average number of arrows you obtain by disarming is dependent on luck, but is higher than the average number you obtain by stepping on the trap until it disappears.  
+
These traps can be a useful source of arrows. While standing on or adjacent to the square with the trap, successfully untrapping an arrow trap will yield a large supply of arrows (50&nbsp;&minus; [[rnl]](50)).<ref>{{function|trap.c|disarm_shooting_trap}}</ref> Each time you or a monster triggers this trap there is a {{frac|15}} chance that it will disappear. Any arrow that hits you or a monster is guaranteed to be lost. The average number of arrows you obtain by disarming is dependent on luck, but is higher than the average number you obtain by stepping on the trap until it disappears.  
  
 
'''To remove:''' #untrap, or trigger it repeatedly until it runs out of arrows.
 
'''To remove:''' #untrap, or trigger it repeatedly until it runs out of arrows.
  
 
{{message|An arrow shoots out at you!|You triggered an arrow trap.}}
 
{{message|An arrow shoots out at you!|You triggered an arrow trap.}}
 +
 
{{message|<monster> is hit by an arrow!|A monster triggered an arrow trap.}}
 
{{message|<monster> is hit by an arrow!|A monster triggered an arrow trap.}}
 +
 
{{message|You hear a loud click!|The trap was out of arrows and is now gone.}}
 
{{message|You hear a loud click!|The trap was out of arrows and is now gone.}}
  
Line 75: Line 82:
 
{{main|Beartrap}}
 
{{main|Beartrap}}
  
A bear trap causes 2d4 damage{{refsrc|trap.c|1062|version=NetHack 3.6.2}} and renders you immobile for several turns. During this time, you can attack and be attacked, but you cannot move from the spot. When caught in a bear trap, you are unable to [[kick]]. For some reason, escaping a bear trap is 5 times more likely when moving diagonally than when moving orthogonally.{{refsrc|hack.c|1202|version=NetHack 3.6.2}}
+
A bear trap causes 2d4 damage{{refsrc|trap.c|1062|version=NetHack 3.6.2}} and renders you immobile for several turns. During this time, you can attack and be attacked, but you cannot move from the spot. When caught in a bear trap, you are unable to [[kick]]. For some reason, escaping a bear trap is 5 times more likely when attempting to move diagonally than when attempting to move orthogonally.{{refsrc|hack.c|1202|version=NetHack 3.6.2}}
  
 
If you trigger the trap when riding, it affects your steed instead of you. Monsters can be trapped too.{{refsrc|trap.c|2271|version=NetHack 3.6.2}}
 
If you trigger the trap when riding, it affects your steed instead of you. Monsters can be trapped too.{{refsrc|trap.c|2271|version=NetHack 3.6.2}}
  
It is possible to <tt>'''#untrap'''</tt> a bear trap. If successful, it will appear as a [[beartrap]] on the dungeon floor. You may then pick it up and apply it to a new location. If unsuccessful, you will become trapped. If a bugbear or an owlbear gets stuck in a bear trap outside your sight, then you will hear "the roaring of an angry bear". If you are caught in a [[beartrap]], you can not untrap yourself.
+
It is possible to untrap a bear trap. If successful, it will appear as a [[beartrap]], an item which can be picked up. You may then apply it to a new location. If unsuccessful, you will become trapped. If a bugbear or an owlbear gets stuck in a bear trap outside your sight, then you will hear "the roaring of an angry bear". If you are caught in a bear trap, you cannot untrap yourself.
  
 
Oddly, [[beartrap]]s reset themselves.
 
Oddly, [[beartrap]]s reset themselves.
Line 93: Line 100:
 
}}
 
}}
  
Similar to an arrow trap, but with [[dart]]s. Darts will generally do 1d3 damage. Darts can be poisoned (1 in 6 chance), so be careful.  
+
A dart trap is similar to an arrow trap, but it fires [[dart]]s. Darts will generally do 1d3 damage. Darts have a 1 in 5 chance of being poisoned, so be careful.  
  
Disarming a dart trap will recover a large stack of darts, but this should probably not be attempted by characters lacking [[poison resistance]]. Like arrow traps, dart traps have a 1/15 chance of disappearing each time they are triggered; darts that hit always disappear; and you will obtain more darts by disarming than by triggering it (on average (50 - [[rnl]](50) darts).<ref>{{function|trap.c|disarm_shooting_trap}}</ref>)
+
Disarming a dart trap will recover a large stack of darts, but this should probably not be attempted by characters lacking [[poison resistance]]. Like arrow traps, dart traps have a {{frac|15}} chance of disappearing each time they are triggered; darts that hit always disappear; and you will obtain more darts by disarming than by triggering it (on average 50&nbsp;&minus; [[rnl]](50) darts).<ref>{{function|trap.c|disarm_shooting_trap}}</ref>
  
 
'''To remove:''' #untrap, or trigger it repeatedly until it runs out of darts ("''You hear a soft click.''")
 
'''To remove:''' #untrap, or trigger it repeatedly until it runs out of darts ("''You hear a soft click.''")
  
 
{{message|A little dart shoots out at you!|You triggered a dart trap.}}
 
{{message|A little dart shoots out at you!|You triggered a dart trap.}}
 +
 
{{message|<monster> is hit by a dart!|A monster triggered a dart trap.}}
 
{{message|<monster> is hit by a dart!|A monster triggered a dart trap.}}
 +
 
{{message|You hear a soft click.|The trap was out of darts and is now gone.}}
 
{{message|You hear a soft click.|The trap was out of darts and is now gone.}}
  
Line 113: Line 122:
 
}}
 
}}
  
This will set off a [[tower|column]] of flame underneath you. If you lack [[fire resistance]], you take 2d4 damage, and lose maximum HP equal to between zero and the damage you took. If you are fire-resistant, you lose d2-1 HP (i.e. one point or none), and no maximum HP. The trap will attempt to burn some article of clothing with an equal chance of each of 5 types (helmet, torso, shield, gloves, or boots) being selected. If the selected armor is not torso, but is either burnproof, thoroughly burnt, or not worn, a different type of armor will be selected. If blessed, the chance of the selected armor burning is subject to luck consideration. If the final armor selection is not body armor (regardless of whether the armor survived the luck roll), there is a 1/3 chance that scrolls, potions, and spellbooks in the main inventory will not be subject to burning. Otherwise all scrolls, potions, and spellbooks will have a 1/3 chance of burning.
+
A fire trap creates a column of flame underneath you. If you lack [[fire resistance]], you take 2d4 damage, and your maximum HP is reduced by between zero and the damage you took. If you are fire-resistant, you lose 0 or 1 HP, and your maximum HP is unaffected.
 +
 
 +
The trap will attempt to burn an article of clothing with an equal chance of each of 5 types (helm, torso, shield, gloves, or boots) being selected. If the selected armor is not torso, but is either fireproof, thoroughly burnt, or not worn, a different type of armor will be selected. If blessed, the chance of the selected armor burning is subject to luck consideration. If the final armor selection is not body armor (regardless of whether the armor survived the luck roll), there is a {{frac|3}} chance that scrolls, potions, and spellbooks in the main inventory will not be subject to burning. Otherwise all scrolls, potions, and spellbooks will have a {{frac|3}} chance of burning.
 +
 
 +
Unlike most traps, fire traps will still activate if you [[jump]] over them.
  
 
'''Generation:''' Fire traps are only randomly generated in [[Gehennom]], maze levels (including to the left and right of the [[Castle]]), the [[Plane of Fire]], and some [[quest]]s, notably the [[Valkyrie quest]]. In Gehennom, fire trap generation is increased. 20% of all randomly generated traps in Gehennom are guaranteed to be fire traps.
 
'''Generation:''' Fire traps are only randomly generated in [[Gehennom]], maze levels (including to the left and right of the [[Castle]]), the [[Plane of Fire]], and some [[quest]]s, notably the [[Valkyrie quest]]. In Gehennom, fire trap generation is increased. 20% of all randomly generated traps in Gehennom are guaranteed to be fire traps.
Line 127: Line 140:
 
<ref>{{sourcecode|trap.c|856}} (Fire trap on you) and {{sourcecode|trap.c|1889}} (On monsters)</ref>
 
<ref>{{sourcecode|trap.c|856}} (Fire trap on you) and {{sourcecode|trap.c|1889}} (On monsters)</ref>
  
== Hole [[image:hole.png]]==
+
== Hole ==
 
{{trap
 
{{trap
 
  |name=hole
 
  |name=hole
Line 137: Line 150:
 
{{main|Hole}}
 
{{main|Hole}}
  
[[Hole]]s simply drop you down a number of levels. 2-3 levels is a typical fall distance, but there is no upper limit, bar extreme improbability, on how many levels it is possible to fall through, although you won't fall beyond the Castle. Monsters never fall more than one floor.{{refsrc|teleport.c|1107}}
+
Holes simply drop you down a number of levels. 2&ndash;3 levels is a typical fall distance, but there is no upper limit on how many levels it is possible to fall through, although you won't fall beyond the Castle. Monsters never fall more than one floor.{{refsrc|teleport.c|1107}}
  
 
One technique for dealing with this problem is to go down any [[stairs]] you encounter and then go back up again immediately. This way, if you should ever fall down to that level you will know where the exit is. A high [[dexterity]] stat will reduce your chances of falling down the hole should you accidentally step on it.
 
One technique for dealing with this problem is to go down any [[stairs]] you encounter and then go back up again immediately. This way, if you should ever fall down to that level you will know where the exit is. A high [[dexterity]] stat will reduce your chances of falling down the hole should you accidentally step on it.
Line 143: Line 156:
 
The same hole is not guaranteed to lead to the same location, or even the same level, even if an object, monster or pet went through it immediately before you.
 
The same hole is not guaranteed to lead to the same location, or even the same level, even if an object, monster or pet went through it immediately before you.
  
'''Generation:''' Hole traps are much less likely to be randomly generated than other eligible types. Only 1 in 7 attempts to randomly place a hole trap will succeed. Hole traps cannot be randomly generated on levels with non-diggable floors such as the [[Vibrating square]] level or the [[Castle]]. If the floor is non-diggable, the hole trap is replaced with a falling rock trap. Cannot be generated beneath a boulder. Unlike other traps, holes are always generated visible.
+
'''Generation:''' Holes are much less likely to be randomly generated than other eligible types. Only 1 in 7 attempts to randomly place a hole will succeed. Holes cannot be randomly generated on levels with non-diggable floors, such as the [[vibrating square]] level or the [[Castle]]. If the floor is non-diggable, the hole trap is replaced with a falling rock trap. Holes cannot be generated beneath a boulder. Unlike other traps, holes are always generated visible.
  
 
'''To remove:''' Push a [[boulder]] into it.
 
'''To remove:''' Push a [[boulder]] into it.
Line 161: Line 174:
 
{{main|Magic trap}}
 
{{main|Magic trap}}
  
The effects of magic traps are many and varied...
+
Magic traps can have a variety of effects.
  
Monsters will fail to trigger this trap with 20/21 chance, in which case the trap will do nothing and not be revealed to you. If a monster triggers the trap, it will generate a pillar of flame, acting like a [[fire trap]].
+
Monsters will fail to trigger this trap with {{frac|20|21}} chance, in which case the trap will do nothing and not be revealed to you. If a monster triggers the trap, it will generate a pillar of flame, acting like a [[fire trap]].
  
 
'''To remove:''' Trigger it repeatedly until it explodes.
 
'''To remove:''' Trigger it repeatedly until it explodes.
Line 177: Line 190:
 
}}
 
}}
  
This triggers a falling [[rock]], which hits you on the head for 2d6 damage, unless you are wearing some kind of hard hat, in which case the damage is reduced to 2. The rock stays on the ground, so it is possible to use them as a rock source, although the trap will be exhausted eventually (1/15 chance each time it is triggered).
+
Falling rock traps drop a [[rock]] on the victim's head, dealing 2d6 damage. If you are wearing some kind of hard hat, the damage is reduced to 2. The rock stays on the ground, so it is possible to use them as a rock source, although the trap will be exhausted eventually ({{frac|15}} chance each time it is triggered).
  
Early [[pet]] deaths are often due to this type of trap, earning it the nickname of "Puppy Pounder" or "Kitty Killer".
+
Early [[pet]] deaths are often due to this type of trap, earning it the nicknames "Puppy Pounder" and "Kitty Killer".
  
 
'''To remove:''' Trigger it repeatedly until it runs out of rocks.
 
'''To remove:''' Trigger it repeatedly until it runs out of rocks.
Line 186: Line 199:
  
 
{{message|A trapdoor in the ceiling opens and a rock falls on your head!|You triggered a falling rock trap.}}
 
{{message|A trapdoor in the ceiling opens and a rock falls on your head!|You triggered a falling rock trap.}}
 +
 
{{message|<monster> is hit by a rock!|A monster triggered a falling rock trap.}}
 
{{message|<monster> is hit by a rock!|A monster triggered a falling rock trap.}}
  
''A trapdoor in the sky opens and a rock falls on your head!'' (outdoors, e.g. in the Home level of some Quests.)
+
{{message|A trapdoor in the sky opens and a rock falls on your head!|The trap is outdoors, e.g. in the Home level of some Quests.}}
  
 
== Land mine ==
 
== Land mine ==
Line 200: Line 214:
 
{{main|Land mine}}
 
{{main|Land mine}}
  
Land mines are hidden explosives, especially common in [[Fort Ludios]]. When triggered, they [[Wounded legs|wound your legs]] and are replaced by a [[pit]] in which you may fall after the explosion. You may #untrap a land mine from an adjacent square, and then pick it up and install it elsewhere, as you might a bear trap.
+
Land mines are hidden explosives, especially common in [[Fort Ludios]]. When triggered, they [[Wounded legs|wound your legs]] and are replaced by a [[pit]] in which you may fall after the explosion. You may untrap a land mine from an adjacent square, and then pick it up and install it elsewhere, similar to a bear trap.
  
Monsters will fail to trigger this trap with 2/3 chance, the rest of the time it affects them just as it does you.
+
Monsters will fail to trigger this trap with {{frac|2|3}} chance; the rest of the time it affects them just as it does you.
  
 
'''To remove:''' #untrap, or just set it off (although the latter will replace it with a pit).
 
'''To remove:''' #untrap, or just set it off (although the latter will replace it with a pit).
Line 216: Line 230:
 
}}
 
}}
  
This teleports you to a random location on a random level. If you have teleport control and are not stunned, fainted, frozen, 1/5 chance if confused, then you can specify the level you (and adjacent/leashed pets) will go to. Otherwise, you or monsters activating the trap will be teleported up at most to level one, down at most three levels, but never down out of the main dungeon, or into the Sanctum before the invocation ritual. In the Endgame, you, monsters with the Amulet, and elementals on their plane cannot level teleport at all. All eligible target levels are equally likely.<ref>{{function|teleport.c|random_teleport_level}}</ref>
+
This teleports you to a random location on a random level. If you have teleport control, then you can specify the level you will go to, unless you are stunned, fainted, paralyzed, or (with a {{frac|5}} probability) confused. Otherwise, you or monsters activating the trap will be teleported up at most to level one, down at most three levels, but never down out of the main dungeon, or into the Sanctum before the invocation ritual. In the Endgame, you, monsters with the Amulet, and elementals on their plane cannot level teleport at all. All eligible target levels are equally likely.<ref>{{function|teleport.c|random_teleport_level}}</ref>
  
 
After the player has triggered the trap once, it vanishes, whether the teleportation was successful or not. You may remain on the same level and receive the message "You shudder for a moment."
 
After the player has triggered the trap once, it vanishes, whether the teleportation was successful or not. You may remain on the same level and receive the message "You shudder for a moment."
  
[[Magic resistance]] will prevent you, but not monsters, from being teleported ("''You feel a wrenching sensation.''"). Under certain conditions, you can use a normal teleport trap, even if you have magic resistance (for more details, see [[Trap#Teleportation trap|Teleportation trap]]). However, you cannot do the same with a level teleporter.
+
[[Magic resistance]] will prevent you, but not monsters, from being teleported ("''You feel a wrenching sensation.''") Under certain conditions, you can use a normal teleport trap, even if you have magic resistance (see {{sa|Teleportation trap|sectionsign=1}} for details). However, you cannot do the same with a level teleporter.
  
 
'''To remove:''' Set it off personally; it is not removed when a monster triggers it.
 
'''To remove:''' Set it off personally; it is not removed when a monster triggers it.
Line 236: Line 250:
 
{{main|Pit}}
 
{{main|Pit}}
  
[[Pit]]s in the ground open up when you walk over them, causing 1-6 damage. This will also [[abuse]] [[strength]] and [[dexterity]]. They require 3-7 [[turn]]s to "climb to the edge" and escape. You may #jump out of a pit or (a)pply a [[whip]] to escape. While in the pit, any [[light]] source you are carrying will not travel beyond the walls of the pit. Falling into a pit as a [[pit fiend]] or a [[pit viper]] will generate [[YAFM]].
+
Pits in the ground open up when you walk over them, causing 1&ndash;6 damage. This also [[abuse]]s [[strength]] and [[dexterity]]. They require 3&ndash;7 [[turn]]s to "climb to the edge" and escape. You may #jump out of a pit or apply a [[bullwhip]] to escape. While in the pit, any [[light]] source you are carrying will not travel beyond the walls of the pit. Falling into a pit as a [[pit fiend]] or a [[pit viper]] will generate [[YAFM]].
  
 
'''To remove:''' Push a [[boulder]] into it.
 
'''To remove:''' Push a [[boulder]] into it.
Line 286: Line 300:
 
}}
 
}}
  
This is a trap in two parts. The actual trap is a switch, which, when activated by stepping on it, sets a nearby [[boulder]] rolling towards you. The existence of these traps can sometimes be inferred by an incongruously placed boulder in a room. The path between the boulder and the trap must be clear<ref name="boulder placement">{{function|trap.c|mkroll_launch}} Boulder placement for boulder trap</ref>, though the boulder will pass through some [[dungeon features]] like [[fountain]]s. When it hits another boulder, "you hear a loud crash as a boulder sets another in motion", it stops, and the other boulder begins moving. If a boulder trap is activated but you can't see it, you get the message "you hear rumbling in the distance".
+
A rolling boulder trap has two parts. The actual trap is a switch which, when activated by stepping on it, sets a nearby [[boulder]] rolling toward you. The existence of these traps can sometimes be inferred by an incongruously placed boulder in a room. The path between the boulder and the trap must be clear,<ref name="boulder placement">{{function|trap.c|mkroll_launch}} Boulder placement for boulder trap</ref> though the boulder will pass through some [[dungeon features]] like [[fountain]]s. When it hits another boulder, "you hear a loud crash as a boulder sets another in motion", it stops, and the other boulder begins moving. If a boulder trap is activated but you can't see it, you get the message "you hear rumbling in the distance".
  
 
Being hit with the boulder deals you d20 damage.
 
Being hit with the boulder deals you d20 damage.
Line 293: Line 307:
  
 
{{message|Click! You trigger a rolling boulder trap!|You triggered a rolling boulder trap.}}
 
{{message|Click! You trigger a rolling boulder trap!|You triggered a rolling boulder trap.}}
 +
 
{{message|Click! <monster> triggers something.|A monster triggered a rolling boulder trap.}}
 
{{message|Click! <monster> triggers something.|A monster triggered a rolling boulder trap.}}
 +
 
{{message|Fortunately for you, no boulder was released.|There was no boulder in the launch spot for this trap, so the trap is destroyed.}}
 
{{message|Fortunately for you, no boulder was released.|There was no boulder in the launch spot for this trap, so the trap is destroyed.}}
  
Line 306: Line 322:
 
}}
 
}}
  
This trap will spray you with water, [[rust]]ing any rustable items you wear where it hits. Wielded iron objects or scrolls are also affected, but not spellbooks or potions. [[Gremlin]]s like to use these traps to multiply. [[Iron golem]]s will be instantly destroyed by these traps. If you are polymorphed into an [[iron golem]] then you will take damage equal to your monster form's maximum hp, killing your monster form and reverting you to your natural form. The [[half physical damage]] extrinsic applies.
+
A rust trap sprays you with water, [[rust]]ing any rustable items you wear where it hits. Wielded iron objects or scrolls are also affected, but not spellbooks or potions. [[Gremlin]]s like to use these traps to multiply. [[Iron golem]]s will be instantly destroyed by these traps. If you are polymorphed into an iron golem, you will take damage equal to your monster form's maximum HP, killing your monster form and reverting you to your natural form. The [[half physical damage]] extrinsic applies.
  
 
'''To remove:''' [[Dig]] a pit into the ground while standing on the trap, then fill the pit.
 
'''To remove:''' [[Dig]] a pit into the ground while standing on the trap, then fill the pit.
  
 
{{message|A gush of water hits you on the <body part>!|Your armor in the corresponding slot takes water damage.}}
 
{{message|A gush of water hits you on the <body part>!|Your armor in the corresponding slot takes water damage.}}
{{message|A gush of water hits you!|The trap hit your body armor slot, or else you are an iron golem.}}
+
 
 +
{{message|A gush of water hits you!|The trap hit your body armor slot, or you are an iron golem.}}
 +
 
 
{{message|You are covered with rust!|You are an iron golem and were hit by the trap. Your monster form will be killed unless you have [[half physical damage]].}}
 
{{message|You are covered with rust!|You are an iron golem and were hit by the trap. Your monster form will be killed unless you have [[half physical damage]].}}
  
Line 324: Line 342:
 
}}
 
}}
  
This trap makes you fall asleep for up to 25 turns, unless you have sleep resistance, or are polymorphed into a monster that doesn't breathe. It works on monsters too.
+
A sleeping gas trap puts you to sleep for up to 25 turns, unless you have sleep resistance or are polymorphed into a naturally [[breathless]] monster. An [[amulet of magical breathing]] does not protect you. Monsters are also subject to the trap's effect.
  
 
'''To remove:''' [[Dig]] a pit into the ground while standing on the trap, then fill the pit.
 
'''To remove:''' [[Dig]] a pit into the ground while standing on the trap, then fill the pit.
Line 330: Line 348:
 
{{message|A cloud of gas puts you to sleep!|You trigger a sleeping gas trap and are put to sleep.}}
 
{{message|A cloud of gas puts you to sleep!|You trigger a sleeping gas trap and are put to sleep.}}
  
{{message|You are enveloped in a cloud of gas!|You trigger a sleeping gas trap and are sleep resistant.}}
+
{{message|You are enveloped in a cloud of gas!|You trigger a sleeping gas trap and are unaffected.}}
  
 
<ref>{{sourcecode|trap.c|1226}} (Sleeping gas trap on you) and {{sourcecode|trap.c|1807}} (On monsters)</ref>
 
<ref>{{sourcecode|trap.c|1226}} (Sleeping gas trap on you) and {{sourcecode|trap.c|1807}} (On monsters)</ref>
Line 342: Line 360:
 
}}
 
}}
  
These are just pits which do 1-10 damage. The spikes are sometimes (1 in 6 chance) poisoned, which can be fatal for a character without [[poison resistance]]. Note that the chance of spikes being poisoned is re-randomized every time you fall on them, not per spiked pit. [[Metallivore]]s can eat the spikes out of a spiked pit, turning it into a normal pit. The spikes are never poisoned when a monster falls in.<ref>{{sourcecode|trap.c|928}} (dotrap can call {{function|mon.c|poisoned}}); {{sourcecode|trap.c|1940}} (but mintrap cannot.)</ref> The treasury in [[Fort Ludios]] contains many spiked pits along with its land mines.
+
These are just pits which do 1&ndash;10 damage. Each time you fall in, there is a {{frac|6}} chance that the spikes will be poisoned, which can be fatal for a character without [[poison resistance]]. [[Metallivore]]s can eat the spikes out of a spiked pit, turning it into a normal pit. The spikes are never poisoned when a monster falls in.<ref>{{sourcecode|trap.c|928}} (dotrap can call {{function|mon.c|poisoned}}); {{sourcecode|trap.c|1940}} (but mintrap cannot.)</ref> The treasury in [[Fort Ludios]] contains many spiked pits along with its land mines.
  
'''WARNING:''' Pets that fall into a pit can be helped out by standing adjacent to the pit and '''u'''ntrapping in the direction of the pit. When you do this with a spiked pit, if you fail to remove your pet, they will suffer the effects of falling onto spikes each time you fail, making them angry (reducing their [[tame]]ness) and counting as abuse for resurrection from the [[wand of undead turning]]. If they die at your hands, you suffer the consequences of killing them in a trap yourself (-15 alignment and an angry [[god]]).
+
Pets that fall into a pit can be helped out by standing adjacent to the pit and untrapping in the direction of the pit. When you do this with a spiked pit, if you fail to remove your pet, they will suffer the effects of falling onto spikes each time you fail, making them angry (reducing their [[tameness]]) and counting as abuse for resurrection from the [[wand of undead turning]]. If they die at your hands, you suffer the consequences of killing them in a trap yourself (&minus;15 [[alignment record|alignment]] and an [[anger|angry]] god).
  
 
'''To remove:''' Push a [[boulder]] into it.
 
'''To remove:''' Push a [[boulder]] into it.
Line 358: Line 376:
 
}}
 
}}
  
A squeaky board wakes nearby sleeping monsters. If a monster steps on a squeaky board on your level, you "hear a distant <note> squeak", or "A board beneath <monster> squeaks <note> loudly" if in sight. (The frequency of the squeak is meaningless, but each trap has only one note associated with it.) For you, "nearby" means that the square of the distance between you and a monster is less than 20 times your level (level 5 gives a 10 square radius, level 10 gives 14, and level 15 gives 17). For monsters, "nearby" means that the square of the distance is less than 40 (a 6 square radius).<ref>{{function|mon.c|wake_nearby}} (for players) and {{function|mon.c|wake_nearto}} (for monsters)</ref>
+
A squeaky board wakes nearby sleeping monsters. If a monster steps on a squeaky board on your level, you "hear a distant <note> squeak", or "A board beneath <monster> squeaks <note> loudly" if in sight. (The pitch of the squeak is meaningless, but each trap has only one note associated with it.) For you, "nearby" means within a distance of <span class="nowrap">&radic;<span style="border-top:1px solid; padding:0 0.1em;">20 &times; XL</span></span>. (For example, level 5 gives a 10-square radius, level 10 gives 14, and level 15 gives 17.) For monsters, "nearby" means that the distance is less than <span class="nowrap">&radic;<span style="border-top:1px solid; padding:0 0.1em;">40</span></span> (a 6-square radius).<ref>{{function|mon.c|wake_nearby}} (for players) and {{function|mon.c|wake_nearto}} (for monsters)</ref>
  
The note may be any note of the [[wikipedia:chromatic scale|chromatic scale]]<ref>{{sourcecode|src/trap.c|1467|version=NetHack 3.6.0}}</ref>, and no two boards on the same level will squeak with the same note, unless there are at least 13 squeaky boards on the level<ref>{{sourcecode|src/trap.c|360|version=NetHack 3.6.0}}</ref>.
+
The note may be any note of the [[wikipedia:chromatic scale|chromatic scale]],<ref>{{sourcecode|src/trap.c|1467|version=NetHack 3.6.0}}</ref> and no two boards on the same level will squeak with the same note unless there are at least 13 squeaky boards on the level.<ref>{{sourcecode|src/trap.c|360|version=NetHack 3.6.0}}</ref>
  
'''To remove:''' #untrap, but you must select a [[potion of oil]] (which will be consumed) or a charged can of grease (one charge will be consumed).
+
'''To remove:''' #untrap, but you must select a [[potion of oil]] (which will be consumed) or a charged [[can of grease]] (one charge will be consumed).
  
 
<ref>{{sourcecode|trap.c|730}} (Squeaky board on you) and {{sourcecode|trap.c|1777}} (On monsters)</ref>
 
<ref>{{sourcecode|trap.c|730}} (Squeaky board on you) and {{sourcecode|trap.c|1777}} (On monsters)</ref>
Line 377: Line 395:
 
Statue traps look like normal [[statue]]s of a monster, until you try to walk on the same square as one. When you walk on the trap, it will [[spellbook of stone to flesh|transform]] the topmost statue on the trap into the monster it depicts. A statue trap can also be activated by [[search]]ing, zapping {{spell of|force bolt}}, or applying a [[pick-axe]]. Technically, {{spell of|stone to flesh}} doesn't activate the trap, it just reanimates the statue if the monster was fleshy, otherwise it turns it in to a [[meatball]]. A [[stethoscope]] will give a revealing message to [[healer]]s only, but will not activate the trap. Monsters will never set off these traps.<ref>{{sourcecode|trap.c|1054}} (Statue trap on you) and {{sourcecode|trap.c|2073}} (On monsters)</ref>
 
Statue traps look like normal [[statue]]s of a monster, until you try to walk on the same square as one. When you walk on the trap, it will [[spellbook of stone to flesh|transform]] the topmost statue on the trap into the monster it depicts. A statue trap can also be activated by [[search]]ing, zapping {{spell of|force bolt}}, or applying a [[pick-axe]]. Technically, {{spell of|stone to flesh}} doesn't activate the trap, it just reanimates the statue if the monster was fleshy, otherwise it turns it in to a [[meatball]]. A [[stethoscope]] will give a revealing message to [[healer]]s only, but will not activate the trap. Monsters will never set off these traps.<ref>{{sourcecode|trap.c|1054}} (Statue trap on you) and {{sourcecode|trap.c|2073}} (On monsters)</ref>
  
Because of these traps it is a good idea to [[far look]] any statue you see. If the statue is of a monster you would rather not fight, don't step on it. If you have [[automatic searching]] don't even go near it. ("The statue comes to life!  The mind flayer hits!")
+
Because of these traps it is a good idea to [[far look]] any statue you see. If the statue is of a monster you would rather not fight, don't step on it. If you have [[automatic searching]], don't even go near it. However, you can throw another statue, preferably one of a weaker monster, onto the trap and then activate it. The new statue will come to life, leaving the old one inanimate. Zapping the trap with a [[wand of teleportation]] will teleport the statue without activating it. A [[wand of polymorph]] will not set it off either.
However, you can throw another statue, preferably one of a weaker monster, onto the trap and then activate it. The new statue will come to life, leaving the old one inanimate. Zapping the trap with a [[wand of teleportation]] will teleport the statue without activating it. A [[wand of polymorph]] will not set it off either.
 
  
Trap statues contain the [[monster starting inventory|inventory a monster normally starts with]]. Unlike ordinary statues, it cannot contain [[spellbook]]s.{{refsrc|Trap.c|271}}
+
Trap statues contain the [[monster starting inventory|inventory a monster normally starts with]]. Unlike ordinary statues, they cannot contain [[spellbook]]s.{{refsrc|Trap.c|271}}
  
 
'''To remove:''' Set it off.
 
'''To remove:''' Set it off.
Line 392: Line 409:
 
}}
 
}}
  
This [[teleport]]s you to a random location on the map, unless it is a [[vault]] teleporter located in a [[closet]] behind [[ad aerarium]], in which case you are teleported to the vault. Note that ad aerarium may also refer to a closet with a level teleporter, which will ''not'' put you inside a vault, so it is not wise to blindly walk into a closet without identifying the trap first.
+
This [[teleport]]s you to a random location on the map, unless it is a [[vault]] teleporter located in a [[closet]] behind an ''[[ad aerarium]]'' engraving, in which case you are teleported to the vault. ''Ad aerarium'' engravings may also appear in front of closet with level teleporters, which will ''not'' put you inside a vault, so it is not wise to blindly walk into a closet without identifying the trap first.
  
[[Magic resistance]] will prevent you from being teleported. ("''You feel a wrenching sensation.''") If you want to use the teleporter (e. g. a vault teleporter), you may use {{kbd|ctrl|t}} to take the teleporter despite magic resistance. The vault teleporter will give you a warning ("''This is a vault teleport, usable once only.  Jump in? [yn]''") before triggering. If one of the squares in the vault is occupied by a monster or a trap (including the portal to [[Fort Ludios]]) or is otherwise unsafe, vault teleport may fail, in which case the trap will act as an ordinary teleport trap, albeit single-use.{{refsrc|src/teleport.c|384|nethack=3.6.1}}
+
[[Magic resistance]] will prevent you from being teleported. ("''You feel a wrenching sensation.''") If you want to use the teleporter (for instance, to enter a vault), you may use {{kbd|ctrl|t}} to take the teleporter despite magic resistance. A vault teleporter will give you a warning ("''This is a vault teleport, usable once only.  Jump in? [yn]''") before triggering. If one of the squares in the vault is occupied by a monster or a trap (including the portal to [[Fort Ludios]]) or is otherwise unsafe, the vault teleport may fail, in which case the trap will act as an ordinary teleport trap, albeit single-use.{{refsrc|src/teleport.c|384|nethack=3.6.1}}
  
'''To remove:''' Dig a pit on the same square and fill it with a boulder. If the trap is located behind ad aerarium, it will disappear after successfully teleporting the player. Monsters cannot use it up.
+
'''To remove:''' Dig a pit on the same square and fill it with a boulder. If the trap is located behind an ''ad aerarium'' engraving, it will disappear after successfully teleporting the player; monsters cannot use it up.
  
 
<ref>{{sourcecode|trap.c|955}} (Teleportation trap on you) and {{sourcecode|trap.c|1998}} (On monsters)</ref>
 
<ref>{{sourcecode|trap.c|955}} (Teleportation trap on you) and {{sourcecode|trap.c|1998}} (On monsters)</ref>
Line 408: Line 425:
 
}}
 
}}
  
A '''trap door''' is a hidden door located in the floor. When triggered the door falls open and creates a hole. It is identical to the simpler [[hole]] except that it starts out hidden. Just as with a hole, 2 or 3 levels is common, there is no upper limit, and you cannot fall beyond the Castle. Monsters never fall more than one floor.{{refsrc|teleport.c|1107}}
+
A '''trap door''' is identical to the simpler [[hole]] except that it starts out hidden. When triggered, you fall to a deeper dungeon level. Just like a hole, 2 or 3 levels is common, there is no upper limit, and you cannot fall beyond the Castle. Monsters never fall more than one floor.{{refsrc|teleport.c|1107}}
  
'''Generation:''' May be randomly generated at any dungeon level. Trap doors cannot be randomly generated on levels with non-diggable floors such as the [[Vibrating square]] level or the [[Castle]], although the Castle contains several statically placed trap doors. If the floor is non-diggable, the trap door is replaced with a falling rock trap. Cannot be generated beneath a boulder. They are sometimes found in closets, with "[[Vlad]] was here" engraved in front of the door.
+
'''Generation:''' May be randomly generated at any dungeon level. Trap doors cannot be randomly generated on levels with non-diggable floors such as the [[vibrating square]] level or the [[Castle]], although the Castle contains several statically placed trap doors. If the floor is non-diggable, the trap door is replaced with a falling rock trap. Trap doors cannot be generated beneath a boulder. They are sometimes found in closets, with "[[Vlad]] was here" engraved in front of the door.
  
 
'''To remove:''' Push a [[boulder]] into it.
 
'''To remove:''' Push a [[boulder]] into it.
Line 438: Line 455:
 
}}
 
}}
  
A spider web is a rare type of non-magical trap.
+
A spider web is a rare type of non-magical trap. It is the only trap to use the " symbol, rather than the ^ symbol. When triggered, you will be unable to escape it for 0&ndash;12 turns, depending on your [[strength]]. If your strength was high enough to escape in 0 turns, then "You tear through a web!" and the web is destroyed.
  
* If you "stumble into a spider web", you will be unable to escape it for 0-12 turns, depending on your [[strength]].
+
If you are wielding [[Sting]], you always escape in 1 turn ("Sting cuts through the web!"), leaving the web intact.
** If your strength was high enough to escape in 0 turns, then "You tear through a web!" and the web is destroyed.
 
* If you are wielding [[Sting]], you always escape in 1 turn ("Sting cuts through the web!"), leaving the web intact.
 
* If you are [[polymorph]]ed into an [[amoeboid]] or [[whirly]] form, the web will not stick to you. ("You flow through the spider web")
 
* If you are polymorphed into an [[acidic]] monster or [[fire elemental]], you burn or dissolve the web. This should also be the case for [[gelatinous cube]]s, but there is a bug.
 
* If you are polymorphed into a [[spider]], you walk over the web without being trapped.
 
* If a bugbear or an owlbear gets stuck in a web outside your sight, then you will hear "the roaring of a confused bear".
 
* Certain very large monsters can tear through a web on they same turn they walk into it, destroying the trap. ([[Titanothere]], [[baluchitherium]], [[purple worm]], [[jabberwock]], [[iron golem]], [[balrog]], [[kraken]], [[mastodon]].)
 
  
This is the only trap to use the " symbol, rather than the ^ symbol. Attempting to untrap stuck monsters risks trapping you and spreading the web.
+
[[Acidic]] monster dissolve webs the step into, and [[fire elemental]]s burn them away. [[Titanothere]]s, [[baluchitherium|balucitheria]], [[purple worm]]s, [[jabberwock]]s, [[iron golem]]s, [[balrog]]s, [[kraken]]s, and [[mastodon]]s tear through webs on the same turn they walk into them, destroying the web.
  
You can produce webs with the [[Monster (command)|#monster]] command if you are a [[spider]]. All web-related messages are lovingly crafted to reflect whether things are happening to "your web" or "a spider web".
+
[[Spider]]s, [[amoeboid]] monsters, and [[whirly]] monsters may move into webs without becoming stuck.
  
'''Generation:''' Wherever a web trap randomly generates, a giant spider is also generated{{refsrc|mklev.c|1266}}. Conversely, when a giant spider generates at level-generation time, a web trap is usually be created under it. {{refsrc|mklev.c|763}}
+
If a bugbear or an owlbear gets stuck in a web outside your sight, then you will hear "the roaring of a confused bear".
 +
 
 +
Attempting to untrap stuck monsters risks trapping you and spreading the web.
 +
 
 +
You can produce webs with the [[Monster (command)|#monster]] command if you are a [[spider]]. All web-related messages reflect whether things are happening to "your web" or "a spider web".
 +
 
 +
'''Generation:''' Wherever a web trap randomly generates, a giant spider is also generated.{{refsrc|mklev.c|1266}} Conversely, when a giant spider generates at level-generation time, a web trap is usually be created under it.{{refsrc|mklev.c|763}}
  
 
'''To remove:''' #untrap (difficult), walk in with greater than 18/50 strength, or burn it away with a [[wand of fire]].
 
'''To remove:''' #untrap (difficult), walk in with greater than 18/50 strength, or burn it away with a [[wand of fire]].
Note that if you fail to #untrap a monster or pet that is in the web, you will become stuck in a ''new'' web at your current position, in addition to the original web. You can fill up the entire dungeon with webs in this way, if you so choose.
+
If you fail to #untrap a monster that is in a web, you will become stuck in a second web that is created at your current position. You can fill up the entire dungeon with webs in this way, if you so choose.
  
 
<ref>{{sourcecode|trap.c|964}} (Web on you) and {{sourcecode|trap.c|2002}} (On monsters)</ref>
 
<ref>{{sourcecode|trap.c|964}} (Web on you) and {{sourcecode|trap.c|2002}} (On monsters)</ref>
Line 462: Line 478:
 
==Container traps==
 
==Container traps==
 
{{main|Container trap}}
 
{{main|Container trap}}
Containers can be searched with the #untrap command. A high [[luck]] can be helpful in avoiding the effects of container traps. Bad luck increases the likelihood of more dangerous traps. Be careful of trapped containers in [[shop]]s, you will be charged for any items that are destroyed if you set off a trap that damages the merchandise. Container traps include:
+
Containers can be searched with the #untrap command. A high [[luck]] can be helpful in avoiding the effects of container traps. Bad luck increases the likelihood of more dangerous traps. Be careful of trapped containers in [[shop]]s; you will be charged for any items that are destroyed if you set off a trap that damages the merchandise. Container traps include:
 
* Explosive charge: [[Strength]] abused and 6d6 damage (unlucky trap)
 
* Explosive charge: [[Strength]] abused and 6d6 damage (unlucky trap)
 
* Poison gas: [[Constitution]] abused, [[Poison]]ed if not [[poison resistance|poison resistant]]
 
* Poison gas: [[Constitution]] abused, [[Poison]]ed if not [[poison resistance|poison resistant]]
 
* Poison needle: Constitution abused, Poisoned if not poison resistant
 
* Poison needle: Constitution abused, Poisoned if not poison resistant
* Fire trap: As per floor trap
+
* Fire trap: Same as floor trap
* Electric charge: 4d4 damage if not [[shock resistant]], and [[wand]]s/[[ring]]s may be destroyed (even if resistant)
+
* Electric charge: 4d4 damage if not [[shock resistant]], and [[wand]]s and [[ring]]s may be destroyed (even if resistant)
* [[Paralysis]] trap: [[Dexterity]] abused and paralyzed for 6-30 turns, unless you have [[free action]]
+
* [[Paralysis]] trap: [[Dexterity]] abused and paralyzed for 6&ndash;30 turns, unless you have [[free action]]
 
* Mind-affecting gas: [[Stun]]s and causes [[hallucination]] for up to 16 turns
 
* Mind-affecting gas: [[Stun]]s and causes [[hallucination]] for up to 16 turns
  
 
==Door traps==
 
==Door traps==
Trapped [[door]]s (and rarely, [[cursed]] [[tin]]s) will explode when opened ("''KABOOM!! The door/tin was booby-trapped!''"), causing damage, abusing Strength and possibly Constitution, and stunning you. The damage and duration of the stun depend on a number of factors, including but not limited to your level and how deep you have been in the dungeon.
+
Trapped [[door]]s (and rarely, [[cursed]] [[tin]]s) will explode when opened ("''KABOOM!! The door/tin was booby-trapped!''"), causing damage, abusing strength and possibly constitution, and stunning you. The damage and duration of the stun depend on a number of factors, including but not limited to your level and how deep you have been in the dungeon.
  
 
==Strategy==
 
==Strategy==
Avoiding traps in the dungeon takes patience and care. Therefore, the more time-consuming of these methods are only worthwhile when you are especially vulnerable. You can minimize your chances of stepping on a trap by paying close attention to monsters, pets, [[you hear|noises]], and terrain. Be wary of the telltale signs of traps such as conspicuous boulders, suspicious corpses, or piles of rocks, darts or arrows. Traps that you've already discovered will also not be visible under items like these, so it's a good idea to use the [[trap id]] command if you need to step onto that square that looks suspicious, even though you may have already been in that area and discovered all traps. By walking only where you have seen pets or monsters safely walk, you can avoid most traps. Remember where you have safely stepped before. [[Elbereth]] can cause monsters to [[flee]], possibly uncovering traps as they do. A [[leash]]ed pet will whine if it is near a trap. [[Magic resistance]] and [[fire resistance]] can help nullify some of the more dangerous effects of traps.
+
Avoiding traps in the dungeon takes patience and care. Therefore, the more time-consuming of these methods are only worthwhile when you are especially vulnerable. You can minimize your chances of stepping on a trap by paying close attention to monsters, pets, [[you hear|noises]], and terrain. Be wary of the telltale signs of traps such as conspicuous boulders, suspicious corpses, and piles of rocks, darts, or arrows. Traps that you've already discovered will also not be visible under items like these, so it's a good idea to use the [[trap id]] command if you need to step onto that square that looks suspicious, even though you may have already been in that area and discovered all traps. By walking only where you have seen pets or monsters safely walk, you can avoid most traps. Remember where you have safely stepped before. [[Elbereth]] can cause monsters to [[flee]], possibly uncovering traps as they do. A [[leash]]ed pet will whine if it is near a trap. [[Magic resistance]] and [[fire resistance]] can help nullify some of the more dangerous effects of traps.
  
 
The [[search]] command is a great way to uncover traps without setting them off. #Untrap can be used on doors and containers. You can improve your chances of finding traps if you:
 
The [[search]] command is a great way to uncover traps without setting them off. #Untrap can be used on doors and containers. You can improve your chances of finding traps if you:
 
* have high Luck;
 
* have high Luck;
* [[put on]] or [[Eating jewelry|eat]] a [[ring of searching]];
+
* put on or [[Eating jewelry|eat]] a [[ring of searching]];
* put on a pair of [[lenses]];
+
* put on a [[pair of lenses]];
* [[wield]] [[Excalibur]];
+
* wield [[Excalibur]];
* wield the [[blessed]] [[Master Key of Thievery]] (which a [[rogue]] can do if it is [[uncursed]] as of [[3.6.0]]) without [[gloves]];
+
* wield the blessed [[Master Key of Thievery]] (or uncursed, if you are a [[Rogue]]) without gloves;
* play a [[role]] with [[intrinsic]] searching
+
* play a role that gets intrinsic searching
 
** [[Ranger]]: Level 1
 
** [[Ranger]]: Level 1
 
** [[Monk]]: Level 9
 
** [[Monk]]: Level 9
Line 495: Line 511:
 
* [[wand of secret door detection]]
 
* [[wand of secret door detection]]
 
* [[spellbook of detect unseen]]
 
* [[spellbook of detect unseen]]
* The [[Bell of Opening]] (probably better used to find [[portal]]s)
+
* The [[Bell of Opening]]
  
 
Because of technical limitations in the level format, only one trap can exist on any given square. If you aren't able to #[[untrap]] a physical trap, or if the trap is non-physical, you can usually remove most traps by entering the square and digging a [[pit]]. This will overwrite the existing trap in the level data, replacing it with a pit trap. You can then leave the pit and avoid it, or fill it by pushing a [[boulder]] in. The downside to this strategy is that you must expose yourself to the trap by entering its space.
 
Because of technical limitations in the level format, only one trap can exist on any given square. If you aren't able to #[[untrap]] a physical trap, or if the trap is non-physical, you can usually remove most traps by entering the square and digging a [[pit]]. This will overwrite the existing trap in the level data, replacing it with a pit trap. You can then leave the pit and avoid it, or fill it by pushing a [[boulder]] in. The downside to this strategy is that you must expose yourself to the trap by entering its space.
Line 510: Line 526:
 
[[UnNetHack]] adds ice traps, which generate in [[Sheol]] and are a cold counterpart to fire traps. The amount of damage is the same, but the damage type is cold instead of fire. These traps also have a small chance of appearing in a [[Random vault (UnNetHack)|trap room]].
 
[[UnNetHack]] adds ice traps, which generate in [[Sheol]] and are a cold counterpart to fire traps. The amount of damage is the same, but the damage type is cold instead of fire. These traps also have a small chance of appearing in a [[Random vault (UnNetHack)|trap room]].
  
Also in UnNetHack, 10% of rolling boulder traps will also generate an archaeologist corpse, a bullwhip, and a 1/3 chance of a fedora.
+
Also in UnNetHack, 10% of rolling boulder traps will also generate an archaeologist corpse, a bullwhip, and a {{frac|3}} chance of a fedora.
  
 
=== SLASH'EM ===
 
=== SLASH'EM ===
In [[SLASH'EM]], it is possible to disarm a fire trap with a non-cursed [[potion of water]], similar to using a potion of oil on a squeaky board. This will also generate 1-4 potions of oil based on luck. Since oil can then be diluted back to water, the large number of fire traps in Gehennom offer an effective way of multiplying one's water potions.
+
In [[SLASH'EM]], it is possible to disarm a fire trap with a non-cursed [[potion of water]], similar to using a potion of oil on a squeaky board. This will also generate 1&ndash;4 [[Potion of oil|potions of oil]] based on [[Luck]]. Since oil can then be diluted back to water, the large number of fire traps in Gehennom offer an effective way of multiplying one's water potions.
  
 
Untrapping a rust trap will turn the trap into a [[fountain]] if successful. This is also true in [[dNetHack]].
 
Untrapping a rust trap will turn the trap into a [[fountain]] if successful. This is also true in [[dNetHack]].
  
===[[Slash'EM Extended]]===
+
===Slash'EM Extended===
There are lots of traps exclusive to Slash'EM Extended. A full overview of them can be seen here: [[Trap (Slash'EM Extended)]]
+
{{main|Trap (Slash'EM Extended)}}
 +
[[Slash'EM Extended]] adds many new types of traps.
 +
 
 +
=== xNetHack ===
 +
In [[xNetHack]], you are asked for confirmation when stepping onto a square with a trap you have already found (and are not clearly immune to). This eliminates the problem of accidentally walking onto traps that you can't see, without needing to use the [[trap id]] command at every step.
 +
 
 +
Door traps can now have a variety of effects, such as waking monsters or wetting items in your inventory. Some changes are made to other traps as well; for instance, webs can be removed by using {{kbd|Shift|F}} with a bladed weapon. See [[xNetHack#Trap changes|xNetHack §&nbsp;Trap changes]] for a full list of these.
  
 
== Encyclopedia entries ==
 
== Encyclopedia entries ==

Revision as of 05:34, 19 September 2019

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

"Fire traps need better coverage on their edge cases. (Golems and special messages.)"

Traps are mechanisms on a space which may activate when you or a monster steps on them. There are many types of traps and a wide assortment of effects that they can cause, most of them negative.

To detect hidden traps, search for them, cast the detect unseen spell, zap a wand of secret door detection, or read a scroll of gold detection while confused.

Certain types of traps can be disarmed with the #untrap command.

In both filler levels and most special levels, a "random" trap is selected uniformly from the whole set of eligible traps, subject to level difficulty checks and some exclusions; see below.[1] Oddly, special levels that contain maze filler (the Castle, Asmodeus, Baalzebub, Orcus, and all real and fake Wizard's Tower levels, but not the Big Room or the Catacombs) use a completely separate formula that ignores level difficulty for selecting traps in the mazes.[2] It nonetheless ends up working much the same way overall, but actually makes fire traps less common than they would otherwise be in Gehennom on those levels.

Many traps affect monsters, including pets, differently than they affect you. Some traps cannot even be triggered by monsters.

In NetHack 3.6.1, certain types of traps up to dungeon level 4 may have a pre-aged corpse generated on top, along with random cursed weapons, tools, food or gems. The chance is 1 − Dlvl − 14,[3] so every eligible trap will have a corpse on the first floor. There will always be at least one possession, and there is a 20% chance of placing an additional possession after each one.[4] Squeaky boards and rust traps never have a corpse because they are non-lethal, and pits or holes also never generate a corpse (but pits are often seen with corpses of monsters that fell in).

Anti-magic field

^ anti-magic field Anti-magic field.png
Generates Anywhere
Effect Pw loss, or HP loss if magic resistant

Anti-magic fields drain between 2 and your experience level + 1 points of your spell power. If this would cause your spell power to go below zero, your maximum spell power will be permanently reduced by that amount, and your spell power becomes zero.[5] Anti-magic fields have no effect on your maximum spell power if it is zero.

If you have magic resistance, you take damage instead of losing power. The damage is at least d4, with an additional d4 each if you:

If you have phasing, you take 14 as much damage, rounded up.

Monsters that have a special attack such as spellcasting or a breath weapon will also be affected by this trap. The timeout for their special attack increases by 2d2 turns unless they are magic resistant, in which case they lose HP. This will also reveal the trap. Other monsters do not trigger this trap and do not reveal it when they pass over it.

You feel your magical energy drain away.
You are not magic resistant, and your Pw was drained.
You feel momentarily lethargic.
You are not magic resistant, but you have zero maximum Pw to drain.
You feel sluggish.
You are magic resistant, and took less than 14 your HP as damage.
You feel very lethargic.
You are magic resistant, and took more than 14 your HP as damage.
You feel unbearably torpid!
You are magic resistant, and were killed by HP loss.
<monster> seems lethargic.
A monster lost some Pw from an anti-magic field.
<monster> is killed by the compression from an anti-magic field!
A magic-resistant monster lost enough HP from an anti-magic field to die.

[6]

Arrow trap

^ arrow trap Arrow trap.png
Generates Anywhere
Effect Fires arrows

Arrow traps fire arrows at you or whoever else steps on them, which generally do 1d6 damage.

These traps can be a useful source of arrows. While standing on or adjacent to the square with the trap, successfully untrapping an arrow trap will yield a large supply of arrows (50 − rnl(50)).[7] Each time you or a monster triggers this trap there is a 115 chance that it will disappear. Any arrow that hits you or a monster is guaranteed to be lost. The average number of arrows you obtain by disarming is dependent on luck, but is higher than the average number you obtain by stepping on the trap until it disappears.

To remove: #untrap, or trigger it repeatedly until it runs out of arrows.

An arrow shoots out at you!
You triggered an arrow trap.
<monster> is hit by an arrow!
A monster triggered an arrow trap.
You hear a loud click!
The trap was out of arrows and is now gone.

[8]

Bear trap

^ bear trap Bear trap.png
Generates Anywhere
Effect Prevents movement
Main article: Beartrap

A bear trap causes 2d4 damage[9] and renders you immobile for several turns. During this time, you can attack and be attacked, but you cannot move from the spot. When caught in a bear trap, you are unable to kick. For some reason, escaping a bear trap is 5 times more likely when attempting to move diagonally than when attempting to move orthogonally.[10]

If you trigger the trap when riding, it affects your steed instead of you. Monsters can be trapped too.[11]

It is possible to untrap a bear trap. If successful, it will appear as a beartrap, an item which can be picked up. You may then apply it to a new location. If unsuccessful, you will become trapped. If a bugbear or an owlbear gets stuck in a bear trap outside your sight, then you will hear "the roaring of an angry bear". If you are caught in a bear trap, you cannot untrap yourself.

Oddly, beartraps reset themselves.

To remove: #untrap, or eat the trap as a metallivore.

Dart trap

^ dart trap Dart trap.png
Generates Anywhere
Effect Fires darts

A dart trap is similar to an arrow trap, but it fires darts. Darts will generally do 1d3 damage. Darts have a 1 in 5 chance of being poisoned, so be careful.

Disarming a dart trap will recover a large stack of darts, but this should probably not be attempted by characters lacking poison resistance. Like arrow traps, dart traps have a 115 chance of disappearing each time they are triggered; darts that hit always disappear; and you will obtain more darts by disarming than by triggering it (on average 50 − rnl(50) darts).[12]

To remove: #untrap, or trigger it repeatedly until it runs out of darts ("You hear a soft click.")

A little dart shoots out at you!
You triggered a dart trap.
<monster> is hit by a dart!
A monster triggered a dart trap.
You hear a soft click.
The trap was out of darts and is now gone.

[13]

Fire trap

^ fire trap Fire trap.png
Generates Gehennom, mazes, some quests, Plane of Fire
Effect Deals fire damage, burns inventory

A fire trap creates a column of flame underneath you. If you lack fire resistance, you take 2d4 damage, and your maximum HP is reduced by between zero and the damage you took. If you are fire-resistant, you lose 0 or 1 HP, and your maximum HP is unaffected.

The trap will attempt to burn an article of clothing with an equal chance of each of 5 types (helm, torso, shield, gloves, or boots) being selected. If the selected armor is not torso, but is either fireproof, thoroughly burnt, or not worn, a different type of armor will be selected. If blessed, the chance of the selected armor burning is subject to luck consideration. If the final armor selection is not body armor (regardless of whether the armor survived the luck roll), there is a 13 chance that scrolls, potions, and spellbooks in the main inventory will not be subject to burning. Otherwise all scrolls, potions, and spellbooks will have a 13 chance of burning.

Unlike most traps, fire traps will still activate if you jump over them.

Generation: Fire traps are only randomly generated in Gehennom, maze levels (including to the left and right of the Castle), the Plane of Fire, and some quests, notably the Valkyrie quest. In Gehennom, fire trap generation is increased. 20% of all randomly generated traps in Gehennom are guaranteed to be fire traps.

A magic trap or trapped box or chest has a chance of acting as a fire trap even where a fire trap cannot be generated. A magic trap always acts as a fire trap if activated by a monster.

If a fire trap is created on top of ice (which is common in the Valkyrie quest), stepping on it will melt the ice and replace it with a pool of water, potentially resulting in drowning.

To remove: Dig a pit into the ground while standing on the trap, then fill the pit.

A tower of flame erupts from the floor!
You triggered a fire trap.

[14]

Hole

^ hole Hole.png
Generates Diggable-floor levels, reduced chance
Effect Fall to lower level
Main article: Hole

Holes simply drop you down a number of levels. 2–3 levels is a typical fall distance, but there is no upper limit on how many levels it is possible to fall through, although you won't fall beyond the Castle. Monsters never fall more than one floor.[15]

One technique for dealing with this problem is to go down any stairs you encounter and then go back up again immediately. This way, if you should ever fall down to that level you will know where the exit is. A high dexterity stat will reduce your chances of falling down the hole should you accidentally step on it.

The same hole is not guaranteed to lead to the same location, or even the same level, even if an object, monster or pet went through it immediately before you.

Generation: Holes are much less likely to be randomly generated than other eligible types. Only 1 in 7 attempts to randomly place a hole will succeed. Holes cannot be randomly generated on levels with non-diggable floors, such as the vibrating square level or the Castle. If the floor is non-diggable, the hole trap is replaced with a falling rock trap. Holes cannot be generated beneath a boulder. Unlike other traps, holes are always generated visible.

To remove: Push a boulder into it.

There's a gaping hole under you!
You fell into a hole.

[16]

Magic trap

^ magic trap Magic trap.png
Generates Anywhere
Effect Various
Main article: Magic trap

Magic traps can have a variety of effects.

Monsters will fail to trigger this trap with 2021 chance, in which case the trap will do nothing and not be revealed to you. If a monster triggers the trap, it will generate a pillar of flame, acting like a fire trap.

To remove: Trigger it repeatedly until it explodes.

[17]

Falling rock trap

^ falling rock trap Falling rock trap.png
Generates Anywhere
Effect Drops rocks

Falling rock traps drop a rock on the victim's head, dealing 2d6 damage. If you are wearing some kind of hard hat, the damage is reduced to 2. The rock stays on the ground, so it is possible to use them as a rock source, although the trap will be exhausted eventually (115 chance each time it is triggered).

Early pet deaths are often due to this type of trap, earning it the nicknames "Puppy Pounder" and "Kitty Killer".

To remove: Trigger it repeatedly until it runs out of rocks.

[18]

A trapdoor in the ceiling opens and a rock falls on your head!
You triggered a falling rock trap.
<monster> is hit by a rock!
A monster triggered a falling rock trap.
A trapdoor in the sky opens and a rock falls on your head!
The trap is outdoors, e.g. in the Home level of some Quests.

Land mine

^ land mine Land mine.png
Generates level 6+, Fort Ludios
Effect Explodes, creates pit, wounds legs
Main article: Land mine

Land mines are hidden explosives, especially common in Fort Ludios. When triggered, they wound your legs and are replaced by a pit in which you may fall after the explosion. You may untrap a land mine from an adjacent square, and then pick it up and install it elsewhere, similar to a bear trap.

Monsters will fail to trigger this trap with 23 chance; the rest of the time it affects them just as it does you.

To remove: #untrap, or just set it off (although the latter will replace it with a pit).

[19]

Level teleporter

^ level teleporter Level teleporter.png
Generates level 5+, not non-teleport level
Effect levelports

This teleports you to a random location on a random level. If you have teleport control, then you can specify the level you will go to, unless you are stunned, fainted, paralyzed, or (with a 15 probability) confused. Otherwise, you or monsters activating the trap will be teleported up at most to level one, down at most three levels, but never down out of the main dungeon, or into the Sanctum before the invocation ritual. In the Endgame, you, monsters with the Amulet, and elementals on their plane cannot level teleport at all. All eligible target levels are equally likely.[20]

After the player has triggered the trap once, it vanishes, whether the teleportation was successful or not. You may remain on the same level and receive the message "You shudder for a moment."

Magic resistance will prevent you, but not monsters, from being teleported ("You feel a wrenching sensation.") Under certain conditions, you can use a normal teleport trap, even if you have magic resistance (see § Teleportation trap for details). However, you cannot do the same with a level teleporter.

To remove: Set it off personally; it is not removed when a monster triggers it.

[21]

Pit

^ pit Pit.png
Generates Anywhere
Effect Prevents movement, damage
Main article: Pit

Pits in the ground open up when you walk over them, causing 1–6 damage. This also abuses strength and dexterity. They require 3–7 turns to "climb to the edge" and escape. You may #jump out of a pit or apply a bullwhip to escape. While in the pit, any light source you are carrying will not travel beyond the walls of the pit. Falling into a pit as a pit fiend or a pit viper will generate YAFM.

To remove: Push a boulder into it.

[22]

Polymorph trap

^ polymorph trap Polymorph trap.png
Generates level 8+
Effect polymorph
Main article: Polymorph trap

A polymorph trap turns you into another monster for a limited time. Monsters can make use of them, too. However, monsters (including pets) that are polymorphed stay in that form permanently. After a successful polymorph of the player, it vanishes.

Magic resistance will prevent you (and the steed you're riding) from being polymorphed. ("You feel momentarily different.")

To remove: Set it off personally; it is not removed when a pet or monster triggers it.

[23]

Magic portal

^ magic portal Magic portal.png
Generates Never randomly; special levels and branches only
Effect Transports between branches

While this is not damaging at all, the game internally represents it as a trap. Magic portals are used to transport you between dungeon branches, and between the elemental planes.

The game internally creates a temporary magic portal when the player branchports, but it vanishes instantly after the branchport, so it is hidden from the player and can't actually be used as a portal that you can step into and out of.

Unlike other teleporter traps, a portal will still work if you have magic resistance. Its destination is fixed and is not subject to teleport control.

To remove: This trap cannot be removed, although the portal to your quest disappears if you are rejected with prejudice.

[24]

Rolling boulder trap

^ rolling boulder trap Rolling boulder trap.png
Generates level 2+
Effect Rolls boulder, causes damage

A rolling boulder trap has two parts. The actual trap is a switch which, when activated by stepping on it, sets a nearby boulder rolling toward you. The existence of these traps can sometimes be inferred by an incongruously placed boulder in a room. The path between the boulder and the trap must be clear,[25] though the boulder will pass through some dungeon features like fountains. When it hits another boulder, "you hear a loud crash as a boulder sets another in motion", it stops, and the other boulder begins moving. If a boulder trap is activated but you can't see it, you get the message "you hear rumbling in the distance".

Being hit with the boulder deals you d20 damage.

To remove: Destroy the boulder, move it beside the trap, or move it out of line with the trap, then activate the trap; a boulder trap only activates if there exists a boulder on one of the two designated launch squares, and activating the trap when there is no suitable boulder will destroy it.[26][27]

Click! You trigger a rolling boulder trap!
You triggered a rolling boulder trap.
Click! <monster> triggers something.
A monster triggered a rolling boulder trap.
Fortunately for you, no boulder was released.
There was no boulder in the launch spot for this trap, so the trap is destroyed.

[28]

Rust trap

^ rust trap Rust trap.png
Generates Anywhere
Effect wets items

A rust trap sprays you with water, rusting any rustable items you wear where it hits. Wielded iron objects or scrolls are also affected, but not spellbooks or potions. Gremlins like to use these traps to multiply. Iron golems will be instantly destroyed by these traps. If you are polymorphed into an iron golem, you will take damage equal to your monster form's maximum HP, killing your monster form and reverting you to your natural form. The half physical damage extrinsic applies.

To remove: Dig a pit into the ground while standing on the trap, then fill the pit.

A gush of water hits you on the <body part>!
Your armor in the corresponding slot takes water damage.
A gush of water hits you!
The trap hit your body armor slot, or you are an iron golem.
You are covered with rust!
You are an iron golem and were hit by the trap. Your monster form will be killed unless you have half physical damage.

[29]

Sleeping gas trap

^ sleeping gas trap Sleeping gas trap.png
Generates level 2+
Effect Releases sleep gas

A sleeping gas trap puts you to sleep for up to 25 turns, unless you have sleep resistance or are polymorphed into a naturally breathless monster. An amulet of magical breathing does not protect you. Monsters are also subject to the trap's effect.

To remove: Dig a pit into the ground while standing on the trap, then fill the pit.

A cloud of gas puts you to sleep!
You trigger a sleeping gas trap and are put to sleep.
You are enveloped in a cloud of gas!
You trigger a sleeping gas trap and are unaffected.

[30]

Spiked pit

^ spiked pit Spiked pit.png
Generates level 5+, Fort Ludios
Effect Prevents movement, damage

These are just pits which do 1–10 damage. Each time you fall in, there is a 16 chance that the spikes will be poisoned, which can be fatal for a character without poison resistance. Metallivores can eat the spikes out of a spiked pit, turning it into a normal pit. The spikes are never poisoned when a monster falls in.[31] The treasury in Fort Ludios contains many spiked pits along with its land mines.

Pets that fall into a pit can be helped out by standing adjacent to the pit and untrapping in the direction of the pit. When you do this with a spiked pit, if you fail to remove your pet, they will suffer the effects of falling onto spikes each time you fail, making them angry (reducing their tameness) and counting as abuse for resurrection from the wand of undead turning. If they die at your hands, you suffer the consequences of killing them in a trap yourself (−15 alignment and an angry god).

To remove: Push a boulder into it.

[32]

Squeaky board

^ squeaky board Squeaky board.png
Generates Anywhere
Effect Wakes monsters

A squeaky board wakes nearby sleeping monsters. If a monster steps on a squeaky board on your level, you "hear a distant <note> squeak", or "A board beneath <monster> squeaks <note> loudly" if in sight. (The pitch of the squeak is meaningless, but each trap has only one note associated with it.) For you, "nearby" means within a distance of 20 × XL. (For example, level 5 gives a 10-square radius, level 10 gives 14, and level 15 gives 17.) For monsters, "nearby" means that the distance is less than 40 (a 6-square radius).[33]

The note may be any note of the chromatic scale,[34] and no two boards on the same level will squeak with the same note unless there are at least 13 squeaky boards on the level.[35]

To remove: #untrap, but you must select a potion of oil (which will be consumed) or a charged can of grease (one charge will be consumed).

[36]

Statue trap

` statue trap Statue trap.png
Generates level 8+
Effect Statue on its space comes to life

Statue traps look like normal statues of a monster, until you try to walk on the same square as one. When you walk on the trap, it will transform the topmost statue on the trap into the monster it depicts. A statue trap can also be activated by searching, zapping force bolt, or applying a pick-axe. Technically, stone to flesh doesn't activate the trap, it just reanimates the statue if the monster was fleshy, otherwise it turns it in to a meatball. A stethoscope will give a revealing message to healers only, but will not activate the trap. Monsters will never set off these traps.[37]

Because of these traps it is a good idea to far look any statue you see. If the statue is of a monster you would rather not fight, don't step on it. If you have automatic searching, don't even go near it. However, you can throw another statue, preferably one of a weaker monster, onto the trap and then activate it. The new statue will come to life, leaving the old one inanimate. Zapping the trap with a wand of teleportation will teleport the statue without activating it. A wand of polymorph will not set it off either.

Trap statues contain the inventory a monster normally starts with. Unlike ordinary statues, they cannot contain spellbooks.[38]

To remove: Set it off.

Teleportation trap

^ teleportation trap Teleportation trap.png
Generates Anywhere except non-teleport levels
Effect Teleport within the level

This teleports you to a random location on the map, unless it is a vault teleporter located in a closet behind an ad aerarium engraving, in which case you are teleported to the vault. Ad aerarium engravings may also appear in front of closet with level teleporters, which will not put you inside a vault, so it is not wise to blindly walk into a closet without identifying the trap first.

Magic resistance will prevent you from being teleported. ("You feel a wrenching sensation.") If you want to use the teleporter (for instance, to enter a vault), you may use ctrl + t to take the teleporter despite magic resistance. A vault teleporter will give you a warning ("This is a vault teleport, usable once only. Jump in? [yn]") before triggering. If one of the squares in the vault is occupied by a monster or a trap (including the portal to Fort Ludios) or is otherwise unsafe, the vault teleport may fail, in which case the trap will act as an ordinary teleport trap, albeit single-use.[39]

To remove: Dig a pit on the same square and fill it with a boulder. If the trap is located behind an ad aerarium engraving, it will disappear after successfully teleporting the player; monsters cannot use it up.

[40]

Trap door

^ trap door Trap door.png
Generates levels with diggable floors, closets, Castle
Effect Fall to lower level

A trap door is identical to the simpler hole except that it starts out hidden. When triggered, you fall to a deeper dungeon level. Just like a hole, 2 or 3 levels is common, there is no upper limit, and you cannot fall beyond the Castle. Monsters never fall more than one floor.[41]

Generation: May be randomly generated at any dungeon level. Trap doors cannot be randomly generated on levels with non-diggable floors such as the vibrating square level or the Castle, although the Castle contains several statically placed trap doors. If the floor is non-diggable, the trap door is replaced with a falling rock trap. Trap doors cannot be generated beneath a boulder. They are sometimes found in closets, with "Vlad was here" engraved in front of the door.

To remove: Push a boulder into it.

[42]

Vibrating square

~ vibrating square Vibrating square.png
Generates Unique
Effect None
Main article: Vibrating square

Despite not really being a trap, the vibrating square is internally represented as a trap, and is thus detectable by methods that detect traps, such as a crystal ball. This also prevents teleporting directly onto the vibrating square, so you'll need to pick a square next to it when using controlled teleports to reach it faster.

Web

" web Web.png
Generates level 7+ and with giant spiders
Effect Prevents movement

A spider web is a rare type of non-magical trap. It is the only trap to use the " symbol, rather than the ^ symbol. When triggered, you will be unable to escape it for 0–12 turns, depending on your strength. If your strength was high enough to escape in 0 turns, then "You tear through a web!" and the web is destroyed.

If you are wielding Sting, you always escape in 1 turn ("Sting cuts through the web!"), leaving the web intact.

Acidic monster dissolve webs the step into, and fire elementals burn them away. Titanotheres, balucitheria, purple worms, jabberwocks, iron golems, balrogs, krakens, and mastodons tear through webs on the same turn they walk into them, destroying the web.

Spiders, amoeboid monsters, and whirly monsters may move into webs without becoming stuck.

If a bugbear or an owlbear gets stuck in a web outside your sight, then you will hear "the roaring of a confused bear".

Attempting to untrap stuck monsters risks trapping you and spreading the web.

You can produce webs with the #monster command if you are a spider. All web-related messages reflect whether things are happening to "your web" or "a spider web".

Generation: Wherever a web trap randomly generates, a giant spider is also generated.[43] Conversely, when a giant spider generates at level-generation time, a web trap is usually be created under it.[44]

To remove: #untrap (difficult), walk in with greater than 18/50 strength, or burn it away with a wand of fire. If you fail to #untrap a monster that is in a web, you will become stuck in a second web that is created at your current position. You can fill up the entire dungeon with webs in this way, if you so choose.

[45]

Container traps

Main article: Container trap

Containers can be searched with the #untrap command. A high luck can be helpful in avoiding the effects of container traps. Bad luck increases the likelihood of more dangerous traps. Be careful of trapped containers in shops; you will be charged for any items that are destroyed if you set off a trap that damages the merchandise. Container traps include:

Door traps

Trapped doors (and rarely, cursed tins) will explode when opened ("KABOOM!! The door/tin was booby-trapped!"), causing damage, abusing strength and possibly constitution, and stunning you. The damage and duration of the stun depend on a number of factors, including but not limited to your level and how deep you have been in the dungeon.

Strategy

Avoiding traps in the dungeon takes patience and care. Therefore, the more time-consuming of these methods are only worthwhile when you are especially vulnerable. You can minimize your chances of stepping on a trap by paying close attention to monsters, pets, noises, and terrain. Be wary of the telltale signs of traps such as conspicuous boulders, suspicious corpses, and piles of rocks, darts, or arrows. Traps that you've already discovered will also not be visible under items like these, so it's a good idea to use the trap id command if you need to step onto that square that looks suspicious, even though you may have already been in that area and discovered all traps. By walking only where you have seen pets or monsters safely walk, you can avoid most traps. Remember where you have safely stepped before. Elbereth can cause monsters to flee, possibly uncovering traps as they do. A leashed pet will whine if it is near a trap. Magic resistance and fire resistance can help nullify some of the more dangerous effects of traps.

The search command is a great way to uncover traps without setting them off. #Untrap can be used on doors and containers. You can improve your chances of finding traps if you:

Some items can be useful in detecting traps, although they may have better uses elsewhere:

Because of technical limitations in the level format, only one trap can exist on any given square. If you aren't able to #untrap a physical trap, or if the trap is non-physical, you can usually remove most traps by entering the square and digging a pit. This will overwrite the existing trap in the level data, replacing it with a pit trap. You can then leave the pit and avoid it, or fill it by pushing a boulder in. The downside to this strategy is that you must expose yourself to the trap by entering its space.

Variants

UnNetHack

^ ice trap File:Ice trap.png
Generates Sheol, trap rooms
Effect Deals cold damage, freezes inventory

UnNetHack adds ice traps, which generate in Sheol and are a cold counterpart to fire traps. The amount of damage is the same, but the damage type is cold instead of fire. These traps also have a small chance of appearing in a trap room.

Also in UnNetHack, 10% of rolling boulder traps will also generate an archaeologist corpse, a bullwhip, and a 13 chance of a fedora.

SLASH'EM

In SLASH'EM, it is possible to disarm a fire trap with a non-cursed potion of water, similar to using a potion of oil on a squeaky board. This will also generate 1–4 potions of oil based on Luck. Since oil can then be diluted back to water, the large number of fire traps in Gehennom offer an effective way of multiplying one's water potions.

Untrapping a rust trap will turn the trap into a fountain if successful. This is also true in dNetHack.

Slash'EM Extended

Slash'EM Extended adds many new types of traps.

xNetHack

In xNetHack, you are asked for confirmation when stepping onto a square with a trap you have already found (and are not clearly immune to). This eliminates the problem of accidentally walking onto traps that you can't see, without needing to use the trap id command at every step.

Door traps can now have a variety of effects, such as waking monsters or wetting items in your inventory. Some changes are made to other traps as well; for instance, webs can be removed by using Shift + F with a bladed weapon. See xNetHack § Trap changes for a full list of these.

Encyclopedia entries

Magic portal

Portals can be Mirrors, Pictures, Standing Stones, Stone
Circles, Windows, and special gates set up for the purpose.
You will travel through them both to distant parts of the
continent and to and from our own world. The precise manner
of their working is a Management secret.

[ The Tough Guide to Fantasyland, by Diana Wynne Jones ]

Squeaky board

A floorboard creaked. Galder had spent many hours tuning them,
always a wise precaution with an ambitious assistant who walked
like a cat.
D flat. That meant he was just to the right of the door.
"Ah, Trymon," he said, without turning, and noted with some
satisfaction the faint indrawing of breath behind him. "Good
of you to come. Shut the door, will you?"

[ The Light Fantastic, by Terry Pratchett ]

Trap door

I knew my Erik too well to feel at all comfortable on jumping
into his house. I knew what he had made of a certain palace at
Mazenderan. From being the most honest building conceivable, he
soon turned it into a house of the very devil, where you could
not utter a word but it was overheard or repeated by an echo.
With his trap-doors the monster was responsible for endless
tragedies of all kinds.

[ The Phantom of the Opera, by Gaston Leroux ]

Web

Oh what a tangled web we weave,
When first we practise to deceive!

[ Marmion, by Sir Walter Scott ]

References

  1. mktrap in mklev.c
  2. rndtrap in sp_lev.c
  3. src/mklev.c in NetHack 3.6.1, line 1391
  4. src/mklev.c in NetHack 3.6.1, line 1458
  5. trap.c in NetHack 3.4.3, line 2970
  6. trap.c, line 1321 (Anti-magic field trap on you) trap.c, line 2500 (On monsters)
  7. disarm_shooting_trap in trap.c
  8. trap.c, line 636 (Arrow trap on you) and trap.c, line 1825 (On monsters)
  9. trap.c in NetHack 3.6.2, line 1062
  10. hack.c in NetHack 3.6.2, line 1202
  11. trap.c in NetHack 3.6.2, line 2271
  12. disarm_shooting_trap in trap.c
  13. trap.c, line 663 (Dart trap on you) and trap.c, line 1742 (On monsters)
  14. trap.c, line 856 (Fire trap on you) and trap.c, line 1889 (On monsters)
  15. teleport.c in NetHack 3.4.3, line 1107
  16. trap.c, line 944 (Hole on you) and trap.c, line 1889 (On monsters)
  17. trap.c, line 1058 (Magic trap on you) and trap.c, line 2076 (On monsters)
  18. trap.c, line 692 (Falling rock trap on you) and trap.c, line 1759 (On monsters)
  19. trap.c, line 1111 (Landmine on you) and trap.c, line 2083 (On monsters)
  20. random_teleport_level in teleport.c
  21. trap.c, line 959 (Level teleporter on you) and trap.c, line 1988 (On monsters)
  22. trap.c, line 861 (Pit trap on you) and trap.c, line 1940 (On monsters)
  23. trap.c, line 1081 (Polymorph trap on you) and trap.c, line 2121 (On monsters)
  24. trap.c, line 1178 (Magic portal on you) and trap.c, line 1989 (On monsters)
  25. mkroll_launch in trap.c Boulder placement for boulder trap
  26. trap.c, line 1165 Player activating a boulder trap
  27. trap.c, line 2131 Monster activating a boulder trap
  28. trap.c, line 1165 (Rolling boulder trap on you) and trap.c, line 2131 (On monsters)
  29. trap.c, line 759 (Rust trap on you) and trap.c, line 1820 (On monsters)
  30. trap.c, line 1226 (Sleeping gas trap on you) and trap.c, line 1807 (On monsters)
  31. trap.c, line 928 (dotrap can call poisoned in mon.c); trap.c, line 1940 (but mintrap cannot.)
  32. trap.c, line 861 (Spiked pit trap on you) and trap.c, line 1940 (On monsters)
  33. wake_nearby in mon.c (for players) and wake_nearto in mon.c (for monsters)
  34. src/trap.c in NetHack 3.6.0, line 1467
  35. src/trap.c in NetHack 3.6.0, line 360
  36. trap.c, line 730 (Squeaky board on you) and trap.c, line 1777 (On monsters)
  37. trap.c, line 1054 (Statue trap on you) and trap.c, line 2073 (On monsters)
  38. Trap.c in NetHack 3.4.3, line 271
  39. src/teleport.c in NetHack 3.6.1, line 384
  40. trap.c, line 955 (Teleportation trap on you) and trap.c, line 1998 (On monsters)
  41. teleport.c in NetHack 3.4.3, line 1107
  42. trap.c, line 944 (Trapdoor on you) and trap.c, line 1965 (On monsters)
  43. mklev.c in NetHack 3.4.3, line 1266
  44. mklev.c in NetHack 3.4.3, line 763
  45. trap.c, line 964 (Web on you) and trap.c, line 2002 (On monsters)


This page may need to be updated for the current version of NetHack.

It may contain text specific to NetHack 3.4.3. Information on this page may be out of date.

Editors: After reviewing this page and making necessary edits, please change the {{nethack-343}} tag to the current version's tag or {{noversion}} as appropriate.