Difference between revisions of "Defensive item"

From NetHackWiki
Jump to navigation Jump to search
(spheres are mindless)
m (pothole)
 
(11 intermediate revisions by 5 users not shown)
Line 1: Line 1:
{{todo|This page describes the generation of defensive items, but not how monsters use them.}}
+
When a [[monster]] is generated, there is a chance that it will be given a '''defensive item''' to protect itself from hostile [[You|adventurers]]. This will happen if the monster's level equals or exceeds the roll of a ''d50''.{{refsrc|src/makemon.c|794|version=NetHack 3.6.6}}
When a [[monster]] is generated, there is a chance that it will be given a '''defensive item''' to protect itself from hostile [[You|adventurers]]. This will happen if the monster's level equals or exceeds the roll of a ''d50''.{{refsrc|makemon.c|655}}
 
 
The following monster types are ineligible for defensive items:
 
The following monster types are ineligible for defensive items:
 
* [[Animal]]s
 
* [[Animal]]s
Line 6: Line 5:
 
* [[Mindless]] monsters
 
* [[Mindless]] monsters
 
* [[Ghost]]s and [[shade]]s
 
* [[Ghost]]s and [[shade]]s
* [[Kop]]s
+
* [[Keystone Kop (monster class)|Keystone Kops]] of any rank
  
In addition, regular [[soldier]]s have a 12/13 chance of missing out on the defensive item roll.
+
In addition, regular [[soldier]]s have a 12/13 chance of missing out on the defensive item roll.{{refsrc|src/makemon.c|791|version=NetHack 3.6.6}}
  
 
If chosen to receive a defensive item, the monster selects and rolls a die according to its difficulty:
 
If chosen to receive a defensive item, the monster selects and rolls a die according to its difficulty:
Line 24: Line 23:
 
|}
 
|}
  
The die roll determines the item, as shown by the following table:
+
The die roll determines the item, as shown by the following table:{{refsrc|src/muse.c|1014|version=NetHack 3.6.6}}
  
 
{| class="prettytable"
 
{| class="prettytable"
Line 41: Line 40:
 
| 7 || [[wand of teleportation]] (33%) or [[scroll of teleportation]] (67%)<br>(reroll up to 2 times if no-teleport level)
 
| 7 || [[wand of teleportation]] (33%) or [[scroll of teleportation]] (67%)<br>(reroll up to 2 times if no-teleport level)
 
|-
 
|-
| 8 || [[wand of digging]]<br>(nothing for [[floating eye]]s, [[shopkeeper]]s, [[guard]]s, and temple [[aligned priest|priest]]s)
+
| 8 || [[wand of digging]]<br>(nothing for [[floating eye]]s){{footnote|The code indicates that [[shopkeeper]]s, [[guard]]s, and temple [[aligned priest|priest]]s are also not to receive a wand of digging, but <code>mtmp->{isshk,isgd,ispriest}</code> are only set after <code>makemon()</code> is called,{{refsrc|src/shknam.c|655|version=NetHack 3.6.6}}{{refsrc|src/vault.c|387|version=NetHack 3.6.6}}{{refsrc|src/priest.c|239|version=NetHack 3.6.6}} thus they are eligible to receive it.  This has no practical gameplay effect (other than the possibility of getting wands of digging if you kill them) because these monsters will not use wands of digging.{{refsrc|src/muse.c|536|version=NetHack 3.6.6}}}}
 
|-
 
|-
 
| colspan="2" |
 
| colspan="2" |
Line 55: Line 54:
 
| 11 || (create-monster item, same as case 9)
 
| 11 || (create-monster item, same as case 9)
 
|}
 
|}
 +
 +
== Use ==
 +
Non-[[animal]], non-[[mindless]] monsters will use defensive items when they are within 5 squares Euclidean distance of [[you]] and they have a problem that needs fixing:{{refsrc|src/muse.c|325|nethack=3.6.6}}
 +
 +
* Non-cursed unicorn horn is used by a monster with hands when [[confuse]]d, [[stun]]ned, or [[blind]]{{refsrc|src/muse.c|348|nethack=3.6.6}}.
 +
* [[Lizard]] corpse or tin is eaten when [[confuse]]d or [[stun]]ned.
 +
* A healing item (potion of full healing, extra healing, or healing, in that order{{refsrc|src/muse.c|302|nethack=3.6.6}}) is used by a monster with hands that has been blinded.{{refsrc|src/muse.c|393|nethack=3.6.6}}
 +
* Monsters will only do the following if their HP is less than {{frac|5}} of their maximum when your experience level is less than 10, {{frac|4}} HP when XL is between 10 and 13, or {{frac|3}} when your XL is at least 14:{{refsrc|src/muse.c|399|nethack=3.6.6}}
 +
** Peaceful monsters will quaff a healing potion if they have hands, but not attempt to use any other defensive items.
 +
** Non-peaceful monsters that are not stuck or immobile will attempt to flee through [[stair]]s or [[trap]]s (teleporters and holes).
 +
** Mercenaries will use a [[bugle]] if there are more mercenaries within 3 squares that can be woken up.{{refsrc|src/muse.c|490|nethack=3.6.6}}
 +
** The following items will be used by a monster with hands:{{refsrc|src/muse.c|523|nethack=3.6.6}}
 +
*** [[wand of digging]], except by shopkeepers, guards, or priests; in Sokoban; or where digging is ineffective.
 +
*** [[wand of teleportation|wand]] or [[scroll of teleportation]], unless the monster knows that the level is no-teleport.
 +
**** shopkeepers in their shop, guards, and priests will not use cursed scrolls of teleportation.
 +
*** potions of {{! of|full healing}}, {{! of|extra healing}}, or {{! of|healing}}; [[wand of create monster|wand]] or [[scroll of create monster]].
  
 
==See Also==
 
==See Also==
 
* [[Monster starting inventory]]
 
* [[Monster starting inventory]]
 +
* [[Miscellaneous item]]
 
* [[Offensive item]]
 
* [[Offensive item]]
 
* [[Death drop]]
 
* [[Death drop]]
Line 63: Line 79:
 
== References ==
 
== References ==
 
<references/>
 
<references/>
{{nethack-343}}
+
{{nethack-366}}
[[Category:Items]]
+
[[Category:Monster Inventory]]
[[Category:Strategy]]
 

Latest revision as of 22:49, 12 November 2023

When a monster is generated, there is a chance that it will be given a defensive item to protect itself from hostile adventurers. This will happen if the monster's level equals or exceeds the roll of a d50.[1] The following monster types are ineligible for defensive items:

In addition, regular soldiers have a 12/13 chance of missing out on the defensive item roll.[2]

If chosen to receive a defensive item, the monster selects and rolls a die according to its difficulty:

Difficulty Roll
3 or less d8
4–6 d9
7–8 d10
9 or more d11

The die roll determines the item, as shown by the following table:[3]

Roll Outcome
1–2 scroll of teleportation
3 scroll of create monster
4 potion of healing
5 potion of extra healing
6 potion of full healing
(potion of sickness for Pestilence)
7 wand of teleportation (33%) or scroll of teleportation (67%)
(reroll up to 2 times if no-teleport level)
8 wand of digging
(nothing for floating eyes)[8]
9 wand of create monster (33%) or scroll of create monster (67%)
10 (teleport item, same as case 7)
11 (create-monster item, same as case 9)

Use

Non-animal, non-mindless monsters will use defensive items when they are within 5 squares Euclidean distance of you and they have a problem that needs fixing:[9]

  • Non-cursed unicorn horn is used by a monster with hands when confused, stunned, or blind[10].
  • Lizard corpse or tin is eaten when confused or stunned.
  • A healing item (potion of full healing, extra healing, or healing, in that order[11]) is used by a monster with hands that has been blinded.[12]
  • Monsters will only do the following if their HP is less than 15 of their maximum when your experience level is less than 10, 14 HP when XL is between 10 and 13, or 13 when your XL is at least 14:[13]
    • Peaceful monsters will quaff a healing potion if they have hands, but not attempt to use any other defensive items.
    • Non-peaceful monsters that are not stuck or immobile will attempt to flee through stairs or traps (teleporters and holes).
    • Mercenaries will use a bugle if there are more mercenaries within 3 squares that can be woken up.[14]
    • The following items will be used by a monster with hands:[15]

See Also

References