OSDN Git Service

add missing "#ifdef X11LARGETILE"
[jnethack/source.git] / include / prop.h
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. */
4
5 #ifndef PROP_H
6 #define PROP_H
7
8 /*** What the properties are ***
9  *
10  * note:  propertynames[] array in timeout.c has string values for these.
11  *        Property #0 is not used.
12  */
13 /* Resistances to troubles */
14 enum prop_types {
15     FIRE_RES          =  1,
16     COLD_RES          =  2,
17     SLEEP_RES         =  3,
18     DISINT_RES        =  4,
19     SHOCK_RES         =  5,
20     POISON_RES        =  6,
21     ACID_RES          =  7,
22     STONE_RES         =  8,
23     /* note: for the first eight properties, MR_xxx == (1 << (xxx_RES - 1)) */
24     DRAIN_RES         =  9,
25     SICK_RES          = 10,
26     INVULNERABLE      = 11,
27     ANTIMAGIC         = 12,
28     /* Troubles */
29     STUNNED           = 13,
30     CONFUSION         = 14,
31     BLINDED           = 15,
32     DEAF              = 16,
33     SICK              = 17,
34     STONED            = 18,
35     STRANGLED         = 19,
36     VOMITING          = 20,
37     GLIB              = 21,
38     SLIMED            = 22,
39     HALLUC            = 23,
40     HALLUC_RES        = 24,
41     FUMBLING          = 25,
42     WOUNDED_LEGS      = 26,
43     SLEEPY            = 27,
44     HUNGER            = 28,
45     /* Vision and senses */
46     SEE_INVIS         = 29,
47     TELEPAT           = 30,
48     WARNING           = 31,
49     WARN_OF_MON       = 32,
50     WARN_UNDEAD       = 33,
51     SEARCHING         = 34,
52     CLAIRVOYANT       = 35,
53     INFRAVISION       = 36,
54     DETECT_MONSTERS   = 37,
55     /* Appearance and behavior */
56     ADORNED           = 38,
57     INVIS             = 39,
58     DISPLACED         = 40,
59     STEALTH           = 41,
60     AGGRAVATE_MONSTER = 42,
61     CONFLICT          = 43,
62     /* Transportation */
63     JUMPING           = 44,
64     TELEPORT          = 45,
65     TELEPORT_CONTROL  = 46,
66     LEVITATION        = 47,
67     FLYING            = 48,
68     WWALKING          = 49,
69     SWIMMING          = 50,
70     MAGICAL_BREATHING = 51,
71     PASSES_WALLS      = 52,
72     /* Physical attributes */
73     SLOW_DIGESTION    = 53,
74     HALF_SPDAM        = 54,
75     HALF_PHDAM        = 55,
76     REGENERATION      = 56,
77     ENERGY_REGENERATION = 57,
78     PROTECTION        = 58,
79     PROT_FROM_SHAPE_CHANGERS = 59,
80     POLYMORPH         = 60,
81     POLYMORPH_CONTROL = 61,
82     UNCHANGING        = 62,
83     FAST              = 63,
84     REFLECTING        = 64,
85     FREE_ACTION       = 65,
86     FIXED_ABIL        = 66,
87     LIFESAVED         = 67
88 };
89 #define LAST_PROP (LIFESAVED)
90
91 /*** Where the properties come from ***/
92 /* Definitions were moved here from obj.h and you.h */
93 struct prop {
94     /*** Properties conveyed by objects ***/
95     long extrinsic;
96 /* Armor */
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 */
124
125     /*** Property is blocked by an object ***/
126     long blocked; /* Same assignments as extrinsic */
127
128     /*** Timeouts, permanent properties, and other flags ***/
129     long intrinsic;
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)
137 /* Control flags */
138 #define FROMFORM 0x10000000L  /* Polyd; conferred by monster form */
139 #define I_SPECIAL 0x20000000L /* Property is controllable */
140 };
141
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
157
158 #endif /* PROP_H */