Difference between revisions of "Defensive item"
Jump to navigation
Jump to search
(update refs for 3.6.6, and note that shopkeeper, guard, priest can receive digging despite the code) |
|||
Line 1: | Line 1: | ||
− | 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| | + | 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}} |
The following monster types are ineligible for defensive items: | The following monster types are ineligible for defensive items: | ||
* [[Animal]]s | * [[Animal]]s | ||
Line 7: | Line 7: | ||
* [[Kop]]s | * [[Kop]]s | ||
− | 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 23: | 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 40: | 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 | + | | 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.}} |
|- | |- | ||
| colspan="2" | | | colspan="2" | | ||
Line 66: | Line 66: | ||
== References == | == References == | ||
<references/> | <references/> | ||
− | {{nethack- | + | {{nethack-366}} |
[[Category:Monster Inventory]] | [[Category:Monster Inventory]] |
Revision as of 07:45, 3 December 2021
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)[7] |
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
A user has suggested improving this page or section as follows:
"Outline the circumstances under which a monster will make use of a defensive item."
See Also
References
- ↑ src/makemon.c in NetHack 3.6.6, line 794
- ↑ src/makemon.c in NetHack 3.6.6, line 791
- ↑ src/muse.c in NetHack 3.6.6, line 1014
- ↑ src/shknam.c in NetHack 3.6.6, line 655
- ↑ src/vault.c in NetHack 3.6.6, line 387
- ↑ src/priest.c in NetHack 3.6.6, line 239
- ↑ The code indicates that shopkeepers, guards, and temple priests are also not to receive a wand of digging, but
mtmp->{isshk,isgd,ispriest}
are only set aftermakemon()
is called,[4][5][6] thus they are eligible to receive it.