Warned of monster type

From NetHackWiki
Revision as of 01:55, 4 February 2018 by Phol ende wodan (talk | contribs) (apparently purple worms sense shriekers)
Jump to navigation Jump to search

Certain artifacts and polymorph forms give you a special property named warning of monsters, which is active only for certain types of monsters, depending on the source of the property. When you are warned of a monster, you can detect the locations and types of all types of that monster on the current dungeon level, as if you could see them.

The monsters you will be warned against can be any type that can be represented by one of the M2_* monster flags. In practice, these are:

  • Wielding Sting and Orcrist provides warning of orcs, meaning all monsters of o class and any other orcish monster (zombies, mummies).
  • Wielding Grimtooth provides warning of elves, meaning all elven monsters, elven zombies, and elven mummies.
  • Polymorphing into a vampire or vampire lord provides warning of humans and elves, meaning all monsters of @ class, and human zombies and mummies.
  • Polymorphing into a purple worm provides warning of shriekers.

In SLASH'EM, certain roles are warned of undead. This is an innate property of an Undead Slayer from experience level 1, or a Necromancer from level 3. It detects the locations of all undead monsters on the current level.

Messages

These messages can appear during enlightenment:

  • "You are aware of the presence of [orcs/elves/humans and elves/shriekers]."
  • "You are aware of the presence of undead." (SLASH'EM)

There is no way to be warned of demons, but the source code in vanilla NetHack would say, "You are aware of the presence of demons."[1] If for some reason you happened to be warned of other monster types, the message would be "You are aware of the presence of something."

Strategy

Orcs are a small fraction of the monsters you encounter, and typically not much of a threat, so the warning of orcs has little value. It might be useful if you are trying to avoid Uruk-hai poison arrows.

Warning of elves is similarly only situationally useful.

Warning of humans may be more useful because humans make up a larger fraction of monsters.

In SLASH'EM, a Necromancer begins the game with a pet ghoul. This ghoul is slow, so you might abandon it. If you are trying to keep your ghoul, the task becomes easier if you reach experience level 3 and become warned of undead, so that you may always track the location of your ghoul. When it is time for your ghoul to follow you through staircase, then you might use your pick-axe to dig a shortcut from the ghoul's location to the staircase.

Source code

To enable detection of a monster type, the hero must have the WARNED_OF_MON property (as an intrinsic or extrinsic)[2], and flags.warntypes must contain the M2 flag for that monster type.[3]

If an artifact provides SPFX_WARN (either when carried or when worn), and that artifact has any M2 flags, then the artifact will provide warning of those M2 types.[4] An SPFX_WARN artifact without M2 flags will instead provide warning like a ring of warning. Sting is a SPFX_WARN artifact with the M2_ORC flag.

Caveat for carried artifacts that warn of monster type

Multiple artifacts that provide SPFX_WARN when carried, and have M2 flags, would not interact correctly. This is not currently a problem, because the only such artifacts are the Master Key of Thievery or the Orb of Fate, and both have no M2 flags.

Suppose that there is a new artifact pick-axe named Dwarfwatcher that provides SPFX_WARN of M2_DWARF when carried, but artifact.c is unchanged. Then the following sequence of events might happen:

  1. The hero picks up the Master Key of Thievery, and receives warning.
  2. The hero picks up Dwarfwatcher, and becomes warned about dwarves.
  3. The hero drops Dwarfwatcher. NetHack notices that there is another SPFX_WARN artifact in the W_ART (carried artifact) slot, and declines to disable SPFX_WARN.[5]
  4. The hero remains warned about dwarves, despite dropping Dwarfwatcher.

Sting does not cause a problem, because Sting uses a different slot (W_WEP) than carried artifacts.

Caveat for two artifacts that warn of same type

Two artifacts that simultaneously provide SPFX_WARN, of the same M2 flag, would not interact correctly. This is not currently a problem, because Sting is the only such artifact in the game.

Suppose that there is a new artifact amulet named Orcfinder that provides SPFX_WARN of M2_ORC when worn, but artifact.c is unchanged. (Orcfinder seems a bad idea, with Sting already in the game.) Then the following sequence of events might happen:

  1. The hero puts on Orcfinder, and becomes warned of orcs.
  2. The hero wields Sting, and remains warned of orcs.
  3. The hero removes Orcfinder. NetHack decides to disable SPFX_WARN on the W_AMUL (worn amulet) slot.
  4. The hero loses the WARN_OF_MON property in the W_AMUL slot. The hero retains the WARN_OF_MON property in the W_WEP slot.[6]
  5. The hero loses the M2_ORC flag from flags.warntype.[7]
  6. The hero becomes not warned of orcs, despite wielding Sting.

WARN_UNDEAD

WARN_UNDEAD is a separate property from WARN_OF_MON, so that SLASH'EM may include warning of undead in the list of innate properties. When the player changes experience level and gains (or loses) WARN_UNDEAD, then the game also sets (or clears) intrinsic WARN_OF_MON and adds (or removes) M2_UNDEAD to the warned monster types.[8]

Vanilla NetHack also defines a WARN_UNDEAD property and allocates space for its struct prop structure.[9] However, vanilla does not implement warning of undead.

References

This page may need to be updated for the current version of NetHack.

It may contain text specific to NetHack 3.6.0. Information on this page may be out of date.

Editors: After reviewing this page and making necessary edits, please change the {{nethack-360}} tag to the current version's tag or {{noversion}} as appropriate.