1 /* NetHack 3.7 prop.h $NHDT-Date: 1596498555 2020/08/03 23:49:15 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.22 $ */ 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 WITHERING = 67, 88 LIFESAVED = 68 89 }; 90 #define LAST_PROP (LIFESAVED) 91 92 /*** Where the properties come from ***/ 93 /* Definitions were moved here from obj.h and you.h */ 94 struct prop { 95 /*** Properties conveyed by objects ***/ 96 long extrinsic; 97 /* Armor */ 98 #define W_ARM 0x00000001L /* Body armor */ 99 #define W_ARMC 0x00000002L /* Cloak */ 100 #define W_ARMH 0x00000004L /* Helmet/hat */ 101 #define W_ARMS 0x00000008L /* Shield */ 102 #define W_ARMG 0x00000010L /* Gloves/gauntlets */ 103 #define W_ARMF 0x00000020L /* Footwear */ 104 #define W_ARMU 0x00000040L /* Undershirt */ 105 #define W_ARMOR (W_ARM | W_ARMC | W_ARMH | W_ARMS | W_ARMG | W_ARMF | W_ARMU) 106 /* Weapons and artifacts */ 107 #define W_WEP 0x00000100L /* Wielded weapon */ 108 #define W_QUIVER 0x00000200L /* Quiver for (f)iring ammo */ 109 #define W_SWAPWEP 0x00000400L /* Secondary weapon */ 110 #define W_WEAPONS (W_WEP | W_SWAPWEP | W_QUIVER) 111 #define W_ART 0x00001000L /* Carrying artifact (not really worn) */ 112 #define W_ARTI 0x00002000L /* Invoked artifact (not really worn) */ 113 /* Amulets, rings, tools, and other items */ 114 #define W_AMUL 0x00010000L /* Amulet */ 115 #define W_RINGL 0x00020000L /* Left ring */ 116 #define W_RINGR 0x00040000L /* Right ring */ 117 #define W_RING (W_RINGL | W_RINGR) 118 #define W_TOOL 0x00080000L /* Eyewear */ 119 #define W_ACCESSORY (W_RING | W_AMUL | W_TOOL) 120 /* historical note: originally in slash'em, 'worn' saddle stayed in 121 hero's inventory; in nethack, it's kept in the steed's inventory */ 122 #define W_SADDLE 0x00100000L /* KMH -- For riding monsters */ 123 #define W_BALL 0x00200000L /* Punishment ball */ 124 #define W_CHAIN 0x00400000L /* Punishment chain */ 125 126 /*** Property is blocked by an object ***/ 127 long blocked; /* Same assignments as extrinsic */ 128 129 /*** Timeouts, permanent properties, and other flags ***/ 130 long intrinsic; 131 /* Timed properties */ 132 #define TIMEOUT 0x00ffffffL /* Up to 16 million turns */ 133 /* Permanent properties */ 134 #define FROMEXPER 0x01000000L /* Gain/lose with experience, for role */ 135 #define FROMRACE 0x02000000L /* Gain/lose with experience, for race */ 136 #define FROMOUTSIDE 0x04000000L /* By corpses, prayer, thrones, etc. */ 137 #define INTRINSIC (FROMOUTSIDE | FROMRACE | FROMEXPER) 138 /* Control flags */ 139 #define FROMFORM 0x10000000L /* Polyd; conferred by monster form */ 140 #define I_SPECIAL 0x20000000L /* Property is controllable */ 141 }; 142 143 /*** Definitions for backwards compatibility ***/ 144 #define LEFT_RING W_RINGL 145 #define RIGHT_RING W_RINGR 146 #define LEFT_SIDE LEFT_RING 147 #define RIGHT_SIDE RIGHT_RING 148 #define BOTH_SIDES (LEFT_SIDE | RIGHT_SIDE) 149 #define WORN_ARMOR W_ARM 150 #define WORN_CLOAK W_ARMC 151 #define WORN_HELMET W_ARMH 152 #define WORN_SHIELD W_ARMS 153 #define WORN_GLOVES W_ARMG 154 #define WORN_BOOTS W_ARMF 155 #define WORN_AMUL W_AMUL 156 #define WORN_BLINDF W_TOOL 157 #define WORN_SHIRT W_ARMU 158 159 #endif /* PROP_H */ 160