Monster weapon preference

From NetHackWiki
Jump to navigation Jump to search

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.

The following information pertains to an upcoming version (NetHack 3.7.0). If this version is now released, please verify that the information below is still accurate, then update the page to incorporate it.

Balrogs specifically will prefer their whip to any other weapon they might have, provided the hero is wielding a weapon. They do not actually need to see the hero wielding something to decide on the whip.

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.