Item theft

From NetHackWiki
Jump to navigation Jump to search
For the ability that can steal multiple items at once, see charm.
Not to be confused with stealing from shops.

Item theft or item-stealing is a damage type that appears in NetHack, and is primarily used by monsters to steal one or more items. The damage type is defined by the AD_SITM flag within monattk.h in the source code.[1]

Descrption

Item theft attacks are distinct from the charming ability of nymphs that can steal multiple items, as well as the outcome of a foocubus seduction attack used against monsters[2][3]—these damage types both use some of the same code as item theft, but are defined by different flags.[4][5][6] It is also distinct from the gold-stealing abilities of leprechauns and the Amulet theft ability of covetous monsters like quest nemeses and the Wizard of Yendor.

The four monsters that have item theft attacks are the monkey, wood nymph, water nymph, and mountain nymph—these monsters all use claw attacks in order to steal items. Magic cancellation does not protect against item-stealing attacks. Monsters that have charm attacks or can initiate foocubus-style encounters (which consists of nymphs and actual foocubi) are immune to item theft in this manner.[7]

Targeting the hero

A monster that lands an item theft attack against the hero will attempt to steal a targeted item (or stack of items) from the hero's inventory and interrupt any occupation[8][9][10][11]—the following criteria is applied for invalid items:

  • Gold cannot be targeted by item theft attacks.[12]
  • Food that the hero has just finished eating will be used up in order to avoid the attacker stealing a nonexistent item.[13]
  • Dragon scales embedded in the skin of a hero polymorphed into a dragon also cannot be targeted.[14]
  • Boulders will not be targeted if the attacker is incapable of lifting them, which will always be true normally.[15]

Once those items are excluded, a specific item in the open inventory will be targeted based on whether the attacker is an animal or not, i.e. if they are a monkey or a nymph.[16][17]

  • An animal stealing from the hero that is not cancelled will target and then attempt to steal a singular item.
    • If the theft targets a worn ring and the hero is wearing gloves, then the target will be changed to those gloves.[18]
    • Then, if the theft attempt is targeting worn gloves while the hero is wielding a weapon or other item, the target will be changed to that wielded item.[19]
    • Otherwise, if the theft attempt is targeting the hero's suit of armor and they are wearing a cloak over it, the target will be changed to the worn cloak[20]—if the theft targets a worn shirt and the hero has a worn suit and/or cloak over it, the target will be changed to the outermost item.[21]
    • If an invalid item is selected, then a limited amount of retries will occur until either an eligible item to steal is selected or the number of retries reaches zero (which should almost never happen), with more retries occurring the more worn armor or jewelry the hero has.[22]
    • Animals will always fail to steal the following target items:[23][24]
    • An animal targeting worn armor that takes multiple turns to remove–including any armor that is partially worn or removed from the hero being interrupted during the process–will be more likely to fail at stealing that armor.[30]
    • If the animal fails to take a targeted item enough times, they may begin fleeing instead, with a higher chance of fleeing the fewer items the hero currently has.[31]
  • A nymph stealing from the hero that is not cancelled will target and then attempt to steal a singular item.
    • If the hero is wearing a ring of adornment and not wearing gloves over them, they will target the worn ring.[32] Otherwise, if their target item is underneath worn armor, the target will be changed as described above.
    • Nymphs can steal all of the above listed items that animals cannot, though they will still avoid taking items that would be too heavy for them to carry. They can also charm the hero into handing over cursed armor and weapons that are welded to them, and can unlink a chained heavy iron ball in order to steal the ball itself if it is in the hero's inventory and targeted for theft.

If the monster steals the target item successfully, they will begin fleeing, and a nymph will attempt to teleport away as well unless they are on a no-teleport level.[33] Knights are not subjected to caitiff penalties for attacking a fleeing monster that stole something with an item theft attack unless the monster stole the item under conflict, started fleeing after charming the hero into handing over their armor, or else started fleeing after ending the hero's punishment by stealing a heavy iron ball from them.[34][35]

A nymph that targets a hero polymorphed into a nymph or foocubus with a theft attack will speak to them instead of stealing items, and always teleports away afterward.[36] A monster that steals a footrice corpse and is not wearing gloves will be subjected to instant stoning.[37] Item theft will always fail if there is nothing eligible to steal.[38] Item theft attempts that 'miss' a mounted hero can fall upon their steed instead, and if the steed's saddle is stolen this way, then the hero will be dismounted without suffering any damage.[39][40]

Targeting other monsters

An item theft attack used against monsters will attempt to steal an item from them, with similar conditions as those applied to one targeting the hero:[5][41] gold pieces and a dragon's natural scales cannot be stolen this way, boulders will be avoided if the attacker cannot carry them (which will always be the case normally), and a nymph that steals an item this way will teleport away if possible upon success. As mentioned above, this also includes cases where the monster originally targets the hero and their attack falls upon the steed. A pet that uses an item theft attack will not take any cursed items.[42]

Rings of adornment have no influence on what items are stolen for these cases: succubi can put on a hero's ring of adornment, but are immune to charming attacks, and no other monsters will wear the ring (or any ring, for that matter).

Monsters that have any worn or wield equipment stolen by item theft attacks will have a chance of replacing it with any other appropriate equipment they have during their next action.[43] If a monster stealing items from another monster causes the defender to die, e.g. from stealing the gloves of a monster wielding a footrice corpse, the attacker gains HP as they would for killing any other monster.[44]

Targeting monsters as a hero

A hero that uses an item theft attack while wielding a weapon will attack with that weapon—a hero in the form of a nymph must be empty-handed in order to perform the actual item theft with their initial attack. The conditions described for monster-versus-monster combat above also apply to heroes that steal items from monsters this way, and the hero will automatically drop any stolen items that either cannot fit in their inventory, or else would prompt a warning from the game about their encumbrance increasing.[6][45][46]

If the hero steals an item that would petrify them (i.e. stealing a footrice corpse while not wearing gloves), the attack routine will be interrupted by the hero becoming a statue, even if life saving subsequently occurs.[47] The attack routine is also interrupted if the target monster becomes petrified as a result of the hero stealing worn gloves from them while they are wielding a footrice corpse, since the remaining items will then be placed in the resulting statue.[48]

Strategy

Early in the game, it is often a good strategy to stay away from sleeping nymphs unless you can kill them with ranged attacks or have a pet that can fight them off. If dealing with multiple item-stealing monsters individual names so you know which monster to chase in case they manage to steal something particular.

Messages

Many of the messages used are shared with those of charming attacks.

<The monster> stole <an item>!
A monster landed an item theft attack on you.
<The monster> tries to run away with your <item>.
The monster begins fleeing after a successful theft.
<The monster> tries to <steal/snatch/grab/take> <your item> but gives up.
The monster tried and failed to take a valid item, and may begin fleeing afterward.
<The monster> tries to rob you, but there is nothing to steal!
A monster's item theft attack hit you, but you have no valid items to steal.
<The monster> tries to rob you, but isn't interested in gold.
As above, but there is also gold in your inventory.
Somebody tries to rob you, but finds nothing to steal.
In either of the two cases above, while you are blind.
<The monster> steals <an item> from <the other monster>!
A monster stole an item from another monster.
You steal:
You successfully stole an item, with this message followed by the name and inventory letter of the new item.
You snatched but dropped <an item>.
As above, but you cannot fit the item in your inventory, and it is placed on your square.

Variants

NetHack variants may add new monsters with item-theft attacks, and may also extend the ability to certain roles. Some variants may also add means of resisting the attacks and/or restrict the ability to teleport after a successful theft to nymphs and similar monsters.

SLASH'EM

In SLASH'EM, pack rats behave as monkeys do when stealing items—all other monsters with single-item theft attacks follow the same rules for single-item theft attacks that nymphs in NetHack do, including teleporting away after a successful theft. This means that non-nymph monsters like dwarf thieves and gnome thieves can also teleport upon stealing from the hero.

dNetHack

In dNetHack, notdNetHack and notnotdNetHack, a hero with item theft attacks can toggle whether or not they keep items steal items with it using the #style extended command.

The Thjofastafur stave carved into a wooden weapon can repel monsters with item theft attacks or any form of theft attack if it is placed on the hero's square, and that weapon will also warn the hero of those monsters while wielded.

The spirit Andromalius grants complete protection against item theft attacks and other item-stealing attacks, and the hero will have warning of monsters with such attacks as well.

EvilHack

In EvilHack, behavior for item theft attacks differentiates between monsters that are "robbers" like monkeys, hobbit pickpockets and Gollum, and "magical" thieves that teleport away like ice nymphs and other nymphs: the former will always fail to steal from a tortle hero hiding in their shell, while the latter will always fail to steal from a hiding tortle, a lawful hero wearing the Gauntlets of Purity or a Druid that is at least experience level 14.

Both forms of item theft attack have a 34 chance of failing to steal a non-cursed item that is greased or has the oilskin property, including naturally-oilskin items such as the oilskin sack and the oilskin cloak—grease on an item has a 12 chance of wearing off after foiling a theft attempt.

A Convict or Rogue can employ their thievery skill to steal items in a similar manner, with the ability to steal gold and welded items as well—this has a chance of angering peaceful targets.

References

  1. include/monattk.h in NetHack 3.6.7, line 58
  2. include/monattk.h in NetHack 3.6.7, line 59
  3. include/monattk.h in NetHack 3.6.7, line 72
  4. src/mhitu.c in NetHack 3.6.7, line 1336-L1337: per comment, "for now these are the same"
  5. 5.0 5.1 src/mhitm.c in NetHack 3.6.7, line 1314-L1316: similar comment to mhitu.c
  6. 6.0 6.1 src/uhitm.c in NetHack 3.6.7, line 1774-L1779: no comment in uhitm.c, but all cases observably make the same call to steal_it()
  7. src/mhitu.c in NetHack 3.6.7, line 1343-L1354
  8. src/mhitu.c in NetHack 3.6.7, line 1336-L1386: full case for AD_SITM against the hero
  9. src/mhitu.c in NetHack 3.6.7, line 1370: calls steal() in steal.c
  10. src/steal.c in NetHack 3.6.7, line 239-L478: steal() function
  11. src/steal.c in NetHack 3.6.7, line 376-L381: stop occupations to notice theft
  12. src/steal.c in NetHack 3.6.7, line 267
  13. src/steal.c in NetHack 3.6.7, line 261-L265
  14. src/steal.c in NetHack 3.6.7, line 268: theft is aborted if the hero's only "item" other than gold is the scales of their dragon polyform
  15. src/steal.c in NetHack 3.6.7, line 332-L336
  16. src/mhitu.c in NetHack 3.6.7, line 1338: first is_animal() check; several more checks are included in steal.c
  17. src/mhitu.c in NetHack 3.6.7, line 1376-L1378: second set of is_animal() checks
  18. src/steal.c in NetHack 3.6.7, line 313-L315
  19. src/steal.c in NetHack 3.6.7, line 316-L318
  20. src/steal.c in NetHack 3.6.7, line 319-L321
  21. src/steal.c in NetHack 3.6.7, line 322-L326
  22. src/steal.c in NetHack 3.6.7, line 293-L312: failing to steal with valid targets in inventory causes an impossible
  23. src/steal.c in NetHack 3.6.7, line 282: monkey_business boolean
  24. src/steal.c in NetHack 3.6.7, line 337-L374: cases for items that animals cannot steal—nymphs are capable of stealing most of these items by virtue of exclusion, with a comment explicitly noting "animals can't overcome curse stickiness nor unlock chains"
  25. src/steal.c in NetHack 3.6.7, line 343-L344
  26. src/steal.c in NetHack 3.6.7, line 348
  27. src/steal.c in NetHack 3.6.7, line 349-L352
  28. src/steal.c in NetHack 3.6.7, line 354-L356: can_carry
  29. src/steal.c in NetHack 3.6.7, line 343-L344
  30. src/steal.c in NetHack 3.6.7, line 395-L399
  31. src/steal.c in NetHack 3.6.7, line 363-L366: per comment, "the fewer items you have, the less likely the thief is going to stick around to try again"
  32. src/steal.c in NetHack 3.6.7, line 282-L291
  33. src/mhitu.c in NetHack 3.6.7, line 1375-L1386
  34. src/steal.c in NetHack 3.6.7, line 165-L170
  35. src/steal.c in NetHack 3.6.7, line 458-L461
  36. src/mhitu.c in NetHack 3.6.7, line 1348-L1355
  37. src/steal.c in NetHack 3.6.7, line 470-L475
  38. src/steal.c in NetHack 3.6.7, line 268-L280
  39. src/mhitm.c in NetHack 3.6.7, line 1333-L1336
  40. src/steed.c in NetHack 3.6.7, line 509-L513
  41. src/mhitm.c in NetHack 3.6.7, line 1315-L1370
  42. src/mhitm.c in NetHack 3.6.7, line 1319-L1322
  43. src/mhitm.c in NetHack 3.6.7, line 1337-L1346
  44. src/mhitm.c in NetHack 3.6.7, line 1358-L1360
  45. src/uhitm.c in NetHack 3.6.7, line 1518-L1627
  46. src/uhitm.c in NetHack 3.6.7, line 1594-L1596
  47. src/uhitm.c in NetHack 3.6.7, line 1600-L1601
  48. src/uhitm.c in NetHack 3.6.7, line 1605-L1609