1 /* NetHack 3.6 prop.h $NHDT-Date: 1570566360 2019/10/08 20:26:00 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.21 $ */
2 /* Copyright (c) 1989 Mike Threepoint */
3 /* NetHack may be freely redistributed. See license for details. */
8 /*** What the properties are ***
10 * note: propertynames[] array in timeout.c has string values for these.
11 * Property #0 is not used.
13 /* Resistances to troubles */
23 /* note: for the first eight properties, MR_xxx == (1 << (xxx_RES - 1)) */
45 /* Vision and senses */
55 /* Appearance and behavior */
60 AGGRAVATE_MONSTER = 42,
65 TELEPORT_CONTROL = 46,
70 MAGICAL_BREATHING = 51,
72 /* Physical attributes */
77 ENERGY_REGENERATION = 57,
79 PROT_FROM_SHAPE_CHANGERS = 59,
81 POLYMORPH_CONTROL = 61,
89 #define LAST_PROP (LIFESAVED)
91 /*** Where the properties come from ***/
92 /* Definitions were moved here from obj.h and you.h */
94 /*** Properties conveyed by objects ***/
97 #define W_ARM 0x00000001L /* Body armor */
98 #define W_ARMC 0x00000002L /* Cloak */
99 #define W_ARMH 0x00000004L /* Helmet/hat */
100 #define W_ARMS 0x00000008L /* Shield */
101 #define W_ARMG 0x00000010L /* Gloves/gauntlets */
102 #define W_ARMF 0x00000020L /* Footwear */
103 #define W_ARMU 0x00000040L /* Undershirt */
104 #define W_ARMOR (W_ARM | W_ARMC | W_ARMH | W_ARMS | W_ARMG | W_ARMF | W_ARMU)
105 /* Weapons and artifacts */
106 #define W_WEP 0x00000100L /* Wielded weapon */
107 #define W_QUIVER 0x00000200L /* Quiver for (f)iring ammo */
108 #define W_SWAPWEP 0x00000400L /* Secondary weapon */
109 #define W_WEAPONS (W_WEP | W_SWAPWEP | W_QUIVER)
110 #define W_ART 0x00001000L /* Carrying artifact (not really worn) */
111 #define W_ARTI 0x00002000L /* Invoked artifact (not really worn) */
112 /* Amulets, rings, tools, and other items */
113 #define W_AMUL 0x00010000L /* Amulet */
114 #define W_RINGL 0x00020000L /* Left ring */
115 #define W_RINGR 0x00040000L /* Right ring */
116 #define W_RING (W_RINGL | W_RINGR)
117 #define W_TOOL 0x00080000L /* Eyewear */
118 #define W_ACCESSORY (W_RING | W_AMUL | W_TOOL)
119 /* historical note: originally in slash'em, 'worn' saddle stayed in
120 hero's inventory; in nethack, it's kept in the steed's inventory */
121 #define W_SADDLE 0x00100000L /* KMH -- For riding monsters */
122 #define W_BALL 0x00200000L /* Punishment ball */
123 #define W_CHAIN 0x00400000L /* Punishment chain */
125 /*** Property is blocked by an object ***/
126 long blocked; /* Same assignments as extrinsic */
128 /*** Timeouts, permanent properties, and other flags ***/
130 /* Timed properties */
131 #define TIMEOUT 0x00ffffffL /* Up to 16 million turns */
132 /* Permanent properties */
133 #define FROMEXPER 0x01000000L /* Gain/lose with experience, for role */
134 #define FROMRACE 0x02000000L /* Gain/lose with experience, for race */
135 #define FROMOUTSIDE 0x04000000L /* By corpses, prayer, thrones, etc. */
136 #define INTRINSIC (FROMOUTSIDE | FROMRACE | FROMEXPER)
138 #define FROMFORM 0x10000000L /* Polyd; conferred by monster form */
139 #define I_SPECIAL 0x20000000L /* Property is controllable */
142 /*** Definitions for backwards compatibility ***/
143 #define LEFT_RING W_RINGL
144 #define RIGHT_RING W_RINGR
145 #define LEFT_SIDE LEFT_RING
146 #define RIGHT_SIDE RIGHT_RING
147 #define BOTH_SIDES (LEFT_SIDE | RIGHT_SIDE)
148 #define WORN_ARMOR W_ARM
149 #define WORN_CLOAK W_ARMC
150 #define WORN_HELMET W_ARMH
151 #define WORN_SHIELD W_ARMS
152 #define WORN_GLOVES W_ARMG
153 #define WORN_BOOTS W_ARMF
154 #define WORN_AMUL W_AMUL
155 #define WORN_BLINDF W_TOOL
156 #define WORN_SHIRT W_ARMU