prop.h

Go to the documentation of this file.
00001 /*      SCCS Id: @(#)prop.h     3.4     1999/07/07      */
00002 /* Copyright (c) 1989 Mike Threepoint                             */
00003 /* NetHack may be freely redistributed.  See license for details. */
00004 
00005 #ifndef PROP_H
00006 #define PROP_H
00007 
00008 /*** What the properties are ***/
00009 #define FIRE_RES                 1
00010 #define COLD_RES                 2
00011 #define SLEEP_RES                3
00012 #define DISINT_RES               4
00013 #define SHOCK_RES                5
00014 #define POISON_RES               6
00015 #define ACID_RES                 7
00016 #define STONE_RES                8
00017 /* note: for the first eight properties, MR_xxx == (1 << (xxx_RES - 1)) */
00018 #define ADORNED                  9
00019 #define REGENERATION            10
00020 #define SEARCHING               11
00021 #define SEE_INVIS               12
00022 #define INVIS                   13
00023 #define TELEPORT                14
00024 #define TELEPORT_CONTROL        15
00025 #define POLYMORPH               16
00026 #define POLYMORPH_CONTROL       17
00027 #define LEVITATION              18
00028 #define STEALTH                 19
00029 #define AGGRAVATE_MONSTER       20
00030 #define CONFLICT                21
00031 #define PROTECTION              22
00032 #define PROT_FROM_SHAPE_CHANGERS 23
00033 #define WARNING                 24
00034 #define TELEPAT                 25
00035 #define FAST                    26
00036 #define STUNNED                 27
00037 #define CONFUSION               28
00038 #define SICK                    29
00039 #define BLINDED                 30
00040 #define SLEEPING                31
00041 #define WOUNDED_LEGS            32
00042 #define STONED                  33
00043 #define STRANGLED               34
00044 #define HALLUC                  35
00045 #define HALLUC_RES              36
00046 #define FUMBLING                37
00047 #define JUMPING                 38
00048 #define WWALKING                39
00049 #define HUNGER                  40
00050 #define GLIB                    41
00051 #define REFLECTING              42
00052 #define LIFESAVED               43
00053 #define ANTIMAGIC               44
00054 #define DISPLACED               45
00055 #define CLAIRVOYANT             46
00056 #define VOMITING                47
00057 #define ENERGY_REGENERATION     48
00058 #define MAGICAL_BREATHING       49
00059 #define HALF_SPDAM              50
00060 #define HALF_PHDAM              51
00061 #define SICK_RES                52
00062 #define DRAIN_RES               53
00063 #define WARN_UNDEAD             54
00064 #define INVULNERABLE            55
00065 #define FREE_ACTION             56
00066 #define SWIMMING                57
00067 #define SLIMED                  58
00068 #define FIXED_ABIL              59
00069 #define FLYING                  60
00070 #define UNCHANGING              61
00071 #define PASSES_WALLS            62
00072 #define SLOW_DIGESTION          63
00073 #define INFRAVISION             64
00074 #define WARN_OF_MON             65
00075 #define DETECT_MONSTERS         66
00076 #define LAST_PROP               (DETECT_MONSTERS)
00077 
00078 /*** Where the properties come from ***/
00079 /* Definitions were moved here from obj.h and you.h */
00080 struct prop {
00081         /*** Properties conveyed by objects ***/
00082         long extrinsic;
00083         /* Armor */
00084 #       define W_ARM        0x00000001L /* Body armor */
00085 #       define W_ARMC       0x00000002L /* Cloak */
00086 #       define W_ARMH       0x00000004L /* Helmet/hat */
00087 #       define W_ARMS       0x00000008L /* Shield */
00088 #       define W_ARMG       0x00000010L /* Gloves/gauntlets */
00089 #       define W_ARMF       0x00000020L /* Footwear */
00090 #ifdef TOURIST
00091 #       define W_ARMU       0x00000040L /* Undershirt */
00092 #       define W_ARMOR       (W_ARM | W_ARMC | W_ARMH | W_ARMS | W_ARMG | W_ARMF | W_ARMU)
00093 #else
00094 #       define W_ARMOR       (W_ARM | W_ARMC | W_ARMH | W_ARMS | W_ARMG | W_ARMF)
00095 #endif
00096         /* Weapons and artifacts */
00097 #       define W_WEP        0x00000100L /* Wielded weapon */
00098 #       define W_QUIVER     0x00000200L /* Quiver for (f)iring ammo */
00099 #       define W_SWAPWEP    0x00000400L /* Secondary weapon */
00100 #       define W_ART        0x00001000L /* Carrying artifact (not really worn) */
00101 #       define W_ARTI       0x00002000L /* Invoked artifact  (not really worn) */
00102         /* Amulets, rings, tools, and other items */
00103 #       define W_AMUL       0x00010000L /* Amulet */
00104 #       define W_RINGL      0x00020000L /* Left ring */
00105 #       define W_RINGR      0x00040000L /* Right ring */
00106 #       define W_RING       (W_RINGL | W_RINGR)
00107 #       define W_TOOL       0x00080000L /* Eyewear */
00108 #ifdef STEED
00109 #       define W_SADDLE     0x00100000L /* KMH -- For riding monsters */
00110 #endif
00111 #       define W_BALL       0x00200000L /* Punishment ball */
00112 #       define W_CHAIN      0x00400000L /* Punishment chain */
00113 
00114         /*** Property is blocked by an object ***/
00115         long blocked;                                   /* Same assignments as extrinsic */
00116 
00117         /*** Timeouts, permanent properties, and other flags ***/
00118         long intrinsic;
00119         /* Timed properties */
00120 #       define TIMEOUT      0x00ffffffL /* Up to 16 million turns */
00121         /* Permanent properties */
00122 #       define FROMEXPER    0x01000000L /* Gain/lose with experience, for role */
00123 #       define FROMRACE     0x02000000L /* Gain/lose with experience, for race */
00124 #       define FROMOUTSIDE  0x04000000L /* By corpses, prayer, thrones, etc. */
00125 #       define INTRINSIC    (FROMOUTSIDE|FROMRACE|FROMEXPER)
00126         /* Control flags */
00127 #       define I_SPECIAL    0x10000000L /* Property is controllable */
00128 };
00129 
00130 /*** Definitions for backwards compatibility ***/
00131 #define LEFT_RING       W_RINGL
00132 #define RIGHT_RING      W_RINGR
00133 #define LEFT_SIDE       LEFT_RING
00134 #define RIGHT_SIDE      RIGHT_RING
00135 #define BOTH_SIDES      (LEFT_SIDE | RIGHT_SIDE)
00136 #define WORN_ARMOR      W_ARM
00137 #define WORN_CLOAK      W_ARMC
00138 #define WORN_HELMET     W_ARMH
00139 #define WORN_SHIELD     W_ARMS
00140 #define WORN_GLOVES     W_ARMG
00141 #define WORN_BOOTS      W_ARMF
00142 #define WORN_AMUL       W_AMUL
00143 #define WORN_BLINDF     W_TOOL
00144 #ifdef TOURIST
00145 #define WORN_SHIRT      W_ARMU
00146 #endif
00147 
00148 #endif /* PROP_H */