1 /* NetHack 3.7 artifact.h $NHDT-Date: 1602692711 2020/10/14 16:25:11 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.15 $ */ 2 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ 3 /*-Copyright (c) Robert Patrick Rankin, 2011. */ 4 /* NetHack may be freely redistributed. See license for details. */ 5 6 #ifndef ARTIFACT_H 7 #define ARTIFACT_H 8 /* clang-format off */ 9 10 #define SPFX_NONE 0x00000000L /* no special effects, just a bonus */ 11 #define SPFX_NOGEN 0x00000001L /* item is special, bequeathed by gods */ 12 #define SPFX_RESTR 0x00000002L /* item is restricted - can't be named */ 13 #define SPFX_INTEL 0x00000004L /* item is self-willed - intelligent */ 14 #define SPFX_SPEAK 0x00000008L /* item can speak (not implemented) */ 15 #define SPFX_SEEK 0x00000010L /* item helps you search for things */ 16 #define SPFX_WARN 0x00000020L /* item warns you of danger */ 17 #define SPFX_ATTK 0x00000040L /* item has a special attack (attk) */ 18 #define SPFX_DEFN 0x00000080L /* item has a special defence (defn) */ 19 #define SPFX_DRLI 0x00000100L /* drains a level from monsters */ 20 #define SPFX_SEARCH 0x00000200L /* helps searching */ 21 #define SPFX_BEHEAD 0x00000400L /* beheads monsters */ 22 #define SPFX_HALRES 0x00000800L /* blocks hallucinations */ 23 #define SPFX_ESP 0x00001000L /* ESP (like amulet of ESP) */ 24 #define SPFX_STLTH 0x00002000L /* Stealth */ 25 #define SPFX_REGEN 0x00004000L /* Regeneration */ 26 #define SPFX_EREGEN 0x00008000L /* Energy Regeneration */ 27 #define SPFX_HSPDAM 0x00010000L /* 1/2 spell damage (on player) in combat */ 28 #define SPFX_HPHDAM 0x00020000L /* 1/2 physical damage (on player) in combat */ 29 #define SPFX_TCTRL 0x00040000L /* Teleportation Control */ 30 #define SPFX_LUCK 0x00080000L /* Increase Luck (like Luckstone) */ 31 #define SPFX_DMONS 0x00100000L /* attack bonus on one monster type */ 32 #define SPFX_DCLAS 0x00200000L /* attack bonus on monsters w/ symbol mtype */ 33 #define SPFX_DFLAG1 0x00400000L /* attack bonus on monsters w/ mflags1 flag */ 34 #define SPFX_DFLAG2 0x00800000L /* attack bonus on monsters w/ mflags2 flag */ 35 #define SPFX_DALIGN 0x01000000L /* attack bonus on non-aligned monsters */ 36 #define SPFX_DBONUS 0x01F00000L /* attack bonus mask */ 37 #define SPFX_XRAY 0x02000000L /* gives X-RAY vision to player */ 38 #define SPFX_REFLECT 0x04000000L /* Reflection */ 39 #define SPFX_PROTECT 0x08000000L /* Protection */ 40 #define SPFX_HEAVYHIT 0x10000000L /* occasionally hits very hard */ 41 42 struct artifact { 43 short otyp; 44 const char *name; 45 unsigned long spfx; /* special effect from wielding/wearing */ 46 unsigned long cspfx; /* special effect just from carrying obj */ 47 unsigned long mtype; /* monster type, symbol, or flag */ 48 struct attack attk, defn, cary; 49 uchar inv_prop; /* property obtained by invoking artifact */ 50 aligntyp alignment; /* alignment of bequeathing gods */ 51 short role; /* character role associated with */ 52 short race; /* character race associated with */ 53 long cost; /* price when sold to hero (default 100 x base cost) */ 54 char acolor; /* color to use if artifact 'glows' */ 55 }; 56 57 /* invoked properties with special powers */ 58 enum invoke_prop_types { 59 TAMING = (LAST_PROP + 1), 60 HEALING, 61 ENERGY_BOOST, 62 UNTRAP, 63 CHARGE_OBJ, 64 LEV_TELE, 65 CREATE_PORTAL, 66 ENLIGHTENING, 67 CREATE_AMMO, 68 LIGHTNING_BOLT, 69 SMOKE_CLOUD 70 }; 71 72 /* clang-format on */ 73 #endif /* ARTIFACT_H */ 74