Difference between revisions of "Covetous"

From NetHackWiki
Jump to navigation Jump to search
(Source code: mention M3_WANTSALL and speculate on its likely purpose)
Line 22: Line 22:
  
 
Covetous monsters are defined by one of the following flags in [[monst.c]]: '''M3_WANTSARTI''', '''M3_WANTSCAND''', '''M3_WANTSBOOK''', '''M3_WANTSAMUL''', or '''M3_COVETOUS'''.
 
Covetous monsters are defined by one of the following flags in [[monst.c]]: '''M3_WANTSARTI''', '''M3_WANTSCAND''', '''M3_WANTSBOOK''', '''M3_WANTSAMUL''', or '''M3_COVETOUS'''.
 +
 +
There is also a '''M3_WANTSALL''' flag. It has the same value as M3_COVETOUS, but is not used by any monsters. It seems likely that M3_WANTSALL was intended to indicate monsters that are capable of stealing all of the major items, whereas M3_COVETOUS was intended as a mask to check if a particular monster is capable of stealing at least one major item. If this is the case, the Wizard of Yendor should be specified as M3_WANTSALL instead of M3_COVETOUS. However, since the two symbols have the same value, the mistake does not actually affect gameplay.
  
 
[[Category:Monster attributes]]
 
[[Category:Monster attributes]]

Revision as of 03:44, 13 May 2008

Certain high-level monsters are covetous, in that they will try to steal one of the unique items, or your quest artifact. The quest artifacts of other roles are immune from this theft, as is yours if it is stashed in a bag. There is no defence against this theft for items in your main inventory; this is especially troublesome if your only source of magic resistance is your quest artifact.

Item Coveted by
Your quest artifact All quest nemeses
Candelabrum Vlad
Book of the Dead Orcus, Master Lich, Arch-Lich
Amulet Asmodeus, Baalzebub, Demogorgon, Dispater, Geryon, Juiblex, Orcus, Yeenoghu
All of the above Wizard of Yendor

On one-twentieth of the hits from such an attack, the monster will look for one of the above items in your inventory; if it finds one it will steal it and, if capable, teleport away.

The Wizard of Yendor is most notorious for this; if he casts double trouble, his double has a chance of carrying a cheap plastic imitation of the Amulet of Yendor which can be confused with the real amulet if it is stolen.

Source code

Covetous monsters are defined by one of the following flags in monst.c: M3_WANTSARTI, M3_WANTSCAND, M3_WANTSBOOK, M3_WANTSAMUL, or M3_COVETOUS.

There is also a M3_WANTSALL flag. It has the same value as M3_COVETOUS, but is not used by any monsters. It seems likely that M3_WANTSALL was intended to indicate monsters that are capable of stealing all of the major items, whereas M3_COVETOUS was intended as a mask to check if a particular monster is capable of stealing at least one major item. If this is the case, the Wizard of Yendor should be specified as M3_WANTSALL instead of M3_COVETOUS. However, since the two symbols have the same value, the mistake does not actually affect gameplay.