Warned of monster type
If you wield the artifact weapon named Sting, then you are warned of orcs. You can detect the locations and types of all orcs on the current dungeon level, as if you could see them. This applies to any monster of orcish race, including any 'o' monsters and also orc mummy and orc zombie.
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.
These messages can appear during enlightenment:
- "You are aware of the presence of orcs."
- "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." For warnings of other monster types, "You are aware of the presence of something".
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.
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.
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. 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.
- The hero picks up the Master Key of Thievery, and receives warning.
- The hero picks up Dwarfwatcher, and becomes warned about dwarves.
- 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.
- 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:
- The hero puts on Orcfinder, and becomes warned of orcs.
- The hero wields Sting, and remains warned of orcs.
- The hero removes Orcfinder. NetHack decides to disable SPFX_WARN on the W_AMUL (worn amulet) slot.
- 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.
- The hero loses the M2_ORC flag from flags.warntype.
- The hero becomes not warned of orcs, despite wielding Sting.
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.
- cmd.c in NetHack 3.4.3, line 931
- youprop.h in NetHack 3.4.3, line 152
- hack.h in NetHack 3.4.3, line 103
- artifact.c in NetHack 3.4.3, line 442
- artifact.c in NetHack 3.4.3, line 400
- artifact.c in NetHack 3.4.3, line 448
- artifact.c in NetHack 3.4.3, line 449
- attrib.c in SLASH'EM 0.0.7E7F2, line 716
- prop.h in NetHack 3.4.3, line 63