dumplog's saved_plines[]
[aNetHack.git] / include / prop.h
blobe4d3ec7aa0fc6289b72f0bca24ff6cd2e00e9732
1 /* NetHack 3.6 prop.h $NHDT-Date: 1437877163 2015/07/26 02:19:23 $ $NHDT-Branch: master $:$NHDT-Revision: 1.16 $ */
2 /* Copyright (c) 1989 Mike Threepoint */
3 /* NetHack may be freely redistributed. See license for details. */
5 #ifndef PROP_H
6 #define PROP_H
8 /*** What the properties are ***/
9 /* Resistances to troubles */
10 #define FIRE_RES 1
11 #define COLD_RES 2
12 #define SLEEP_RES 3
13 #define DISINT_RES 4
14 #define SHOCK_RES 5
15 #define POISON_RES 6
16 #define ACID_RES 7
17 #define STONE_RES 8
18 /* note: for the first eight properties, MR_xxx == (1 << (xxx_RES - 1)) */
19 #define DRAIN_RES 9
20 #define SICK_RES 10
21 #define INVULNERABLE 11
22 #define ANTIMAGIC 12
23 /* Troubles */
24 #define STUNNED 13
25 #define CONFUSION 14
26 #define BLINDED 15
27 #define DEAF 16
28 #define SICK 17
29 #define STONED 18
30 #define STRANGLED 19
31 #define VOMITING 20
32 #define GLIB 21
33 #define SLIMED 22
34 #define HALLUC 23
35 #define HALLUC_RES 24
36 #define FUMBLING 25
37 #define WOUNDED_LEGS 26
38 #define SLEEPY 27
39 #define HUNGER 28
40 /* Vision and senses */
41 #define SEE_INVIS 29
42 #define TELEPAT 30
43 #define WARNING 31
44 #define WARN_OF_MON 32
45 #define WARN_UNDEAD 33
46 #define SEARCHING 34
47 #define CLAIRVOYANT 35
48 #define INFRAVISION 36
49 #define DETECT_MONSTERS 37
50 /* Appearance and behavior */
51 #define ADORNED 38
52 #define INVIS 39
53 #define DISPLACED 40
54 #define STEALTH 41
55 #define AGGRAVATE_MONSTER 42
56 #define CONFLICT 43
57 /* Transportation */
58 #define JUMPING 44
59 #define TELEPORT 45
60 #define TELEPORT_CONTROL 46
61 #define LEVITATION 47
62 #define FLYING 48
63 #define WWALKING 49
64 #define SWIMMING 50
65 #define MAGICAL_BREATHING 51
66 #define PASSES_WALLS 52
67 /* Physical attributes */
68 #define SLOW_DIGESTION 53
69 #define HALF_SPDAM 54
70 #define HALF_PHDAM 55
71 #define REGENERATION 56
72 #define ENERGY_REGENERATION 57
73 #define PROTECTION 58
74 #define PROT_FROM_SHAPE_CHANGERS 59
75 #define POLYMORPH 60
76 #define POLYMORPH_CONTROL 61
77 #define UNCHANGING 62
78 #define FAST 63
79 #define REFLECTING 64
80 #define FREE_ACTION 65
81 #define FIXED_ABIL 66
82 #define LIFESAVED 67
83 #define LAST_PROP (LIFESAVED)
85 /*** Where the properties come from ***/
86 /* Definitions were moved here from obj.h and you.h */
87 struct prop {
88 /*** Properties conveyed by objects ***/
89 long extrinsic;
90 /* Armor */
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 nethack, 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 ***/
123 long intrinsic;
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)
131 /* Control flags */
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
152 #endif /* PROP_H */