Beartrap

From NetHackWiki
(Redirected from Bear trap)
Jump to navigation Jump to search
(
Name beartrap
Appearance beartrap
Base price 60 zm
Weight 200
Material iron
Monster use Will not be used by monsters.

A beartrap (or bear trap) is a type of tool that appears in NetHack and can be set as a trap. A primed bear trap appears as a cyan caret glyph (^ ) upon being revealed. It is made of iron.

Generation

Bear traps can be generated in most rooms on almost any dungeon level during that level's creation: they cannot be placed on a stair or ladder, in a pool or moat, in lava, within a wall, under a closed door, on a spot occupied by another trap or a solid dungeon feature (e.g. a throne or altar), or anywhere on the Plane of Air or Plane of Water.[1]

A hero that successfully untraps a live bear trap will generate an uncursed beartrap item on the former trap's square, even that trap was created by applying a beartrap item with a different beatitude.[2]

Description

Bear traps have a chance of activating when a hero or monster that is on the ground walks onto their square.[3] A hero that is not fumbling will avoid a bear trap 1⁄5 of the time, or 4⁄5 of the time if they know the trap's location.[4] A bear trap will be revealed if the hero sees a monster trapped in it, becomes trapped in it themselves, moves over its square without being trapped, or uncovers it via searching (including automatic searching).[5][6]

A hero or monster that is caught in a bear trap takes 2d4 physical damage from it closing on their foot (subject to half physical damage) unless they are wearing iron shoes:[7] a hero that is caught in the trap and not killed by it will abuse dexterity and be stuck itself for 4-7 turns, during which they cannot kick or levitate, and a hero that is not wearing iron shoes will also suffer a wounded leg that lasts 10-19 turns in addition to the physical damage[8][9]—a monster will be trapped for a random amount of turns, and a trapped monster that was peaceful will become hostile if the bear trap that caught them was set by the hero.[10] If the hero moves onto a bear trap square while riding, the steed will be caught in the trap instead unless they are levitating or flying, and the hero will not trigger the trap if they 'land' on it as a result of that trap killing the steed.[11] A hero that is caught in a bear trap while chained to a heavy iron ball buried in the ground will be immediately freed from that iron ball, due to the code disallowing multiple "trapped" states from occurring on the same square.[12][13] Unique messages are printed if a bugbear or owlbear (including a hero polymorphed into either monster) is caught in a bear trap.[14][15]

A hero or monster that is flying (or floating), levitating, amorphous, whirly, unsolid, or at most small in physical size will not be caught in a bear trap if they walk on its square.[16][17][18][19] A metallivore that moves onto a bear trap will eat the bear trap immediately, while a hero that is polymorphed into a metallivore must move onto the bear trap's square first.[20]

Disarming

A hero can untrap a bear trap to try and disarm it, and failing an attempt has a luck-based chance of causing the hero to be caught in the trap (even if they are currently flying).[21] A hero cannot untrap a bear trap while they are caught within it.[22] A Ranger that attempts to disarm a bear trap will always succeed if they are not impaired (i.e. confused, hallucinating, blind, stunned, or fumbling).[23] Once disarmed, an uncursed beartrap item is produced that can be carried, and the hero can either apply the item to arm it or else perform various actions with it like other items.[2]

A hero that fails an untrapping attempt with a bear trap that a monster is current caught in has a luck-based chance of inflicting up to 4 points of damage to that monster, which also constitutes pet abuse if the trapped monster is tame, and the hero will be responsible for a monster that is killed by this damage.[24] Successfully freeing a monster from a bear trap that was not set by the hero has a similar luck-based chance of making that monster peaceful if they were hostile previously, and lawful heroes have a chance of gaining a +1 bonus to alignment record[25][26]—doing so with unlocking magic, i.e. a wand of opening or the knock spell, has a halved chance of the freed monster becoming peaceful (and lawful heroes gaining an alignment record bonus) if the hero was adjacent to them when they were freed.[27]

A hero that digs down on a beartrap's square by zapping a wand of digging or casting the dig spell will disarm that beartrap, and though the game also attempts to bury it on that square as well, it will immediately be uncovered by the digging magic creating a hole or pit in the floor.[28]

Escaping from a bear trap

The most common way to escape a bear trap is to try to move out of it: for unknown reasons, trying to move diagonally is most effective, allowing a hero to escape in 4–7 moves even if a wall is in the way compared to about five times as many turns for orthogonal movement.[29] Zapping a wand of opening or casting the knock spell downward will instantly release a trapped hero, while zapping either in the direction of a monster trapped in one will free them.[30][31] As discussed prior, digging down using a wand of digging or the dig spell while caught in a bear trap will also disarm it and cause the hero to escape.[28]

Teleportation, including level teleporting and branchporting, can safely get the hero out of a bear trap. Polymorphing into a monster that cannot be held by a bear trap will also instantly free the hero, and polymorph into a metallivore allows the hero to eat it without taking further damage, even while caught in it. A hero can escape out of a bear trap by jumping through any means, or else by propelling themselves using a heavy iron ball that is chained to them, but this does not disarm the trap and also inflicts d10 damage (subject to half physical damage) along with a wounded leg that lasts for 500–1499 turns.[32][33]

A hero digging down with any type of pick while they are caught in a bear trap has a luck-based chance of destroying the trap and freeing themselves:[34] failing will inflict at least one point of damage from hitting themselves in the foot, which is more likely if the hero is fumbling, and this damage can be reduced by half physical damage and by wearing boots (which stack with each other).

Setting a beartrap

A hero applying a beartrap item will arm the beartrap and create a bear trap square, which is an occupation that can be interrupted.[35][36][37] The duration required to successfully arm a beartrap is calculated based on the hero's strength and dexterity, and is doubled if the hero is blind.[38] A hero cannot set a beartrap if they are stunned, levitating, underwater, engulfed, or in a form that lacks hands, and cannot set a bear trap on a square where it is invalid to generate.[1][39]

A hero trying to set a beartrap that is cursed or trying to set any beartrap while they are fumbling has a luck-dependent chance of immediately being caught in the trap upon setting it.[40] A hero that attempts to set a bear trap while they are on a steed and have lower than Basic skill in riding will be given a warning about the possible chance of failure, and they have an even lower chance of success if they are either fumbling or setting a cursed beartrap[41]—however, failing to set one while riding will cause it to fall harmlessly to the floor, rather than setting and triggering the trap.[42]

A bear trap set by the hero behaves as a normal bear trap does and will anger peaceful monsters that are caught in it.[10] A hero can still be caught in their own bear trap if they move into it normally and fail to avoid the trap, or else move into it as a result of failing to disarm it.

Strategy

A beartrap can be applied in a narrow corridor to slow down pursuers, including preventing a shopkeeper from blocking the door of their shop while stealing from that shop—a monster stuck in a beartrap is also an easy target for ranged attacks. However, the time it takes to set one makes it very hard to utilize for emergency getaways, and at 200 aum they are also quite heavy to carry around.

History

The bear trap first appears in Hack 1.0, while the beartrap object is introduced in NetHack 3.2.0.

The encyclopedia entry is added in NetHack 3.6.0.

The Ranger's ability to reliably disarm beartraps while they are not impaired is added in NetHack 5.0.0 via commit e4cb3f08.

Messages

A bear trap closes on your <foot>!
You triggered a bear trap.
You are released from the bear trap.
The bear trap is no longer holding you.
You howl in anger!
You triggered a bear trap while polymorphed into an owlbear or bugbear.
<The monster> is caught in a bear trap!
A monster triggered a bear trap.
You hear the roaring of an angry bear!
An unseen owlbear or bugbear triggered a bear trap.
<The monster> eats a bear trap!
A metallivore ate a bear trap.

Variants

SLASH'EM

In SLASH'EM, a doppelganger hero can use their liquid leap technique to escape safely from a bear trap that they are caught in.[43]

UnNetHack

In UnNetHack, 2-8 bear traps are generated on the forest level of the Ruins of Moria during level creation.

dNetHack

In dNetHack, notdNetHack and notnotdNetHack, the beartrap's weight is reduced to 100 aum.

A hero or monster that is trapped in a bear trap is potentially vulnerable to sneak attacks.

Worn boots that have the randomized appearance of "jungle boots" grant immunity to wounded legs from being caught in a bear trap—damage taken from being forced out of a bear trap (e.g. by a thrown iron ball) is also reduced, though the boots will be damaged in that instance and lose up to 10 points of enchantment, destroying them if the enchantment is brought low enough as a result.

xNetHack

In xNetHack, beartraps have their weight reduced to 50 aum.

Rangers start each game with two beartraps.

EvilHack

In EvilHack, a bear trap is always placed on a set square within each map of Goblin Town during level creation.

Five bear traps are randomly placed around the top floor of the Ice Queen's Realm during level creation, and a bear trap is placed on a set square within the middle floor of the branch during level creation.

Encyclopedia entry

Probably most commonly associated with trapping, the leghold
trap is a rather simple mechanical trap. It is made up of two
jaws, a spring of some sort, and a trigger in the middle. When
the animal steps on the trigger the trap closes around the leg,
holding the animal in place. Usually some kind of lure is used
to position the animal, or the trap is set on an animal trail.
Traditionally, leghold traps had tightly closing "teeth" to make
sure the animal stayed in place. The teeth also made sure the
animal could not move the leg in the trap and ruin their fur.
However, this resulted in many animals gnawing off legs in order
to escape. More modern traps have a gap called an "offset jaw"
and work more like a handcuff. They grip above the paw, making
sure the animal cannot pull out but does not destroy the leg.
This also allows the trapper to release unwanted catches.

[ Wikipedia, the free encyclopedia ]

References

  1. ↑ 1.0 1.1 src/apply.c in NetHack 5.0.0, line 2839-L2854
  2. ↑ 2.0 2.1 src/trap.c in NetHack 5.0.0, line 5571-L5573
  3. ↑ src/trap.c in NetHack 5.0.0, line 1068
  4. ↑ src/trap.c in NetHack 5.0.0, line 3035-L3044
  5. ↑ src/trap.c in NetHack 5.0.0, line 1537
  6. ↑ src/trap.c in NetHack 5.0.0, line 1550
  7. ↑ src/trap.c in NetHack 5.0.0, line 1478-L1560: trapeffect_bear_trap()
  8. ↑ src/trap.c in NetHack 5.0.0, line 1517-L1518
  9. ↑ src/trap.c in NetHack 5.0.0, line 1553-L1554
  10. ↑ 10.0 10.1 src/trap.c in NetHack 5.0.0, line 1536
  11. ↑ src/trap.c in NetHack 5.0.0, line 1506-L1511
  12. ↑ src/trap.c in NetHack 5.0.0, line 1039
  13. ↑ src/hack.c in NetHack 5.0.0, line 2830-L2836
  14. ↑ src/trap.c in NetHack 5.0.0, line 1515-L1516
  15. ↑ src/trap.c in NetHack 5.0.0, line 1538-L1544
  16. ↑ src/trap.c in NetHack 5.0.0, line 1124-L1128
  17. ↑ src/trap.c in NetHack 5.0.0, line 1492-L1500
  18. ↑ src/trap.c in NetHack 5.0.0, line 1530-L1531
  19. ↑ src/trap.c in NetHack 5.0.0, line 2803-L2808
  20. ↑ src/trap.c in NetHack 5.0.0, line 3773-L3780
  21. ↑ src/trap.c in NetHack 5.0.0, line 5512-L5517
  22. ↑ src/trap.c in NetHack 5.0.0, line 5953-L5958
  23. ↑ src/trap.c in NetHack 5.0.0, line 5314-L5326
  24. ↑ src/trap.c in NetHack 5.0.0, line 5479-L5489
  25. ↑ src/trap.c in NetHack 5.0.0, line 5529-L5548
  26. ↑ src/trap.c in NetHack 5.0.0, line 5562-L5573
  27. ↑ src/trap.c in NetHack 5.0.0, line 6200-L6202
  28. ↑ 28.0 28.1 src/trap.c in NetHack 5.0.0, line 5355-L5358
  29. ↑ src/hack.c in NetHack 5.0.0, line 1566-L1579
  30. ↑ src/zap.c in NetHack 5.0.0, line 3282-L3284
  31. ↑ src/trap.c in NetHack 5.0.0, line 6167-L6203
  32. ↑ src/ball.c in NetHack 5.0.0, line 911-L925
  33. ↑ src/apply.c in NetHack 5.0.0, line 2076-L2085
  34. ↑ src/dig.c in NetHack 5.0.0, line 392-L413
  35. ↑ src/apply.c in NetHack 5.0.0, line 2819-L2912: use_trap() function
  36. ↑ src/apply.c in NetHack 5.0.0, line 2914-L2952: set_trap() function
  37. ↑ src/apply.c in NetHack 5.0.0, line 4389-L4393
  38. ↑ src/apply.c in NetHack 5.0.0, line 2867-L2876
  39. ↑ src/apply.c in NetHack 5.0.0, line 2829-L2838
  40. ↑ src/apply.c in NetHack 5.0.0, line 2941-L2944
  41. ↑ src/apply.c in NetHack 5.0.0, line 2877-L2889
  42. ↑ src/apply.c in NetHack 5.0.0, line 2896-L2900
  43. ↑ tech.c in SLASH'EM_0.0.7E7F2, line 947