Difference between revisions of "Monster weapon preference"

From NetHackWiki
Jump to navigation Jump to search
(link sting)
m (pothole)
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
When selecting a [[weapon]] in their inventory to use (whether one they [[Monster starting inventory|started with]] or [[Pick up#Monsters|picked up]]), monsters follow a set of rules intended to help them inflict maximum damage.  Broadly speaking, based on the monster's distance to the player, it will choose the "best" weapon from one of three lists: a list for melee distance, a list for polearm range, and a list for all other ranges.
+
When selecting a [[weapon]] in their inventory to use (whether one they [[Monster starting inventory|started with]] or [[Pick up#Monsters|picked up]]), [[monster]]s follow a set of rules intended to help them inflict maximum damage.  Broadly speaking, based on the monster's distance to the player, it will choose the "best" weapon from one of three lists: a list for melee distance, a list for polearm range, and a list for all other ranges.
  
 
Notably, monster weapon choice is unaffected by the [[BUC]] status or [[enchantment]] of the weapons they possess - only the base type matters.
 
Notably, monster weapon choice is unaffected by the [[BUC]] status or [[enchantment]] of the weapons they possess - only the base type matters.
Line 33: Line 33:
 
If a monster is in melee range (or feels it will shortly be), it chooses the first of the following weapons that it possesses:
 
If a monster is in melee range (or feels it will shortly be), it chooses the first of the following weapons that it possesses:
  
* any [[artifact]] weapon, [[cockatrice corpse|cockatrice/chickatrice corpse]], [[tsurugi]], [[runesword]], [[dwarvish mattock]], [[two-handed sword]], [[battle axe]], [[katana]], [[unicorn horn]], [[crysknife]], [[trident]], [[long sword]], [[elven broadsword]], [[broadsword]], [[scimitar]], [[silver saber]], [[morning star]], [[elven short sword]], [[dwarvish short sword]], [[short sword]], [[orcish short sword]], [[mace]], [[axe]], [[dwarvish spear]], [[silver spear]], [[elven spear]], [[spear]], [[orcish spear]], [[flail]], [[bullwhip]], [[quarterstaff]], [[javelin]], [[aklys]], [[club]], [[pick axe]], [[rubber hose]], [[war hammer]], [[silver dagger]], [[elven dagger]], [[dagger]], [[orcish dagger]], [[athame]], [[scalpel]], [[knife]], [[worm tooth]]
+
* any [[artifact]] weapon, [[cockatrice corpse|cockatrice/chickatrice corpse]], [[tsurugi]], [[runesword]], [[dwarvish mattock]], [[two-handed sword]], [[battle axe]], [[katana]], [[unicorn horn]], [[crysknife]], [[trident]], [[long sword]], [[elven broadsword]], [[broadsword]], [[scimitar]], [[silver saber]], [[morning star]], [[elven short sword]], [[dwarvish short sword]], [[short sword]], [[orcish short sword]], [[mace]], [[axe]], [[dwarvish spear]], [[silver spear]], [[elven spear]], [[spear]], [[orcish spear]], [[flail]], [[bullwhip]], [[quarterstaff]], [[javelin]], [[aklys]], [[club]], [[pick-axe]], [[rubber hose]], [[war hammer]], [[silver dagger]], [[elven dagger]], [[dagger]], [[orcish dagger]], [[athame]], [[scalpel]], [[knife]], [[worm tooth]]
  
 
Monsters wielding weapons are subject to a few restrictions:
 
Monsters wielding weapons are subject to a few restrictions:
Line 44: Line 44:
  
 
==Strategy==
 
==Strategy==
 +
In general, the mechanics of monster weapon choice will not affect the player's actions very much. However, there are a few things to keep in mind:
  
In general, the mechanics of monster weapon choice will not affect the player's actions very much.  However, there are a few things to keep in mind:
+
* Be careful about leaving cockatrice corpses where monsters may find and wield them! In particular, chaotic casters can create a corpse-leaving cockatrice and a glove-wearing captain in a single spell via [[summon nasties]]. Also, be very cautious in areas like the [[Castle]] and [[Fort Ludios]] that contain many [[Yendorian Army]] members: even after the soldiers have been slain, humanoid monsters may still pick up and wear their gloves.
 
+
* Occasionally, early monsters such as [[Uruk-hai]] and [[Woodland-elves]] may prove more dangerous with their bows than their melee weapons, especially if their arrows are [[poisoned]]. In that case, it may be advantageous to rush into melee range to make them switch weapons.
* Be careful about leaving cockatrice corpses where monsters may find and wield them! In particular, chaotic casters [[summon nasties|summoning nasties]] can create a corpse-leaving cockatrice and a glove-wearing captain in a single spell. Also, be very cautious in areas like the [[Castle]] and [[Fort Ludios]] that contain many [[Yendorian Army]] members: even after the soldiers have been slain, humanoid monsters may still pick up and wear their gloves.
 
* Occasionally, early monsters such as [[Mordor orc]]s and [[Woodland-elves]] may prove more dangerous with their bows than their melee weapons, especially if their arrows are [[poisoned]]. In that case, it may be advantageous to rush into melee range to make them switch weapons.
 
 
* A bullwhip in the hands of a monster can be very dangerous, as it allows them to disarm you.  However, the bullwhip is fairly low on the priority list: that is why [[balrog]]s are never found wielding bullwhips, despite being guaranteed to start with one.  A particularly paranoid player might pick up any bullwhips they find, and drop them on a pile containing a "better" weapon.
 
* A bullwhip in the hands of a monster can be very dangerous, as it allows them to disarm you.  However, the bullwhip is fairly low on the priority list: that is why [[balrog]]s are never found wielding bullwhips, despite being guaranteed to start with one.  A particularly paranoid player might pick up any bullwhips they find, and drop them on a pile containing a "better" weapon.
* While it is theoretically possible to reduce a weapon-wielding monster's damage output by saddling them with a bad weapon (e.g. a cursed bow or a burnt rotted -5 [[Sting]]), in practice this is not worth attempting. The turns taken trying to set up such a situation are better spent simply killing the monster.
+
* While it is theoretically possible to reduce a weapon-wielding monster's damage output by saddling them with a bad weapon (e.g. a cursed bow or a burnt rotted -5 [[Sting]]), in practice this is not worth attempting. The turns taken trying to set up such a situation are better spent simply killing the monster.
* An observant but unspoiled player can learn what weapons do higher base damage by watching what weapons monsters choose: they are (roughly) ordered by base damage.
+
* An observant, unspoiled player can learn what weapons do higher base damage by watching what weapons monsters choose: they are (roughly) ordered by base damage.
  
 
==Sources==
 
==Sources==
  
 
Most of this information comes from [[Source:NetHack_3.6.1/src/weapon.c|weapon.c]], specifically the functions <code>select_hwep</code> and <code>select_rwep</code>.  Some is also adapted (and updated) from Dylan O'Donnell's [https://www.steelypips.org/nethack/343/weap-343.html#early NetHack Weapons spoiler].
 
Most of this information comes from [[Source:NetHack_3.6.1/src/weapon.c|weapon.c]], specifically the functions <code>select_hwep</code> and <code>select_rwep</code>.  Some is also adapted (and updated) from Dylan O'Donnell's [https://www.steelypips.org/nethack/343/weap-343.html#early NetHack Weapons spoiler].
 +
 +
[[Category:Monster Inventory]]

Latest revision as of 12:04, 10 December 2023

When selecting a weapon in their inventory to use (whether one they started with or picked up), monsters follow a set of rules intended to help them inflict maximum damage. Broadly speaking, based on the monster's distance to the player, it will choose the "best" weapon from one of three lists: a list for melee distance, a list for polearm range, and a list for all other ranges.

Notably, monster weapon choice is unaffected by the BUC status or enchantment of the weapons they possess - only the base type matters.

Below is an enumeration of the lists that monsters choose from, as well as details of how they decide what list to choose from.

Choosing a ranged weapon

In general, monsters that are not adjacent to the player throw the first of the following items that they find in their inventory:

Monsters will not attempt to throw certain types of ammunition without the appropriate launcher. If they have the appropriate launcher, they will wield it, and if not, they will keep looking for another type of weapon to throw. Specifically:

  • Monsters will not throw any kind of arrow unless they have a bow. If they have more than one type of bow, they choose in the following order: yumi, elven bow, bow, orcish bow.
  • Monsters will not throw crossbow bolts without a crossbow.
  • Monsters will not throw flint, rocks, loadstones, luckstones or gemstones without a sling.
    • Monsters that like gems will not throw them, even if they have a sling.
    • Monsters cannot throw cursed loadstones.[2]

Monsters will not automatically unwield their launcher once they run out of ammunition, although they may switch to another weapon once the player comes within range, as detailed below. Additionally, monsters cannot throw a weapon if it is welded to their hand: monsters can throw cursed daggers if the player has kept their distance, but once the player comes within melee range, they will wield the dagger(s) and be unable to throw them.

Choosing a polearm

If a monster is in range to hit the player with a polearm, but is still out of melee range, they will use the polearm in preference to a ranged weapon. They pick polearms in the following order:

Similar to launchers, monsters will continue wielding a polearm in melee range if they possess no suitable melee weapon. Monsters are special-cased to not attempt to use a polearm if their current weapon is welded to their hand: this allows them to continue to fire throwable weapons such as daggers.

Choosing a melee weapon

If a monster is in melee range (or feels it will shortly be), it chooses the first of the following weapons that it possesses:

Monsters wielding weapons are subject to a few restrictions:

  • Monsters that are neither stoning-resistant nor wearing gloves cannot wield cockatrice/chickatrice corpses.
  • Monsters that are not strong cannot wield two-handed weapons, nor can monsters that are wearing a shield.
  • Silver-hating monsters cannot wield silver weapons.

Due to what may be a bug, monsters picking up an artifact weapon will always wield it, even if they were already wielding a "better" artifact.

Strategy

In general, the mechanics of monster weapon choice will not affect the player's actions very much. However, there are a few things to keep in mind:

  • Be careful about leaving cockatrice corpses where monsters may find and wield them! In particular, chaotic casters can create a corpse-leaving cockatrice and a glove-wearing captain in a single spell via summon nasties. Also, be very cautious in areas like the Castle and Fort Ludios that contain many Yendorian Army members: even after the soldiers have been slain, humanoid monsters may still pick up and wear their gloves.
  • Occasionally, early monsters such as Uruk-hai and Woodland-elves may prove more dangerous with their bows than their melee weapons, especially if their arrows are poisoned. In that case, it may be advantageous to rush into melee range to make them switch weapons.
  • A bullwhip in the hands of a monster can be very dangerous, as it allows them to disarm you. However, the bullwhip is fairly low on the priority list: that is why balrogs are never found wielding bullwhips, despite being guaranteed to start with one. A particularly paranoid player might pick up any bullwhips they find, and drop them on a pile containing a "better" weapon.
  • While it is theoretically possible to reduce a weapon-wielding monster's damage output by saddling them with a bad weapon (e.g. a cursed bow or a burnt rotted -5 Sting), in practice this is not worth attempting. The turns taken trying to set up such a situation are better spent simply killing the monster.
  • An observant, unspoiled player can learn what weapons do higher base damage by watching what weapons monsters choose: they are (roughly) ordered by base damage.

Sources

Most of this information comes from weapon.c, specifically the functions select_hwep and select_rwep. Some is also adapted (and updated) from Dylan O'Donnell's NetHack Weapons spoiler.

  1. Gemstones are not explicitly in the list of preferred items, but if the list has iterated to darts, and the monster has gems and a sling, it will choose to throw the gems.
  2. This makes it very rare for monsters to fire loadstones, since they are always generated cursed on the ground and auto-curse upon leaving the player's inventory. If you really want to see this happen, cancel a loadstone.