1 /* aNetHack 0.0.1 prop.h $ANH-Date: 1437877163 2015/07/26 02:19:23 $ $ANH-Branch: master $:$ANH-Revision: 1.16 $ */
2 /* Copyright (c) 1989 Mike Threepoint */
3 /* aNetHack may be freely redistributed. See license for details. */
8 /*** What the properties are ***/
9 /* Resistances to troubles */
18 /* note: for the first eight properties, MR_xxx == (1 << (xxx_RES - 1)) */
21 #define INVULNERABLE 11
37 #define WOUNDED_LEGS 26
40 /* Vision and senses */
44 #define WARN_OF_MON 32
45 #define WARN_UNDEAD 33
47 #define CLAIRVOYANT 35
48 #define INFRAVISION 36
49 #define DETECT_MONSTERS 37
50 /* Appearance and behavior */
55 #define AGGRAVATE_MONSTER 42
60 #define TELEPORT_CONTROL 46
65 #define MAGICAL_BREATHING 51
66 #define PASSES_WALLS 52
67 /* Physical attributes */
68 #define SLOW_DIGESTION 53
71 #define REGENERATION 56
72 #define ENERGY_REGENERATION 57
74 #define PROT_FROM_SHAPE_CHANGERS 59
76 #define POLYMORPH_CONTROL 61
80 #define FREE_ACTION 65
83 #define LAST_PROP (LIFESAVED)
85 /*** Where the properties come from ***/
86 /* Definitions were moved here from obj.h and you.h */
88 /*** Properties conveyed by objects ***/
91 #define W_ARM 0x00000001L /* Body armor */
92 #define W_ARMC 0x00000002L /* Cloak */
93 #define W_ARMH 0x00000004L /* Helmet/hat */
94 #define W_ARMS 0x00000008L /* Shield */
95 #define W_ARMG 0x00000010L /* Gloves/gauntlets */
96 #define W_ARMF 0x00000020L /* Footwear */
97 #define W_ARMU 0x00000040L /* Undershirt */
98 #define W_ARMOR (W_ARM | W_ARMC | W_ARMH | W_ARMS | W_ARMG | W_ARMF | W_ARMU)
99 /* Weapons and artifacts */
100 #define W_WEP 0x00000100L /* Wielded weapon */
101 #define W_QUIVER 0x00000200L /* Quiver for (f)iring ammo */
102 #define W_SWAPWEP 0x00000400L /* Secondary weapon */
103 #define W_WEAPON (W_WEP | W_SWAPWEP | W_QUIVER)
104 #define W_ART 0x00001000L /* Carrying artifact (not really worn) */
105 #define W_ARTI 0x00002000L /* Invoked artifact (not really worn) */
106 /* Amulets, rings, tools, and other items */
107 #define W_AMUL 0x00010000L /* Amulet */
108 #define W_RINGL 0x00020000L /* Left ring */
109 #define W_RINGR 0x00040000L /* Right ring */
110 #define W_RING (W_RINGL | W_RINGR)
111 #define W_TOOL 0x00080000L /* Eyewear */
112 #define W_ACCESSORY (W_RING | W_AMUL | W_TOOL)
113 /* historical note: originally in slash'em, 'worn' saddle stayed in
114 hero's inventory; in anethack, it's kept in the steed's inventory */
115 #define W_SADDLE 0x00100000L /* KMH -- For riding monsters */
116 #define W_BALL 0x00200000L /* Punishment ball */
117 #define W_CHAIN 0x00400000L /* Punishment chain */
119 /*** Property is blocked by an object ***/
120 long blocked
; /* Same assignments as extrinsic */
122 /*** Timeouts, permanent properties, and other flags ***/
124 /* Timed properties */
125 #define TIMEOUT 0x00ffffffL /* Up to 16 million turns */
126 /* Permanent properties */
127 #define FROMEXPER 0x01000000L /* Gain/lose with experience, for role */
128 #define FROMRACE 0x02000000L /* Gain/lose with experience, for race */
129 #define FROMOUTSIDE 0x04000000L /* By corpses, prayer, thrones, etc. */
130 #define INTRINSIC (FROMOUTSIDE | FROMRACE | FROMEXPER)
132 #define FROMFORM 0x10000000L /* Polyd; conferred by monster form */
133 #define I_SPECIAL 0x20000000L /* Property is controllable */
136 /*** Definitions for backwards compatibility ***/
137 #define LEFT_RING W_RINGL
138 #define RIGHT_RING W_RINGR
139 #define LEFT_SIDE LEFT_RING
140 #define RIGHT_SIDE RIGHT_RING
141 #define BOTH_SIDES (LEFT_SIDE | RIGHT_SIDE)
142 #define WORN_ARMOR W_ARM
143 #define WORN_CLOAK W_ARMC
144 #define WORN_HELMET W_ARMH
145 #define WORN_SHIELD W_ARMS
146 #define WORN_GLOVES W_ARMG
147 #define WORN_BOOTS W_ARMF
148 #define WORN_AMUL W_AMUL
149 #define WORN_BLINDF W_TOOL
150 #define WORN_SHIRT W_ARMU