0c428d01a4e4c5a07529afe25ee4ad1b36ecaa48
[crawl.git] / crawl-ref / source / enum.h
1 /**
2  * @file
3  * @brief Global (ick) enums.
4 **/
5
6 #ifndef ENUM_H
7 #define ENUM_H
8
9 #include <type_traits> // underlying_type<>
10
11 #include "tag-version.h"
12
13 template<class E>
14 class enum_bitfield
15 {
16 public:
17     typedef typename underlying_type<E>::type underlying_type;
18     underlying_type flags;
19
20     /// Get the flag corresponding to the given bit position (0 = LSB).
21     static E exponent(int pos) { return static_cast<E>(1 << pos); }
22
23     enum_bitfield() : flags(0) {}
24     enum_bitfield(E flag) : flags(flag) {}
25     template<class ... Es>
26     enum_bitfield(E flag, Es... rest) : enum_bitfield(rest...) { flags |= flag; }
27
28     explicit operator underlying_type () const { return flags; }
29     explicit operator bool () const { return flags; }
30     bool operator==(enum_bitfield<E> other) const
31     {
32         return flags == other.flags;
33     }
34     bool operator!=(enum_bitfield<E> other) const
35     {
36         return !(*this == other);
37     }
38
39     enum_bitfield<E> &operator|=(enum_bitfield<E> other)
40     {
41         flags |= other.flags;
42         return *this;
43     }
44
45     enum_bitfield<E> &operator&=(enum_bitfield<E> other)
46     {
47         flags &= other.flags;
48         return *this;
49     }
50
51     enum_bitfield<E> operator|(enum_bitfield<E> other) const
52     {
53         return enum_bitfield<E>(*this) |= other;
54     }
55
56     enum_bitfield<E> operator|(E other) const
57     {
58         return enum_bitfield<E>(*this) |= other;
59     }
60
61     enum_bitfield<E> operator&(enum_bitfield<E> other) const
62     {
63         return enum_bitfield<E>(*this) &= other;
64     }
65
66     enum_bitfield<E> operator&(E other) const
67     {
68         return enum_bitfield<E>(*this) &= other;
69     }
70
71     enum_bitfield<E> operator~() const
72     {
73         enum_bitfield<E> me(*this);
74         me.flags = ~me.flags;
75         return me;
76     }
77 };
78
79 template <class E, class ... Es>
80 enum_bitfield<E> bitfield(E e1, Es... args)
81 {
82     return bitfield<E>(e1, args...);
83 }
84
85 /**
86  * Define fieldT as a bitfield of the enum flagT, and make bitwise
87  * operators on flagT yield a fieldT.
88  *
89  * This macro produces a typedef and several inline function definitions;
90  * use it only at file/namespace scope. It requires a trailing semicolon.
91  *
92  * The operations ~, |, and (binary) & on flags or fields yields a field.
93  * Fields also support &= and |=. Fields can be explicitly converted to
94  * an integer of the enum's underlying type, or to bool. Note that in C++
95  * using a bitfield expression as the condition of a control structure,
96  * or as an operand of a logical operator, counts as explicit conversion
97  * to bool.
98  *
99  * @param fieldT An identifier naming the bitfield type to define.
100  * @param flagT  An identifier naming the enum type to use as a flag.
101  *               Could theoretically be a more complex type expression, but
102  *               I wouldn't try anything trickier than scope resolution.
103  */
104 #define DEF_BITFIELD(fieldT, flagT) typedef enum_bitfield<flagT> fieldT;  \
105     inline fieldT operator|(flagT a, flagT b)  { return fieldT(a) |= b; } \
106     inline fieldT operator|(flagT a, fieldT b) { return fieldT(a) |= b; } \
107     inline fieldT operator&(flagT a, flagT b)  { return fieldT(a) &= b; } \
108     inline fieldT operator&(flagT a, fieldT b) { return fieldT(a) &= b; } \
109     inline fieldT operator~(flagT a) { return ~fieldT(a); } \
110     COMPILE_CHECK(is_enum<flagT>::value)
111 // The last line above is really just to eat a semicolon; template
112 // substitution of enum_bitfield would have already failed.
113
114 enum lang_t
115 {
116     LANG_EN = 0,
117     LANG_CS,
118     LANG_DA,
119     LANG_DE,
120     LANG_EL,
121     LANG_ES,
122     LANG_FI,
123     LANG_FR,
124     LANG_HU,
125     LANG_IT,
126     LANG_JA,
127     LANG_KO,
128     LANG_LT,
129     LANG_LV,
130     LANG_NL,
131     LANG_PL,
132     LANG_PT,
133     LANG_RU,
134     LANG_SV,
135     LANG_ZH,
136 };
137
138 enum flang_t
139 {
140     FLANG_DWARVEN,
141     FLANG_JAGERKIN,
142     FLANG_KRAUT,
143     FLANG_FUTHARK,
144     FLANG_WIDE,
145     FLANG_GRUNT,
146     FLANG_BUTT,
147 };
148
149 enum ability_type
150 {
151     ABIL_NON_ABILITY = -1,
152     // Innate abilities and (Demonspawn) mutations.
153     ABIL_SPIT_POISON = 1,
154     ABIL_BREATHE_FIRE,
155     ABIL_BREATHE_FROST,
156     ABIL_BREATHE_POISON,
157     ABIL_BREATHE_LIGHTNING,
158     ABIL_BREATHE_POWER,
159     ABIL_BREATHE_STICKY_FLAME,
160     ABIL_BREATHE_STEAM,
161     ABIL_BREATHE_MEPHITIC,
162     ABIL_SPIT_ACID,
163     ABIL_BLINK,
164     // Others
165     ABIL_DELAYED_FIREBALL,
166     ABIL_END_TRANSFORMATION,
167     ABIL_STOP_SINGING, // From song of slaying
168
169     // Species-specific abilities.
170     // Demonspawn-only
171     ABIL_HELLFIRE,
172     // Tengu, Draconians
173     ABIL_FLY,
174 #if TAG_MAJOR_VERSION == 34
175     ABIL_WISP_BLINK,
176 #endif
177     ABIL_STOP_FLYING,
178     // Mummies
179     ABIL_MUMMY_RESTORATION,
180     // Vampires
181     ABIL_TRAN_BAT,
182 #if TAG_MAJOR_VERSION == 34
183     ABIL_BOTTLE_BLOOD,
184 #endif
185     // Deep Dwarves
186     ABIL_RECHARGING,
187     // Formicids
188     ABIL_DIG,
189     ABIL_SHAFT_SELF,
190     ABIL_MAX_INTRINSIC = ABIL_SHAFT_SELF,
191
192     // Evoking items.
193     ABIL_EVOKE_BERSERK = 40,
194     ABIL_MIN_EVOKE = ABIL_EVOKE_BERSERK,
195     ABIL_EVOKE_TELEPORTATION,
196     ABIL_EVOKE_BLINK,
197     ABIL_EVOKE_TURN_INVISIBLE,
198     ABIL_EVOKE_TURN_VISIBLE,
199     ABIL_EVOKE_FLIGHT,
200 #if TAG_MAJOR_VERSION == 34
201     ABIL_EVOKE_STOP_LEVITATING,
202 #endif
203     ABIL_EVOKE_FOG,
204     ABIL_EVOKE_TELEPORT_CONTROL,
205     ABIL_EVOKE_TWISTER,
206     ABIL_MAX_EVOKE = ABIL_EVOKE_TWISTER,
207
208     // Divine abilities
209     // Zin
210     ABIL_ZIN_SUSTENANCE = 1000,
211     ABIL_ZIN_RECITE,
212     ABIL_ZIN_VITALISATION,
213     ABIL_ZIN_IMPRISON,
214     ABIL_ZIN_SANCTUARY,
215     ABIL_ZIN_CURE_ALL_MUTATIONS,
216     // TSO
217     ABIL_TSO_DIVINE_SHIELD = 1010,
218     ABIL_TSO_CLEANSING_FLAME,
219     ABIL_TSO_SUMMON_DIVINE_WARRIOR,
220     // Kiku
221     ABIL_KIKU_RECEIVE_CORPSES = 1020,
222     ABIL_KIKU_TORMENT,
223     // Yredelemnul
224     ABIL_YRED_INJURY_MIRROR = 1030,
225     ABIL_YRED_ANIMATE_REMAINS,
226     ABIL_YRED_RECALL_UNDEAD_SLAVES,
227     ABIL_YRED_ANIMATE_DEAD,
228     ABIL_YRED_DRAIN_LIFE,
229     ABIL_YRED_ENSLAVE_SOUL,
230     ABIL_YRED_ANIMATE_REMAINS_OR_DEAD,
231     // Vehumet
232     // = 1040
233     // Okawaru
234     ABIL_OKAWARU_HEROISM = 1050,
235     ABIL_OKAWARU_FINESSE,
236     // Makhleb
237     ABIL_MAKHLEB_MINOR_DESTRUCTION = 1060,
238     ABIL_MAKHLEB_LESSER_SERVANT_OF_MAKHLEB,
239     ABIL_MAKHLEB_MAJOR_DESTRUCTION,
240     ABIL_MAKHLEB_GREATER_SERVANT_OF_MAKHLEB,
241     // Sif Muna
242     ABIL_SIF_MUNA_CHANNEL_ENERGY = 1070,
243     ABIL_SIF_MUNA_FORGET_SPELL,
244     // Trog
245     ABIL_TROG_BURN_SPELLBOOKS = 1080,
246     ABIL_TROG_BERSERK,
247     ABIL_TROG_REGEN_MR,
248     ABIL_TROG_BROTHERS_IN_ARMS,
249     // Elyvilon
250     ABIL_ELYVILON_LIFESAVING = 1090,
251     ABIL_ELYVILON_LESSER_HEALING,
252 #if TAG_MAJOR_VERSION == 34
253     ABIL_ELYVILON_LESSER_HEALING_OTHERS,
254 #endif
255     ABIL_ELYVILON_PURIFICATION,
256     ABIL_ELYVILON_GREATER_HEALING,
257     ABIL_ELYVILON_HEAL_OTHER,
258     ABIL_ELYVILON_DIVINE_VIGOUR,
259     // Lugonu
260     ABIL_LUGONU_ABYSS_EXIT = 1100,
261     ABIL_LUGONU_BEND_SPACE,
262     ABIL_LUGONU_BANISH,
263     ABIL_LUGONU_CORRUPT,
264     ABIL_LUGONU_ABYSS_ENTER,
265     // Nemelex
266 #if TAG_MAJOR_VERSION == 34
267     ABIL_NEMELEX_DRAW_ONE = 1110,
268     ABIL_NEMELEX_PEEK_TWO,
269 #endif
270     ABIL_NEMELEX_TRIPLE_DRAW = 1112,
271     ABIL_NEMELEX_DEAL_FOUR,
272     ABIL_NEMELEX_STACK_FIVE,
273     // Beogh
274     ABIL_BEOGH_SMITING = 1120,
275     ABIL_BEOGH_RECALL_ORCISH_FOLLOWERS,
276     ABIL_BEOGH_GIFT_ITEM,
277     // Jiyva
278     ABIL_JIYVA_CALL_JELLY = 1130,
279     ABIL_JIYVA_JELLY_PARALYSE,
280     ABIL_JIYVA_SLIMIFY,
281     ABIL_JIYVA_CURE_BAD_MUTATION,
282     // Fedhas
283     ABIL_FEDHAS_SUNLIGHT = 1140,
284     ABIL_FEDHAS_RAIN,
285     ABIL_FEDHAS_PLANT_RING,
286     ABIL_FEDHAS_SPAWN_SPORES,
287     ABIL_FEDHAS_EVOLUTION,
288     // Cheibriados
289     ABIL_CHEIBRIADOS_TIME_STEP = 1151,
290     ABIL_CHEIBRIADOS_TIME_BEND,
291     ABIL_CHEIBRIADOS_SLOUCH,
292     ABIL_CHEIBRIADOS_DISTORTION,
293     // Ashenzari
294     ABIL_ASHENZARI_SCRYING = 1160,
295     ABIL_ASHENZARI_TRANSFER_KNOWLEDGE,
296     ABIL_ASHENZARI_END_TRANSFER,
297     // Dithmenos
298     ABIL_DITHMENOS_SHADOW_STEP = 1170,
299     ABIL_DITHMENOS_SHADOW_FORM,
300     // Gozag
301     ABIL_GOZAG_POTION_PETITION = 1180,
302     ABIL_GOZAG_CALL_MERCHANT,
303     ABIL_GOZAG_BRIBE_BRANCH,
304     // Qazlal
305     ABIL_QAZLAL_UPHEAVAL = 1190,
306     ABIL_QAZLAL_ELEMENTAL_FORCE,
307     ABIL_QAZLAL_DISASTER_AREA,
308     // Ru
309     ABIL_RU_DRAW_OUT_POWER = 1200,
310     ABIL_RU_POWER_LEAP,
311     ABIL_RU_APOCALYPSE,
312
313     ABIL_RU_SACRIFICE_PURITY,
314         ABIL_FIRST_SACRIFICE = ABIL_RU_SACRIFICE_PURITY,
315     ABIL_RU_SACRIFICE_WORDS,
316     ABIL_RU_SACRIFICE_DRINK,
317     ABIL_RU_SACRIFICE_ESSENCE,
318     ABIL_RU_SACRIFICE_HEALTH,
319     ABIL_RU_SACRIFICE_STEALTH,
320     ABIL_RU_SACRIFICE_ARTIFICE,
321     ABIL_RU_SACRIFICE_LOVE,
322     ABIL_RU_SACRIFICE_COURAGE,
323     ABIL_RU_SACRIFICE_ARCANA,
324     ABIL_RU_SACRIFICE_NIMBLENESS,
325     ABIL_RU_SACRIFICE_DURABILITY,
326     ABIL_RU_SACRIFICE_HAND,
327     ABIL_RU_SACRIFICE_EXPERIENCE,
328     ABIL_RU_SACRIFICE_SKILL,
329         ABIL_FINAL_SACRIFICE = ABIL_RU_SACRIFICE_SKILL,
330     ABIL_RU_REJECT_SACRIFICES,
331
332     // For both Yred and Beogh
333     ABIL_STOP_RECALL = 1500,
334
335     // General divine (pseudo) abilities.
336     ABIL_RENOUNCE_RELIGION,
337     ABIL_CONVERT_TO_BEOGH,
338
339     // Zot Defence abilities
340     ABIL_MAKE_FUNGUS = 2000,
341     ABIL_MIN_ZOTDEF = ABIL_MAKE_FUNGUS,
342     ABIL_MAKE_PLANT,
343     ABIL_MAKE_OKLOB_SAPLING,
344 #if TAG_MAJOR_VERSION == 34
345     ABIL_MAKE_DART_TRAP,
346 #endif
347     ABIL_MAKE_ICE_STATUE,
348     ABIL_MAKE_OCS,
349     ABIL_MAKE_OBSIDIAN_STATUE,
350     ABIL_MAKE_CURSE_SKULL,
351     ABIL_MAKE_TELEPORT,
352     ABIL_MAKE_ARROW_TRAP,
353     ABIL_MAKE_BOLT_TRAP,
354     ABIL_MAKE_SPEAR_TRAP,
355     ABIL_MAKE_NEEDLE_TRAP,
356     ABIL_MAKE_NET_TRAP,
357 #if TAG_MAJOR_VERSION == 34
358         ABIL_UNUSED_Z1,
359 #endif
360     ABIL_MAKE_ALARM_TRAP,
361     ABIL_MAKE_BLADE_TRAP,
362     ABIL_MAKE_OKLOB_CIRCLE,
363     ABIL_MAKE_ACQUIRE_GOLD,
364     ABIL_MAKE_ACQUIREMENT,
365     ABIL_MAKE_WATER,
366     ABIL_MAKE_LIGHTNING_SPIRE,
367     ABIL_MAKE_BAZAAR,
368     ABIL_MAKE_ALTAR,
369     ABIL_MAKE_GRENADES,
370 #if TAG_MAJOR_VERSION == 34
371     ABIL_MAKE_SAGE,
372 #endif
373     ABIL_MAKE_OKLOB_PLANT,
374     ABIL_MAKE_BURNING_BUSH,
375     ABIL_REMOVE_CURSE,
376     ABIL_MAX_ZOTDEF = ABIL_REMOVE_CURSE,
377     NUM_ABILITIES
378 };
379
380 // Be sure to change activity_interrupt_names in delay.cc to match!
381 enum activity_interrupt_type
382 {
383     AI_FORCE_INTERRUPT = 0,         // Forcibly kills any activity that can be
384                                     // interrupted.
385     AI_KEYPRESS,
386     AI_FULL_HP,                     // Player is fully healed
387     AI_FULL_MP,                     // Player has recovered all mp
388     AI_STATUE,                      // Bad statue has come into view
389     AI_HUNGRY,                      // Hunger increased
390     AI_MESSAGE,                     // Message was displayed
391     AI_HP_LOSS,
392     AI_STAT_CHANGE,
393     AI_SEE_MONSTER,
394     AI_MONSTER_ATTACKS,
395     AI_TELEPORT,
396     AI_HIT_MONSTER,                 // Player hit monster (invis or
397                                     // mimic) during travel/explore.
398     AI_SENSE_MONSTER,
399     AI_MIMIC,
400
401     // Always the last.
402     NUM_AINTERRUPTS
403 };
404
405 enum attribute_type
406 {
407     ATTR_DIVINE_LIGHTNING_PROTECTION,
408 #if TAG_MAJOR_VERSION == 34
409     ATTR_DIVINE_REGENERATION,
410 #endif
411     ATTR_DIVINE_DEATH_CHANNEL,
412     ATTR_CARD_COUNTDOWN,
413     ATTR_BANISHMENT_IMMUNITY,   // banishment immunity until
414     ATTR_DELAYED_FIREBALL,      // bwr: reserve fireballs
415     ATTR_HELD,                  // caught in a net or web
416     ATTR_ABYSS_ENTOURAGE,       // maximum number of hostile monsters in
417                                 // sight of the player while in the Abyss.
418     ATTR_DIVINE_VIGOUR,         // strength of Ely's Divine Vigour
419     ATTR_DIVINE_STAMINA,        // strength of Zin's Divine Stamina
420     ATTR_DIVINE_SHIELD,         // strength of TSO's Divine Shield
421 #if TAG_MAJOR_VERSION == 34
422     ATTR_WEAPON_SWAP_INTERRUPTED,
423 #endif
424     ATTR_GOLD_FOUND,
425     ATTR_PURCHASES,            // Gold amount spent at shops.
426     ATTR_DONATIONS,            // Gold amount donated to Zin.
427     ATTR_MISC_SPENDING,        // Spending for things like ziggurats.
428 #if TAG_MAJOR_VERSION == 34
429     ATTR_UNUSED1,              // was ATTR_RND_LVL_BOOKS
430     ATTR_NOISES,
431 #endif
432     ATTR_SHADOWS,              // Lantern of shadows effect.
433 #if TAG_MAJOR_VERSION == 34
434     ATTR_UNUSED2,              // was ATTR_FRUIT_FOUND
435 #endif
436     ATTR_FLIGHT_UNCANCELLABLE, // Potion of flight is in effect.
437     ATTR_INVIS_UNCANCELLABLE,  // Potion/spell/wand of invis is in effect.
438     ATTR_PERM_FLIGHT,          // Tengu flight or boots of flying are on.
439     ATTR_SEEN_INVIS_TURN,      // Last turn you saw something invisible.
440     ATTR_SEEN_INVIS_SEED,      // Random seed for invis monster positions.
441     ATTR_APPENDAGE,            // eq slot of Beastly Appendage
442     ATTR_TITHE_BASE,           // Remainder of untithed gold.
443     ATTR_EVOL_XP,              // XP gained since last evolved mutation
444     ATTR_LIFE_GAINED,          // XL when a felid gained a life.
445     ATTR_TEMP_MUTATIONS,       // Number of temporary mutations the player has.
446     ATTR_TEMP_MUT_XP,          // Amount of XP remaining before some temp muts
447                                // will be removed
448     ATTR_NEXT_RECALL_TIME,     // aut remaining until next ally will be recalled
449     ATTR_NEXT_RECALL_INDEX,    // index+1 into recall_list for next recall
450 #if TAG_MAJOR_VERSION == 34
451     ATTR_EVOKER_XP,            // How much xp remaining until next evoker charge
452 #endif
453     ATTR_SEEN_BEOGH,           // Did an orc priest already offer conversion?
454     ATTR_XP_DRAIN,             // Severity of current skill drain
455     ATTR_SEARING_RAY,          // Are we currently firing a searing ray?
456     ATTR_RECITE_TYPE,          // Recitation type.
457     ATTR_RECITE_SEED,          // Recite text seed.
458     ATTR_RECITE_HP,            // HP on start of recitation.
459     ATTR_SWIFTNESS,            // Duration of future antiswiftness.
460 #if TAG_MAJOR_VERSION == 34
461     ATTR_BARBS_MSG,            // Have we already printed a message on move?
462 #endif
463     ATTR_BARBS_POW,            // How badly we are currently skewered
464     ATTR_REPEL_MISSILES,       // Repel missiles active
465     ATTR_DEFLECT_MISSILES,     // Deflect missiles active
466     ATTR_PORTAL_PROJECTILE,    // Accuracy bonus during portal projectile
467     ATTR_GOD_WRATH_XP,         // How much XP before our next god wrath check?
468     ATTR_GOD_WRATH_COUNT,      // Number of stored retributions
469     ATTR_NEXT_DRAGON_TIME,     // aut remaining until Dragon's Call summons another
470     ATTR_GOLD_GENERATED,       // Count gold generated this game.
471 #if TAG_MAJOR_VERSION == 34
472     ATTR_GOZAG_POTIONS,        // Number of times you've bought potions from Gozag.
473 #endif
474     ATTR_GOZAG_SHOPS,          // Number of shops you've funded from Gozag.
475     ATTR_GOZAG_SHOPS_CURRENT,  // As above, but since most recent time worshipping.
476 #if TAG_MAJOR_VERSION == 34
477     ATTR_DIVINE_FIRE_RES,      // Divine fire resistance (Qazlal).
478     ATTR_DIVINE_COLD_RES,      // Divine cold resistance (Qazlal).
479     ATTR_DIVINE_ELEC_RES,      // Divine electricity resistance (Qazlal).
480     ATTR_DIVINE_AC,            // Divine AC bonus (Qazlal).
481 #endif
482     ATTR_GOZAG_GOLD_USED,      // Gold spent for Gozag abilities.
483     ATTR_BONE_ARMOUR,          // Current amount of boney armour (from the spell)
484     ATTR_LAST_FLIGHT_STATUS,   // Whether spawm_flight should be restored after form change
485     ATTR_GOZAG_FIRST_POTION,   // Gozag's free first usage of Potion Petition.
486     NUM_ATTRIBUTES
487 };
488
489 enum transformation_type
490 {
491     TRAN_NONE,
492     TRAN_SPIDER,
493     TRAN_BLADE_HANDS,
494     TRAN_STATUE,
495     TRAN_ICE_BEAST,
496     TRAN_DRAGON,
497     TRAN_LICH,
498     TRAN_BAT,
499     TRAN_PIG,
500     TRAN_APPENDAGE,
501     TRAN_TREE,
502     TRAN_PORCUPINE,
503     TRAN_WISP,
504 #if TAG_MAJOR_VERSION == 34
505     TRAN_JELLY,
506 #endif
507     TRAN_FUNGUS,
508     TRAN_SHADOW,
509     TRAN_HYDRA,
510     NUM_TRANSFORMS,
511 };
512
513 enum beam_type                  // bolt::flavour
514 {
515     BEAM_NONE,
516
517     BEAM_MISSILE,
518     BEAM_MMISSILE,                //    and similarly irresistible things
519     BEAM_FIRE,
520     BEAM_COLD,
521     BEAM_MAGIC,
522     BEAM_ELECTRICITY,
523     BEAM_POISON,
524     BEAM_NEG,
525     BEAM_ACID,
526     BEAM_MIASMA,
527     BEAM_WATER,
528
529     BEAM_SPORE,
530     BEAM_POISON_ARROW,
531     BEAM_HELLFIRE,
532     BEAM_STICKY_FLAME,
533     BEAM_STEAM,
534     BEAM_ENERGY,
535     BEAM_HOLY,
536     BEAM_FRAG,
537     BEAM_LAVA,
538     BEAM_ICE,
539     BEAM_DEVASTATION,
540     BEAM_RANDOM,                  // currently translates into FIRE..ACID
541     BEAM_CHAOS,
542     BEAM_GHOSTLY_FLAME,
543
544     // Enchantments
545     BEAM_SLOW,
546     BEAM_FIRST_ENCHANTMENT = BEAM_SLOW,
547     BEAM_HASTE,
548     BEAM_MIGHT,
549     BEAM_HEALING,
550     BEAM_PARALYSIS,
551     BEAM_CONFUSION,
552     BEAM_INVISIBILITY,
553     BEAM_DIGGING,
554     BEAM_TELEPORT,
555     BEAM_POLYMORPH,
556     BEAM_MALMUTATE,
557     BEAM_ENSLAVE,
558     BEAM_BANISH,
559     BEAM_ENSLAVE_SOUL,
560     BEAM_PAIN,
561     BEAM_DISPEL_UNDEAD,
562     BEAM_DISINTEGRATION,
563     BEAM_BLINK,
564     BEAM_BLINK_CLOSE,
565     BEAM_PETRIFY,
566     BEAM_CORONA,
567     BEAM_PORKALATOR,
568     BEAM_HIBERNATION,
569     BEAM_BERSERK,
570     BEAM_SLEEP,
571     BEAM_INNER_FLAME,
572     BEAM_SENTINEL_MARK,
573     BEAM_DIMENSION_ANCHOR,
574     BEAM_VULNERABILITY,
575     BEAM_MALIGN_OFFERING,
576     BEAM_VIRULENCE,
577     BEAM_IGNITE_POISON,
578     BEAM_AGILITY,
579     BEAM_SAP_MAGIC,
580     BEAM_CORRUPT_BODY,
581     BEAM_CHAOTIC_REFLECTION,
582     BEAM_DRAIN_MAGIC,
583     BEAM_TUKIMAS_DANCE,
584     BEAM_RESISTANCE,
585     BEAM_ATTRACT,
586     BEAM_LAST_ENCHANTMENT = BEAM_ATTRACT,
587
588     BEAM_MEPHITIC,
589     BEAM_INK,
590     BEAM_HOLY_FLAME,
591     BEAM_AIR,
592     BEAM_PETRIFYING_CLOUD,
593     BEAM_ENSNARE,
594     BEAM_CRYSTAL,
595     BEAM_DEATH_RATTLE,
596     BEAM_LAST_REAL = BEAM_DEATH_RATTLE,
597
598     // For getting the visual effect of a beam.
599     BEAM_VISUAL,
600     BEAM_BOUNCY_TRACER,           // Used for random bolt tracer (bounces as
601                                   // crystal bolt, but irresistable).
602
603     BEAM_TORMENT_DAMAGE,          // Pseudo-beam for damage flavour.
604     BEAM_FIRST_PSEUDO = BEAM_TORMENT_DAMAGE,
605
606     NUM_BEAMS
607 };
608
609 enum book_type
610 {
611     BOOK_MINOR_MAGIC,
612     BOOK_CONJURATIONS,
613     BOOK_FLAMES,
614     BOOK_FROST,
615     BOOK_SUMMONINGS,
616     BOOK_FIRE,
617     BOOK_ICE,
618     BOOK_SPATIAL_TRANSLOCATIONS,
619     BOOK_ENCHANTMENTS,
620     BOOK_YOUNG_POISONERS,
621     BOOK_TEMPESTS,
622     BOOK_DEATH,
623     BOOK_HINDERANCE,
624     BOOK_CHANGES,
625     BOOK_TRANSFIGURATIONS,
626     BOOK_FEN,
627 #if TAG_MAJOR_VERSION == 34
628     BOOK_WAR_CHANTS = BOOK_FEN,
629 #else
630     BOOK_BATTLE,
631 #endif
632     BOOK_CLOUDS,
633     BOOK_NECROMANCY,
634     BOOK_CALLINGS,
635     BOOK_MALEDICT,
636     BOOK_AIR,
637     BOOK_SKY,
638     BOOK_WARP,
639     BOOK_ENVENOMATIONS,
640     BOOK_UNLIFE,
641     BOOK_CONTROL,
642 #if TAG_MAJOR_VERSION == 34
643     BOOK_BATTLE, // was BOOK_MUTATIONS
644 #endif
645     BOOK_GEOMANCY,
646     BOOK_EARTH,
647 #if TAG_MAJOR_VERSION == 34
648     BOOK_WIZARDRY,
649 #endif
650     BOOK_POWER,
651     BOOK_CANTRIPS,
652     BOOK_PARTY_TRICKS,
653 #if TAG_MAJOR_VERSION == 34
654     BOOK_AKASHIC_RECORD,
655 #endif
656     BOOK_DEBILITATION,
657     BOOK_DRAGON,
658     BOOK_BURGLARY,
659     BOOK_DREAMS,
660     BOOK_ALCHEMY,
661     BOOK_BEASTS,
662
663     BOOK_ANNIHILATIONS,
664     BOOK_GRAND_GRIMOIRE,
665     BOOK_NECRONOMICON,
666 #if TAG_MAJOR_VERSION > 34
667     BOOK_AKASHIC_RECORD,
668 #endif
669
670 #if TAG_MAJOR_VERSION == 34
671     MAX_FIXED_BOOK = BOOK_NECRONOMICON,
672 #else
673     MAX_FIXED_BOOK = BOOK_AKASHIC_RECORD,
674 #endif
675
676     BOOK_RANDART_LEVEL,
677     BOOK_RANDART_THEME,
678
679     BOOK_MANUAL,
680 #if TAG_MAJOR_VERSION == 34
681     BOOK_BUGGY_DESTRUCTION,
682 #endif
683     NUM_BOOKS
684 };
685
686 #define NUM_NORMAL_BOOKS     (MAX_NORMAL_BOOK + 1)
687 #define NUM_FIXED_BOOKS      (MAX_FIXED_BOOK + 1)
688
689 enum branch_type                // you.where_are_you
690 {
691     BRANCH_DUNGEON,
692     BRANCH_TEMPLE,
693     BRANCH_FIRST_NON_DUNGEON = BRANCH_TEMPLE,
694     BRANCH_ORC,
695     BRANCH_ELF,
696 #if TAG_MAJOR_VERSION == 34
697     BRANCH_DWARF,
698 #endif
699     BRANCH_LAIR,
700     BRANCH_SWAMP,
701     BRANCH_SHOALS,
702     BRANCH_SNAKE,
703     BRANCH_SPIDER,
704     BRANCH_SLIME,
705     BRANCH_VAULTS,
706 #if TAG_MAJOR_VERSION == 34
707     BRANCH_BLADE,
708 #endif
709     BRANCH_CRYPT,
710     BRANCH_TOMB,
711 #if TAG_MAJOR_VERSION > 34
712     BRANCH_DEPTHS,
713 #endif
714     BRANCH_VESTIBULE,
715     BRANCH_DIS,
716     BRANCH_GEHENNA,
717     BRANCH_COCYTUS,
718     BRANCH_TARTARUS,
719       BRANCH_FIRST_HELL = BRANCH_DIS,
720       BRANCH_LAST_HELL = BRANCH_TARTARUS,
721     BRANCH_ZOT,
722 #if TAG_MAJOR_VERSION == 34
723     BRANCH_FOREST,
724 #endif
725     BRANCH_ABYSS,
726     BRANCH_PANDEMONIUM,
727     BRANCH_ZIGGURAT,
728     BRANCH_LABYRINTH,
729     BRANCH_BAZAAR,
730     BRANCH_TROVE,
731     BRANCH_SEWER,
732     BRANCH_OSSUARY,
733     BRANCH_BAILEY,
734     BRANCH_ICE_CAVE,
735     BRANCH_VOLCANO,
736     BRANCH_WIZLAB,
737 #if TAG_MAJOR_VERSION == 34
738     BRANCH_DEPTHS,
739 #endif
740     NUM_BRANCHES
741 };
742
743 enum caction_type    // Primary categorization of counted actions.
744 {                    // A subtype will also be given in each case:
745     CACT_MELEE,      // weapon subtype or unrand index
746     CACT_FIRE,       // weapon subtype or unrand index
747     CACT_THROW,      // item basetype << 16 | subtype
748     CACT_CAST,       // spell_type
749     CACT_INVOKE,     // ability_type
750     CACT_ABIL,       // ability_type
751     CACT_EVOKE,      // evoc_type
752                      //   or item.basetype << 16 | subtype
753                      //   or unrand index
754     CACT_USE,        // object_class_type
755     CACT_STAB,       // stab_type
756     CACT_EAT,        // food_type, or -1 for corpse
757     NUM_CACTIONS,
758 };
759
760 enum canned_message_type
761 {
762     MSG_SOMETHING_APPEARS,
763     MSG_NOTHING_HAPPENS,
764     MSG_YOU_UNAFFECTED,
765     MSG_YOU_RESIST,
766     MSG_YOU_PARTIALLY_RESIST,
767     MSG_TOO_BERSERK,
768     MSG_TOO_CONFUSED,
769     MSG_PRESENT_FORM,
770     MSG_NOTHING_CARRIED,
771     MSG_CANNOT_DO_YET,
772     MSG_OK,
773     MSG_UNTHINKING_ACT,
774     MSG_NOTHING_THERE,
775     MSG_NOTHING_CLOSE_ENOUGH,
776     MSG_NO_ENERGY,
777     MSG_SPELL_FIZZLES,
778     MSG_HUH,
779     MSG_EMPTY_HANDED_ALREADY,
780     MSG_EMPTY_HANDED_NOW,
781     MSG_YOU_BLINK,
782     MSG_STRANGE_STASIS,
783     MSG_NO_SPELLS,
784     MSG_MANA_INCREASE,
785     MSG_MANA_DECREASE,
786     MSG_DISORIENTED,
787     MSG_TOO_HUNGRY,
788     MSG_DETECT_NOTHING,
789     MSG_CALL_DEAD,
790     MSG_ANIMATE_REMAINS,
791     MSG_CANNOT_MOVE,
792     MSG_YOU_DIE,
793     MSG_GHOSTLY_OUTLINE,
794 };
795
796 enum char_set_type
797 {
798     CSET_DEFAULT,
799     CSET_ASCII,         // flat 7-bit ASCII
800     NUM_CSET
801 };
802
803 enum cleansing_flame_source_type
804 {
805     CLEANSING_FLAME_GENERIC    = -1,
806     CLEANSING_FLAME_SPELL      = -2, // SPELL_FLAME_OF_CLEANSING
807     CLEANSING_FLAME_INVOCATION = -3, // ABIL_TSO_CLEANSING_FLAME
808     CLEANSING_FLAME_TSO        = -4, // TSO effect
809 };
810
811 enum cloud_type
812 {
813     CLOUD_NONE,
814     CLOUD_FIRE,
815     CLOUD_MEPHITIC,
816     CLOUD_COLD,
817     CLOUD_POISON,
818     CLOUD_BLACK_SMOKE,
819     CLOUD_GREY_SMOKE,
820     CLOUD_BLUE_SMOKE,
821     CLOUD_PURPLE_SMOKE,
822     CLOUD_TLOC_ENERGY,
823     CLOUD_FOREST_FIRE,
824     CLOUD_STEAM,
825 #if TAG_MAJOR_VERSION == 34
826     CLOUD_GLOOM,
827 #endif
828     CLOUD_INK,
829     CLOUD_PETRIFY,
830     CLOUD_HOLY_FLAMES,
831     CLOUD_MIASMA,
832     CLOUD_MIST,
833     CLOUD_CHAOS,
834     CLOUD_RAIN,
835     CLOUD_MUTAGENIC,
836     CLOUD_MAGIC_TRAIL,
837     CLOUD_TORNADO,
838     CLOUD_DUST_TRAIL,
839     CLOUD_GHOSTLY_FLAME,
840     CLOUD_ACID,
841     CLOUD_STORM,
842     CLOUD_NEGATIVE_ENERGY,
843     NUM_CLOUD_TYPES,
844
845     CLOUD_OPAQUE_FIRST = CLOUD_BLACK_SMOKE,
846     CLOUD_OPAQUE_LAST  = CLOUD_HOLY_FLAMES,
847
848     // Random per-square.
849     CLOUD_RANDOM_SMOKE = 97,
850     CLOUD_RANDOM,
851     CLOUD_DEBUGGING,
852 };
853
854 enum command_type
855 {
856     CMD_NO_CMD = 2000,
857     CMD_NO_CMD_DEFAULT, // hack to allow assignment of keys to CMD_NO_CMD
858     CMD_MOVE_LEFT,
859     CMD_MOVE_DOWN,
860     CMD_MOVE_UP,
861     CMD_MOVE_RIGHT,
862     CMD_MOVE_UP_LEFT,
863     CMD_MOVE_DOWN_LEFT,
864     CMD_MOVE_UP_RIGHT,
865     CMD_MOVE_DOWN_RIGHT,
866     CMD_RUN_LEFT,
867     CMD_RUN_DOWN,
868     CMD_RUN_UP,
869     CMD_RUN_RIGHT,
870     CMD_RUN_UP_LEFT,
871     CMD_RUN_DOWN_LEFT,
872     CMD_RUN_UP_RIGHT,
873     CMD_RUN_DOWN_RIGHT,
874     CMD_SAFE_WAIT,
875     CMD_SAFE_MOVE_LEFT,
876     CMD_SAFE_MOVE_DOWN,
877     CMD_SAFE_MOVE_UP,
878     CMD_SAFE_MOVE_RIGHT,
879     CMD_SAFE_MOVE_UP_LEFT,
880     CMD_SAFE_MOVE_DOWN_LEFT,
881     CMD_SAFE_MOVE_UP_RIGHT,
882     CMD_SAFE_MOVE_DOWN_RIGHT,
883     CMD_ATTACK_LEFT,
884     CMD_ATTACK_DOWN,
885     CMD_ATTACK_UP,
886     CMD_ATTACK_RIGHT,
887     CMD_ATTACK_UP_LEFT,
888     CMD_ATTACK_DOWN_LEFT,
889     CMD_ATTACK_UP_RIGHT,
890     CMD_ATTACK_DOWN_RIGHT,
891     CMD_OPEN_DOOR,
892     CMD_CLOSE_DOOR,
893     CMD_REST,
894     CMD_GO_UPSTAIRS,
895     CMD_GO_DOWNSTAIRS,
896     CMD_TOGGLE_AUTOPICKUP,
897     CMD_TOGGLE_VIEWPORT_MONSTER_HP,
898     CMD_TOGGLE_VIEWPORT_WEAPONS,
899     CMD_TOGGLE_TRAVEL_SPEED,
900     CMD_PICKUP,
901     CMD_PICKUP_QUANTITY,
902     CMD_DROP,
903     CMD_DROP_LAST,
904     CMD_BUTCHER,
905     CMD_INSPECT_FLOOR,
906     CMD_SHOW_TERRAIN,
907     CMD_FULL_VIEW,
908     CMD_EVOKE,
909     CMD_EVOKE_WIELDED,
910     CMD_FORCE_EVOKE_WIELDED,
911     CMD_WIELD_WEAPON,
912     CMD_WEAPON_SWAP,
913     CMD_FIRE,
914     CMD_QUIVER_ITEM,
915     CMD_THROW_ITEM_NO_QUIVER,
916     CMD_WEAR_ARMOUR,
917     CMD_REMOVE_ARMOUR,
918     CMD_WEAR_JEWELLERY,
919     CMD_REMOVE_JEWELLERY,
920     CMD_CYCLE_QUIVER_FORWARD,
921     CMD_CYCLE_QUIVER_BACKWARD,
922     CMD_LIST_WEAPONS,
923     CMD_LIST_ARMOUR,
924     CMD_LIST_JEWELLERY,
925     CMD_LIST_EQUIPMENT,
926     CMD_LIST_GOLD,
927     CMD_ZAP_WAND,
928     CMD_CAST_SPELL,
929     CMD_FORCE_CAST_SPELL,
930     CMD_MEMORISE_SPELL,
931     CMD_USE_ABILITY,
932     CMD_PRAY,
933     CMD_EAT,
934     CMD_QUAFF,
935     CMD_READ,
936     CMD_LOOK_AROUND,
937     CMD_WAIT,
938     CMD_SHOUT,
939     CMD_CHARACTER_DUMP,
940     CMD_DISPLAY_COMMANDS,
941     CMD_DISPLAY_INVENTORY,
942     CMD_DISPLAY_KNOWN_OBJECTS,
943     CMD_DISPLAY_MUTATIONS,
944     CMD_DISPLAY_SKILLS,
945     CMD_DISPLAY_MAP,
946     CMD_DISPLAY_OVERMAP,
947     CMD_DISPLAY_RELIGION,
948     CMD_DISPLAY_RUNES,
949     CMD_DISPLAY_CHARACTER_STATUS,
950     CMD_DISPLAY_SPELLS,
951     CMD_LOOKUP_HELP,
952     CMD_EXPERIENCE_CHECK,
953     CMD_ADJUST_INVENTORY,
954     CMD_REPLAY_MESSAGES,
955     CMD_REDRAW_SCREEN,
956     CMD_MACRO_ADD,
957     CMD_SAVE_GAME,
958     CMD_SAVE_GAME_NOW,
959     CMD_SUSPEND_GAME,
960     CMD_QUIT,
961     CMD_WIZARD,
962     CMD_EXPLORE_MODE,
963
964     CMD_SEARCH_STASHES,
965     CMD_EXPLORE,
966     CMD_INTERLEVEL_TRAVEL,
967     CMD_FIX_WAYPOINT,
968
969     CMD_CLEAR_MAP,
970     CMD_INSCRIBE_ITEM,
971     CMD_MAKE_NOTE,
972     CMD_RESISTS_SCREEN,
973
974     CMD_READ_MESSAGES,
975
976     CMD_MOUSE_MOVE,
977     CMD_MOUSE_CLICK,
978
979     CMD_ANNOTATE_LEVEL,
980
981 #ifdef CLUA_BINDINGS
982     CMD_AUTOFIGHT,
983     CMD_AUTOFIGHT_NOMOVE,
984 #endif
985
986 #ifdef USE_TILE
987     CMD_EDIT_PLAYER_TILE,
988     CMD_MIN_TILE = CMD_EDIT_PLAYER_TILE,
989     CMD_MAX_TILE = CMD_EDIT_PLAYER_TILE,
990 #endif
991
992 #ifdef TOUCH_UI
993     // zoom on dungeon
994     CMD_ZOOM_IN,
995     CMD_ZOOM_OUT,
996
997     // bring up the on-screen keyboard if needed
998     CMD_SHOW_KEYBOARD,
999 #endif
1000
1001     // Repeat previous command
1002     CMD_PREV_CMD_AGAIN,
1003
1004     // Repeat next command a given number of times
1005     CMD_REPEAT_CMD,
1006
1007     CMD_LUA_CONSOLE,
1008
1009     CMD_MAX_NORMAL = CMD_LUA_CONSOLE,
1010
1011     // overmap commands
1012     CMD_MAP_CLEAR_MAP,
1013     CMD_MIN_OVERMAP = CMD_MAP_CLEAR_MAP,
1014     CMD_MAP_ADD_WAYPOINT,
1015     CMD_MAP_EXCLUDE_AREA,
1016     CMD_MAP_CLEAR_EXCLUDES,
1017     CMD_MAP_EXCLUDE_RADIUS,
1018
1019     CMD_MAP_MOVE_LEFT,
1020     CMD_MAP_MOVE_DOWN,
1021     CMD_MAP_MOVE_UP,
1022     CMD_MAP_MOVE_RIGHT,
1023     CMD_MAP_MOVE_UP_LEFT,
1024     CMD_MAP_MOVE_DOWN_LEFT,
1025     CMD_MAP_MOVE_UP_RIGHT,
1026     CMD_MAP_MOVE_DOWN_RIGHT,
1027
1028     CMD_MAP_JUMP_LEFT,
1029     CMD_MAP_JUMP_DOWN,
1030     CMD_MAP_JUMP_UP,
1031     CMD_MAP_JUMP_RIGHT,
1032     CMD_MAP_JUMP_UP_LEFT,
1033     CMD_MAP_JUMP_DOWN_LEFT,
1034     CMD_MAP_JUMP_UP_RIGHT,
1035     CMD_MAP_JUMP_DOWN_RIGHT,
1036
1037     CMD_MAP_NEXT_LEVEL,
1038     CMD_MAP_PREV_LEVEL,
1039     CMD_MAP_GOTO_LEVEL,
1040
1041     CMD_MAP_SCROLL_DOWN,
1042     CMD_MAP_SCROLL_UP,
1043
1044     CMD_MAP_FIND_UPSTAIR,
1045     CMD_MAP_FIND_DOWNSTAIR,
1046     CMD_MAP_FIND_YOU,
1047     CMD_MAP_FIND_PORTAL,
1048     CMD_MAP_FIND_TRAP,
1049     CMD_MAP_FIND_ALTAR,
1050     CMD_MAP_FIND_EXCLUDED,
1051     CMD_MAP_FIND_WAYPOINT,
1052     CMD_MAP_FIND_STASH,
1053     CMD_MAP_FIND_STASH_REVERSE,
1054
1055     CMD_MAP_GOTO_TARGET,
1056     CMD_MAP_ANNOTATE_LEVEL,
1057
1058     CMD_MAP_EXPLORE,
1059
1060     CMD_MAP_WIZARD_TELEPORT,
1061
1062     CMD_MAP_DESCRIBE,
1063
1064     CMD_MAP_HELP,
1065     CMD_MAP_FORGET,
1066     CMD_MAP_UNFORGET,
1067
1068     CMD_MAP_EXIT_MAP,
1069
1070     CMD_MAX_OVERMAP = CMD_MAP_EXIT_MAP,
1071
1072     // targeting commands
1073     CMD_TARGET_DOWN_LEFT,
1074     CMD_MIN_TARGET = CMD_TARGET_DOWN_LEFT,
1075     CMD_TARGET_DOWN,
1076     CMD_TARGET_DOWN_RIGHT,
1077     CMD_TARGET_LEFT,
1078     CMD_TARGET_RIGHT,
1079     CMD_TARGET_UP_LEFT,
1080     CMD_TARGET_UP,
1081     CMD_TARGET_UP_RIGHT,
1082
1083     CMD_TARGET_DIR_DOWN_LEFT,
1084     CMD_TARGET_DIR_DOWN,
1085     CMD_TARGET_DIR_DOWN_RIGHT,
1086     CMD_TARGET_DIR_LEFT,
1087     CMD_TARGET_DIR_RIGHT,
1088     CMD_TARGET_DIR_UP_LEFT,
1089     CMD_TARGET_DIR_UP,
1090     CMD_TARGET_DIR_UP_RIGHT,
1091
1092     CMD_TARGET_DESCRIBE,
1093     CMD_TARGET_PREV_TARGET,
1094     CMD_TARGET_MAYBE_PREV_TARGET,
1095     CMD_TARGET_SELECT,
1096     CMD_TARGET_SELECT_ENDPOINT,
1097     CMD_TARGET_SELECT_FORCE,
1098     CMD_TARGET_SELECT_FORCE_ENDPOINT,
1099     CMD_TARGET_GET,
1100     CMD_TARGET_OBJ_CYCLE_BACK,
1101     CMD_TARGET_OBJ_CYCLE_FORWARD,
1102     CMD_TARGET_CYCLE_FORWARD,
1103     CMD_TARGET_CYCLE_BACK,
1104     CMD_TARGET_CYCLE_BEAM,
1105     CMD_TARGET_CYCLE_MLIST = CMD_NO_CMD + 1000, // for indices a-z in the monster list
1106     CMD_TARGET_CYCLE_MLIST_END = CMD_NO_CMD + 1025,
1107     CMD_TARGET_TOGGLE_MLIST,
1108     CMD_TARGET_TOGGLE_BEAM,
1109     CMD_TARGET_CANCEL,
1110     CMD_TARGET_SHOW_PROMPT,
1111     CMD_TARGET_OLD_SPACE,
1112     CMD_TARGET_EXCLUDE,
1113     CMD_TARGET_FIND_TRAP,
1114     CMD_TARGET_FIND_PORTAL,
1115     CMD_TARGET_FIND_ALTAR,
1116     CMD_TARGET_FIND_UPSTAIR,
1117     CMD_TARGET_FIND_DOWNSTAIR,
1118     CMD_TARGET_FIND_YOU,
1119     CMD_TARGET_WIZARD_MAKE_FRIENDLY,
1120     CMD_TARGET_WIZARD_BLESS_MONSTER,
1121     CMD_TARGET_WIZARD_MAKE_SHOUT,
1122     CMD_TARGET_WIZARD_GIVE_ITEM,
1123     CMD_TARGET_WIZARD_MOVE,
1124     CMD_TARGET_WIZARD_PATHFIND,
1125     CMD_TARGET_WIZARD_GAIN_LEVEL,
1126     CMD_TARGET_WIZARD_MISCAST,
1127     CMD_TARGET_WIZARD_MAKE_SUMMONED,
1128     CMD_TARGET_WIZARD_POLYMORPH,
1129     CMD_TARGET_WIZARD_DEBUG_MONSTER,
1130     CMD_TARGET_WIZARD_HEAL_MONSTER,
1131     CMD_TARGET_WIZARD_HURT_MONSTER,
1132     CMD_TARGET_WIZARD_DEBUG_PORTAL,
1133     CMD_TARGET_WIZARD_KILL_MONSTER,
1134     CMD_TARGET_WIZARD_BANISH_MONSTER,
1135     CMD_TARGET_WIZARD_CREATE_MIMIC,
1136     CMD_TARGET_MOUSE_MOVE,
1137     CMD_TARGET_MOUSE_SELECT,
1138     CMD_TARGET_HELP,
1139     CMD_MAX_TARGET = CMD_TARGET_HELP,
1140
1141 #ifdef USE_TILE
1142     // Tile doll editing screen
1143     CMD_DOLL_RANDOMIZE,
1144     CMD_MIN_DOLL = CMD_DOLL_RANDOMIZE,
1145     CMD_DOLL_SELECT_NEXT_DOLL,
1146     CMD_DOLL_SELECT_PREV_DOLL,
1147     CMD_DOLL_SELECT_NEXT_PART,
1148     CMD_DOLL_SELECT_PREV_PART,
1149     CMD_DOLL_CHANGE_PART_NEXT,
1150     CMD_DOLL_CHANGE_PART_PREV,
1151     CMD_DOLL_CONFIRM_CHOICE,
1152     CMD_DOLL_COPY,
1153     CMD_DOLL_PASTE,
1154     CMD_DOLL_TAKE_OFF,
1155     CMD_DOLL_TAKE_OFF_ALL,
1156     CMD_DOLL_TOGGLE_EQUIP,
1157     CMD_DOLL_TOGGLE_EQUIP_ALL,
1158     CMD_DOLL_JOB_DEFAULT,
1159     CMD_DOLL_CHANGE_MODE,
1160     CMD_DOLL_SAVE,
1161     CMD_DOLL_QUIT,
1162     CMD_MAX_DOLL = CMD_DOLL_QUIT,
1163 #endif
1164
1165     // Disable/enable -more- prompts.
1166     CMD_DISABLE_MORE,
1167     CMD_MIN_SYNTHETIC = CMD_DISABLE_MORE,
1168     CMD_ENABLE_MORE,
1169     CMD_UNWIELD_WEAPON,
1170
1171     // [ds] Silently ignored, requests another round of input.
1172     CMD_NEXT_CMD,
1173
1174     // Must always be last
1175     CMD_MAX_CMD
1176 };
1177
1178 enum conduct_type
1179 {
1180     DID_NOTHING,
1181     DID_NECROMANCY,                       // vamp/drain/pain/reap, Zong/Curses
1182     DID_HOLY,                             // holy wrath, holy word scrolls
1183     DID_UNHOLY,                           // demon weapons, demon spells
1184     DID_ATTACK_HOLY,
1185     DID_ATTACK_NEUTRAL,
1186     DID_ATTACK_FRIEND,
1187     DID_FRIEND_DIED,
1188     DID_UNCHIVALRIC_ATTACK,
1189     DID_POISON,
1190     DID_KILL_LIVING,
1191     DID_KILL_UNDEAD,
1192     DID_KILL_DEMON,
1193     DID_KILL_NATURAL_UNHOLY,              // TSO
1194     DID_KILL_NATURAL_EVIL,                // TSO
1195     DID_KILL_UNCLEAN,                     // Zin
1196     DID_KILL_CHAOTIC,                     // Zin
1197     DID_KILL_WIZARD,                      // Trog
1198     DID_KILL_PRIEST,                      // Beogh
1199     DID_KILL_HOLY,
1200     DID_KILL_FAST,                        // Cheibriados
1201     DID_BANISH,
1202     DID_SPELL_MEMORISE,
1203     DID_SPELL_CASTING,
1204     DID_SPELL_PRACTISE,
1205     DID_DRINK_BLOOD,
1206     DID_CANNIBALISM,
1207     DID_DESECRATE_SOULED_BEING,           // Zin
1208     DID_DELIBERATE_MUTATING,              // Zin
1209     DID_CAUSE_GLOWING,                    // Zin
1210     DID_UNCLEAN,                          // Zin (used unclean weapon/magic)
1211     DID_CHAOS,                            // Zin (used chaotic weapon/magic)
1212     DID_DESECRATE_ORCISH_REMAINS,         // Beogh
1213     DID_DESTROY_ORCISH_IDOL,              // Beogh
1214     DID_KILL_SLIME,                       // Jiyva
1215     DID_KILL_PLANT,                       // Fedhas
1216     DID_HASTY,                            // Cheibriados
1217     DID_CORPSE_VIOLATION,                 // Fedhas (Necromancy involving
1218                                           // corpses/chunks).
1219     DID_SOULED_FRIEND_DIED,               // Zin
1220     DID_ATTACK_IN_SANCTUARY,              // Zin
1221     DID_KILL_ARTIFICIAL,                  // Yredelemnul
1222     DID_DESTROY_SPELLBOOK,                // Sif Muna
1223     DID_EXPLORATION,                      // Ashenzari, wrath timers
1224     DID_DESECRATE_HOLY_REMAINS,           // Zin/Ely/TSO/Yredelemnul
1225     DID_SEE_MONSTER,                      // TSO
1226     DID_FIRE,                             // Dithmenos
1227     DID_KILL_FIERY,                       // Dithmenos
1228     DID_SACRIFICE_LOVE,                   // Ru
1229
1230     NUM_CONDUCTS
1231 };
1232
1233 enum confirm_butcher_type
1234 {
1235     CONFIRM_NEVER,
1236     CONFIRM_ALWAYS,
1237     CONFIRM_AUTO,
1238 };
1239
1240 enum confirm_prompt_type
1241 {
1242     CONFIRM_CANCEL,             // automatically answer 'no', i.e. disallow
1243     CONFIRM_PROMPT,             // prompt
1244     CONFIRM_NONE,               // automatically answer 'yes'
1245 };
1246
1247 enum confirm_level_type
1248 {
1249     CONFIRM_NONE_EASY,
1250     CONFIRM_SAFE_EASY,
1251     CONFIRM_ALL_EASY,
1252 };
1253
1254 // When adding new delays, update their names in delay.cc
1255 enum delay_type
1256 {
1257     DELAY_NOT_DELAYED,
1258     DELAY_EAT,
1259     DELAY_FEED_VAMPIRE,
1260     DELAY_ARMOUR_ON,
1261     DELAY_ARMOUR_OFF,
1262     DELAY_JEWELLERY_ON,
1263     DELAY_MEMORISE,
1264     DELAY_BUTCHER,
1265     DELAY_BOTTLE_BLOOD,
1266 #if TAG_MAJOR_VERSION == 34
1267     DELAY_WEAPON_SWAP,
1268 #endif
1269     DELAY_PASSWALL,
1270     DELAY_DROP_ITEM,
1271     DELAY_MULTIDROP,
1272     DELAY_ASCENDING_STAIRS,
1273     DELAY_DESCENDING_STAIRS,
1274 #if TAG_MAJOR_VERSION == 34
1275     DELAY_UNUSED, // was DELAY_RECITE
1276 #endif
1277
1278     // [dshaligram] Shift-running, resting, travel and macros are now
1279     // also handled as delays.
1280     DELAY_RUN,
1281     DELAY_REST,
1282     DELAY_TRAVEL,
1283
1284     DELAY_MACRO,
1285
1286     // In a macro delay, a stacked delay to tell Crawl to read and act on
1287     // one input command.
1288     DELAY_MACRO_PROCESS_KEY,
1289
1290     DELAY_INTERRUPTIBLE,                // simple interruptible delay
1291     DELAY_UNINTERRUPTIBLE,              // simple uninterruptible delay
1292
1293     DELAY_SHAFT_SELF, // Formicid ability
1294     DELAY_BLURRY_SCROLL,
1295
1296     NUM_DELAYS
1297 };
1298
1299 enum description_level_type
1300 {
1301     DESC_THE,
1302     DESC_A,
1303     DESC_YOUR,
1304     DESC_PLAIN,
1305     DESC_ITS,
1306     DESC_INVENTORY_EQUIP,
1307     DESC_INVENTORY,
1308
1309     // Partial item names.
1310     DESC_BASENAME,                     // Base name of item subtype
1311     DESC_QUALNAME,                     // Name without articles, quantities,
1312                                        // enchantments.
1313     DESC_DBNAME,                       // Name with which to look up item
1314                                        // description in the db.
1315
1316     DESC_NONE
1317 };
1318
1319 enum evoc_type
1320 {
1321     EVOC_WAND,
1322     EVOC_ROD,
1323     EVOC_DECK,
1324 #if TAG_MAJOR_VERSION == 34
1325     EVOC_MISC,
1326     EVOC_BUGGY_TOME,
1327 #endif
1328 };
1329
1330 enum game_direction_type
1331 {
1332     GDT_GAME_START = 0,
1333     GDT_DESCENDING,
1334     GDT_ASCENDING,
1335 };
1336
1337 enum game_type
1338 {
1339     GAME_TYPE_UNSPECIFIED,
1340     GAME_TYPE_NORMAL,
1341     GAME_TYPE_TUTORIAL,
1342     GAME_TYPE_ARENA,
1343     GAME_TYPE_SPRINT,
1344     GAME_TYPE_HINTS,
1345     GAME_TYPE_ZOTDEF,
1346     GAME_TYPE_INSTRUCTIONS,
1347     GAME_TYPE_HIGH_SCORES,
1348     NUM_GAME_TYPE
1349 };
1350
1351 enum level_flag_type
1352 {
1353     LFLAG_NONE = 0,
1354
1355     LFLAG_NO_TELE_CONTROL = (1 << 0), // Teleport control not allowed.
1356     LFLAG_NO_MAP          = (1 << 2), // Level can't be persistently mapped.
1357 };
1358
1359 // Volatile state and cache.
1360 enum level_state_type
1361 {
1362     LSTATE_NONE = 0,
1363
1364     LSTATE_GOLUBRIA       = (1 << 0), // A Golubria trap exists.
1365     LSTATE_GLOW_MOLD      = (1 << 1), // Any glowing mold exists.
1366     LSTATE_DELETED        = (1 << 2), // The level won't be saved.
1367     LSTATE_BEOGH          = (1 << 3), // Possibly an orcish priest around.
1368     LSTATE_SLIMY_WALL     = (1 << 4), // Any slime walls exist.
1369 };
1370
1371 // NOTE: The order of these is very important to their usage!
1372 // [dshaligram] If adding/removing from this list, also update viewchar.cc!
1373 enum dungeon_char_type
1374 {
1375     DCHAR_WALL,
1376     DCHAR_PERMAWALL,
1377     DCHAR_WALL_MAGIC,
1378     DCHAR_FLOOR,
1379     DCHAR_FLOOR_MAGIC,
1380     DCHAR_DOOR_OPEN,
1381     DCHAR_DOOR_CLOSED,
1382     DCHAR_TRAP,
1383     DCHAR_STAIRS_DOWN,
1384     DCHAR_STAIRS_UP,
1385     DCHAR_GRATE,
1386     DCHAR_ALTAR,
1387     DCHAR_ARCH,
1388     DCHAR_FOUNTAIN,
1389     DCHAR_WAVY,
1390     DCHAR_STATUE,
1391     DCHAR_INVIS_EXPOSED,
1392     DCHAR_ITEM_DETECTED,
1393     DCHAR_ITEM_ORB,
1394     DCHAR_ITEM_RUNE,
1395     DCHAR_ITEM_WEAPON,
1396     DCHAR_ITEM_ARMOUR,
1397     DCHAR_ITEM_WAND,
1398     DCHAR_ITEM_FOOD,
1399     DCHAR_ITEM_SCROLL,
1400     DCHAR_ITEM_RING,
1401     DCHAR_ITEM_POTION,
1402     DCHAR_ITEM_MISSILE,
1403     DCHAR_ITEM_BOOK,
1404     DCHAR_ITEM_STAFF,
1405     DCHAR_ITEM_ROD,
1406     DCHAR_ITEM_MISCELLANY,
1407     DCHAR_ITEM_CORPSE,
1408     DCHAR_ITEM_SKELETON,
1409     DCHAR_ITEM_GOLD,
1410     DCHAR_ITEM_AMULET,
1411     DCHAR_CLOUD,
1412     DCHAR_TREE,
1413     DCHAR_TELEPORTER,
1414
1415     DCHAR_SPACE,
1416     DCHAR_FIRED_FLASK,
1417     DCHAR_FIRED_BOLT,
1418     DCHAR_FIRED_CHUNK,
1419     DCHAR_FIRED_BOOK,
1420     DCHAR_FIRED_WEAPON,
1421     DCHAR_FIRED_ZAP,
1422     DCHAR_FIRED_BURST,
1423     DCHAR_FIRED_STICK,
1424     DCHAR_FIRED_TRINKET,
1425     DCHAR_FIRED_SCROLL,
1426     DCHAR_FIRED_DEBUG,
1427     DCHAR_FIRED_ARMOUR,
1428     DCHAR_FIRED_MISSILE,
1429     DCHAR_EXPLOSION,
1430
1431     DCHAR_FRAME_HORIZ,
1432     DCHAR_FRAME_VERT,
1433     DCHAR_FRAME_TL,
1434     DCHAR_FRAME_TR,
1435     DCHAR_FRAME_BL,
1436     DCHAR_FRAME_BR,
1437
1438     NUM_DCHAR_TYPES
1439 };
1440
1441 // When adding:
1442
1443 // * Add an entry in feature-data.h for the feature.
1444
1445 // * edit dat/descript/features.txt and add a
1446 //      long description if appropriate.
1447
1448 // * check the feat_* functions in terrain.cc and make sure
1449 //      they return sane values for your new feature.
1450
1451 // * edit mapdef.cc and add a symbol to _glyph_to_feat() for the feature,
1452 //      if you want vault maps to be able to use it directly . If you do, also
1453 //      update docs/develop/levels/syntax.txt with the new symbol.
1454 enum dungeon_feature_type
1455 {
1456     DNGN_UNSEEN = 0,                   // must be zero
1457     DNGN_CLOSED_DOOR,
1458     DNGN_RUNED_DOOR,
1459     DNGN_SEALED_DOOR,
1460     DNGN_TREE,
1461
1462     // Walls
1463     DNGN_METAL_WALL,
1464     DNGN_CRYSTAL_WALL,
1465     DNGN_ROCK_WALL,
1466     DNGN_SLIMY_WALL,
1467     DNGN_STONE_WALL,
1468     DNGN_PERMAROCK_WALL,               // for undiggable walls
1469     DNGN_CLEAR_ROCK_WALL,              // transparent walls
1470     DNGN_CLEAR_STONE_WALL,
1471     DNGN_CLEAR_PERMAROCK_WALL,
1472
1473     DNGN_GRATE,
1474
1475     // Misc solid features
1476     DNGN_OPEN_SEA,                     // Shoals equivalent for permarock
1477     DNGN_LAVA_SEA,                     // Gehenna equivalent for permarock
1478     DNGN_ORCISH_IDOL,
1479     DNGN_GRANITE_STATUE,
1480     DNGN_MALIGN_GATEWAY,
1481
1482 #if TAG_MAJOR_VERSION == 34
1483     DNGN_LAVA            = 30,
1484 #else
1485     DNGN_LAVA,
1486 #endif
1487     DNGN_DEEP_WATER,
1488
1489     DNGN_SHALLOW_WATER,
1490
1491     DNGN_FLOOR,
1492     DNGN_OPEN_DOOR,
1493
1494     DNGN_TRAP_MECHANICAL,
1495     DNGN_TRAP_TELEPORT,
1496     DNGN_TRAP_SHAFT,
1497     DNGN_TRAP_WEB,
1498 #if TAG_MAJOR_VERSION > 34
1499     DNGN_TRAP_ALARM,
1500     DNGN_TRAP_ZOT,
1501     DNGN_PASSAGE_OF_GOLUBRIA,
1502     DNGN_TRAP_SHADOW,
1503     DNGN_TRAP_SHADOW_DORMANT,
1504 #endif
1505     DNGN_UNDISCOVERED_TRAP,
1506
1507     DNGN_ENTER_SHOP,
1508     DNGN_ABANDONED_SHOP,
1509
1510     DNGN_STONE_STAIRS_DOWN_I,
1511     DNGN_STONE_STAIRS_DOWN_II,
1512     DNGN_STONE_STAIRS_DOWN_III,
1513     DNGN_ESCAPE_HATCH_DOWN,
1514
1515     // corresponding up stairs (same order as above)
1516     DNGN_STONE_STAIRS_UP_I,
1517     DNGN_STONE_STAIRS_UP_II,
1518     DNGN_STONE_STAIRS_UP_III,
1519     DNGN_ESCAPE_HATCH_UP,
1520
1521     // Various gates
1522     DNGN_ENTER_DIS,
1523     DNGN_ENTER_GEHENNA,
1524     DNGN_ENTER_COCYTUS,
1525     DNGN_ENTER_TARTARUS,
1526     DNGN_ENTER_ABYSS,
1527     DNGN_EXIT_ABYSS,
1528     DNGN_STONE_ARCH,
1529     DNGN_ENTER_PANDEMONIUM,
1530     DNGN_EXIT_PANDEMONIUM,
1531     DNGN_TRANSIT_PANDEMONIUM,
1532     DNGN_EXIT_DUNGEON,
1533     DNGN_EXIT_THROUGH_ABYSS,
1534     DNGN_EXIT_HELL,
1535     DNGN_ENTER_HELL,
1536     DNGN_ENTER_LABYRINTH,
1537     DNGN_TELEPORTER,
1538 #if TAG_MAJOR_VERSION == 34
1539     DNGN_ENTER_PORTAL_VAULT,
1540     DNGN_EXIT_PORTAL_VAULT,
1541 #endif
1542     DNGN_EXPIRED_PORTAL,
1543
1544     // Entrances to various branches
1545 #if TAG_MAJOR_VERSION == 34
1546     DNGN_ENTER_DWARF,
1547 #endif
1548     DNGN_ENTER_ORC,
1549     DNGN_ENTER_LAIR,
1550     DNGN_ENTER_SLIME,
1551     DNGN_ENTER_VAULTS,
1552     DNGN_ENTER_CRYPT,
1553 #if TAG_MAJOR_VERSION == 34
1554     DNGN_ENTER_BLADE,
1555 #endif
1556     DNGN_ENTER_ZOT,
1557     DNGN_ENTER_TEMPLE,
1558     DNGN_ENTER_SNAKE,
1559     DNGN_ENTER_ELF,
1560     DNGN_ENTER_TOMB,
1561     DNGN_ENTER_SWAMP,
1562     DNGN_ENTER_SHOALS,
1563     DNGN_ENTER_SPIDER,
1564 #if TAG_MAJOR_VERSION == 34
1565     DNGN_ENTER_FOREST,
1566 #endif
1567     DNGN_ENTER_DEPTHS,
1568
1569     // Exits from various branches
1570     // Order must be the same as above
1571 #if TAG_MAJOR_VERSION == 34
1572     DNGN_EXIT_DWARF,
1573 #endif
1574     DNGN_EXIT_ORC,
1575     DNGN_EXIT_LAIR,
1576     DNGN_EXIT_SLIME,
1577     DNGN_EXIT_VAULTS,
1578     DNGN_EXIT_CRYPT,
1579 #if TAG_MAJOR_VERSION == 34
1580     DNGN_EXIT_BLADE,
1581 #endif
1582     DNGN_EXIT_ZOT,
1583     DNGN_EXIT_TEMPLE,
1584     DNGN_EXIT_SNAKE,
1585     DNGN_EXIT_ELF,
1586     DNGN_EXIT_TOMB,
1587     DNGN_EXIT_SWAMP,
1588     DNGN_EXIT_SHOALS,
1589     DNGN_EXIT_SPIDER,
1590 #if TAG_MAJOR_VERSION == 34
1591     DNGN_EXIT_FOREST,
1592 #endif
1593     DNGN_EXIT_DEPTHS,
1594
1595     DNGN_ALTAR_ZIN,
1596     DNGN_ALTAR_SHINING_ONE,
1597     DNGN_ALTAR_KIKUBAAQUDGHA,
1598     DNGN_ALTAR_YREDELEMNUL,
1599     DNGN_ALTAR_XOM,
1600     DNGN_ALTAR_VEHUMET,
1601     DNGN_ALTAR_OKAWARU,
1602     DNGN_ALTAR_MAKHLEB,
1603     DNGN_ALTAR_SIF_MUNA,
1604     DNGN_ALTAR_TROG,
1605     DNGN_ALTAR_NEMELEX_XOBEH,
1606     DNGN_ALTAR_ELYVILON,
1607     DNGN_ALTAR_LUGONU,
1608     DNGN_ALTAR_BEOGH,
1609     DNGN_ALTAR_JIYVA,
1610     DNGN_ALTAR_FEDHAS,
1611     DNGN_ALTAR_CHEIBRIADOS,
1612     DNGN_ALTAR_ASHENZARI,
1613     DNGN_ALTAR_DITHMENOS,
1614 #if TAG_MAJOR_VERSION > 34
1615     DNGN_ALTAR_GOZAG,
1616     DNGN_ALTAR_QAZLAL,
1617     DNGN_ALTAR_RU,
1618 #endif
1619
1620     DNGN_FOUNTAIN_BLUE,
1621     DNGN_FOUNTAIN_SPARKLING,           // aka 'Magic Fountain' {dlb}
1622     DNGN_FOUNTAIN_BLOOD,
1623 #if TAG_MAJOR_VERSION == 34
1624     DNGN_DRY_FOUNTAIN_BLUE,
1625     DNGN_DRY_FOUNTAIN_SPARKLING,
1626     DNGN_DRY_FOUNTAIN_BLOOD,
1627 #endif
1628     DNGN_DRY_FOUNTAIN,
1629
1630     // Not meant to ever appear in grd().
1631     DNGN_EXPLORE_HORIZON, // dummy for redefinition
1632
1633     DNGN_UNKNOWN_ALTAR,
1634     DNGN_UNKNOWN_PORTAL,
1635
1636     DNGN_ABYSSAL_STAIR,
1637 #if TAG_MAJOR_VERSION == 34
1638     DNGN_BADLY_SEALED_DOOR,
1639 #endif
1640
1641     DNGN_SEALED_STAIRS_UP,
1642     DNGN_SEALED_STAIRS_DOWN,
1643 #if TAG_MAJOR_VERSION == 34
1644     DNGN_TRAP_ALARM,
1645     DNGN_TRAP_ZOT,
1646     DNGN_PASSAGE_OF_GOLUBRIA,
1647 #endif
1648
1649     DNGN_ENTER_ZIGGURAT,
1650     DNGN_ENTER_BAZAAR,
1651     DNGN_ENTER_TROVE,
1652     DNGN_ENTER_SEWER,
1653     DNGN_ENTER_OSSUARY,
1654     DNGN_ENTER_BAILEY,
1655     DNGN_ENTER_ICE_CAVE,
1656     DNGN_ENTER_VOLCANO,
1657     DNGN_ENTER_WIZLAB,
1658 #if TAG_MAJOR_VERSION == 34
1659     DNGN_UNUSED_ENTER_PORTAL_1,
1660 #endif
1661
1662     DNGN_EXIT_ZIGGURAT,
1663     DNGN_EXIT_BAZAAR,
1664     DNGN_EXIT_TROVE,
1665     DNGN_EXIT_SEWER,
1666     DNGN_EXIT_OSSUARY,
1667     DNGN_EXIT_BAILEY,
1668     DNGN_EXIT_ICE_CAVE,
1669     DNGN_EXIT_VOLCANO,
1670     DNGN_EXIT_WIZLAB,
1671     DNGN_EXIT_LABYRINTH,
1672 #if TAG_MAJOR_VERSION == 34
1673     DNGN_UNUSED_EXIT_PORTAL_1,
1674
1675     DNGN_ALTAR_GOZAG,
1676     DNGN_ALTAR_QAZLAL,
1677     DNGN_ALTAR_RU,
1678
1679     DNGN_TRAP_SHADOW,
1680     DNGN_TRAP_SHADOW_DORMANT,
1681 #endif
1682
1683     NUM_FEATURES
1684 };
1685
1686 enum duration_type
1687 {
1688     DUR_INVIS,
1689     DUR_CONF,
1690     DUR_PARALYSIS,
1691     DUR_SLOW,
1692     DUR_MESMERISED,
1693     DUR_HASTE,
1694     DUR_MIGHT,
1695     DUR_BRILLIANCE,
1696     DUR_AGILITY,
1697     DUR_FLIGHT,
1698     DUR_BERSERK,
1699     DUR_POISONING,
1700
1701     DUR_CONFUSING_TOUCH,
1702 #if TAG_MAJOR_VERSION == 34
1703     DUR_SURE_BLADE,
1704 #endif
1705     DUR_CORONA,
1706     DUR_DEATHS_DOOR,
1707     DUR_FIRE_SHIELD,
1708
1709 #if TAG_MAJOR_VERSION == 34
1710     DUR_BUILDING_RAGE,
1711 #endif
1712     DUR_EXHAUSTED,              // fatigue counter for berserk
1713
1714     DUR_LIQUID_FLAMES,
1715     DUR_ICY_ARMOUR,
1716 #if TAG_MAJOR_VERSION == 34
1717     DUR_REPEL_MISSILES,
1718     DUR_JELLY_PRAYER,
1719 #endif
1720     DUR_PIETY_POOL,             // distribute piety over time
1721     DUR_DIVINE_VIGOUR,          // duration of Ely's Divine Vigour
1722     DUR_DIVINE_STAMINA,         // duration of Zin's Divine Stamina
1723     DUR_DIVINE_SHIELD,          // duration of TSO's Divine Shield
1724     DUR_REGENERATION,
1725     DUR_SWIFTNESS,
1726 #if TAG_MAJOR_VERSION == 34
1727     DUR_CONTROLLED_FLIGHT,
1728 #endif
1729     DUR_TELEPORT,
1730     DUR_CONTROL_TELEPORT,
1731     DUR_BREATH_WEAPON,
1732     DUR_TRANSFORMATION,
1733     DUR_DEATH_CHANNEL,
1734 #if TAG_MAJOR_VERSION == 34
1735     DUR_DEFLECT_MISSILES,
1736 #endif
1737     DUR_PHASE_SHIFT,
1738 #if TAG_MAJOR_VERSION == 34
1739     DUR_SEE_INVISIBLE,
1740 #endif
1741     DUR_WEAPON_BRAND,           // general "branding" spell counter
1742     DUR_DEMONIC_GUARDIAN,       // demonic guardian timeout
1743     DUR_POWERED_BY_DEATH,
1744     DUR_SILENCE,
1745     DUR_CONDENSATION_SHIELD,
1746     DUR_STONESKIN,
1747     DUR_GOURMAND,
1748 #if TAG_MAJOR_VERSION == 34
1749     DUR_BARGAIN,
1750     DUR_INSULATION,
1751 #endif
1752     DUR_RESISTANCE,
1753 #if TAG_MAJOR_VERSION == 34
1754     DUR_SLAYING,
1755 #endif
1756     DUR_STEALTH,
1757     DUR_MAGIC_SHIELD,
1758     DUR_SLEEP,
1759     DUR_TELEPATHY,
1760     DUR_PETRIFIED,
1761     DUR_LOWERED_MR,
1762     DUR_REPEL_STAIRS_MOVE,
1763     DUR_REPEL_STAIRS_CLIMB,
1764     DUR_COLOUR_SMOKE_TRAIL,
1765     DUR_SLIMIFY,
1766     DUR_TIME_STEP,
1767     DUR_ICEMAIL_DEPLETED,       // Wait this many turns for Icemail to return
1768 #if TAG_MAJOR_VERSION == 34
1769     DUR_MISLED,
1770 #endif
1771     DUR_QUAD_DAMAGE,
1772     DUR_AFRAID,
1773     DUR_MIRROR_DAMAGE,
1774     DUR_SCRYING,
1775     DUR_TORNADO,
1776     DUR_LIQUEFYING,
1777     DUR_HEROISM,
1778     DUR_FINESSE,
1779     DUR_LIFESAVING,
1780     DUR_PARALYSIS_IMMUNITY,
1781     DUR_DARKNESS,
1782     DUR_PETRIFYING,
1783     DUR_SHROUD_OF_GOLUBRIA,
1784     DUR_TORNADO_COOLDOWN,
1785 #if TAG_MAJOR_VERSION == 34
1786     DUR_NAUSEA,
1787 #endif
1788     DUR_AMBROSIA,
1789 #if TAG_MAJOR_VERSION == 34
1790     DUR_TEMP_MUTATIONS,
1791 #endif
1792     DUR_DISJUNCTION,
1793     DUR_VEHUMET_GIFT,
1794 #if TAG_MAJOR_VERSION == 34
1795     DUR_BATTLESPHERE,
1796 #endif
1797     DUR_SENTINEL_MARK,
1798     DUR_SICKENING,
1799     DUR_WATER_HOLD,
1800     DUR_WATER_HOLD_IMMUNITY,
1801     DUR_FLAYED,
1802 #if TAG_MAJOR_VERSION == 34
1803     DUR_RETCHING,
1804 #endif
1805     DUR_WEAK,
1806     DUR_DIMENSION_ANCHOR,
1807     DUR_ANTIMAGIC,
1808 #if TAG_MAJOR_VERSION == 34
1809     DUR_SPIRIT_HOWL,
1810 #endif
1811     DUR_INFUSION,
1812     DUR_SONG_OF_SLAYING,
1813 #if TAG_MAJOR_VERSION == 34
1814     DUR_SONG_OF_SHIELDING,
1815 #endif
1816     DUR_TOXIC_RADIANCE,
1817     DUR_RECITE,
1818     DUR_GRASPING_ROOTS,
1819     DUR_SLEEP_IMMUNITY,
1820     DUR_FIRE_VULN,
1821     DUR_ELIXIR_HEALTH,
1822     DUR_ELIXIR_MAGIC,
1823 #if TAG_MAJOR_VERSION == 34
1824     DUR_ANTENNAE_EXTEND,
1825 #endif
1826     DUR_TROGS_HAND,
1827     DUR_BARBS,
1828     DUR_POISON_VULN,
1829     DUR_FROZEN,
1830     DUR_SAP_MAGIC,
1831     DUR_MAGIC_SAPPED,
1832     DUR_PORTAL_PROJECTILE,
1833     DUR_FORESTED,
1834     DUR_DRAGON_CALL,
1835     DUR_DRAGON_CALL_COOLDOWN,
1836     DUR_ABJURATION_AURA,
1837     DUR_MESMERISE_IMMUNE,
1838     DUR_NO_POTIONS,
1839     DUR_QAZLAL_FIRE_RES,
1840     DUR_QAZLAL_COLD_RES,
1841     DUR_QAZLAL_ELEC_RES,
1842     DUR_QAZLAL_AC,
1843     DUR_CORROSION,
1844     DUR_FORTITUDE,
1845     DUR_HORROR,
1846     DUR_NO_SCROLLS,
1847 #if TAG_MAJOR_VERSION == 34
1848     DUR_NEGATIVE_VULN,
1849 #endif
1850     DUR_CLEAVE,
1851     DUR_GOZAG_GOLD_AURA,
1852     DUR_COLLAPSE,
1853     DUR_BRAINLESS,
1854     DUR_CLUMSY,
1855     NUM_DURATIONS
1856 };
1857
1858 // This list must match the enchant_names array in mon-ench.cc
1859 // Enchantments that imply other enchantments should come first
1860 // to avoid timeout message confusion. Currently:
1861 //     berserk -> haste, might; fatigue -> slow
1862 enum enchant_type
1863 {
1864     ENCH_NONE = 0,
1865     ENCH_BERSERK,
1866     ENCH_HASTE,
1867     ENCH_MIGHT,
1868     ENCH_FATIGUE,        // Post-berserk fatigue.
1869     ENCH_SLOW,
1870     ENCH_FEAR,
1871     ENCH_CONFUSION,
1872     ENCH_INVIS,
1873     ENCH_POISON,
1874 #if TAG_MAJOR_VERSION == 34
1875     ENCH_ROT,
1876 #endif
1877     ENCH_SUMMON,
1878     ENCH_ABJ,
1879     ENCH_CORONA,
1880     ENCH_CHARM,
1881     ENCH_STICKY_FLAME,
1882     ENCH_GLOWING_SHAPESHIFTER,
1883     ENCH_SHAPESHIFTER,
1884     ENCH_TP,
1885     ENCH_SLEEP_WARY,
1886     ENCH_SUBMERGED,
1887     ENCH_SHORT_LIVED,
1888     ENCH_PARALYSIS,
1889     ENCH_SICK,
1890 #if TAG_MAJOR_VERSION == 34
1891     ENCH_SLEEPY,         //   Monster can't wake until this wears off.
1892 #endif
1893     ENCH_HELD,           //   Caught in a net.
1894     ENCH_BATTLE_FRENZY,  //   Monster is in a battle frenzy.
1895 #if TAG_MAJOR_VERSION == 34
1896     ENCH_TEMP_PACIF,
1897 #endif
1898     ENCH_PETRIFYING,
1899     ENCH_PETRIFIED,
1900     ENCH_LOWERED_MR,
1901     ENCH_SOUL_RIPE,
1902     ENCH_SLOWLY_DYING,
1903     ENCH_EAT_ITEMS,
1904     ENCH_AQUATIC_LAND,   // Water monsters lose hp while on land.
1905     ENCH_SPORE_PRODUCTION,
1906 #if TAG_MAJOR_VERSION == 34
1907     ENCH_SLOUCH,
1908 #endif
1909     ENCH_SWIFT,
1910     ENCH_TIDE,
1911     ENCH_INSANE,         // Berserk + changed attitude.
1912     ENCH_SILENCE,
1913     ENCH_AWAKEN_FOREST,
1914     ENCH_EXPLODING,
1915     ENCH_BLEED,
1916     ENCH_PORTAL_TIMER,
1917     ENCH_SEVERED,
1918     ENCH_ANTIMAGIC,
1919 #if TAG_MAJOR_VERSION == 34
1920     ENCH_FADING_AWAY,
1921     ENCH_PREPARING_RESURRECT,
1922 #endif
1923     ENCH_REGENERATION,
1924     ENCH_RAISED_MR,
1925     ENCH_MIRROR_DAMAGE,
1926     ENCH_STONESKIN,
1927     ENCH_FEAR_INSPIRING,
1928     ENCH_PORTAL_PACIFIED,
1929     ENCH_WITHDRAWN,
1930 #if TAG_MAJOR_VERSION == 34
1931     ENCH_ATTACHED,
1932 #endif
1933     ENCH_LIFE_TIMER,     // Minimum time demonic guardian must exist.
1934     ENCH_FLIGHT,
1935     ENCH_LIQUEFYING,
1936     ENCH_TORNADO,
1937     ENCH_FAKE_ABJURATION,
1938     ENCH_DAZED,          // Dazed - less chance of acting each turn.
1939     ENCH_MUTE,           // Silenced.
1940     ENCH_BLIND,          // Blind (everything is invisible).
1941     ENCH_DUMB,           // Stupefied (paralysis by a different name).
1942     ENCH_MAD,            // Confusion by another name.
1943     ENCH_SILVER_CORONA,  // Zin's silver light.
1944     ENCH_RECITE_TIMER,   // Was recited against.
1945     ENCH_INNER_FLAME,
1946     ENCH_ROUSED,         // Monster has been roused to greatness
1947     ENCH_BREATH_WEAPON,  // just a simple timer for dragon breathweapon spam
1948     ENCH_DEATHS_DOOR,
1949     ENCH_ROLLING,        // Boulder Beetle in ball form
1950     ENCH_OZOCUBUS_ARMOUR,
1951     ENCH_WRETCHED,       // An abstract placeholder for monster mutations
1952     ENCH_SCREAMED,       // Starcursed scream timer
1953     ENCH_WORD_OF_RECALL, // Chanting word of recall
1954     ENCH_INJURY_BOND,
1955     ENCH_WATER_HOLD,     // Silence and asphyxiation damage
1956     ENCH_FLAYED,
1957     ENCH_HAUNTING,
1958 #if TAG_MAJOR_VERSION == 34
1959     ENCH_RETCHING,
1960 #endif
1961     ENCH_WEAK,
1962     ENCH_DIMENSION_ANCHOR,
1963     ENCH_AWAKEN_VINES,   // Is presently animating snaplasher vines
1964     ENCH_CONTROL_WINDS,
1965 #if TAG_MAJOR_VERSION == 34
1966     ENCH_WIND_AIDED,
1967 #endif
1968     ENCH_SUMMON_CAPPED,  // Abjuring quickly because a summon cap was hit
1969     ENCH_TOXIC_RADIANCE,
1970     ENCH_GRASPING_ROOTS_SOURCE, // Not actually entangled, but entangling others
1971     ENCH_GRASPING_ROOTS,
1972     ENCH_IOOD_CHARGED,
1973     ENCH_FIRE_VULN,
1974     ENCH_TORNADO_COOLDOWN,
1975     ENCH_MERFOLK_AVATAR_SONG,
1976     ENCH_BARBS,
1977 #if TAG_MAJOR_VERSION == 34
1978     ENCH_BUILDING_CHARGE,
1979 #endif
1980     ENCH_POISON_VULN,
1981     ENCH_ICEMAIL,
1982     ENCH_AGILE,
1983     ENCH_FROZEN,
1984     ENCH_EPHEMERAL_INFUSION,
1985     ENCH_BLACK_MARK,
1986     ENCH_GRAND_AVATAR,
1987     ENCH_SAP_MAGIC,
1988     ENCH_SHROUD,
1989     ENCH_PHANTOM_MIRROR,
1990     ENCH_NEUTRAL_BRIBED,
1991     ENCH_FRIENDLY_BRIBED,
1992     ENCH_CORROSION,
1993     ENCH_GOLD_LUST,
1994     ENCH_DRAINED,
1995     ENCH_REPEL_MISSILES,
1996     ENCH_DEFLECT_MISSILES,
1997 #if TAG_MAJOR_VERSION == 34
1998     ENCH_NEGATIVE_VULN,
1999 #endif
2000     ENCH_CONDENSATION_SHIELD,
2001     ENCH_RESISTANCE,
2002     ENCH_HEXED,
2003     ENCH_BONE_ARMOUR,
2004     ENCH_CHANT_FIRE_STORM, // chanting the fire storm spell
2005     ENCH_CHANT_WORD_OF_ENTROPY, // chanting word of entropy
2006     // Update enchantment names in mon-ench.cc when adding or removing
2007     // enchantments.
2008     NUM_ENCHANTMENTS
2009 };
2010
2011 enum energy_use_type
2012 {
2013     EUT_MOVE,
2014     EUT_SWIM,
2015     EUT_ATTACK,
2016     EUT_MISSILE,
2017     EUT_SPELL,
2018     EUT_SPECIAL,
2019     EUT_ITEM,
2020     EUT_PICKUP,
2021 };
2022
2023 enum equipment_type
2024 {
2025     EQ_NONE = -1,
2026
2027     EQ_WEAPON,
2028     EQ_CLOAK,
2029     EQ_HELMET,
2030     EQ_GLOVES,
2031     EQ_BOOTS,
2032     EQ_SHIELD,
2033     EQ_BODY_ARMOUR,
2034     //Everything beyond here is jewellery
2035     EQ_LEFT_RING,
2036     EQ_RIGHT_RING,
2037     EQ_AMULET,
2038     //Octopodes don't have left and right rings. They have eight rings, instead.
2039     EQ_RING_ONE,
2040     EQ_RING_TWO,
2041     EQ_RING_THREE,
2042     EQ_RING_FOUR,
2043     EQ_RING_FIVE,
2044     EQ_RING_SIX,
2045     EQ_RING_SEVEN,
2046     EQ_RING_EIGHT,
2047     // Finger amulet provides an extra ring slot
2048     EQ_RING_AMULET,
2049     NUM_EQUIP,
2050
2051     EQ_MIN_ARMOUR = EQ_CLOAK,
2052     EQ_MAX_ARMOUR = EQ_BODY_ARMOUR,
2053     EQ_MAX_WORN   = EQ_RING_AMULET,
2054     // these aren't actual equipment slots, they're categories for functions
2055     EQ_STAFF            = 100,         // weapon with base_type OBJ_STAVES
2056     EQ_RINGS,                          // check both rings
2057     EQ_RINGS_PLUS,                     // check both rings and sum plus
2058 #if TAG_MAJOR_VERSION == 34
2059     EQ_RINGS_PLUS2,                    // check both rings and sum plus2
2060 #endif
2061     EQ_ALL_ARMOUR,                     // check all armour types
2062 };
2063
2064 enum eq_type
2065 {
2066     ET_WEAPON,
2067     ET_SHIELD,
2068     ET_ARMOUR,
2069     ET_JEWELS,
2070     NUM_ET
2071 };
2072
2073 enum eq_type_flags
2074 {
2075     ETF_WEAPON = 0x1,
2076     ETF_SHIELD = 0x2,
2077     ETF_ARMOUR = 0x4,
2078     ETF_JEWELS = 0x8,
2079     ETF_ALL    = 0xF
2080 };
2081
2082 enum flush_reason_type
2083 {
2084     FLUSH_ON_FAILURE,                  // spell/ability failed to cast
2085     FLUSH_BEFORE_COMMAND,              // flush before getting a command
2086     FLUSH_ON_MESSAGE,                  // flush when printing a message
2087     FLUSH_ON_WARNING_MESSAGE,          // flush on MSGCH_WARN messages
2088     FLUSH_ON_DANGER_MESSAGE,           // flush on MSGCH_DANGER messages
2089     FLUSH_ON_PROMPT,                   // flush on MSGCH_PROMPT messages
2090     FLUSH_ON_UNSAFE_YES_OR_NO_PROMPT,  // flush when !safe set to yesno()
2091     FLUSH_LUA,                         // flush when Lua wants to flush
2092     FLUSH_KEY_REPLAY_CANCEL,           // flush when key replay is cancelled
2093     FLUSH_ABORT_MACRO,                 // something wrong with macro being
2094                                        // processed, so stop it
2095     FLUSH_REPLAY_SETUP_FAILURE,        // setup for key replay failed
2096     FLUSH_REPEAT_SETUP_DONE,           // command repeat done manipulating
2097                                        // the macro buffer
2098     NUM_FLUSH_REASONS
2099 };
2100
2101 enum god_type
2102 {
2103     GOD_NO_GOD,
2104     GOD_ZIN,
2105     GOD_SHINING_ONE,
2106     GOD_KIKUBAAQUDGHA,
2107     GOD_YREDELEMNUL,
2108     GOD_XOM,
2109     GOD_VEHUMET,
2110     GOD_OKAWARU,
2111     GOD_MAKHLEB,
2112     GOD_SIF_MUNA,
2113     GOD_TROG,
2114     GOD_NEMELEX_XOBEH,
2115     GOD_ELYVILON,
2116     GOD_LUGONU,
2117     GOD_BEOGH,
2118     GOD_JIYVA,
2119     GOD_FEDHAS,
2120     GOD_CHEIBRIADOS,
2121     GOD_ASHENZARI,
2122     GOD_DITHMENOS,
2123     GOD_GOZAG,
2124     GOD_QAZLAL,
2125     GOD_RU,
2126     NUM_GODS,                          // always after last god
2127
2128     GOD_RANDOM = 100,
2129     GOD_NAMELESS,                      // for monsters with non-player gods
2130     GOD_VIABLE,
2131 };
2132
2133 enum held_type
2134 {
2135     HELD_NONE = 0,
2136     HELD_NET,         // currently unused
2137     HELD_WEB,         // currently unused
2138     HELD_MONSTER,     // but no damage
2139     HELD_CONSTRICTED, // damaging
2140 };
2141
2142 enum holy_word_source_type
2143 {
2144     HOLY_WORD_SCROLL,
2145     HOLY_WORD_ZIN,     // sanctuary
2146     HOLY_WORD_TSO,     // weapon blessing
2147 };
2148
2149 enum hunger_state_t                    // you.hunger_state
2150 {
2151     HS_STARVING,
2152     HS_NEAR_STARVING,
2153     HS_VERY_HUNGRY,
2154     HS_HUNGRY,
2155     HS_SATIATED,                       // "not hungry" state
2156     HS_FULL,
2157     HS_VERY_FULL,
2158     HS_ENGORGED,
2159 };
2160
2161 enum item_status_flag_type  // per item flags: ie. ident status, cursed status
2162 {
2163     ISFLAG_KNOW_CURSE        = 0x00000001,  // curse status
2164     ISFLAG_KNOW_TYPE         = 0x00000002,  // artefact name, sub/special types
2165     ISFLAG_KNOW_PLUSES       = 0x00000004,  // to hit/to dam/to AC/charges
2166     ISFLAG_KNOW_PROPERTIES   = 0x00000008,  // know special artefact properties
2167     ISFLAG_IDENT_MASK        = 0x0000000F,  // mask of all id related flags
2168
2169     ISFLAG_CURSED            = 0x00000100,  // cursed
2170     ISFLAG_HANDLED           = 0x00000200,  // player has handled this item
2171                              //0x00000400,  // was: ISFLAG_SEEN_CURSED
2172     ISFLAG_TRIED             = 0x00000800,  // tried but not (usually) ided
2173
2174     ISFLAG_RANDART           = 0x00001000,  // special value is seed
2175     ISFLAG_UNRANDART         = 0x00002000,  // is an unrandart
2176     ISFLAG_ARTEFACT_MASK     = 0x00003000,  // randart or unrandart
2177     ISFLAG_DROPPED           = 0x00004000,  // dropped item (no autopickup)
2178     ISFLAG_THROWN            = 0x00008000,  // thrown missile weapon
2179
2180     // these don't have to remain as flags
2181     ISFLAG_NO_DESC           = 0x00000000,  // used for clearing these flags
2182     ISFLAG_GLOWING           = 0x00010000,  // weapons or armour
2183     ISFLAG_RUNED             = 0x00020000,  // weapons or armour
2184     ISFLAG_EMBROIDERED_SHINY = 0x00040000,  // armour: depends on sub-type
2185     ISFLAG_COSMETIC_MASK     = 0x00070000,  // mask of cosmetic descriptions
2186
2187     ISFLAG_UNOBTAINABLE      = 0x00080000,  // vault on display
2188
2189     ISFLAG_MIMIC             = 0x00100000,  // mimic
2190     ISFLAG_NO_MIMIC          = 0x00200000,  // Can't be turned into a mimic
2191
2192     ISFLAG_NO_PICKUP         = 0x00400000,  // Monsters won't pick this up
2193
2194 #if TAG_MAJOR_VERSION == 34
2195     ISFLAG_UNUSED1           = 0x01000000,  // was ISFLAG_ORCISH
2196     ISFLAG_UNUSED2           = 0x02000000,  // was ISFLAG_DWARVEN
2197     ISFLAG_UNUSED3           = 0x04000000,  // was ISFLAG_ELVEN
2198     ISFLAG_RACIAL_MASK       = 0x07000000,  // mask of racial equipment types
2199 #endif
2200     ISFLAG_NOTED_ID          = 0x08000000,
2201     ISFLAG_NOTED_GET         = 0x10000000,
2202
2203     ISFLAG_SEEN              = 0x20000000,  // has it been seen
2204     ISFLAG_SUMMONED          = 0x40000000,  // Item generated on a summon
2205 #if TAG_MAJOR_VERSION == 34
2206     ISFLAG_UNUSED4           = 0x80000000,  // was ISFLAG_DROPPED_BY_ALLY
2207 #endif
2208 };
2209
2210 enum item_type_id_state_type
2211 {
2212     ID_UNKNOWN_TYPE = 0,
2213     ID_MON_TRIED_TYPE,
2214     ID_TRIED_TYPE,
2215     ID_TRIED_ITEM_TYPE,
2216     ID_KNOWN_TYPE,
2217     NUM_ID_STATE_TYPES
2218 };
2219
2220 enum job_type
2221 {
2222     JOB_FIGHTER,
2223     JOB_WIZARD,
2224 #if TAG_MAJOR_VERSION == 34
2225     JOB_PRIEST,
2226 #endif
2227     JOB_GLADIATOR,
2228     JOB_NECROMANCER,
2229     JOB_ASSASSIN,
2230     JOB_BERSERKER,
2231     JOB_HUNTER,
2232     JOB_CONJURER,
2233     JOB_ENCHANTER,
2234     JOB_FIRE_ELEMENTALIST,
2235     JOB_ICE_ELEMENTALIST,
2236     JOB_SUMMONER,
2237     JOB_AIR_ELEMENTALIST,
2238     JOB_EARTH_ELEMENTALIST,
2239     JOB_SKALD,
2240     JOB_VENOM_MAGE,
2241     JOB_CHAOS_KNIGHT,
2242     JOB_TRANSMUTER,
2243 #if TAG_MAJOR_VERSION == 34
2244     JOB_HEALER,
2245     JOB_STALKER,
2246 #endif
2247     JOB_MONK,
2248     JOB_WARPER,
2249     JOB_WANDERER,
2250     JOB_ARTIFICER,                     //   Greenberg/Bane
2251     JOB_ARCANE_MARKSMAN,
2252 #if TAG_MAJOR_VERSION == 34
2253     JOB_DEATH_KNIGHT,
2254 #endif
2255     JOB_ABYSSAL_KNIGHT,
2256 #if TAG_MAJOR_VERSION == 34
2257     JOB_JESTER,
2258 #endif
2259     NUM_JOBS,                          // always after the last job
2260
2261     JOB_UNKNOWN = 100,
2262     JOB_RANDOM,
2263     JOB_VIABLE,
2264 };
2265
2266 enum KeymapContext
2267 {
2268     KMC_DEFAULT,         // For no-arg getchm(), must be zero.
2269     KMC_LEVELMAP,        // When in the 'X' level map
2270     KMC_TARGETING,       // Only during 'x' and other targeting modes
2271     KMC_CONFIRM,         // When being asked y/n/q questions
2272     KMC_MENU,            // For menus
2273 #ifdef USE_TILE
2274     KMC_DOLL,            // For the tiles doll menu editing screen
2275 #endif
2276
2277     KMC_CONTEXT_COUNT,   // Must always be the last real context
2278
2279     KMC_NONE
2280 };
2281
2282 // This order is *critical*. Don't mess with it (see mon_enchant)
2283 enum kill_category
2284 {
2285     KC_YOU,
2286     KC_FRIENDLY,
2287     KC_OTHER,
2288     KC_NCATEGORIES
2289 };
2290
2291 enum killer_type                       // monster_die(), thing_thrown
2292 {
2293     KILL_NONE,                         // no killer
2294     KILL_YOU,                          // you are the killer
2295     KILL_MON,                          // no, it was a monster!
2296     KILL_YOU_MISSILE,                  // in the library, with a dart
2297     KILL_MON_MISSILE,                  // in the dungeon, with a club
2298     KILL_YOU_CONF,                     // died while confused as caused by you
2299     KILL_MISCAST,                      // as a result of a spell miscast
2300     KILL_MISC,                         // any miscellaneous killing
2301     KILL_RESET,                        // excised from existence
2302     KILL_DISMISSED,                    // like KILL_RESET, but drops inventory
2303     KILL_BANISHED,                     // monsters what got banished
2304     KILL_UNSUMMONED,                   // summoned monsters whose timers ran out
2305     KILL_TIMEOUT,                      // non-summoned monsters whose times ran out
2306     KILL_PACIFIED,                     // only used by milestones and notes
2307     KILL_ENSLAVED,                     // only used by milestones and notes
2308     KILL_SLIMIFIED,                    // only used by milestones and notes
2309 };
2310
2311 // Can't change this order without breaking saves.
2312 enum map_marker_type
2313 {
2314     MAT_FEATURE,              // Stock marker.
2315     MAT_LUA_MARKER,
2316     MAT_CORRUPTION_NEXUS,
2317     MAT_WIZ_PROPS,
2318     MAT_TOMB,
2319     MAT_MALIGN,
2320 #if TAG_MAJOR_VERSION == 34
2321     MAT_PHOENIX,
2322 #endif
2323     MAT_POSITION,
2324 #if TAG_MAJOR_VERSION == 34
2325     MAT_DOOR_SEAL,
2326 #endif
2327     MAT_TERRAIN_CHANGE,
2328     MAT_CLOUD_SPREADER,
2329     NUM_MAP_MARKER_TYPES,
2330     MAT_ANY,
2331 };
2332
2333 enum terrain_change_type
2334 {
2335     TERRAIN_CHANGE_GENERIC,
2336     TERRAIN_CHANGE_FLOOD,
2337     TERRAIN_CHANGE_TOMB,
2338     TERRAIN_CHANGE_IMPRISON,
2339     TERRAIN_CHANGE_DOOR_SEAL,
2340     TERRAIN_CHANGE_FORESTED,
2341     NUM_TERRAIN_CHANGE_TYPES
2342 };
2343
2344 enum map_feature
2345 {
2346     MF_UNSEEN,
2347     MF_FLOOR,
2348     MF_WALL,
2349     MF_MAP_FLOOR,
2350     MF_MAP_WALL,
2351     MF_DOOR,
2352     MF_ITEM,
2353     MF_MONS_FRIENDLY,
2354     MF_MONS_PEACEFUL,
2355     MF_MONS_NEUTRAL,
2356     MF_MONS_HOSTILE,
2357     MF_MONS_NO_EXP,
2358     MF_STAIR_UP,
2359     MF_STAIR_DOWN,
2360     MF_STAIR_BRANCH,
2361     MF_FEATURE,
2362     MF_WATER,
2363     MF_LAVA,
2364     MF_TRAP,
2365     MF_EXCL_ROOT,
2366     MF_EXCL,
2367     MF_PLAYER,
2368     MF_DEEP_WATER,
2369     MF_PORTAL,
2370     MF_MAX,
2371
2372     MF_SKIP,
2373 };
2374
2375 enum menu_type
2376 {
2377     MT_ANY = -1,
2378
2379     MT_INVLIST,                        // List inventory
2380     MT_DROP,
2381     MT_PICKUP,
2382     MT_KNOW,
2383     MT_RUNES,
2384     MT_SELONE,                         // Select one
2385 };
2386
2387 enum mon_holy_type
2388 {
2389     MH_HOLY,
2390     MH_NATURAL,
2391     MH_UNDEAD,
2392     MH_DEMONIC,
2393     MH_NONLIVING, // golems and other constructs
2394     MH_PLANT,
2395 };
2396
2397 enum targ_mode_type
2398 {
2399     TARG_ANY,
2400     TARG_ENEMY,  // hostile + neutral
2401     TARG_FRIEND,
2402     TARG_INJURED_FRIEND, // for healing
2403     TARG_HOSTILE,
2404     TARG_HOSTILE_SUBMERGED, // Target hostiles including submerged ones
2405     TARG_EVOLVABLE_PLANTS,  // Targeting mode for Fedhas' evolution
2406     TARG_HOSTILE_UNDEAD,    // For dispel undead
2407     TARG_BEOGH_GIFTABLE,    // For Beogh followers who can be given gifts
2408     TARG_NUM_MODES
2409 };
2410
2411 // NOTE: Changing this order will break saves! Appending does not.
2412 enum monster_type                      // menv[].type
2413 {
2414     MONS_PROGRAM_BUG,
2415         MONS_0 = MONS_PROGRAM_BUG,
2416
2417 #if TAG_MAJOR_VERSION > 34
2418     MONS_GIANT_LIZARD,          // genus
2419 #endif
2420     MONS_GIANT_NEWT,
2421     MONS_GIANT_GECKO,
2422     MONS_IGUANA,
2423     MONS_KOMODO_DRAGON,
2424     MONS_BASILISK,
2425     MONS_BAT,
2426     MONS_FIRE_BAT,
2427 #if TAG_MAJOR_VERSION > 34
2428     MONS_SNAKE,                // genus
2429 #endif
2430     MONS_BALL_PYTHON,
2431     MONS_ADDER,
2432     MONS_WATER_MOCCASIN,
2433     MONS_BLACK_MAMBA,
2434     MONS_ANACONDA,
2435     MONS_SEA_SNAKE,
2436 #if TAG_MAJOR_VERSION > 34
2437     MONS_SHOCK_SERPENT,
2438     MONS_MANA_VIPER,
2439 #endif
2440     MONS_RAT,
2441 #if TAG_MAJOR_VERSION == 34
2442     MONS_GREY_RAT,
2443 #endif
2444     MONS_RIVER_RAT,
2445     MONS_HELL_RAT,
2446 #if TAG_MAJOR_VERSION == 34
2447     MONS_LABORATORY_RAT,
2448 #endif
2449     MONS_QUOKKA,         // Quokka are a type of wallaby, returned -- bwr 382
2450     MONS_PORCUPINE,
2451     MONS_JACKAL,
2452     MONS_HOUND,
2453 #if TAG_MAJOR_VERSION == 34
2454     MONS_WAR_DOG,
2455 #endif
2456     MONS_WOLF,
2457     MONS_WARG,
2458     MONS_HELL_HOUND,
2459 #if TAG_MAJOR_VERSION > 34
2460     MONS_RAIJU,
2461 #endif
2462     MONS_HOG,
2463     MONS_HELL_HOG,
2464     MONS_HOLY_SWINE,            // porkalator
2465 #if TAG_MAJOR_VERSION == 34
2466     MONS_GIANT_SLUG,
2467     MONS_AGATE_SNAIL,
2468 #else
2469     MONS_TORPOR_SNAIL,
2470 #endif
2471     MONS_ELEPHANT_SLUG,
2472     MONS_GIANT_LEECH,
2473     MONS_BABY_ALLIGATOR,
2474     MONS_ALLIGATOR,
2475     MONS_CROCODILE,
2476     MONS_HYDRA,
2477     MONS_SHEEP,
2478     MONS_YAK,
2479     MONS_DEATH_YAK,
2480     MONS_CATOBLEPAS,
2481     MONS_ELEPHANT,
2482     MONS_DIRE_ELEPHANT,
2483     MONS_HELLEPHANT,
2484     MONS_MANTICORE,
2485     MONS_HIPPOGRIFF,
2486     MONS_GRIFFON,
2487 #if TAG_MAJOR_VERSION > 34
2488     MONS_CHIMERA,
2489 #endif
2490     MONS_GIANT_FROG,
2491     MONS_SPINY_FROG,
2492     MONS_BLINK_FROG,
2493 #if TAG_MAJOR_VERSION > 34
2494     MONS_BEAR,                  // genus
2495 #endif
2496     MONS_GRIZZLY_BEAR,
2497     MONS_POLAR_BEAR,
2498     MONS_BLACK_BEAR,
2499     MONS_WORM,
2500     MONS_BRAIN_WORM,
2501 #if TAG_MAJOR_VERSION == 34
2502     MONS_ROCK_WORM,
2503     MONS_SPINY_WORM,
2504 #endif
2505     MONS_WYVERN,
2506 #if TAG_MAJOR_VERSION > 34
2507     MONS_DRAKE,                 // genus
2508 #endif
2509     MONS_LINDWURM,
2510     MONS_FIRE_DRAKE,
2511     MONS_SWAMP_DRAKE,
2512     MONS_DEATH_DRAKE,
2513 #if TAG_MAJOR_VERSION > 34
2514     MONS_WIND_DRAKE,
2515     MONS_DRAGON,                // genus
2516 #endif
2517     MONS_STEAM_DRAGON,
2518     MONS_MOTTLED_DRAGON,
2519     MONS_SWAMP_DRAGON,
2520     MONS_FIRE_DRAGON,
2521     MONS_ICE_DRAGON,
2522     MONS_SHADOW_DRAGON,
2523     MONS_STORM_DRAGON,
2524     MONS_BONE_DRAGON,
2525     MONS_QUICKSILVER_DRAGON,
2526     MONS_IRON_DRAGON,
2527     MONS_GOLDEN_DRAGON,
2528     MONS_PEARL_DRAGON,
2529
2530     MONS_OOZE,
2531     MONS_JELLY,
2532 #if TAG_MAJOR_VERSION == 34
2533     MONS_BROWN_OOZE,
2534     MONS_GIANT_AMOEBA,
2535 #endif
2536     MONS_AZURE_JELLY,
2537     MONS_DEATH_OOZE,
2538     MONS_ACID_BLOB,
2539     MONS_SLIME_CREATURE,
2540 #if TAG_MAJOR_VERSION == 34
2541     MONS_PULSATING_LUMP,
2542 #endif
2543     MONS_GIANT_EYEBALL,
2544     MONS_EYE_OF_DRAINING,
2545     MONS_SHINING_EYE,
2546     MONS_EYE_OF_DEVASTATION,
2547     MONS_GREAT_ORB_OF_EYES,
2548     MONS_GIANT_ORANGE_BRAIN,
2549
2550     MONS_DANCING_WEAPON,
2551 #if TAG_MAJOR_VERSION > 34
2552     MONS_SPECTRAL_WEAPON,
2553     MONS_GRAND_AVATAR,
2554 #endif
2555     MONS_HARPY,
2556     MONS_RAVEN,
2557 #if TAG_MAJOR_VERSION > 34
2558     MONS_BENNU,
2559     MONS_CAUSTIC_SHRIKE,
2560     MONS_SHARD_SHRIKE,
2561
2562     MONS_ANUBIS_GUARD,
2563 #endif
2564     MONS_FIRE_CRAB,
2565 #if TAG_MAJOR_VERSION == 34
2566     MONS_HOMUNCULUS,
2567     MONS_SOUPLING,
2568 #else
2569     MONS_GHOST_CRAB,
2570     MONS_CRAB,
2571 #endif
2572
2573     MONS_BUTTERFLY,
2574 #if TAG_MAJOR_VERSION == 34
2575     MONS_ANT_LARVA,
2576 #endif
2577     MONS_WORKER_ANT,
2578     MONS_SOLDIER_ANT,
2579     MONS_QUEEN_ANT,
2580 #if TAG_MAJOR_VERSION > 34
2581     MONS_FORMICID,
2582 #endif
2583     MONS_KILLER_BEE,
2584     MONS_QUEEN_BEE,
2585     MONS_VAMPIRE_MOSQUITO,
2586 #if TAG_MAJOR_VERSION == 34
2587     MONS_BUMBLEBEE,
2588 #endif
2589     MONS_WASP,
2590     MONS_HORNET,
2591     MONS_GOLIATH_BEETLE,
2592     MONS_BORING_BEETLE,
2593     MONS_BOULDER_BEETLE,
2594 #if TAG_MAJOR_VERSION > 34
2595     MONS_DEATH_SCARAB,
2596 #endif
2597     MONS_GIANT_COCKROACH,
2598 #if TAG_MAJOR_VERSION == 34
2599     MONS_GIANT_CENTIPEDE,
2600     MONS_GIANT_MITE,
2601 #endif
2602     MONS_SPIDER,
2603     MONS_WOLF_SPIDER,
2604     MONS_TRAPDOOR_SPIDER,
2605     MONS_JUMPING_SPIDER,
2606     MONS_ORB_SPIDER,
2607     MONS_TARANTELLA,
2608     MONS_REDBACK,
2609     MONS_SCORPION,
2610     MONS_EMPEROR_SCORPION,
2611     MONS_MOTH,                  // genus
2612 #if TAG_MAJOR_VERSION == 34
2613     MONS_MOTH_OF_SUPPRESSION,
2614 #endif
2615     MONS_GHOST_MOTH,
2616     MONS_MOTH_OF_WRATH,
2617     MONS_DEMONIC_CRAWLER,
2618     MONS_SNAPPING_TURTLE,
2619     MONS_ALLIGATOR_SNAPPING_TURTLE,
2620 #if TAG_MAJOR_VERSION == 34
2621     MONS_GNOME,
2622 #endif
2623     MONS_HALFLING,              // recolouring + single vault.
2624     MONS_FELID,                 // recolouring + single vault. Miaow!
2625     MONS_VAMPIRE_BAT,           // recolouring + vaults
2626     MONS_DEMIGOD,               // recolouring + single vault
2627     MONS_DEMONSPAWN,
2628 #if TAG_MAJOR_VERSION > 34
2629     MONS_FIRST_DEMONSPAWN = MONS_DEMONSPAWN,
2630     MONS_MONSTROUS_DEMONSPAWN,
2631     MONS_FIRST_BASE_DEMONSPAWN = MONS_MONSTROUS_DEMONSPAWN,
2632     MONS_GELID_DEMONSPAWN,
2633     MONS_INFERNAL_DEMONSPAWN,
2634     MONS_PUTRID_DEMONSPAWN,
2635     MONS_TORTUROUS_DEMONSPAWN,
2636     MONS_LAST_BASE_DEMONSPAWN = MONS_TORTUROUS_DEMONSPAWN,
2637     MONS_BLOOD_SAINT,
2638     MONS_FIRST_NONBASE_DEMONSPAWN = MONS_BLOOD_SAINT,
2639     MONS_CHAOS_CHAMPION,
2640     MONS_WARMONGER,
2641     MONS_CORRUPTER,
2642     MONS_BLACK_SUN,
2643     MONS_LAST_NONBASE_DEMONSPAWN = MONS_BLACK_SUN,
2644     MONS_LAST_DEMONSPAWN = MONS_BLACK_SUN,
2645 #endif
2646     MONS_GARGOYLE,
2647     MONS_WAR_GARGOYLE,
2648     MONS_MOLTEN_GARGOYLE,
2649     MONS_UGLY_THING,
2650     MONS_VERY_UGLY_THING,
2651     MONS_ICE_BEAST,
2652     MONS_SKY_BEAST,
2653     MONS_SPHINX,
2654     MONS_ORB_GUARDIAN,
2655
2656     MONS_GOLEM,                 // genus
2657 #if TAG_MAJOR_VERSION == 34
2658     MONS_CLAY_GOLEM,
2659     MONS_WOOD_GOLEM,
2660     MONS_STONE_GOLEM,
2661 #endif
2662     MONS_IRON_GOLEM,
2663     MONS_CRYSTAL_GUARDIAN,
2664     MONS_TOENAIL_GOLEM,
2665     MONS_ELECTRIC_GOLEM, // replacing the guardian robot -- bwr
2666 #if TAG_MAJOR_VERSION > 34
2667     MONS_GUARDIAN_GOLEM,
2668     MONS_SPELLFORGED_SERVITOR,
2669     MONS_USHABTI,
2670 #endif
2671     MONS_ORB_OF_FIRE,    // Swords renamed to fit -- bwr
2672 #if TAG_MAJOR_VERSION > 34
2673     MONS_ELEMENTAL,             // genus
2674 #endif
2675     MONS_EARTH_ELEMENTAL,
2676     MONS_FIRE_ELEMENTAL,
2677     MONS_AIR_ELEMENTAL,
2678 #if TAG_MAJOR_VERSION > 34
2679     MONS_IRON_ELEMENTAL,
2680     MONS_ELEMENTAL_WELLSPRING,
2681 #endif
2682     MONS_TWISTER,        // air miscasts
2683     MONS_GOLDEN_EYE,
2684     MONS_FIRE_VORTEX,
2685     MONS_SPATIAL_VORTEX,
2686     MONS_INSUBSTANTIAL_WISP,
2687 #if TAG_MAJOR_VERSION == 34
2688     MONS_VAPOUR,
2689
2690     // Mimics:
2691     MONS_INEPT_ITEM_MIMIC,
2692     MONS_ITEM_MIMIC,
2693     MONS_RAVENOUS_ITEM_MIMIC,
2694     MONS_MONSTROUS_ITEM_MIMIC,
2695     MONS_INEPT_FEATURE_MIMIC,
2696     MONS_FEATURE_MIMIC,
2697     MONS_RAVENOUS_FEATURE_MIMIC,
2698     MONS_MONSTROUS_FEATURE_MIMIC, // unused
2699 #endif
2700
2701     // Plants:
2702     MONS_TOADSTOOL,
2703     MONS_FUNGUS,
2704     MONS_WANDERING_MUSHROOM,
2705 #if TAG_MAJOR_VERSION > 34
2706     MONS_DEATHCAP,
2707 #endif
2708     MONS_PLANT,
2709     MONS_OKLOB_SAPLING,
2710     MONS_OKLOB_PLANT,
2711     MONS_BUSH,
2712     MONS_BURNING_BUSH,
2713 #if TAG_MAJOR_VERSION > 34
2714     MONS_THORN_HUNTER,
2715     MONS_BRIAR_PATCH,
2716     MONS_SHAMBLING_MANGROVE,
2717     MONS_VINE_STALKER,
2718     MONS_ANIMATED_TREE,
2719 #endif
2720     MONS_GIANT_SPORE,
2721     MONS_BALLISTOMYCETE,
2722     MONS_HYPERACTIVE_BALLISTOMYCETE,
2723
2724     MONS_GOBLIN,
2725     MONS_HOBGOBLIN,
2726     MONS_GNOLL,
2727     MONS_GNOLL_SHAMAN,
2728     MONS_GNOLL_SERGEANT,
2729     MONS_BOGGART,
2730     MONS_KOBOLD,
2731     MONS_BIG_KOBOLD,
2732     MONS_KOBOLD_DEMONOLOGIST,
2733     MONS_ORC,
2734     MONS_ORC_WARRIOR,
2735     MONS_ORC_PRIEST,
2736     MONS_ORC_HIGH_PRIEST,
2737     MONS_ORC_WIZARD,
2738     MONS_ORC_KNIGHT,
2739     MONS_ORC_SORCERER,
2740     MONS_ORC_WARLORD,
2741     MONS_DWARF,
2742     MONS_DEEP_DWARF,
2743 #if TAG_MAJOR_VERSION == 34
2744     MONS_DEEP_DWARF_SCION,
2745     MONS_DEEP_DWARF_ARTIFICER,
2746     MONS_DEEP_DWARF_NECROMANCER,
2747     MONS_DEEP_DWARF_BERSERKER,
2748     MONS_DEATH_KNIGHT,
2749     MONS_UNBORN,
2750 #endif
2751     MONS_ELF,
2752 #if TAG_MAJOR_VERSION == 34
2753     MONS_DEEP_ELF_SOLDIER,
2754 #endif
2755     MONS_DEEP_ELF_FIGHTER,
2756     MONS_DEEP_ELF_KNIGHT,
2757     MONS_DEEP_ELF_MAGE,
2758     MONS_DEEP_ELF_SUMMONER,
2759     MONS_DEEP_ELF_CONJURER,
2760     MONS_DEEP_ELF_PRIEST,
2761     MONS_DEEP_ELF_HIGH_PRIEST,
2762     MONS_DEEP_ELF_DEMONOLOGIST,
2763     MONS_DEEP_ELF_ANNIHILATOR,
2764     MONS_DEEP_ELF_SORCERER,
2765     MONS_DEEP_ELF_DEATH_MAGE,
2766     MONS_DEEP_ELF_BLADEMASTER,
2767     MONS_DEEP_ELF_MASTER_ARCHER,
2768     MONS_SPRIGGAN,
2769     MONS_SPRIGGAN_DRUID,
2770 #if TAG_MAJOR_VERSION == 34
2771     MONS_SPRIGGAN_ASSASSIN,
2772 #endif
2773     MONS_SPRIGGAN_RIDER,
2774     MONS_SPRIGGAN_BERSERKER,
2775     MONS_SPRIGGAN_DEFENDER,
2776     MONS_SPRIGGAN_AIR_MAGE,
2777 #if TAG_MAJOR_VERSION == 34
2778     MONS_FIREFLY,
2779 #endif
2780     MONS_TENGU,
2781 #if TAG_MAJOR_VERSION > 34
2782     MONS_TENGU_WARRIOR,
2783     MONS_TENGU_CONJURER,
2784     MONS_TENGU_REAVER,
2785 #endif
2786     MONS_MINOTAUR,
2787     MONS_NAGA,
2788     MONS_NAGA_WARRIOR,
2789     MONS_NAGA_MAGE,
2790 #if TAG_MAJOR_VERSION > 34
2791     MONS_NAGA_RITUALIST,
2792     MONS_NAGA_SHARPSHOOTER,
2793 #endif
2794     MONS_GREATER_NAGA,
2795     MONS_GUARDIAN_SERPENT,
2796     MONS_OCTOPODE,
2797 #if TAG_MAJOR_VERSION > 34
2798     MONS_OCTOPODE_CRUSHER,
2799 #endif
2800     MONS_MERFOLK,
2801     MONS_SIREN,
2802     MONS_MERFOLK_AVATAR,
2803 #if TAG_MAJOR_VERSION > 34
2804     MONS_DROWNED_SOUL,
2805 #endif
2806     MONS_MERFOLK_IMPALER,
2807     MONS_MERFOLK_AQUAMANCER,
2808     MONS_MERFOLK_JAVELINEER,
2809 #if TAG_MAJOR_VERSION > 34
2810     MONS_WATER_NYMPH,
2811 #endif
2812     MONS_CENTAUR,
2813     MONS_CENTAUR_WARRIOR,
2814     MONS_YAKTAUR,
2815     MONS_YAKTAUR_CAPTAIN,
2816 #if TAG_MAJOR_VERSION > 34
2817     MONS_FAUN,
2818     MONS_SATYR,
2819 #endif
2820     MONS_OGRE,
2821     MONS_TWO_HEADED_OGRE,
2822     MONS_OGRE_MAGE,
2823     MONS_TROLL,
2824 #if TAG_MAJOR_VERSION == 34
2825     MONS_ROCK_TROLL,
2826 #endif
2827     MONS_IRON_TROLL,
2828     MONS_DEEP_TROLL,
2829 #if TAG_MAJOR_VERSION > 34
2830     MONS_DEEP_TROLL_EARTH_MAGE,
2831     MONS_DEEP_TROLL_SHAMAN,
2832 #endif
2833     MONS_GIANT,                 // genus
2834     MONS_HILL_GIANT,
2835     MONS_CYCLOPS,
2836     MONS_ETTIN,
2837     MONS_STONE_GIANT,
2838     MONS_FIRE_GIANT,
2839     MONS_FROST_GIANT,
2840     MONS_TITAN,
2841     MONS_HUMAN,
2842     MONS_SLAVE,
2843     MONS_HELL_KNIGHT,
2844 #if TAG_MAJOR_VERSION > 34
2845     MONS_DEATH_KNIGHT,
2846 #endif
2847     MONS_NECROMANCER,
2848     MONS_WIZARD,
2849     MONS_VAULT_GUARD,
2850 #if TAG_MAJOR_VERSION > 34
2851     MONS_VAULT_SENTINEL,
2852     MONS_VAULT_WARDEN,
2853     MONS_IRONBRAND_CONVOKER,
2854     MONS_IRONHEART_PRESERVER,
2855 #endif
2856     MONS_KILLER_KLOWN,
2857     MONS_SHAPESHIFTER,
2858     MONS_GLOWING_SHAPESHIFTER,
2859
2860     // Draconians:
2861     MONS_DRACONIAN,
2862     MONS_FIRST_DRACONIAN = MONS_DRACONIAN,
2863
2864     // If adding more drac colours, sync up colour names in
2865     // mon-util.cc.
2866     MONS_BLACK_DRACONIAN,
2867     MONS_FIRST_BASE_DRACONIAN = MONS_BLACK_DRACONIAN,
2868     MONS_MOTTLED_DRACONIAN,
2869     MONS_YELLOW_DRACONIAN,
2870     MONS_GREEN_DRACONIAN,
2871     MONS_PURPLE_DRACONIAN,
2872     MONS_RED_DRACONIAN,
2873     MONS_WHITE_DRACONIAN,
2874     MONS_LAST_SPAWNED_DRACONIAN = MONS_WHITE_DRACONIAN,
2875     MONS_GREY_DRACONIAN,
2876     MONS_PALE_DRACONIAN,
2877     MONS_LAST_BASE_DRACONIAN = MONS_PALE_DRACONIAN,
2878
2879     // Sync up with mon-place.cc's draconian selection if adding more.
2880     MONS_DRACONIAN_CALLER,
2881     MONS_FIRST_NONBASE_DRACONIAN = MONS_DRACONIAN_CALLER,
2882     MONS_DRACONIAN_MONK,
2883     MONS_DRACONIAN_ZEALOT,
2884     MONS_DRACONIAN_SHIFTER,
2885     MONS_DRACONIAN_ANNIHILATOR,
2886     MONS_DRACONIAN_KNIGHT,
2887     MONS_DRACONIAN_SCORCHER,
2888
2889     MONS_LAST_DRACONIAN = MONS_DRACONIAN_SCORCHER,
2890     MONS_LAST_NONBASE_DRACONIAN = MONS_DRACONIAN_SCORCHER,
2891
2892     // Lava monsters:
2893 #if TAG_MAJOR_VERSION == 34
2894     MONS_LAVA_WORM,
2895     MONS_LAVA_FISH,
2896 #endif
2897     MONS_LAVA_SNAKE,
2898     MONS_SALAMANDER,
2899 #if TAG_MAJOR_VERSION > 34
2900     MONS_SALAMANDER_FIREBRAND,
2901     MONS_SALAMANDER_MYSTIC,
2902     MONS_SALAMANDER_STORMCALLER,
2903 #endif
2904
2905     // Water monsters:
2906 #if TAG_MAJOR_VERSION == 34
2907     MONS_BIG_FISH,
2908     MONS_GIANT_GOLDFISH,
2909 #endif
2910     MONS_ELECTRIC_EEL,
2911 #if TAG_MAJOR_VERSION == 34
2912     MONS_JELLYFISH,
2913 #endif
2914     MONS_WATER_ELEMENTAL,
2915     MONS_SWAMP_WORM,
2916 #if TAG_MAJOR_VERSION == 34
2917     MONS_SHARK,
2918 #endif
2919     MONS_KRAKEN,
2920     MONS_KRAKEN_TENTACLE,
2921     MONS_KRAKEN_TENTACLE_SEGMENT,
2922
2923     // Statuary
2924     MONS_ORANGE_STATUE,
2925     MONS_OBSIDIAN_STATUE,
2926     MONS_ICE_STATUE,
2927     MONS_STATUE,
2928     MONS_TRAINING_DUMMY,
2929     MONS_LIGHTNING_SPIRE,
2930 #if TAG_MAJOR_VERSION > 34
2931     MONS_DIAMOND_OBELISK,
2932 #endif
2933
2934     // Demons:
2935     MONS_CRIMSON_IMP,
2936     MONS_QUASIT,
2937     MONS_WHITE_IMP,
2938 #if TAG_MAJOR_VERSION == 34
2939     MONS_LEMURE,
2940 #endif
2941     MONS_UFETUBUS,
2942     MONS_IRON_IMP,
2943     MONS_SHADOW_IMP,
2944     MONS_RED_DEVIL,
2945 #if TAG_MAJOR_VERSION == 34
2946     MONS_ROTTING_DEVIL,
2947 #endif
2948     MONS_HELLWING,
2949     MONS_SIXFIRHY,
2950     MONS_NEQOXEC,
2951     MONS_ORANGE_DEMON,
2952     MONS_SMOKE_DEMON,
2953     MONS_YNOXINUL,
2954     MONS_CHAOS_SPAWN,
2955     MONS_HELLION,
2956     MONS_LOROCYPROCA,
2957     MONS_TORMENTOR,
2958     MONS_REAPER,
2959     MONS_SOUL_EATER,
2960     MONS_ICE_DEVIL,
2961     MONS_BLUE_DEVIL,
2962     MONS_HELL_BEAST,
2963     MONS_RUST_DEVIL,
2964     MONS_EXECUTIONER,
2965     MONS_GREEN_DEATH,
2966     MONS_BLIZZARD_DEMON,
2967     MONS_BALRUG,
2968     MONS_CACODEMON,
2969     MONS_SUN_DEMON,
2970     MONS_SHADOW_DEMON,
2971     MONS_HELL_SENTINEL,
2972     MONS_BRIMSTONE_FIEND,
2973     MONS_ICE_FIEND,
2974     MONS_SHADOW_FIEND,
2975     MONS_PANDEMONIUM_LORD,
2976
2977     // Spiritual beings ('R')
2978     MONS_EFREET,
2979     MONS_RAKSHASA,
2980 #if TAG_MAJOR_VERSION == 34
2981     MONS_RAKSHASA_FAKE,
2982 #endif
2983 #if TAG_MAJOR_VERSION > 34
2984     MONS_DRYAD,
2985     MONS_SNAPLASHER_VINE,
2986     MONS_SNAPLASHER_VINE_SEGMENT,
2987 #endif
2988
2989     // Abyssals
2990     MONS_UNSEEN_HORROR,
2991     MONS_TENTACLED_STARSPAWN,
2992     MONS_LURKING_HORROR,
2993     MONS_THRASHING_HORROR,
2994     MONS_STARCURSED_MASS,
2995     MONS_ANCIENT_ZYME,
2996     MONS_WRETCHED_STAR,
2997 #if TAG_MAJOR_VERSION > 34
2998     MONS_APOCALYPSE_CRAB,
2999     MONS_STARSPAWN_TENTACLE,
3000     MONS_STARSPAWN_TENTACLE_SEGMENT,
3001     MONS_SPATIAL_MAELSTROM,
3002     MONS_WORLDBINDER,
3003     MONS_ENTROPY_WEAVER, // not sure where else to put it
3004 #endif
3005     MONS_ELDRITCH_TENTACLE,
3006     MONS_ELDRITCH_TENTACLE_SEGMENT,
3007     MONS_TENTACLED_MONSTROSITY,
3008     MONS_ABOMINATION_SMALL,
3009     MONS_ABOMINATION_LARGE,
3010     MONS_CRAWLING_CORPSE,
3011     MONS_MACABRE_MASS,
3012
3013     // Undead:
3014 #if TAG_MAJOR_VERSION > 34
3015     MONS_ZOMBIE,
3016     MONS_SKELETON,
3017     MONS_SIMULACRUM,
3018 #endif
3019 #if TAG_MAJOR_VERSION == 34
3020     MONS_PLAGUE_SHAMBLER,
3021 #endif
3022     MONS_NECROPHAGE,
3023     MONS_GHOUL,
3024 #if TAG_MAJOR_VERSION == 34
3025     MONS_FLAMING_CORPSE,
3026 #endif
3027     MONS_MUMMY,
3028     MONS_BOG_BODY,
3029     MONS_GUARDIAN_MUMMY,
3030     MONS_GREATER_MUMMY,
3031     MONS_MUMMY_PRIEST,
3032     MONS_VAMPIRE,
3033     MONS_VAMPIRE_KNIGHT,
3034     MONS_VAMPIRE_MAGE,
3035     MONS_GHOST,                 // common genus for monster and player ghosts
3036     MONS_PHANTOM,
3037     MONS_SHADOW,
3038     MONS_HUNGRY_GHOST,
3039     MONS_FLAYED_GHOST,
3040     MONS_WIGHT,
3041     MONS_WRAITH,
3042     MONS_FREEZING_WRAITH,
3043     MONS_SHADOW_WRAITH,
3044     MONS_SILENT_SPECTRE,
3045     MONS_EIDOLON,
3046     MONS_FLYING_SKULL,
3047     MONS_SKELETAL_WARRIOR,
3048     MONS_PHANTASMAL_WARRIOR,
3049     MONS_LICH,
3050     MONS_ANCIENT_LICH,
3051     MONS_DEATH_COB,
3052     MONS_CURSE_TOE,
3053     MONS_CURSE_SKULL,
3054     MONS_PROFANE_SERVITOR,
3055 #if TAG_MAJOR_VERSION > 34
3056     MONS_ANCIENT_CHAMPION,
3057     MONS_REVENANT,
3058     MONS_LOST_SOUL,
3059     MONS_JIANGSHI,
3060 #endif
3061     MONS_SKELETON_SMALL,   // recolouring only
3062     MONS_SKELETON_LARGE,   // recolouring only
3063     MONS_ZOMBIE_SMALL,     // recolouring only
3064     MONS_ZOMBIE_LARGE,     // recolouring only
3065     MONS_SPECTRAL_THING,
3066     MONS_SIMULACRUM_SMALL, // recolouring only
3067     MONS_SIMULACRUM_LARGE, // recolouring only
3068
3069     // Holies:
3070     MONS_ANGEL,
3071     MONS_DAEVA,
3072     MONS_CHERUB,
3073     MONS_SERAPH,
3074 #if TAG_MAJOR_VERSION == 34
3075     MONS_PHOENIX,
3076     MONS_SILVER_STAR,
3077     MONS_BLESSED_TOE,
3078     MONS_SHEDU,
3079 #endif
3080     MONS_OPHAN,
3081 #if TAG_MAJOR_VERSION == 34
3082     MONS_SPIRIT,
3083     MONS_PALADIN,
3084 #endif
3085     MONS_APIS,
3086
3087     // Fixed uniques:
3088     MONS_GERYON,
3089     MONS_DISPATER,
3090     MONS_ASMODEUS,
3091     MONS_ANTAEUS,
3092     MONS_ERESHKIGAL,
3093     MONS_ROYAL_JELLY,
3094     MONS_THE_ENCHANTRESS,
3095     // the four Pan lords, order must match runes
3096     MONS_MNOLEG,
3097     MONS_LOM_LOBON,
3098     MONS_CEREBOV,
3099     MONS_GLOORX_VLOQ,
3100     MONS_SERPENT_OF_HELL,
3101 #if TAG_MAJOR_VERSION > 34
3102     MONS_SERPENT_OF_HELL_COCYTUS,
3103     MONS_SERPENT_OF_HELL_DIS,
3104     MONS_SERPENT_OF_HELL_TARTARUS,
3105 #endif
3106     // Random uniques:
3107     MONS_IJYB,
3108     MONS_JESSICA,
3109     MONS_SIGMUND,
3110     MONS_TERENCE,
3111     MONS_BLORK_THE_ORC,
3112     MONS_EDMUND,
3113     MONS_PSYCHE,
3114     MONS_EROLCHA,
3115     MONS_DONALD,
3116     MONS_URUG,
3117     MONS_JOSEPH,
3118     MONS_SNORG, // was Anita - 16jan2000 {dlb}
3119     MONS_ERICA,
3120     MONS_JOSEPHINE,
3121     MONS_HAROLD,
3122     MONS_AGNES,
3123     MONS_MAUD,
3124     MONS_LOUISE,
3125     MONS_FRANCES,
3126     MONS_RUPERT,
3127     MONS_WIGLAF,
3128     MONS_XTAHUA,
3129     MONS_NORRIS,
3130     MONS_FREDERICK,
3131     MONS_MARGERY,
3132     MONS_BORIS,
3133     MONS_POLYPHEMUS,
3134     MONS_MURRAY,
3135     MONS_TIAMAT,
3136     MONS_ROXANNE,
3137     MONS_SONJA,
3138     MONS_EUSTACHIO,
3139     MONS_AZRAEL,
3140     MONS_ILSUIW,
3141     MONS_PRINCE_RIBBIT,
3142     MONS_NERGALLE,
3143     MONS_SAINT_ROKA,
3144     MONS_NESSOS,
3145     MONS_LERNAEAN_HYDRA,
3146     MONS_DISSOLUTION,
3147     MONS_KIRKE,
3148     MONS_GRUM,
3149     MONS_PURGY,
3150     MONS_MENKAURE,
3151     MONS_DUVESSA,
3152     MONS_DOWAN,
3153     MONS_GASTRONOK,
3154     MONS_MAURICE,
3155     MONS_KHUFU,
3156     MONS_NIKOLA,
3157     MONS_AIZUL,
3158     MONS_PIKEL,
3159     MONS_CRAZY_YIUF,
3160     MONS_MENNAS,
3161     MONS_MARA,
3162 #if TAG_MAJOR_VERSION == 34
3163     MONS_MARA_FAKE,
3164 #endif
3165     MONS_GRINDER,
3166     MONS_JORY,
3167     MONS_IGNACIO,
3168     MONS_ARACHNE,
3169 #if TAG_MAJOR_VERSION > 34
3170     MONS_HELLBINDER,
3171     MONS_CLOUD_MAGE,
3172     MONS_FANNAR,
3173     MONS_JORGRUN,
3174     MONS_SOJOBO,
3175     MONS_ASTERION,
3176     MONS_NATASHA,
3177     MONS_VASHNIA,
3178     MONS_ROBIN,
3179     MONS_MOON_TROLL,
3180 #endif
3181     // Sprint uniques:
3182     MONS_CHUCK,
3183     MONS_IRON_GIANT,
3184     MONS_NELLIE,
3185 #if TAG_MAJOR_VERSION == 34
3186     MONS_IRON_ELEMENTAL,
3187 #endif
3188
3189     // Specials:
3190     MONS_PLAYER_ILLUSION,
3191     MONS_PLAYER_GHOST,
3192     MONS_BALL_LIGHTNING,
3193     MONS_ORB_OF_DESTRUCTION,    // a projectile, not a real mon
3194 #if TAG_MAJOR_VERSION > 34
3195     MONS_FULMINANT_PRISM,
3196     MONS_SINGULARITY,
3197     MONS_BATTLESPHERE,
3198 #endif
3199     MONS_PILLAR_OF_SALT,
3200 #if TAG_MAJOR_VERSION > 34
3201     MONS_BLOCK_OF_ICE,
3202 #endif
3203     MONS_HELL_LORD,             // genus
3204     MONS_MERGED_SLIME_CREATURE, // used only for recolouring
3205     MONS_SENSED,                // dummy monster for unspecified sensed mons
3206     MONS_SENSED_TRIVIAL,
3207     MONS_SENSED_EASY,
3208     MONS_SENSED_TOUGH,
3209     MONS_SENSED_NASTY,
3210     MONS_SENSED_FRIENDLY,
3211     MONS_PLAYER,                // a certain ugly creature
3212 #if TAG_MAJOR_VERSION > 34
3213     MONS_PLAYER_SHADOW,         // Dithmenos
3214 #endif
3215     MONS_TEST_SPAWNER,
3216
3217     // Add new monsters here:
3218 #if TAG_MAJOR_VERSION == 34
3219     MONS_SERPENT_OF_HELL_COCYTUS,
3220     MONS_SERPENT_OF_HELL_DIS,
3221     MONS_SERPENT_OF_HELL_TARTARUS,
3222
3223     MONS_HELLBINDER,
3224     MONS_CLOUD_MAGE,
3225     MONS_ANIMATED_TREE,
3226
3227     MONS_BEAR,                  // genus
3228     MONS_ELEMENTAL,             // genus
3229
3230     MONS_FANNAR,
3231     MONS_APOCALYPSE_CRAB,
3232     MONS_STARSPAWN_TENTACLE,
3233     MONS_STARSPAWN_TENTACLE_SEGMENT,
3234
3235     MONS_SPATIAL_MAELSTROM,
3236     MONS_CHAOS_BUTTERFLY,
3237
3238     MONS_JORGRUN,
3239     MONS_LAMIA,
3240
3241     MONS_FULMINANT_PRISM,
3242     MONS_BATTLESPHERE,
3243
3244     MONS_GIANT_LIZARD,          // genus
3245     MONS_DRAKE,                 // genus
3246     MONS_PLAYER_SHADOW,         // Dithmenos
3247
3248     MONS_DEEP_TROLL_EARTH_MAGE,
3249     MONS_DEEP_TROLL_SHAMAN,
3250     MONS_DIAMOND_OBELISK,
3251
3252     MONS_VAULT_SENTINEL,
3253     MONS_VAULT_WARDEN,
3254     MONS_IRONBRAND_CONVOKER,
3255     MONS_IRONHEART_PRESERVER,
3256
3257     MONS_ZOMBIE,
3258     MONS_SKELETON,
3259     MONS_SIMULACRUM,
3260
3261     MONS_ANCIENT_CHAMPION,
3262     MONS_REVENANT,
3263     MONS_LOST_SOUL,
3264     MONS_JIANGSHI,
3265
3266     MONS_DJINNI,
3267     MONS_LAVA_ORC,
3268
3269     MONS_DRYAD,
3270     MONS_WIND_DRAKE,
3271     MONS_FAUN,
3272     MONS_SATYR,
3273
3274     MONS_PAN,
3275
3276     MONS_TENGU_WARRIOR,
3277     MONS_TENGU_CONJURER,
3278     MONS_TENGU_REAVER,
3279
3280     MONS_SPRIGGAN_ENCHANTER,
3281
3282     MONS_SOJOBO,
3283
3284     MONS_CHIMERA,
3285
3286     MONS_SNAPLASHER_VINE,
3287     MONS_SNAPLASHER_VINE_SEGMENT,
3288     MONS_THORN_HUNTER,
3289     MONS_BRIAR_PATCH,
3290     MONS_SPIRIT_WOLF,
3291     MONS_ANCIENT_BEAR,
3292     MONS_WATER_NYMPH,
3293     MONS_SHAMBLING_MANGROVE,
3294     MONS_THORN_LOTUS,
3295     MONS_SPECTRAL_WEAPON,
3296     MONS_ELEMENTAL_WELLSPRING,
3297     MONS_POLYMOTH,
3298
3299     MONS_DEATHCAP,
3300     MONS_IGNIS,
3301
3302     MONS_FORMICID,
3303     MONS_FORMICID_DRONE,
3304     MONS_FORMICID_VENOM_MAGE,
3305
3306     MONS_RAIJU,
3307
3308     MONS_DRAGON,                // genus
3309     MONS_SNAKE,                 // genus
3310
3311     MONS_MONSTROUS_DEMONSPAWN,
3312     MONS_FIRST_DEMONSPAWN = MONS_MONSTROUS_DEMONSPAWN,
3313     MONS_FIRST_BASE_DEMONSPAWN = MONS_MONSTROUS_DEMONSPAWN,
3314     MONS_GELID_DEMONSPAWN,
3315     MONS_INFERNAL_DEMONSPAWN,
3316     MONS_PUTRID_DEMONSPAWN,
3317     MONS_TORTUROUS_DEMONSPAWN,
3318     MONS_LAST_BASE_DEMONSPAWN = MONS_TORTUROUS_DEMONSPAWN,
3319     MONS_BLOOD_SAINT,
3320     MONS_FIRST_NONBASE_DEMONSPAWN = MONS_BLOOD_SAINT,
3321     MONS_CHAOS_CHAMPION,
3322     MONS_WARMONGER,
3323     MONS_CORRUPTER,
3324     MONS_BLACK_SUN,
3325     MONS_LAST_NONBASE_DEMONSPAWN = MONS_BLACK_SUN,
3326     MONS_LAST_DEMONSPAWN = MONS_BLACK_SUN,
3327
3328     MONS_WORLDBINDER,
3329     MONS_GRAND_AVATAR,
3330     MONS_VINE_STALKER,
3331
3332     MONS_DROWNED_SOUL,
3333
3334     MONS_SHOCK_SERPENT,
3335     MONS_MANA_VIPER,
3336     MONS_NAGA_RITUALIST,
3337     MONS_NAGA_SHARPSHOOTER,
3338
3339     MONS_SALAMANDER_FIREBRAND,
3340     MONS_SALAMANDER_MYSTIC,
3341
3342     MONS_ASTERION,
3343     MONS_NATASHA,
3344     MONS_VASHNIA,
3345
3346     MONS_BLOCK_OF_ICE,
3347     MONS_GUARDIAN_GOLEM,
3348     MONS_SPELLFORGED_SERVITOR,
3349     MONS_OCTOPODE_CRUSHER,
3350     MONS_CRAB,
3351     MONS_GHOST_CRAB,
3352     MONS_TORPOR_SNAIL,
3353     MONS_MNOLEG_TENTACLE,
3354     MONS_MNOLEG_TENTACLE_SEGMENT,
3355     MONS_BENNU,
3356     MONS_USHABTI,
3357     MONS_DEATH_SCARAB,
3358     MONS_ANUBIS_GUARD,
3359     MONS_CAUSTIC_SHRIKE,
3360
3361     MONS_ROBIN,
3362
3363     MONS_SHARD_SHRIKE,
3364     MONS_SINGULARITY,
3365     MONS_SALAMANDER_STORMCALLER,
3366     MONS_ENTROPY_WEAVER,
3367     MONS_MOON_TROLL,
3368 #endif
3369
3370     NUM_MONSTERS,               // used for polymorph
3371
3372     // MONS_NO_MONSTER can get put in savefiles, so it shouldn't change
3373     // when NUM_MONSTERS increases.
3374     MONS_NO_MONSTER = 1000,
3375
3376     RANDOM_MONSTER = 2000, // used to distinguish between a random monster and using program bugs for error trapping {dlb}
3377     RANDOM_TOUGHER_MONSTER, // used for poly upgrading monsters.
3378     RANDOM_MOBILE_MONSTER, // used for monster generation (shadow creatures)
3379     RANDOM_COMPATIBLE_MONSTER, // used for player shadow creatures (prevents repulsing summons)
3380     RANDOM_BANDLESS_MONSTER,
3381
3382     // A random draconian, either base coloured drac or specialised.
3383     RANDOM_DRACONIAN,
3384     // Any random base draconian colour.
3385     RANDOM_BASE_DRACONIAN,
3386     // Any random specialised draconian, such as a draconian knight.
3387     RANDOM_NONBASE_DRACONIAN,
3388
3389     RANDOM_DEMON_LESSER,               //    0: Class V
3390     RANDOM_DEMON_COMMON,               //    1: Class II-IV
3391     RANDOM_DEMON_GREATER,              //    2: Class I
3392     RANDOM_DEMON,                      //    any of the above
3393
3394     RANDOM_MODERATE_OOD, // +5 depth, AKA '9' glyph on maps
3395     RANDOM_SUPER_OOD, // *2 + 4 depth, AKA '8'
3396
3397     RANDOM_DEMONSPAWN,
3398     RANDOM_BASE_DEMONSPAWN,
3399     RANDOM_NONBASE_DEMONSPAWN,
3400
3401     WANDERING_MONSTER = 3500, // only used in monster placement routines - forced limit checks {dlb}
3402 };
3403
3404 enum beh_type
3405 {
3406     BEH_SLEEP,
3407     BEH_WANDER,
3408     BEH_SEEK,
3409     BEH_FLEE,
3410     BEH_CORNERED,                      //  wanting to flee, but blocked by an
3411                                        //  obstacle or monster
3412 #if TAG_MAJOR_VERSION == 34
3413     BEH_PANIC,                         //  like flee but without running away
3414 #endif
3415     BEH_LURK,                          //  stay still until discovered or
3416                                        //  enemy close by
3417     BEH_RETREAT,                       //  like flee but when cannot attack
3418     BEH_WITHDRAW,                      //  an ally given a command to withdraw
3419                                        //  (will not respond to attacks)
3420     NUM_BEHAVIOURS,                    //  max # of legal states
3421     BEH_CHARMED,                       //  hostile-but-charmed; creation only
3422     BEH_FRIENDLY,                      //  used during creation only
3423     BEH_GOOD_NEUTRAL,                  //  creation only
3424     BEH_STRICT_NEUTRAL,
3425     BEH_NEUTRAL,                       //  creation only
3426     BEH_HOSTILE,                       //  creation only
3427     BEH_GUARD,                         //  creation only - monster is guard
3428     BEH_COPY,                          //  creation only - copy from summoner
3429 };
3430
3431 enum mon_attitude_type
3432 {
3433     ATT_HOSTILE,                       // 0, default in most cases
3434     ATT_NEUTRAL,                       // neutral
3435     ATT_STRICT_NEUTRAL,                // neutral, won't attack player. Used by Jiyva.
3436     ATT_GOOD_NEUTRAL,                  // neutral, but won't attack friendlies
3437     ATT_FRIENDLY,                      // created friendly (or tamed?)
3438 };
3439
3440 // Adding slots breaks saves. YHBW.
3441 enum mon_inv_type           // menv[].inv[]
3442 {
3443     MSLOT_WEAPON,           // Primary weapon (melee)
3444     MSLOT_ALT_WEAPON,       // Alternate weapon, ranged or second melee weapon
3445                             // for monsters that can use two weapons.
3446     MSLOT_MISSILE,
3447     MSLOT_ALT_MISSILE,
3448     MSLOT_ARMOUR,
3449     MSLOT_SHIELD,
3450     MSLOT_WAND,
3451     MSLOT_JEWELLERY,
3452     MSLOT_MISCELLANY,
3453
3454     // [ds] Last monster gear slot that the player can observe by examining
3455     // the monster; i.e. the last slot that goes into monster_info.
3456     MSLOT_LAST_VISIBLE_SLOT = MSLOT_MISCELLANY,
3457
3458     MSLOT_POTION,
3459     MSLOT_SCROLL,
3460     MSLOT_GOLD,
3461     NUM_MONSTER_SLOTS
3462 };
3463
3464 enum mutation_type
3465 {
3466     // body slot facets
3467     MUT_ANTENNAE,       // head
3468     MUT_BIG_WINGS,
3469     MUT_BEAK,           // head
3470     MUT_CLAWS,          // hands
3471     MUT_FANGS,
3472     MUT_HOOVES,         // feet
3473     MUT_HORNS,          // head
3474     MUT_STINGER,
3475     MUT_TALONS,         // feet
3476     MUT_TENTACLE_SPIKE, // Octopode only.
3477
3478     // scales
3479     MUT_DISTORTION_FIELD,
3480     MUT_ICY_BLUE_SCALES,
3481     MUT_IRIDESCENT_SCALES,
3482     MUT_LARGE_BONE_PLATES,
3483     MUT_MOLTEN_SCALES,
3484     MUT_ROUGH_BLACK_SCALES,
3485     MUT_RUGGED_BROWN_SCALES,
3486     MUT_SLIMY_GREEN_SCALES,
3487     MUT_THIN_METALLIC_SCALES,
3488     MUT_THIN_SKELETAL_STRUCTURE,
3489     MUT_YELLOW_SCALES,
3490     MUT_CAMOUFLAGE,
3491
3492     MUT_ACUTE_VISION,
3493     MUT_AGILE,
3494     MUT_BERSERK,
3495     MUT_BLINK,
3496     MUT_BLURRY_VISION,
3497     MUT_BREATHE_FLAMES,
3498 #if TAG_MAJOR_VERSION == 34
3499     MUT_BREATHE_POISON,
3500 #endif
3501     MUT_CARNIVOROUS,
3502     MUT_CLARITY,
3503     MUT_CLEVER,
3504     MUT_CLUMSY,
3505 #if TAG_MAJOR_VERSION > 34
3506     MUT_COLD_BLOODED,
3507 #endif
3508     MUT_COLD_RESISTANCE,
3509 #if TAG_MAJOR_VERSION > 34
3510     MUT_COLD_VULNERABILITY,
3511 #endif
3512 #if TAG_MAJOR_VERSION == 34
3513     MUT_CONSERVE_POTIONS,
3514     MUT_CONSERVE_SCROLLS,
3515 #endif
3516     MUT_DEFORMED,
3517     MUT_DEMONIC_GUARDIAN,
3518     MUT_DETERIORATION,
3519     MUT_DOPEY,
3520     MUT_HEAT_RESISTANCE,
3521 #if TAG_MAJOR_VERSION > 34
3522     MUT_HEAT_VULNERABILITY,
3523     MUT_FLAME_CLOUD_IMMUNITY,
3524 #endif
3525     MUT_HERBIVOROUS,
3526     MUT_HURL_HELLFIRE,
3527
3528     MUT_FAST,
3529     MUT_FAST_METABOLISM,
3530 #if TAG_MAJOR_VERSION == 34
3531     MUT_FLEXIBLE_WEAK,
3532 #endif
3533     MUT_FRAIL,
3534     MUT_FOUL_STENCH,
3535     MUT_GOURMAND,
3536     MUT_HIGH_MAGIC,
3537 #if TAG_MAJOR_VERSION > 34
3538     MUT_FREEZING_CLOUD_IMMUNITY,
3539 #endif
3540     MUT_ICEMAIL,
3541     MUT_IGNITE_BLOOD,
3542     MUT_LOW_MAGIC,
3543     MUT_MAGIC_RESISTANCE,
3544     MUT_MUTATION_RESISTANCE,
3545     MUT_NEGATIVE_ENERGY_RESISTANCE,
3546     MUT_NIGHTSTALKER,
3547     MUT_PASSIVE_FREEZE,
3548     MUT_PASSIVE_MAPPING,
3549     MUT_POISON_RESISTANCE,
3550     MUT_POWERED_BY_DEATH,
3551     MUT_POWERED_BY_PAIN,
3552     MUT_REGENERATION,
3553     MUT_ROBUST,
3554 #if TAG_MAJOR_VERSION == 34
3555     MUT_SAPROVOROUS,
3556 #endif
3557     MUT_SCREAM,
3558     MUT_SHAGGY_FUR,
3559     MUT_SHOCK_RESISTANCE,
3560 #if TAG_MAJOR_VERSION > 34
3561     MUT_SHOCK_VULNERABILITY,
3562 #endif
3563     MUT_SLOW,
3564     MUT_SLOW_HEALING,
3565     MUT_SLOW_METABOLISM,
3566     MUT_SPINY,
3567     MUT_SPIT_POISON,
3568     MUT_STOCHASTIC_TORMENT_RESISTANCE,
3569     MUT_STRONG,
3570 #if TAG_MAJOR_VERSION == 34
3571     MUT_STRONG_STIFF,
3572 #endif
3573     MUT_TELEPORT,
3574     MUT_TELEPORT_CONTROL,
3575     MUT_TORMENT_RESISTANCE,
3576     MUT_TOUGH_SKIN,
3577     MUT_WEAK,
3578     MUT_WILD_MAGIC,
3579     MUT_UNBREATHING,
3580     MUT_ACIDIC_BITE,
3581     MUT_EYEBALLS,
3582 #if TAG_MAJOR_VERSION == 34
3583     MUT_FOOD_JELLY,
3584 #endif
3585     MUT_GELATINOUS_BODY,
3586     MUT_PSEUDOPODS,
3587     MUT_TRANSLUCENT_SKIN,
3588     MUT_EVOLUTION,
3589     MUT_AUGMENTATION,
3590     MUT_TENDRILS,
3591     MUT_JELLY_GROWTH,
3592     MUT_JELLY_MISSILE,
3593     MUT_MANA_SHIELD,
3594     MUT_MANA_REGENERATION,
3595     MUT_MANA_LINK,
3596     MUT_PETRIFICATION_RESISTANCE,
3597     MUT_TRAMPLE_RESISTANCE,
3598 #if TAG_MAJOR_VERSION == 34
3599     MUT_CLING,
3600     MUT_FUMES,
3601     MUT_JUMP,
3602     MUT_EXOSKELETON,
3603 #endif
3604     MUT_ANTIMAGIC_BITE,
3605     MUT_NO_DEVICE_HEAL,
3606 #if TAG_MAJOR_VERSION == 34
3607     MUT_COLD_VULNERABILITY,
3608     MUT_HEAT_VULNERABILITY,
3609 #endif
3610     MUT_BLACK_MARK,
3611 #if TAG_MAJOR_VERSION == 34
3612     MUT_SHOCK_VULNERABILITY,
3613     MUT_COLD_BLOODED,
3614 #endif
3615     MUT_ROT_IMMUNITY,
3616 #if TAG_MAJOR_VERSION == 34
3617     MUT_FREEZING_CLOUD_IMMUNITY,
3618     MUT_FLAME_CLOUD_IMMUNITY,
3619 #else
3620     MUT_SUSTAIN_ABILITIES,
3621 #endif
3622 #if TAG_MAJOR_VERSION == 34
3623     MUT_FORLORN,
3624 #endif
3625     MUT_PLACID_MAGIC,
3626     MUT_NO_DRINK,
3627     MUT_NO_READ,
3628     MUT_MISSING_HAND,
3629     MUT_NO_STEALTH,
3630     MUT_NO_ARTIFICE,
3631     MUT_NO_LOVE,
3632     MUT_COWARDICE,
3633     MUT_NO_DODGING,
3634     MUT_NO_ARMOUR,
3635     MUT_NO_AIR_MAGIC,
3636     MUT_NO_CHARM_MAGIC,
3637     MUT_NO_CONJURATION_MAGIC,
3638     MUT_NO_EARTH_MAGIC,
3639     MUT_NO_FIRE_MAGIC,
3640     MUT_NO_HEXES_MAGIC,
3641     MUT_NO_ICE_MAGIC,
3642     MUT_NO_NECROMANCY_MAGIC,
3643     MUT_NO_POISON_MAGIC,
3644     MUT_NO_SUMMONING_MAGIC,
3645     MUT_NO_TRANSLOCATION_MAGIC,
3646     MUT_NO_TRANSMUTATION_MAGIC,
3647     MUT_PHYSICAL_VULNERABILITY,
3648     MUT_SLOW_REFLEXES,
3649     MUT_MAGICAL_VULNERABILITY,
3650     MUT_ANTI_WIZARDRY,
3651
3652 #if TAG_MAJOR_VERSION == 34
3653     MUT_SUSTAIN_ABILITIES,
3654 #endif
3655     MUT_MP_WANDS,
3656     MUT_UNSKILLED,
3657     MUT_INEXPERIENCED,
3658     MUT_PAWS,
3659     MUT_NECRO_ENHANCER,
3660     MUT_MUMMY_RESTORATION,
3661     MUT_CONSTRICTING_TAIL,
3662     MUT_TENGU_FLIGHT,
3663     NUM_MUTATIONS,
3664
3665     RANDOM_MUTATION,
3666     RANDOM_XOM_MUTATION,
3667     RANDOM_GOOD_MUTATION,
3668     RANDOM_BAD_MUTATION,
3669     RANDOM_SLIME_MUTATION,
3670     RANDOM_NON_SLIME_MUTATION,
3671     RANDOM_CORRUPT_MUTATION,
3672     RANDOM_QAZLAL_MUTATION,
3673     MUT_NON_MUTATION,
3674 };
3675
3676 enum object_class_type                 // mitm[].base_type
3677 {
3678     OBJ_WEAPONS,
3679     OBJ_MISSILES,
3680     OBJ_ARMOUR,
3681     OBJ_WANDS,
3682     OBJ_FOOD,
3683     OBJ_SCROLLS,
3684     OBJ_JEWELLERY,
3685     OBJ_POTIONS,
3686     OBJ_BOOKS,
3687     OBJ_STAVES,
3688     OBJ_ORBS,
3689     OBJ_MISCELLANY,
3690     OBJ_CORPSES,
3691     OBJ_GOLD,
3692     OBJ_RODS,
3693     NUM_OBJECT_CLASSES,
3694     OBJ_UNASSIGNED = 100,
3695     OBJ_RANDOM,      // used for blanket random sub_type .. see dungeon::items()
3696     OBJ_DETECTED,    // unknown item; item_info only
3697 };
3698
3699 enum operation_types
3700 {
3701     OPER_WIELD    = 'w',
3702     OPER_QUAFF    = 'q',
3703     OPER_DROP     = 'd',
3704     OPER_EAT      = 'e',
3705     OPER_TAKEOFF  = 'T',
3706     OPER_WEAR     = 'W',
3707     OPER_PUTON    = 'P',
3708     OPER_REMOVE   = 'R',
3709     OPER_READ     = 'r',
3710     OPER_MEMORISE = 'M',
3711     OPER_ZAP      = 'Z',
3712     OPER_FIRE     = 'f',
3713     OPER_PRAY     = 'p',
3714     OPER_EVOKE    = 'v',
3715     OPER_DESTROY  = 'D',
3716     OPER_QUIVER   = 'Q',
3717     OPER_ATTACK   = 'a',
3718     OPER_ANY      = 0,
3719 };
3720
3721 enum orb_type
3722 {
3723     ORB_ZOT,
3724 };
3725
3726 enum recite_type
3727 {
3728     RECITE_HERETIC,
3729     RECITE_CHAOTIC,
3730     RECITE_IMPURE,
3731     RECITE_UNHOLY,
3732     NUM_RECITE_TYPES
3733 };
3734
3735 enum size_part_type
3736 {
3737     PSIZE_BODY,         // entire body size -- used for EV/size of target
3738     PSIZE_TORSO,        // torso only (hybrids -- size of parts that use equip)
3739 };
3740
3741 enum potion_type
3742 {
3743     POT_CURING,
3744     POT_HEAL_WOUNDS,
3745     POT_HASTE,
3746     POT_MIGHT,
3747     POT_BRILLIANCE,
3748     POT_AGILITY,
3749 #if TAG_MAJOR_VERSION == 34
3750     POT_GAIN_STRENGTH,
3751     POT_GAIN_DEXTERITY,
3752     POT_GAIN_INTELLIGENCE,
3753 #endif
3754     POT_FLIGHT,
3755     POT_POISON,
3756 #if TAG_MAJOR_VERSION == 34
3757     POT_SLOWING,
3758 #endif
3759     POT_CANCELLATION,
3760     POT_AMBROSIA,
3761     POT_INVISIBILITY,
3762 #if TAG_MAJOR_VERSION == 34
3763     POT_PORRIDGE,
3764 #endif
3765     POT_DEGENERATION,
3766 #if TAG_MAJOR_VERSION == 34
3767     POT_DECAY,
3768     POT_WATER,
3769 #endif
3770     POT_EXPERIENCE,
3771     POT_MAGIC,
3772     POT_RESTORE_ABILITIES,
3773 #if TAG_MAJOR_VERSION == 34
3774     POT_STRONG_POISON,
3775 #endif
3776     POT_BERSERK_RAGE,
3777     POT_CURE_MUTATION,
3778     POT_MUTATION,
3779     POT_RESISTANCE,
3780     POT_BLOOD,
3781 #if TAG_MAJOR_VERSION == 34
3782     POT_BLOOD_COAGULATED,
3783 #endif
3784     POT_LIGNIFY,
3785     POT_BENEFICIAL_MUTATION,
3786     NUM_POTIONS
3787 };
3788
3789 enum pronoun_type
3790 {
3791     PRONOUN_SUBJECTIVE,
3792     PRONOUN_POSSESSIVE,
3793     PRONOUN_REFLEXIVE,
3794     PRONOUN_OBJECTIVE,
3795     NUM_PRONOUN_CASES
3796 };
3797
3798 enum gender_type
3799 {
3800     GENDER_NEUTER,
3801     GENDER_MALE,
3802     GENDER_FEMALE,
3803     GENDER_YOU, // A person, not a gender, but close enough.
3804     NUM_GENDERS
3805 };
3806
3807 // Be sure to update artefact_prop_data[] in artefact.cc. Also,
3808 // _randart_propnames() in describe.cc, but order doesn't matter there.
3809 enum artefact_prop_type
3810 {
3811     ARTP_BRAND,
3812     ARTP_AC,
3813     ARTP_EVASION,
3814     ARTP_STRENGTH,
3815     ARTP_INTELLIGENCE,
3816     ARTP_DEXTERITY,
3817     ARTP_FIRE,
3818     ARTP_COLD,
3819     ARTP_ELECTRICITY,
3820     ARTP_POISON,
3821     ARTP_NEGATIVE_ENERGY,
3822     ARTP_MAGIC,
3823     ARTP_EYESIGHT,
3824     ARTP_INVISIBLE,
3825     ARTP_FLY,
3826 #if TAG_MAJOR_VERSION > 34
3827     ARTP_FOG,
3828 #endif
3829     ARTP_BLINK,
3830     ARTP_BERSERK,
3831     ARTP_NOISES,
3832     ARTP_PREVENT_SPELLCASTING,
3833     ARTP_CAUSE_TELEPORTATION,
3834     ARTP_PREVENT_TELEPORTATION,
3835     ARTP_ANGRY,
3836 #if TAG_MAJOR_VERSION == 34
3837     ARTP_METABOLISM,
3838 #endif
3839     ARTP_MUTAGENIC,
3840 #if TAG_MAJOR_VERSION == 34
3841     ARTP_ACCURACY,
3842 #endif
3843     ARTP_SLAYING,
3844     ARTP_CURSED,
3845     ARTP_STEALTH,
3846     ARTP_MAGICAL_POWER,
3847     ARTP_BASE_DELAY,
3848     ARTP_HP,
3849     ARTP_CLARITY,
3850     ARTP_BASE_ACC,
3851     ARTP_BASE_DAM,
3852     ARTP_RMSL,
3853 #if TAG_MAJOR_VERSION == 34
3854     ARTP_FOG,
3855 #endif
3856     ARTP_REGENERATION,
3857     ARTP_SUSTAB,
3858     ARTP_NO_UPGRADE,
3859     ARTP_RCORR,
3860     ARTP_RMUT,
3861     ARTP_TWISTER,
3862     ARTP_NUM_PROPERTIES
3863 };
3864
3865 enum score_format_type
3866 {
3867     SCORE_TERSE,                // one line
3868     SCORE_REGULAR,              // two lines (name, cause, blank)
3869     SCORE_VERBOSE,              // everything (dates, times, god, etc.)
3870 };
3871
3872 enum sense_type
3873 {
3874     SENSE_SMELL_BLOOD,
3875     SENSE_WEB_VIBRATION,
3876 };
3877
3878 enum shop_type
3879 {
3880     SHOP_WEAPON,
3881     SHOP_ARMOUR,
3882     SHOP_WEAPON_ANTIQUE,
3883     SHOP_ARMOUR_ANTIQUE,
3884     SHOP_GENERAL_ANTIQUE,
3885     SHOP_JEWELLERY,
3886     SHOP_EVOKABLES, // wands, rods, and misc items
3887     SHOP_BOOK,
3888     SHOP_FOOD,
3889     SHOP_DISTILLERY,
3890     SHOP_SCROLL,
3891     SHOP_GENERAL,
3892     NUM_SHOPS, // must remain last 'regular' member {dlb}
3893     SHOP_UNASSIGNED = 100,
3894     SHOP_RANDOM,
3895 };
3896
3897 // These are often addressed relative to each other (esp. delta SIZE_MEDIUM).
3898 enum size_type
3899 {
3900     SIZE_TINY,              // rats/bats
3901     SIZE_LITTLE,            // spriggans
3902     SIZE_SMALL,             // halflings/kobolds
3903     SIZE_MEDIUM,            // humans/elves/dwarves
3904     SIZE_LARGE,             // trolls/ogres/centaurs/nagas
3905     SIZE_BIG,               // large quadrupeds
3906     SIZE_GIANT,             // giants
3907     NUM_SIZE_LEVELS,
3908     SIZE_CHARACTER,         // transformations that don't change size
3909 };
3910
3911 // [dshaligram] If you add a new skill, update skills.cc, specifically
3912 // the skills[] array and skill_display_order[]. New skills must go at the
3913 // end of the list or in the unused skill numbers. NEVER rearrange this enum or
3914 // move existing skills to new numbers; save file compatibility depends on this
3915 // order.
3916 enum skill_type
3917 {
3918     SK_FIGHTING,
3919     SK_FIRST_SKILL = SK_FIGHTING,
3920     SK_SHORT_BLADES,
3921     SK_LONG_BLADES,
3922     SK_AXES,
3923     SK_MACES_FLAILS,
3924     SK_POLEARMS,
3925     SK_STAVES,
3926     SK_SLINGS,
3927     SK_BOWS,
3928     SK_CROSSBOWS,
3929     SK_THROWING,
3930     SK_ARMOUR,
3931     SK_DODGING,
3932     SK_STEALTH,
3933 #if TAG_MAJOR_VERSION == 34
3934     SK_STABBING,
3935 #endif
3936     SK_SHIELDS,
3937 #if TAG_MAJOR_VERSION == 34
3938     SK_TRAPS,
3939 #endif
3940     SK_UNARMED_COMBAT,
3941     SK_LAST_MUNDANE = SK_UNARMED_COMBAT,
3942     SK_SPELLCASTING,
3943     SK_CONJURATIONS,
3944     SK_FIRST_MAGIC_SCHOOL = SK_CONJURATIONS, // not SK_FIRST_MAGIC as no Spc
3945     SK_HEXES,
3946     SK_CHARMS,
3947     SK_SUMMONINGS,
3948     SK_NECROMANCY,
3949     SK_TRANSLOCATIONS,
3950     SK_TRANSMUTATIONS,
3951     SK_FIRE_MAGIC,
3952     SK_ICE_MAGIC,
3953     SK_AIR_MAGIC,
3954     SK_EARTH_MAGIC,
3955     SK_POISON_MAGIC,
3956     SK_LAST_MAGIC = SK_POISON_MAGIC,
3957     SK_INVOCATIONS,
3958     SK_EVOCATIONS,
3959     SK_LAST_SKILL = SK_EVOCATIONS,
3960     NUM_SKILLS,                        // must remain last regular member
3961
3962     SK_BLANK_LINE,                     // used for skill output
3963     SK_COLUMN_BREAK,                   // used for skill output
3964     SK_TITLE,                          // used for skill output
3965     SK_NONE,
3966 };
3967
3968 enum skill_menu_state
3969 {
3970     SKM_NONE,
3971     SKM_DO_FOCUS,
3972     SKM_DO_PRACTISE,
3973     SKM_LEVEL_ENHANCED,
3974     SKM_LEVEL_NORMAL,
3975     SKM_MODE_AUTO,
3976     SKM_MODE_MANUAL,
3977     SKM_SHOW_DEFAULT,
3978     SKM_SHOW_ALL,
3979     SKM_VIEW_NEW_LEVEL,
3980     SKM_VIEW_POINTS,
3981     SKM_VIEW_PROGRESS,
3982     SKM_VIEW_TRAINING,
3983     SKM_VIEW_TRANSFER,
3984 };
3985
3986 enum skill_focus_mode
3987 {
3988     SKM_FOCUS_OFF,
3989     SKM_FOCUS_ON,
3990     SKM_FOCUS_TOGGLE,
3991 };
3992
3993 enum species_type
3994 {
3995     SP_HUMAN,
3996     SP_HIGH_ELF,
3997     SP_DEEP_ELF,
3998 #if TAG_MAJOR_VERSION == 34
3999     SP_SLUDGE_ELF,
4000 #endif
4001     SP_HALFLING,
4002     SP_HILL_ORC,
4003     SP_KOBOLD,
4004     SP_MUMMY,
4005     SP_NAGA,
4006     SP_OGRE,
4007     SP_TROLL,
4008
4009     SP_RED_DRACONIAN,
4010       SP_FIRST_NONBASE_DRACONIAN = SP_RED_DRACONIAN,
4011     SP_WHITE_DRACONIAN,
4012     SP_GREEN_DRACONIAN,
4013     SP_YELLOW_DRACONIAN,
4014     SP_GREY_DRACONIAN,
4015     SP_BLACK_DRACONIAN,
4016     SP_PURPLE_DRACONIAN,
4017     SP_MOTTLED_DRACONIAN,
4018     SP_PALE_DRACONIAN,
4019       SP_LAST_NONBASE_DRACONIAN = SP_PALE_DRACONIAN,
4020     SP_BASE_DRACONIAN,
4021     SP_CENTAUR,
4022     SP_DEMIGOD,
4023     SP_SPRIGGAN,
4024     SP_MINOTAUR,
4025     SP_DEMONSPAWN,
4026     SP_GHOUL,
4027     SP_TENGU,
4028     SP_MERFOLK,
4029     SP_VAMPIRE,
4030     SP_DEEP_DWARF,
4031     SP_FELID,
4032     SP_OCTOPODE,
4033 #if TAG_MAJOR_VERSION == 34
4034     SP_DJINNI,
4035     SP_LAVA_ORC,
4036 #endif
4037     SP_GARGOYLE,
4038     SP_FORMICID,
4039     SP_VINE_STALKER,
4040     NUM_SPECIES,
4041
4042     SP_UNKNOWN  = 100,
4043     SP_RANDOM   = 101,
4044     SP_VIABLE   = 102,
4045 };
4046
4047 enum spell_type
4048 {
4049     SPELL_NO_SPELL,
4050     SPELL_TELEPORT_SELF,
4051     SPELL_CAUSE_FEAR,
4052     SPELL_MAGIC_DART,
4053     SPELL_FIREBALL,
4054     SPELL_APPORTATION,
4055     SPELL_DELAYED_FIREBALL,
4056 #if TAG_MAJOR_VERSION == 34
4057     SPELL_STRIKING,
4058 #endif
4059     SPELL_CONJURE_FLAME,
4060     SPELL_DIG,
4061     SPELL_BOLT_OF_FIRE,
4062     SPELL_BOLT_OF_COLD,
4063     SPELL_LIGHTNING_BOLT,
4064     SPELL_BOLT_OF_MAGMA,
4065     SPELL_POLYMORPH,
4066     SPELL_SLOW,
4067     SPELL_HASTE,
4068     SPELL_PARALYSE,
4069     SPELL_CONFUSE,
4070     SPELL_INVISIBILITY,
4071     SPELL_THROW_FLAME,
4072     SPELL_THROW_FROST,
4073     SPELL_CONTROLLED_BLINK,
4074     SPELL_FREEZING_CLOUD,
4075     SPELL_MEPHITIC_CLOUD,
4076     SPELL_RING_OF_FLAMES,
4077     SPELL_VENOM_BOLT,
4078     SPELL_OLGREBS_TOXIC_RADIANCE,
4079     SPELL_TELEPORT_OTHER,
4080     SPELL_MINOR_HEALING,
4081     SPELL_MAJOR_HEALING,
4082     SPELL_DEATHS_DOOR,
4083     SPELL_MASS_CONFUSION,
4084     SPELL_SMITING,
4085     SPELL_SUMMON_SMALL_MAMMAL,
4086     SPELL_ABJURATION,
4087 #if TAG_MAJOR_VERSION == 34
4088     SPELL_SUMMON_SCORPIONS,
4089 #endif
4090     SPELL_BOLT_OF_DRAINING,
4091     SPELL_LEHUDIBS_CRYSTAL_SPEAR,
4092     SPELL_BOLT_OF_INACCURACY,
4093     SPELL_POISONOUS_CLOUD,
4094     SPELL_FIRE_STORM,
4095     SPELL_BLINK,
4096     SPELL_ISKENDERUNS_MYSTIC_BLAST,
4097     SPELL_SUMMON_SWARM,
4098     SPELL_SUMMON_HORRIBLE_THINGS,
4099     SPELL_ENSLAVEMENT,
4100     SPELL_ANIMATE_DEAD,
4101     SPELL_PAIN,
4102     SPELL_CONTROL_UNDEAD,
4103     SPELL_ANIMATE_SKELETON,
4104     SPELL_VAMPIRIC_DRAINING,
4105     SPELL_HAUNT,
4106     SPELL_BORGNJORS_REVIVIFICATION,
4107     SPELL_FREEZE,
4108 #if TAG_MAJOR_VERSION == 34
4109     SPELL_SUMMON_ELEMENTAL,
4110 #endif
4111     SPELL_OZOCUBUS_REFRIGERATION,
4112     SPELL_STICKY_FLAME,
4113     SPELL_SUMMON_ICE_BEAST,
4114     SPELL_OZOCUBUS_ARMOUR,
4115     SPELL_CALL_IMP,
4116     SPELL_REPEL_MISSILES,
4117     SPELL_BERSERKER_RAGE,
4118     SPELL_DISPEL_UNDEAD,
4119 #if TAG_MAJOR_VERSION == 34
4120     SPELL_FULSOME_DISTILLATION,
4121 #endif
4122     SPELL_POISON_ARROW,
4123     SPELL_TWISTED_RESURRECTION,
4124     SPELL_REGENERATION,
4125     SPELL_BANISHMENT,
4126 #if TAG_MAJOR_VERSION == 34
4127     SPELL_CIGOTUVIS_DEGENERATION,
4128 #endif
4129     SPELL_STING,
4130     SPELL_SUBLIMATION_OF_BLOOD,
4131     SPELL_TUKIMAS_DANCE,
4132     SPELL_HELLFIRE,
4133     SPELL_SUMMON_DEMON,
4134 #if TAG_MAJOR_VERSION == 34
4135     SPELL_DEMONIC_HORDE,
4136 #endif
4137     SPELL_SUMMON_GREATER_DEMON,
4138     SPELL_CORPSE_ROT,
4139 #if TAG_MAJOR_VERSION == 34
4140     SPELL_FIRE_BRAND,
4141     SPELL_FREEZING_AURA,
4142     SPELL_LETHAL_INFUSION,
4143 #endif
4144     SPELL_IRON_SHOT,
4145     SPELL_STONE_ARROW,
4146     SPELL_SHOCK,
4147     SPELL_SWIFTNESS,
4148     SPELL_FLY,
4149 #if TAG_MAJOR_VERSION == 34
4150     SPELL_INSULATION,
4151 #endif
4152     SPELL_CURE_POISON,
4153     SPELL_CONTROL_TELEPORT,
4154 #if TAG_MAJOR_VERSION == 34
4155     SPELL_POISON_WEAPON,
4156 #endif
4157     SPELL_DEBUGGING_RAY,
4158     SPELL_RECALL,
4159     SPELL_AGONY,
4160     SPELL_SPIDER_FORM,
4161     SPELL_DISINTEGRATE,
4162     SPELL_BLADE_HANDS,
4163     SPELL_STATUE_FORM,
4164     SPELL_ICE_FORM,
4165     SPELL_DRAGON_FORM,
4166 #if TAG_MAJOR_VERSION > 34
4167     SPELL_HYDRA_FORM,
4168     SPELL_IRRADIATE,
4169 #endif
4170     SPELL_NECROMUTATION,
4171     SPELL_DEATH_CHANNEL,
4172     SPELL_SYMBOL_OF_TORMENT,
4173     SPELL_DEFLECT_MISSILES,
4174     SPELL_THROW_ICICLE,
4175     SPELL_GLACIATE,
4176     SPELL_AIRSTRIKE,
4177     SPELL_SHADOW_CREATURES,
4178     SPELL_CONFUSING_TOUCH,
4179 #if TAG_MAJOR_VERSION == 34
4180     SPELL_SURE_BLADE,
4181 #endif
4182     SPELL_FLAME_TONGUE,
4183     SPELL_PASSWALL,
4184     SPELL_IGNITE_POISON,
4185     SPELL_STICKS_TO_SNAKES,
4186     SPELL_CALL_CANINE_FAMILIAR,
4187     SPELL_SUMMON_DRAGON,
4188     SPELL_HIBERNATION,
4189     SPELL_ENGLACIATION,
4190 #if TAG_MAJOR_VERSION == 34
4191     SPELL_SEE_INVISIBLE,
4192 #endif
4193     SPELL_PHASE_SHIFT,
4194     SPELL_SUMMON_BUTTERFLIES,
4195     SPELL_WARP_BRAND,
4196     SPELL_SILENCE,
4197     SPELL_SHATTER,
4198     SPELL_DISPERSAL,
4199     SPELL_DISCHARGE,
4200     SPELL_CORONA,
4201     SPELL_INTOXICATE,
4202 #if TAG_MAJOR_VERSION == 34
4203     SPELL_EVAPORATE,
4204 #endif
4205     SPELL_LRD,
4206     SPELL_SANDBLAST,
4207     SPELL_CONDENSATION_SHIELD,
4208     SPELL_STONESKIN,
4209     SPELL_SIMULACRUM,
4210     SPELL_CONJURE_BALL_LIGHTNING,
4211     SPELL_CHAIN_LIGHTNING,
4212     SPELL_EXCRUCIATING_WOUNDS,
4213     SPELL_PORTAL_PROJECTILE,
4214     SPELL_MONSTROUS_MENAGERIE,
4215     SPELL_PETRIFY,
4216     SPELL_GOLUBRIAS_PASSAGE,
4217
4218     // Mostly monster-only spells after this point:
4219     SPELL_HELLFIRE_BURST,
4220 #if TAG_MAJOR_VERSION == 34
4221     SPELL_VAMPIRE_SUMMON,
4222 #endif
4223     SPELL_BRAIN_FEED,
4224 #if TAG_MAJOR_VERSION == 34
4225     SPELL_FAKE_RAKSHASA_SUMMON,
4226 #endif
4227     SPELL_STEAM_BALL,
4228     SPELL_SUMMON_UFETUBUS,
4229     SPELL_SUMMON_HELL_BEAST,
4230     SPELL_ENERGY_BOLT,
4231     SPELL_SPIT_POISON,
4232     SPELL_SUMMON_UNDEAD,
4233     SPELL_CANTRIP,
4234     SPELL_QUICKSILVER_BOLT,
4235     SPELL_METAL_SPLINTERS,
4236     SPELL_MIASMA_BREATH,
4237     SPELL_SUMMON_DRAKES,
4238     SPELL_BLINK_OTHER,
4239     SPELL_SUMMON_MUSHROOMS,
4240     SPELL_SPIT_ACID,
4241     SPELL_STICKY_FLAME_SPLASH,
4242     SPELL_FIRE_BREATH,
4243     SPELL_COLD_BREATH,
4244 #if TAG_MAJOR_VERSION == 34
4245     SPELL_DRACONIAN_BREATH,
4246 #endif
4247     SPELL_WATER_ELEMENTALS,
4248     SPELL_PORKALATOR,
4249     SPELL_CREATE_TENTACLES,
4250     SPELL_TOMB_OF_DOROKLOHE,
4251     SPELL_SUMMON_EYEBALLS,
4252     SPELL_HASTE_OTHER,
4253     SPELL_FIRE_ELEMENTALS,
4254     SPELL_EARTH_ELEMENTALS,
4255     SPELL_AIR_ELEMENTALS,
4256     SPELL_SLEEP,
4257     SPELL_BLINK_OTHER_CLOSE,
4258     SPELL_BLINK_CLOSE,
4259     SPELL_BLINK_RANGE,
4260     SPELL_BLINK_AWAY,
4261 #if TAG_MAJOR_VERSION == 34
4262     SPELL_MISLEAD,
4263 #endif
4264     SPELL_FAKE_MARA_SUMMON,
4265 #if TAG_MAJOR_VERSION == 34
4266     SPELL_SUMMON_RAKSHASA,
4267 #endif
4268     SPELL_SUMMON_ILLUSION,
4269     SPELL_PRIMAL_WAVE,
4270     SPELL_CALL_TIDE,
4271     SPELL_IOOD,
4272     SPELL_INK_CLOUD,
4273     SPELL_MIGHT,
4274 #if TAG_MAJOR_VERSION == 34
4275     SPELL_SUNRAY,
4276 #endif
4277     SPELL_AWAKEN_FOREST,
4278     SPELL_DRUIDS_CALL,
4279     SPELL_IRON_ELEMENTALS,
4280     SPELL_SUMMON_SPECTRAL_ORCS,
4281 #if TAG_MAJOR_VERSION == 34
4282     SPELL_RESURRECT,
4283     SPELL_HOLY_LIGHT,
4284     SPELL_HOLY_WORD,
4285 #endif
4286     SPELL_SUMMON_HOLIES,
4287     SPELL_HEAL_OTHER,
4288 #if TAG_MAJOR_VERSION == 34
4289     SPELL_SACRIFICE,
4290 #endif
4291     SPELL_HOLY_FLAMES,
4292     SPELL_HOLY_BREATH,
4293     SPELL_TROGS_HAND,
4294     SPELL_BROTHERS_IN_ARMS,
4295     SPELL_INJURY_MIRROR,
4296     SPELL_DRAIN_LIFE,
4297 #if TAG_MAJOR_VERSION == 34
4298     SPELL_MIASMA_CLOUD,
4299     SPELL_POISON_CLOUD,
4300     SPELL_FIRE_CLOUD,
4301     SPELL_STEAM_CLOUD,
4302 #endif
4303     SPELL_MALIGN_GATEWAY,
4304     SPELL_NOXIOUS_CLOUD,
4305     SPELL_TORNADO,
4306     SPELL_STICKY_FLAME_RANGE,
4307     SPELL_LEDAS_LIQUEFACTION,
4308 #if TAG_MAJOR_VERSION == 34
4309     SPELL_HOMUNCULUS,
4310 #endif
4311     SPELL_SUMMON_HYDRA,
4312     SPELL_DARKNESS,
4313     SPELL_MESMERISE,
4314 #if TAG_MAJOR_VERSION == 34
4315     SPELL_MELEE, // like SPELL_NO_SPELL, but doesn't cause a re-roll
4316 #endif
4317     SPELL_FIRE_SUMMON,
4318     SPELL_SHROUD_OF_GOLUBRIA,
4319     SPELL_INNER_FLAME,
4320     SPELL_PETRIFYING_CLOUD,
4321     SPELL_AURA_OF_ABJURATION,
4322     SPELL_BEASTLY_APPENDAGE,
4323 #if TAG_MAJOR_VERSION == 34
4324     SPELL_SILVER_BLAST,
4325 #endif
4326     SPELL_ENSNARE,
4327     SPELL_THUNDERBOLT,
4328     SPELL_SUMMON_MINOR_DEMON,
4329     SPELL_DISJUNCTION,
4330     SPELL_CHAOS_BREATH,
4331     SPELL_FRENZY,
4332 #if TAG_MAJOR_VERSION == 34
4333     SPELL_SUMMON_TWISTER,
4334 #endif
4335     SPELL_BATTLESPHERE,
4336     SPELL_FULMINANT_PRISM,
4337     SPELL_DAZZLING_SPRAY,
4338     SPELL_FORCE_LANCE,
4339     SPELL_MALMUTATE,
4340     SPELL_MIGHT_OTHER,
4341     SPELL_SENTINEL_MARK,
4342     SPELL_WORD_OF_RECALL,
4343     SPELL_INJURY_BOND,
4344     SPELL_GHOSTLY_FLAMES,
4345     SPELL_GHOSTLY_FIREBALL,
4346     SPELL_CALL_LOST_SOUL,
4347     SPELL_DIMENSION_ANCHOR,
4348     SPELL_BLINK_ALLIES_ENCIRCLE,
4349     SPELL_AWAKEN_VINES,
4350     SPELL_CONTROL_WINDS,
4351     SPELL_THORN_VOLLEY,
4352     SPELL_WALL_OF_BRAMBLES,
4353     SPELL_WATERSTRIKE,
4354     SPELL_HASTE_PLANTS,
4355     SPELL_WIND_BLAST,
4356     SPELL_STRIP_RESISTANCE,
4357     SPELL_INFUSION,
4358     SPELL_SONG_OF_SLAYING,
4359     SPELL_SPECTRAL_WEAPON,
4360 #if TAG_MAJOR_VERSION == 34
4361     SPELL_SONG_OF_SHIELDING,
4362 #endif
4363     SPELL_SUMMON_VERMIN,
4364     SPELL_MALIGN_OFFERING,
4365     SPELL_SEARING_RAY,
4366     SPELL_DISCORD,
4367 #if TAG_MAJOR_VERSION == 34
4368     SPELL_SHAFT_SELF,
4369 #endif
4370     SPELL_BLINKBOLT,
4371     SPELL_INVISIBILITY_OTHER,
4372     SPELL_VIRULENCE,
4373     SPELL_IGNITE_POISON_SINGLE,
4374     SPELL_ORB_OF_ELECTRICITY,
4375     SPELL_EXPLOSIVE_BOLT,
4376     SPELL_FLASH_FREEZE,
4377     SPELL_LEGENDARY_DESTRUCTION,
4378     SPELL_EPHEMERAL_INFUSION,
4379     SPELL_FORCEFUL_INVITATION,
4380     SPELL_PLANEREND,
4381     SPELL_CHAIN_OF_CHAOS,
4382     SPELL_CHAOTIC_MIRROR,
4383     SPELL_BLACK_MARK,
4384     SPELL_GRAND_AVATAR,
4385     SPELL_SAP_MAGIC,
4386     SPELL_CORRUPT_BODY,
4387 #if TAG_MAJOR_VERSION == 34
4388     SPELL_REARRANGE_PIECES,
4389 #endif
4390     SPELL_MAJOR_DESTRUCTION,
4391     SPELL_BLINK_ALLIES_AWAY,
4392     SPELL_SHADOW_SHARD,
4393     SPELL_SHADOW_BOLT,
4394     SPELL_CRYSTAL_BOLT,
4395     SPELL_SUMMON_FOREST,
4396     SPELL_SUMMON_LIGHTNING_SPIRE,
4397     SPELL_SUMMON_GUARDIAN_GOLEM,
4398     SPELL_RANDOM_BOLT,
4399     SPELL_CLOUD_CONE,
4400     SPELL_WEAVE_SHADOWS,
4401     SPELL_DRAGON_CALL,
4402     SPELL_SPELLFORGED_SERVITOR,
4403 #if TAG_MAJOR_VERSION == 34
4404     SPELL_FORCEFUL_DISMISSAL,
4405 #endif
4406     SPELL_SUMMON_MANA_VIPER,
4407     SPELL_PHANTOM_MIRROR,
4408     SPELL_DRAIN_MAGIC,
4409     SPELL_CORROSIVE_BOLT,
4410     SPELL_SERPENT_OF_HELL_BREATH,
4411     SPELL_SUMMON_EMPEROR_SCORPIONS,
4412 #if TAG_MAJOR_VERSION == 34
4413     SPELL_HYDRA_FORM,
4414     SPELL_IRRADIATE,
4415 #endif
4416     SPELL_SPIT_LAVA,
4417     SPELL_ELECTRICAL_BOLT,
4418     SPELL_FLAMING_CLOUD,
4419     SPELL_THROW_BARBS,
4420     SPELL_BATTLECRY,
4421     SPELL_SIGNAL_HORN,
4422     SPELL_SEAL_DOORS,
4423     SPELL_FLAY,
4424     SPELL_BERSERK_OTHER,
4425     SPELL_TENTACLE_THROW,
4426     SPELL_CORRUPTING_PULSE,
4427     SPELL_SIREN_SONG,
4428     SPELL_AVATAR_SONG,
4429     SPELL_PARALYSIS_GAZE,
4430     SPELL_CONFUSION_GAZE,
4431     SPELL_DRAINING_GAZE,
4432     SPELL_DEATH_RATTLE,
4433     SPELL_SUMMON_SCARABS,
4434     SPELL_HUNTING_CRY,
4435     SPELL_SEARING_BREATH,
4436     SPELL_CHILLING_BREATH,
4437     SPELL_SCATTERSHOT,
4438     SPELL_CLEANSING_FLAME,
4439     SPELL_GOBLIN_TOSS,
4440     SPELL_CIGOTUVIS_EMBRACE,
4441     SPELL_SINGULARITY,
4442     SPELL_GRAVITAS,
4443     SPELL_CHANT_FIRE_STORM,
4444     SPELL_CHANT_WORD_OF_ENTROPY,
4445     NUM_SPELLS
4446 };
4447
4448 enum slot_select_mode
4449 {
4450     SS_FORWARD      = 0,
4451     SS_BACKWARD     = 1,
4452 };
4453
4454 enum stat_type
4455 {
4456     STAT_STR,
4457     STAT_INT,
4458     STAT_DEX,
4459     NUM_STATS,
4460     STAT_ALL, // must remain after NUM_STATS
4461     STAT_RANDOM,
4462 };
4463
4464 enum targeting_type
4465 {
4466     DIR_NONE,
4467     DIR_TARGET,         // smite targeting
4468     DIR_DIR,            // needs a clear line to target
4469     DIR_TARGET_OBJECT,  // targets items
4470     DIR_MOVABLE_OBJECT, // skips corpses
4471     DIR_SHADOW_STEP,    // a shadow step target
4472     DIR_LEAP,           // power leap -- short-range cblink
4473 };
4474
4475 enum torment_source_type
4476 {
4477     TORMENT_LURKING_HORROR= -1,
4478     TORMENT_CARDS         = -2,   // Symbol of torment
4479     TORMENT_SCEPTRE       = -3,   // The Sceptre of Torment
4480     TORMENT_SCROLL        = -4,
4481     TORMENT_SPELL         = -5,   // SPELL_SYMBOL_OF_TORMENT
4482     TORMENT_XOM           = -6,   // Xom effect
4483     TORMENT_KIKUBAAQUDGHA = -7,   // Kikubaaqudgha effect
4484     TORMENT_MISCAST       = -8,
4485 };
4486
4487 enum trap_type
4488 {
4489 #if TAG_MAJOR_VERSION == 34
4490     TRAP_DART,
4491 #endif
4492     TRAP_ARROW,
4493     TRAP_SPEAR,
4494 #if TAG_MAJOR_VERSION > 34
4495     TRAP_TELEPORT,
4496 #endif
4497     TRAP_TELEPORT_PERMANENT,
4498     TRAP_ALARM,
4499     TRAP_BLADE,
4500     TRAP_BOLT,
4501     TRAP_NET,
4502     TRAP_ZOT,
4503     TRAP_NEEDLE,
4504     TRAP_SHAFT,
4505     TRAP_GOLUBRIA,
4506     TRAP_PLATE,
4507     TRAP_WEB,
4508 #if TAG_MAJOR_VERSION == 34
4509     TRAP_GAS,
4510     TRAP_TELEPORT,
4511 #endif
4512     TRAP_SHADOW,
4513     TRAP_SHADOW_DORMANT,
4514     NUM_TRAPS,
4515     TRAP_MAX_REGULAR = TRAP_SHAFT,
4516     TRAP_UNASSIGNED = 100,
4517 #if TAG_MAJOR_VERSION == 34
4518     TRAP_UNUSED1,                      // was TRAP_INDEPTH
4519     TRAP_UNUSED2,                      // was TRAP_NOTELEPORT
4520 #endif
4521     TRAP_RANDOM,
4522 };
4523
4524 enum undead_state_type                // you.is_undead
4525 {
4526     US_ALIVE = 0,
4527     US_HUNGRY_DEAD,     // Ghouls
4528     US_UNDEAD,          // Mummies
4529     US_SEMI_UNDEAD,     // Vampires
4530 };
4531
4532 enum unique_item_status_type
4533 {
4534     UNIQ_NOT_EXISTS = 0,
4535     UNIQ_EXISTS = 1,
4536     UNIQ_LOST_IN_ABYSS = 2,
4537 };
4538
4539 enum zap_type
4540 {
4541     ZAP_THROW_FLAME,
4542     ZAP_THROW_FROST,
4543     ZAP_SLOW,
4544     ZAP_HASTE,
4545     ZAP_MAGIC_DART,
4546     ZAP_HEAL_WOUNDS,
4547     ZAP_PARALYSE,
4548     ZAP_BOLT_OF_FIRE,
4549     ZAP_BOLT_OF_COLD,
4550     ZAP_CONFUSE,
4551     ZAP_INVISIBILITY,
4552     ZAP_DIG,
4553     ZAP_FIREBALL,
4554     ZAP_TELEPORT_OTHER,
4555     ZAP_LIGHTNING_BOLT,
4556     ZAP_POLYMORPH,
4557     ZAP_VENOM_BOLT,
4558     ZAP_BOLT_OF_DRAINING,
4559     ZAP_LEHUDIBS_CRYSTAL_SPEAR,
4560     ZAP_BOLT_OF_INACCURACY,
4561     ZAP_ISKENDERUNS_MYSTIC_BLAST,
4562     ZAP_ENSLAVEMENT,
4563     ZAP_PAIN,
4564     ZAP_STICKY_FLAME,
4565     ZAP_STICKY_FLAME_RANGE,
4566     ZAP_DISPEL_UNDEAD,
4567     ZAP_BANISHMENT,
4568     ZAP_STING,
4569     ZAP_HELLFIRE,
4570     ZAP_IRON_SHOT,
4571     ZAP_STONE_ARROW,
4572     ZAP_SHOCK,
4573     ZAP_ORB_OF_ELECTRICITY,
4574     ZAP_SPIT_POISON,
4575     ZAP_DEBUGGING_RAY,
4576     ZAP_BREATHE_FIRE,
4577     ZAP_BREATHE_FROST,
4578     ZAP_BREATHE_ACID,
4579     ZAP_BREATHE_POISON,
4580     ZAP_BREATHE_POWER,
4581     ZAP_AGONY,
4582     ZAP_DISINTEGRATE,
4583     ZAP_BREATHE_STEAM,
4584     ZAP_THROW_ICICLE,
4585     ZAP_CORONA,
4586     ZAP_HIBERNATION,
4587     ZAP_FLAME_TONGUE,
4588     ZAP_LARGE_SANDBLAST,
4589     ZAP_SANDBLAST,
4590     ZAP_SMALL_SANDBLAST,
4591     ZAP_BOLT_OF_MAGMA,
4592     ZAP_POISON_ARROW,
4593     ZAP_BREATHE_STICKY_FLAME,
4594     ZAP_PETRIFY,
4595     ZAP_ENSLAVE_SOUL,
4596     ZAP_PORKALATOR,
4597     ZAP_SLEEP,
4598     ZAP_PRIMAL_WAVE,
4599     ZAP_IOOD,
4600     ZAP_BREATHE_MEPHITIC,
4601     ZAP_INNER_FLAME,
4602     ZAP_DAZZLING_SPRAY,
4603     ZAP_FORCE_LANCE,
4604     ZAP_SEARING_RAY_I,
4605     ZAP_SEARING_RAY_II,
4606     ZAP_SEARING_RAY_III,
4607     ZAP_EXPLOSIVE_BOLT,
4608     ZAP_CRYSTAL_BOLT,
4609     ZAP_TUKIMAS_DANCE,
4610     ZAP_QUICKSILVER_BOLT,
4611     ZAP_CORROSIVE_BOLT,
4612     ZAP_RANDOM_BOLT_TRACER,
4613     ZAP_SCATTERSHOT,
4614
4615     NUM_ZAPS
4616 };
4617
4618 enum montravel_target_type
4619 {
4620     MTRAV_NONE = 0,
4621     MTRAV_FOE,         // Travelling to reach its foe.
4622     MTRAV_PATROL,      // Travelling to reach the patrol point.
4623     MTRAV_MERFOLK_AVATAR, // Merfolk avatars travelling towards deep water.
4624     MTRAV_UNREACHABLE, // Not travelling because target is unreachable.
4625     MTRAV_KNOWN_UNREACHABLE, // As above, and the player knows this.
4626 };
4627
4628 enum maybe_bool
4629 {
4630     MB_FALSE,
4631     MB_MAYBE,
4632     MB_TRUE,
4633 };
4634
4635 enum reach_type
4636 {
4637     REACH_NONE   = 2,
4638     REACH_KNIGHT = 5,
4639     REACH_TWO    = 8,
4640 };
4641
4642 enum daction_type
4643 {
4644     DACT_ALLY_HOLY,
4645     DACT_ALLY_UNHOLY_EVIL,
4646     DACT_ALLY_UNCLEAN_CHAOTIC,
4647     DACT_ALLY_SPELLCASTER,
4648     DACT_ALLY_YRED_SLAVE,
4649     DACT_ALLY_BEOGH, // both orcs and demons summoned by high priests
4650     DACT_ALLY_SLIME,
4651     DACT_ALLY_PLANT,
4652
4653     NUM_DACTION_COUNTERS,
4654
4655     // Leave space for new counters, as they need to be at the start.
4656     DACT_OLD_ENSLAVED_SOULS_POOF = 16,
4657 #if TAG_MAJOR_VERSION == 34
4658     DACT_HOLY_NEW_ATTEMPT,
4659 #endif
4660 #if TAG_MAJOR_VERSION > 34
4661     DACT_SLIME_NEW_ATTEMPT,
4662 #endif
4663     DACT_HOLY_PETS_GO_NEUTRAL,
4664     DACT_ALLY_TROG,
4665
4666     DACT_SHUFFLE_DECKS,
4667     DACT_REAUTOMAP,
4668     DACT_REMOVE_JIYVA_ALTARS,
4669     DACT_PIKEL_SLAVES,
4670     DACT_ROT_CORPSES,
4671     DACT_TOMB_CTELE,
4672 #if TAG_MAJOR_VERSION == 34
4673     DACT_SLIME_NEW_ATTEMPT,
4674 #endif
4675     DACT_KIRKE_HOGS,
4676 #if TAG_MAJOR_VERSION == 34
4677     DACT_END_SPIRIT_HOWL,
4678 #endif
4679     DACT_GOLD_ON_TOP,
4680     DACT_BRIBE_TIMEOUT,
4681     DACT_REMOVE_GOZAG_SHOPS,
4682     DACT_SET_BRIBES,
4683     DACT_ALLY_MAKHLEB,
4684 #if TAG_MAJOR_VERSION == 34
4685     DACT_ALLY_SACRIFICE_LOVE,
4686 #endif
4687     NUM_DACTIONS,
4688     // If you want to add a new daction, you need to
4689     // add a corresponding entry to *daction_names[]
4690     // of dactions.cc to avoid breaking the debug build
4691 };
4692
4693 enum disable_type
4694 {
4695     DIS_SPAWNS,
4696     DIS_MON_ACT,
4697     DIS_MON_REGEN,
4698     DIS_PLAYER_REGEN,
4699     DIS_HUNGER,
4700     DIS_DEATH,
4701     DIS_DELAY,
4702     DIS_CONFIRMATIONS,
4703     DIS_AFFLICTIONS,
4704     DIS_MON_SIGHT,
4705     DIS_SAVE_CHECKPOINTS,
4706     NUM_DISABLEMENTS
4707 };
4708