Warned of monster type

From NetHackWiki
(Redirected from Undead warning)
Jump to navigation Jump to search

Warning of monsters is a property that allows the player to sense certain monsters. 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. This property can be granted by certain artifacts or by polymorphing into certain monsters.

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 ​@ human or elf class, and human zombies and mummies.
  • Polymorphing into a purple worm provides warning of shriekers.

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.

Baby purple worms now also sense shriekers.

Messages

These messages can appear during enlightenment:

  • "You are aware of the presence of [orcs/elves/humans and elves/shriekers]."

There is no way to be warned of demons, but if there were, the message "You are aware of the presence of demons" would appear.[1] If you somehow became warned of some other monster type, 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's 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.

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] For example, Sting is a SPFX_WARN artifact with the M2_ORC flag. An artifact with SPFX_WARN but no M2 flags will instead provide warning like a ring of warning.

Carried artifacts that warn of a 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.

Multiple artifacts that warn of the 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. 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.

SLASH'EM

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.

A Necromancer begins the game with a pet ghoul, which is slow and can be difficult to bring along. Keeping it 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.

WARN_UNDEAD

Vanilla NetHack defines a WARN_UNDEAD property separate from WARN_OF_MON and allocates space for its struct prop structure.[8] However, vanilla does not implement warning of undead. In SLASH'EM, 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.[9]

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.