Revert "Track who destroys an item; incur Nemelex penance for deck destruction."
[crawl.git] / crawl-ref / source / enum.h
1 /**
2  * @file
3  * @brief Global (ick) enums.
4 **/
5
6
7 #ifndef ENUM_H
8 #define ENUM_H
9
10 #include "tag-version.h"
11
12 enum lang_t
13 {
14     LANG_EN = 0,
15     LANG_CS,
16     LANG_DA,
17     LANG_DE,
18     LANG_EL,
19     LANG_ES,
20     LANG_FI,
21     LANG_FR,
22     LANG_HU,
23     LANG_IT,
24     LANG_JA,
25     LANG_KO,
26     LANG_LT,
27     LANG_LV,
28     LANG_NL,
29     LANG_PL,
30     LANG_PT,
31     LANG_RU,
32     LANG_ZH,
33     // fake languages
34     LANG_DWARVEN,
35     LANG_JAGERKIN,
36     LANG_KRAUT,
37     LANG_CYRILLIC,
38     LANG_FUTHARK,
39     LANG_WIDE,
40 };
41
42 enum ability_type
43 {
44     ABIL_NON_ABILITY = -1,
45     // Innate abilities and (Demonspawn) mutations.
46     ABIL_SPIT_POISON = 1,
47     ABIL_BREATHE_FIRE,
48     ABIL_BREATHE_FROST,
49     ABIL_BREATHE_POISON,
50     ABIL_BREATHE_LIGHTNING,
51     ABIL_BREATHE_POWER,
52     ABIL_BREATHE_STICKY_FLAME,
53     ABIL_BREATHE_STEAM,
54     ABIL_BREATHE_MEPHITIC,
55     ABIL_SPIT_ACID,
56     ABIL_BLINK,
57
58     // Others
59     ABIL_DELAYED_FIREBALL,
60     ABIL_END_TRANSFORMATION,
61
62     // Species-specific abilities.
63     // Demonspawn-only
64     ABIL_HELLFIRE,
65     // Tengu, Draconians
66     ABIL_FLY,
67     ABIL_WISP_BLINK,
68     ABIL_STOP_FLYING,
69     // Mummies
70     ABIL_MUMMY_RESTORATION,
71     // Vampires
72     ABIL_TRAN_BAT,
73     ABIL_BOTTLE_BLOOD,
74     // Deep Dwarves
75     ABIL_RECHARGING,
76     ABIL_MAX_INTRINSIC = ABIL_RECHARGING,
77
78     // Evoking items.
79     ABIL_EVOKE_BERSERK = 40,
80     ABIL_MIN_EVOKE = ABIL_EVOKE_BERSERK,
81     ABIL_EVOKE_TELEPORTATION,
82     ABIL_EVOKE_BLINK,
83     ABIL_EVOKE_TURN_INVISIBLE,
84     ABIL_EVOKE_TURN_VISIBLE,
85     ABIL_EVOKE_FLIGHT,
86 #if TAG_MAJOR_VERSION == 34
87     ABIL_EVOKE_STOP_LEVITATING,
88 #endif
89     ABIL_EVOKE_FOG,
90     ABIL_EVOKE_TELEPORT_CONTROL,
91     ABIL_MAX_EVOKE = ABIL_EVOKE_TELEPORT_CONTROL,
92
93     // Divine abilities
94     // Zin
95     ABIL_ZIN_SUSTENANCE = 50,
96     ABIL_ZIN_RECITE,
97     ABIL_ZIN_VITALISATION,
98     ABIL_ZIN_IMPRISON,
99     ABIL_ZIN_SANCTUARY,
100     ABIL_ZIN_CURE_ALL_MUTATIONS,
101     // TSO
102     ABIL_TSO_DIVINE_SHIELD = 60,
103     ABIL_TSO_CLEANSING_FLAME,
104     ABIL_TSO_SUMMON_DIVINE_WARRIOR,
105     // Kiku
106     ABIL_KIKU_RECEIVE_CORPSES = 70,
107     ABIL_KIKU_TORMENT,
108     // Yredelemnul
109     ABIL_YRED_INJURY_MIRROR = 80,
110     ABIL_YRED_ANIMATE_REMAINS,
111     ABIL_YRED_RECALL_UNDEAD_SLAVES,
112     ABIL_YRED_ANIMATE_DEAD,
113     ABIL_YRED_DRAIN_LIFE,
114     ABIL_YRED_ENSLAVE_SOUL,
115     ABIL_YRED_ANIMATE_REMAINS_OR_DEAD,
116 #if TAG_MAJOR_VERSION == 34
117     // Vehumet
118     ABIL_VEHUMET_MEMORISE_SPELL = 90,
119 #endif
120     // Okawaru
121     ABIL_OKAWARU_HEROISM = 100,
122     ABIL_OKAWARU_FINESSE,
123     // Makhleb
124     ABIL_MAKHLEB_MINOR_DESTRUCTION = 110,
125     ABIL_MAKHLEB_LESSER_SERVANT_OF_MAKHLEB,
126     ABIL_MAKHLEB_MAJOR_DESTRUCTION,
127     ABIL_MAKHLEB_GREATER_SERVANT_OF_MAKHLEB,
128     // Sif Muna
129     ABIL_SIF_MUNA_CHANNEL_ENERGY = 120,
130     ABIL_SIF_MUNA_FORGET_SPELL,
131     // Trog
132     ABIL_TROG_BURN_SPELLBOOKS = 130,
133     ABIL_TROG_BERSERK,
134     ABIL_TROG_REGEN_MR,
135     ABIL_TROG_BROTHERS_IN_ARMS,
136     // Elyvilon
137     ABIL_ELYVILON_LIFESAVING = 140,
138     ABIL_ELYVILON_LESSER_HEALING_SELF,
139     ABIL_ELYVILON_LESSER_HEALING_OTHERS,
140     ABIL_ELYVILON_PURIFICATION,
141     ABIL_ELYVILON_GREATER_HEALING_SELF,
142     ABIL_ELYVILON_GREATER_HEALING_OTHERS,
143     ABIL_ELYVILON_DIVINE_VIGOUR,
144     // Lugonu
145     ABIL_LUGONU_ABYSS_EXIT = 150,
146     ABIL_LUGONU_BEND_SPACE,
147     ABIL_LUGONU_BANISH,
148     ABIL_LUGONU_CORRUPT,
149     ABIL_LUGONU_ABYSS_ENTER,
150     // Nemelex
151     ABIL_NEMELEX_DRAW_ONE = 160,
152     ABIL_NEMELEX_PEEK_TWO,
153     ABIL_NEMELEX_TRIPLE_DRAW,
154     ABIL_NEMELEX_DEAL_FOUR,
155     ABIL_NEMELEX_STACK_FIVE,
156     // Beogh
157     ABIL_BEOGH_SMITING = 170,
158     ABIL_BEOGH_RECALL_ORCISH_FOLLOWERS,
159     // Jiyva
160     ABIL_JIYVA_CALL_JELLY = 180,
161     ABIL_JIYVA_JELLY_PARALYSE,
162     ABIL_JIYVA_SLIMIFY,
163     ABIL_JIYVA_CURE_BAD_MUTATION,
164     // Fedhas
165     ABIL_FEDHAS_SUNLIGHT = 190,
166     ABIL_FEDHAS_RAIN,
167     ABIL_FEDHAS_PLANT_RING,
168     ABIL_FEDHAS_SPAWN_SPORES,
169     ABIL_FEDHAS_EVOLUTION,
170     // Cheibriados
171     ABIL_CHEIBRIADOS_TIME_STEP = 201,
172     ABIL_CHEIBRIADOS_TIME_BEND,
173     ABIL_CHEIBRIADOS_SLOUCH,
174     ABIL_CHEIBRIADOS_DISTORTION,
175     // Ashenzari
176     ABIL_ASHENZARI_SCRYING = 210,
177     ABIL_ASHENZARI_TRANSFER_KNOWLEDGE,
178     ABIL_ASHENZARI_END_TRANSFER,
179
180     // For both Yred and Beogh
181     ABIL_STOP_RECALL,
182
183     // General divine (pseudo) abilities.
184     ABIL_RENOUNCE_RELIGION,
185     ABIL_CONVERT_TO_BEOGH,
186
187     // Zot Defence abilities
188     ABIL_MAKE_FUNGUS = 230,
189     ABIL_MIN_ZOTDEF = ABIL_MAKE_FUNGUS,
190     ABIL_MAKE_PLANT,
191     ABIL_MAKE_OKLOB_SAPLING,
192     ABIL_MAKE_DART_TRAP,
193     ABIL_MAKE_ICE_STATUE,
194     ABIL_MAKE_OCS,
195     ABIL_MAKE_SILVER_STATUE,
196     ABIL_MAKE_CURSE_SKULL,
197     ABIL_MAKE_TELEPORT,
198     ABIL_MAKE_ARROW_TRAP,
199     ABIL_MAKE_BOLT_TRAP,
200     ABIL_MAKE_SPEAR_TRAP,
201     ABIL_MAKE_NEEDLE_TRAP,
202     ABIL_MAKE_NET_TRAP,
203     ABIL_MAKE_TELEPORT_TRAP,
204     ABIL_MAKE_ALARM_TRAP,
205     ABIL_MAKE_BLADE_TRAP,
206     ABIL_MAKE_OKLOB_CIRCLE,
207     ABIL_MAKE_ACQUIRE_GOLD,
208     ABIL_MAKE_ACQUIREMENT,
209     ABIL_MAKE_WATER,
210     ABIL_MAKE_LIGHTNING_SPIRE,
211     ABIL_MAKE_BAZAAR,
212     ABIL_MAKE_ALTAR,
213     ABIL_MAKE_GRENADES,
214     ABIL_MAKE_SAGE,
215     ABIL_MAKE_OKLOB_PLANT,
216     ABIL_MAKE_BURNING_BUSH,
217     ABIL_REMOVE_CURSE,
218     ABIL_MAX_ZOTDEF = ABIL_REMOVE_CURSE,
219     NUM_ABILITIES
220 };
221
222 enum activity_interrupt_type
223 {
224     AI_FORCE_INTERRUPT = 0,         // Forcibly kills any activity that can be
225                                     // interrupted.
226     AI_KEYPRESS,
227     AI_FULL_HP,                     // Player is fully healed
228     AI_FULL_MP,                     // Player has recovered all mp
229     AI_STATUE,                      // Bad statue has come into view
230     AI_HUNGRY,                      // Hunger increased
231     AI_MESSAGE,                     // Message was displayed
232     AI_HP_LOSS,
233     AI_BURDEN_CHANGE,
234     AI_STAT_CHANGE,
235     AI_SEE_MONSTER,
236     AI_MONSTER_ATTACKS,
237     AI_TELEPORT,
238     AI_HIT_MONSTER,                 // Player hit monster (invis or
239                                     // mimic) during travel/explore.
240     AI_SENSE_MONSTER,
241
242     // Always the last.
243     NUM_AINTERRUPTS
244 };
245
246 enum actor_type
247 {
248     ACT_NONE = -1,
249     ACT_PLAYER,
250     ACT_MONSTER,
251 };
252
253 enum attribute_type
254 {
255     ATTR_DIVINE_LIGHTNING_PROTECTION,
256     ATTR_DIVINE_REGENERATION,
257     ATTR_DIVINE_DEATH_CHANNEL,
258     ATTR_CARD_COUNTDOWN,
259     ATTR_BANISHMENT_IMMUNITY,   // banishment immunity until
260     ATTR_DELAYED_FIREBALL,      // bwr: reserve fireballs
261     ATTR_HELD,                  // caught in a net
262     ATTR_ABYSS_ENTOURAGE,       // maximum number of hostile monsters in
263                                 // sight of the player while in the Abyss.
264     ATTR_DIVINE_VIGOUR,         // strength of Ely's Divine Vigour
265     ATTR_DIVINE_STAMINA,        // strength of Zin's Divine Stamina
266     ATTR_DIVINE_SHIELD,         // strength of TSO's Divine Shield
267     ATTR_WEAPON_SWAP_INTERRUPTED,
268     ATTR_GOLD_FOUND,
269     ATTR_PURCHASES,            // Gold amount spent at shops.
270     ATTR_DONATIONS,            // Gold amount donated to Zin.
271     ATTR_MISC_SPENDING,        // Spending for things like ziggurats.
272 #if TAG_MAJOR_VERSION == 34
273     ATTR_UNUSED1,              // was ATTR_RND_LVL_BOOKS
274 #endif
275     ATTR_NOISES,               // A noisy artefact is equipped.
276     ATTR_SHADOWS,              // Lantern of shadows effect.
277 #if TAG_MAJOR_VERSION == 34
278     ATTR_UNUSED2,              // was ATTR_FRUIT_FOUND
279 #endif
280     ATTR_FLIGHT_UNCANCELLABLE, // Potion of flight is in effect.
281     ATTR_INVIS_UNCANCELLABLE,  // Potion/spell/wand of invis is in effect.
282     ATTR_PERM_FLIGHT,          // Tengu flight or boots of flying are on.
283     ATTR_SEEN_INVIS_TURN,      // Last turn you saw something invisible.
284     ATTR_SEEN_INVIS_SEED,      // Random seed for invis monster positions.
285     ATTR_APPENDAGE,            // eq slot of Beastly Appendage
286     ATTR_TITHE_BASE,           // Remainder of untithed gold.
287     ATTR_EVOL_XP,              // XP gained since last evolved mutation
288     ATTR_LIFE_GAINED,          // XL when a felid gained a life.
289     ATTR_TEMP_MUTATIONS,       // Number of temporary mutations the player has.
290     ATTR_TEMP_MUT_XP,          // Amount of XP remaining before some temp muts
291                                // will be removed
292     ATTR_NEXT_RECALL_TIME,     // aut remaining until next ally will be recalled
293     ATTR_NEXT_RECALL_INDEX,    // index+1 into recall_list for next recall
294 #if TAG_MAJOR_VERSION == 34
295     ATTR_EVOKER_XP,            // How much xp remaining until next evoker charge
296 #endif
297     ATTR_SEEN_BEOGH,           // Did an orc priest already offer conversion?
298     NUM_ATTRIBUTES
299 };
300
301 enum transformation_type
302 {
303     TRAN_NONE,
304     TRAN_SPIDER,
305     TRAN_BLADE_HANDS,
306     TRAN_STATUE,
307     TRAN_ICE_BEAST,
308     TRAN_DRAGON,
309     TRAN_LICH,
310     TRAN_BAT,
311     TRAN_PIG,
312     TRAN_APPENDAGE,
313     TRAN_TREE,
314     TRAN_PORCUPINE,
315     TRAN_WISP,
316     TRAN_JELLY,
317     TRAN_FUNGUS,
318     // no NUM_TRANSFORMS due to too many switch statements
319     LAST_FORM = TRAN_FUNGUS
320 };
321
322 enum beam_type                  // bolt::flavour
323 {
324     BEAM_NONE,
325
326     BEAM_MISSILE,
327     BEAM_MMISSILE,                //    and similarly irresistible things
328     BEAM_FIRE,
329     BEAM_COLD,
330     BEAM_MAGIC,
331     BEAM_ELECTRICITY,
332     BEAM_POISON,
333     BEAM_NEG,
334     BEAM_ACID,
335     BEAM_MIASMA,
336     BEAM_WATER,
337
338     BEAM_SPORE,
339     BEAM_POISON_ARROW,
340     BEAM_HELLFIRE,
341     BEAM_NAPALM,
342     BEAM_STEAM,
343     BEAM_ENERGY,
344     BEAM_HOLY,
345     BEAM_FRAG,
346     BEAM_LAVA,
347     BEAM_ICE,
348     BEAM_NUKE,
349     BEAM_LIGHT,
350     BEAM_RANDOM,                  // currently translates into FIRE..ACID
351     BEAM_CHAOS,
352     BEAM_GHOSTLY_FLAME,
353
354     // Enchantments
355     BEAM_SLOW,
356     BEAM_FIRST_ENCHANTMENT = BEAM_SLOW,
357     BEAM_HASTE,
358     BEAM_MIGHT,
359     BEAM_HEALING,
360     BEAM_PARALYSIS,
361     BEAM_CONFUSION,
362     BEAM_INVISIBILITY,
363     BEAM_DIGGING,
364     BEAM_TELEPORT,
365     BEAM_POLYMORPH,
366     BEAM_MALMUTATE,
367     BEAM_ENSLAVE,
368     BEAM_BANISH,
369     BEAM_ENSLAVE_SOUL,
370     BEAM_PAIN,
371     BEAM_DISPEL_UNDEAD,
372     BEAM_DISINTEGRATION,
373     BEAM_BLINK,
374     BEAM_BLINK_CLOSE,
375     BEAM_PETRIFY,
376     BEAM_CORONA,
377     BEAM_PORKALATOR,
378     BEAM_HIBERNATION,
379     BEAM_BERSERK,
380     BEAM_SLEEP,
381     BEAM_INNER_FLAME,
382     BEAM_SENTINEL_MARK,
383     BEAM_DIMENSION_ANCHOR,
384     BEAM_LAST_ENCHANTMENT = BEAM_DIMENSION_ANCHOR,
385
386     BEAM_MEPHITIC,
387     BEAM_GLOOM,
388     BEAM_INK,
389     BEAM_HOLY_FLAME,
390     BEAM_HOLY_LIGHT,
391     BEAM_AIR,
392     BEAM_PETRIFYING_CLOUD,
393     BEAM_BOLT_OF_ZIN,
394     BEAM_ENSNARE,
395     BEAM_LAST_REAL = BEAM_ENSNARE,
396
397     // For getting the visual effect of a beam.
398     BEAM_VISUAL,
399
400     BEAM_TORMENT_DAMAGE,          // Pseudo-beam for damage flavour.
401     BEAM_FIRST_PSEUDO = BEAM_TORMENT_DAMAGE,
402     BEAM_DEVOUR_FOOD,             // Pseudo-beam for harpies' devouring food.
403
404     NUM_BEAMS
405 };
406
407 enum book_type
408 {
409     BOOK_MINOR_MAGIC,
410     BOOK_CONJURATIONS,
411     BOOK_FLAMES,
412     BOOK_FROST,
413     BOOK_SUMMONINGS,
414     BOOK_FIRE,
415     BOOK_ICE,
416     BOOK_SPATIAL_TRANSLOCATIONS,
417     BOOK_ENCHANTMENTS,
418     BOOK_YOUNG_POISONERS,
419     BOOK_TEMPESTS,
420     BOOK_DEATH,
421     BOOK_HINDERANCE,
422     BOOK_CHANGES,
423     BOOK_TRANSFIGURATIONS,
424     BOOK_WAR_CHANTS,
425     BOOK_CLOUDS,
426     BOOK_NECROMANCY,
427     BOOK_CALLINGS,
428     BOOK_MALEDICT,
429     BOOK_AIR,
430     BOOK_SKY,
431     BOOK_WARP,
432     BOOK_ENVENOMATIONS,
433     BOOK_UNLIFE,
434     BOOK_CONTROL,
435 #if TAG_MAJOR_VERSION == 34
436     BOOK_MUTATIONS,
437 #endif
438     BOOK_GEOMANCY,
439     BOOK_EARTH,
440     BOOK_WIZARDRY,
441     BOOK_POWER,
442     BOOK_CANTRIPS,
443     BOOK_PARTY_TRICKS,
444 #if TAG_MAJOR_VERSION == 34
445     BOOK_STALKING,
446 #endif
447     BOOK_DEBILITATION,
448     BOOK_DRAGON,
449     BOOK_BURGLARY,
450     BOOK_DREAMS,
451     BOOK_ALCHEMY,
452     BOOK_BEASTS,
453     MAX_NORMAL_BOOK = BOOK_BEASTS,
454
455     MIN_RARE_BOOK,
456     BOOK_ANNIHILATIONS = MIN_RARE_BOOK,
457     BOOK_GRAND_GRIMOIRE,
458     BOOK_NECRONOMICON,
459     MAX_RARE_BOOK = BOOK_NECRONOMICON,
460
461     MAX_FIXED_BOOK = MAX_RARE_BOOK,
462
463     BOOK_RANDART_LEVEL,
464     BOOK_RANDART_THEME,
465
466     BOOK_MANUAL,
467     BOOK_DESTRUCTION,
468     NUM_BOOKS
469 };
470
471 #define NUM_NORMAL_BOOKS     (MAX_NORMAL_BOOK + 1)
472 #define NUM_FIXED_BOOKS      (MAX_FIXED_BOOK + 1)
473
474 enum branch_type                // you.where_are_you
475 {
476     BRANCH_MAIN_DUNGEON,
477     BRANCH_ECUMENICAL_TEMPLE,
478     BRANCH_FIRST_NON_DUNGEON = BRANCH_ECUMENICAL_TEMPLE,
479     BRANCH_ORCISH_MINES,
480     BRANCH_ELVEN_HALLS,
481     BRANCH_DWARVEN_HALL,
482     BRANCH_LAIR,
483     BRANCH_SWAMP,
484     BRANCH_SHOALS,
485     BRANCH_SNAKE_PIT,
486     BRANCH_SPIDER_NEST,
487     BRANCH_SLIME_PITS,
488     BRANCH_VAULTS,
489     BRANCH_HALL_OF_BLADES,
490     BRANCH_CRYPT,
491     BRANCH_TOMB,
492     BRANCH_VESTIBULE_OF_HELL,
493     BRANCH_DIS,
494     BRANCH_GEHENNA,
495     BRANCH_COCYTUS,
496     BRANCH_TARTARUS,
497       BRANCH_FIRST_HELL = BRANCH_DIS,
498       BRANCH_LAST_HELL = BRANCH_TARTARUS,
499     BRANCH_HALL_OF_ZOT,
500     BRANCH_FOREST,
501     BRANCH_ABYSS,
502     BRANCH_PANDEMONIUM,
503     BRANCH_ZIGGURAT,
504     BRANCH_LABYRINTH,
505     BRANCH_BAZAAR,
506     BRANCH_TROVE,
507     BRANCH_SEWER,
508     BRANCH_OSSUARY,
509     BRANCH_BAILEY,
510     BRANCH_ICE_CAVE,
511     BRANCH_VOLCANO,
512     BRANCH_WIZLAB,
513 #if TAG_MAJOR_VERSION == 34
514         BRANCH_UNUSED,
515 #endif
516     NUM_BRANCHES
517 };
518
519 enum burden_state_type          // you.burden_state
520 {   // these values increase hunger and divide stealth
521     BS_UNENCUMBERED = 0,
522     BS_ENCUMBERED   = 2,
523     BS_OVERLOADED   = 5,
524 };
525
526 enum caction_type    // Primary categorization of counted actions.
527 {                    // A subtype will also be given in each case:
528     CACT_MELEE,      // weapon subtype
529     CACT_FIRE,       // weapon subtype
530     CACT_THROW,      // item basetype << 16 | subtype
531     CACT_CAST,       // spell_type
532     CACT_INVOKE,     // ability_type
533     CACT_ABIL,       // ability_type
534     CACT_EVOKE,      // evoc_type
535     CACT_USE,        // object_class_type
536     CACT_STAB,       // unchivalric_attack_type
537     NUM_CACTIONS,
538 };
539
540 enum canned_message_type
541 {
542     MSG_SOMETHING_APPEARS,
543     MSG_NOTHING_HAPPENS,
544     MSG_YOU_UNAFFECTED,
545     MSG_YOU_RESIST,
546     MSG_YOU_PARTIALLY_RESIST,
547     MSG_TOO_BERSERK,
548     MSG_TOO_CONFUSED,
549     MSG_PRESENT_FORM,
550     MSG_NOTHING_CARRIED,
551     MSG_CANNOT_DO_YET,
552     MSG_OK,
553     MSG_UNTHINKING_ACT,
554     MSG_NOTHING_THERE,
555     MSG_NOTHING_CLOSE_ENOUGH,
556     MSG_NO_ENERGY,
557     MSG_SPELL_FIZZLES,
558     MSG_HUH,
559     MSG_EMPTY_HANDED_ALREADY,
560     MSG_EMPTY_HANDED_NOW,
561     MSG_YOU_BLINK,
562     MSG_STRANGE_STASIS,
563     MSG_NO_SPELLS,
564     MSG_MANA_INCREASE,
565     MSG_MANA_DECREASE,
566     MSG_DISORIENTED,
567     MSG_TOO_HUNGRY,
568     MSG_DETECT_NOTHING,
569     MSG_CALL_DEAD,
570     MSG_ANIMATE_REMAINS,
571     MSG_DECK_EXHAUSTED,
572     MSG_EVOCATION_SUPPRESSED,
573     MSG_BEING_WATCHED,
574     MSG_CANNOT_MOVE,
575 };
576
577 enum char_set_type
578 {
579     CSET_DEFAULT,
580     CSET_ASCII,         // flat 7-bit ASCII
581     CSET_IBM,           // 8-bit ANSI/Code Page 437
582     CSET_DEC,           // 8-bit DEC, 0xE0-0xFF shifted for line drawing chars
583     CSET_OLD_UNICODE,
584     NUM_CSET
585 };
586
587 enum cleansing_flame_source_type
588 {
589     CLEANSING_FLAME_GENERIC    = -1,
590     CLEANSING_FLAME_SPELL      = -2, // SPELL_FLAME_OF_CLEANSING
591     CLEANSING_FLAME_INVOCATION = -3, // ABIL_TSO_CLEANSING_FLAME
592     CLEANSING_FLAME_TSO        = -4, // TSO effect
593 };
594
595 enum cloud_type
596 {
597     CLOUD_NONE,
598     CLOUD_FIRE,
599     CLOUD_MEPHITIC,
600     CLOUD_COLD,
601     CLOUD_POISON,
602     CLOUD_BLACK_SMOKE,
603     CLOUD_GREY_SMOKE,
604     CLOUD_BLUE_SMOKE,
605     CLOUD_PURPLE_SMOKE,
606     CLOUD_TLOC_ENERGY,
607     CLOUD_FOREST_FIRE,
608     CLOUD_STEAM,
609     CLOUD_GLOOM,
610     CLOUD_INK,
611     CLOUD_PETRIFY,
612     CLOUD_HOLY_FLAMES,
613     CLOUD_MIASMA,
614     CLOUD_MIST,
615     CLOUD_CHAOS,
616     CLOUD_RAIN,
617     CLOUD_MUTAGENIC,
618     CLOUD_MAGIC_TRAIL,
619     CLOUD_TORNADO,
620     CLOUD_DUST_TRAIL,
621     CLOUD_GHOSTLY_FLAME,
622     NUM_CLOUD_TYPES,
623
624     CLOUD_OPAQUE_FIRST = CLOUD_BLACK_SMOKE,
625     CLOUD_OPAQUE_LAST  = CLOUD_HOLY_FLAMES,
626
627     CLOUD_RANDOM = 98,
628     CLOUD_DEBUGGING,
629 };
630
631 enum command_type
632 {
633     CMD_NO_CMD = 2000,
634     CMD_NO_CMD_DEFAULT, // hack to allow assignment of keys to CMD_NO_CMD
635     CMD_MOVE_NOWHERE,
636     CMD_MOVE_LEFT,
637     CMD_MOVE_DOWN,
638     CMD_MOVE_UP,
639     CMD_MOVE_RIGHT,
640     CMD_MOVE_UP_LEFT,
641     CMD_MOVE_DOWN_LEFT,
642     CMD_MOVE_UP_RIGHT,
643     CMD_MOVE_DOWN_RIGHT,
644     CMD_RUN_LEFT,
645     CMD_RUN_DOWN,
646     CMD_RUN_UP,
647     CMD_RUN_RIGHT,
648     CMD_RUN_UP_LEFT,
649     CMD_RUN_DOWN_LEFT,
650     CMD_RUN_UP_RIGHT,
651     CMD_RUN_DOWN_RIGHT,
652     CMD_OPEN_DOOR_LEFT,
653     CMD_OPEN_DOOR_DOWN,
654     CMD_OPEN_DOOR_UP,
655     CMD_OPEN_DOOR_RIGHT,
656     CMD_OPEN_DOOR_UP_LEFT,
657     CMD_OPEN_DOOR_DOWN_LEFT,
658     CMD_OPEN_DOOR_UP_RIGHT,
659     CMD_OPEN_DOOR_DOWN_RIGHT,
660     CMD_OPEN_DOOR,
661     CMD_CLOSE_DOOR,
662     CMD_REST,
663     CMD_GO_UPSTAIRS,
664     CMD_GO_DOWNSTAIRS,
665     CMD_TOGGLE_AUTOPICKUP,
666     CMD_TOGGLE_FRIENDLY_PICKUP,
667     CMD_TOGGLE_VIEWPORT_MONSTER_HP,
668     CMD_TOGGLE_TRAVEL_SPEED,
669     CMD_PICKUP,
670     CMD_PICKUP_QUANTITY,
671     CMD_DROP,
672     CMD_DROP_LAST,
673     CMD_BUTCHER,
674     CMD_INSPECT_FLOOR,
675     CMD_SHOW_TERRAIN,
676     CMD_FULL_VIEW,
677     CMD_EXAMINE_OBJECT,
678     CMD_EVOKE,
679     CMD_EVOKE_WIELDED,
680     CMD_WIELD_WEAPON,
681     CMD_WEAPON_SWAP,
682     CMD_FIRE,
683     CMD_QUIVER_ITEM,
684     CMD_THROW_ITEM_NO_QUIVER,
685     CMD_WEAR_ARMOUR,
686     CMD_REMOVE_ARMOUR,
687     CMD_WEAR_JEWELLERY,
688     CMD_REMOVE_JEWELLERY,
689     CMD_CYCLE_QUIVER_FORWARD,
690     CMD_CYCLE_QUIVER_BACKWARD,
691     CMD_LIST_WEAPONS,
692     CMD_LIST_ARMOUR,
693     CMD_LIST_JEWELLERY,
694     CMD_LIST_EQUIPMENT,
695     CMD_LIST_GOLD,
696     CMD_ZAP_WAND,
697     CMD_CAST_SPELL,
698     CMD_FORCE_CAST_SPELL,
699     CMD_MEMORISE_SPELL,
700     CMD_USE_ABILITY,
701     CMD_PRAY,
702     CMD_EAT,
703     CMD_QUAFF,
704     CMD_READ,
705     CMD_LOOK_AROUND,
706     CMD_WAIT,
707     CMD_SHOUT,
708     CMD_DISARM_TRAP,
709     CMD_CHARACTER_DUMP,
710     CMD_DISPLAY_COMMANDS,
711     CMD_DISPLAY_INVENTORY,
712     CMD_DISPLAY_KNOWN_OBJECTS,
713     CMD_DISPLAY_MUTATIONS,
714     CMD_DISPLAY_SKILLS,
715     CMD_DISPLAY_MAP,
716     CMD_DISPLAY_OVERMAP,
717     CMD_DISPLAY_RELIGION,
718     CMD_DISPLAY_RUNES,
719     CMD_DISPLAY_CHARACTER_STATUS,
720     CMD_DISPLAY_SPELLS,
721     CMD_EXPERIENCE_CHECK,
722     CMD_ADJUST_INVENTORY,
723     CMD_REPLAY_MESSAGES,
724     CMD_REDRAW_SCREEN,
725     CMD_MACRO_ADD,
726     CMD_SAVE_GAME,
727     CMD_SAVE_GAME_NOW,
728     CMD_SUSPEND_GAME,
729     CMD_QUIT,
730     CMD_WIZARD,
731     CMD_DESTROY_ITEM,
732
733     CMD_SEARCH_STASHES,
734     CMD_EXPLORE,
735     CMD_INTERLEVEL_TRAVEL,
736     CMD_FIX_WAYPOINT,
737
738     CMD_CLEAR_MAP,
739     CMD_INSCRIBE_ITEM,
740     CMD_MAKE_NOTE,
741     CMD_RESISTS_SCREEN,
742
743     CMD_READ_MESSAGES,
744
745     CMD_MOUSE_MOVE,
746     CMD_MOUSE_CLICK,
747
748     CMD_ANNOTATE_LEVEL,
749
750 #ifdef CLUA_BINDINGS
751     CMD_AUTOFIGHT,
752     CMD_AUTOFIGHT_NOMOVE,
753 #endif
754
755 #ifdef USE_TILE
756     CMD_EDIT_PLAYER_TILE,
757     CMD_MIN_TILE = CMD_EDIT_PLAYER_TILE,
758     CMD_MAX_TILE = CMD_EDIT_PLAYER_TILE,
759 #endif
760
761 #ifdef TOUCH_UI
762     // zoom on dungeon
763     CMD_ZOOM_IN,
764     CMD_ZOOM_OUT,
765 #endif
766
767     // Repeat previous command
768     CMD_PREV_CMD_AGAIN,
769
770     // Repeat next command a given number of times
771     CMD_REPEAT_CMD,
772
773     CMD_MAX_NORMAL = CMD_REPEAT_CMD,
774
775     // overmap commands
776     CMD_MAP_CLEAR_MAP,
777     CMD_MIN_OVERMAP = CMD_MAP_CLEAR_MAP,
778     CMD_MAP_ADD_WAYPOINT,
779     CMD_MAP_EXCLUDE_AREA,
780     CMD_MAP_CLEAR_EXCLUDES,
781     CMD_MAP_EXCLUDE_RADIUS,
782
783     CMD_MAP_MOVE_LEFT,
784     CMD_MAP_MOVE_DOWN,
785     CMD_MAP_MOVE_UP,
786     CMD_MAP_MOVE_RIGHT,
787     CMD_MAP_MOVE_UP_LEFT,
788     CMD_MAP_MOVE_DOWN_LEFT,
789     CMD_MAP_MOVE_UP_RIGHT,
790     CMD_MAP_MOVE_DOWN_RIGHT,
791
792     CMD_MAP_JUMP_LEFT,
793     CMD_MAP_JUMP_DOWN,
794     CMD_MAP_JUMP_UP,
795     CMD_MAP_JUMP_RIGHT,
796     CMD_MAP_JUMP_UP_LEFT,
797     CMD_MAP_JUMP_DOWN_LEFT,
798     CMD_MAP_JUMP_UP_RIGHT,
799     CMD_MAP_JUMP_DOWN_RIGHT,
800
801     CMD_MAP_NEXT_LEVEL,
802     CMD_MAP_PREV_LEVEL,
803     CMD_MAP_GOTO_LEVEL,
804
805     CMD_MAP_SCROLL_DOWN,
806     CMD_MAP_SCROLL_UP,
807
808     CMD_MAP_FIND_UPSTAIR,
809     CMD_MAP_FIND_DOWNSTAIR,
810     CMD_MAP_FIND_YOU,
811     CMD_MAP_FIND_PORTAL,
812     CMD_MAP_FIND_TRAP,
813     CMD_MAP_FIND_ALTAR,
814     CMD_MAP_FIND_EXCLUDED,
815     CMD_MAP_FIND_WAYPOINT,
816     CMD_MAP_FIND_STASH,
817     CMD_MAP_FIND_STASH_REVERSE,
818
819     CMD_MAP_GOTO_TARGET,
820     CMD_MAP_ANNOTATE_LEVEL,
821
822     CMD_MAP_WIZARD_TELEPORT,
823
824     CMD_MAP_HELP,
825     CMD_MAP_FORGET,
826
827     CMD_MAP_EXIT_MAP,
828
829     CMD_MAX_OVERMAP = CMD_MAP_EXIT_MAP,
830
831     // targetting commands
832     CMD_TARGET_DOWN_LEFT,
833     CMD_MIN_TARGET = CMD_TARGET_DOWN_LEFT,
834     CMD_TARGET_DOWN,
835     CMD_TARGET_DOWN_RIGHT,
836     CMD_TARGET_LEFT,
837     CMD_TARGET_RIGHT,
838     CMD_TARGET_UP_LEFT,
839     CMD_TARGET_UP,
840     CMD_TARGET_UP_RIGHT,
841
842     CMD_TARGET_DIR_DOWN_LEFT,
843     CMD_TARGET_DIR_DOWN,
844     CMD_TARGET_DIR_DOWN_RIGHT,
845     CMD_TARGET_DIR_LEFT,
846     CMD_TARGET_DIR_RIGHT,
847     CMD_TARGET_DIR_UP_LEFT,
848     CMD_TARGET_DIR_UP,
849     CMD_TARGET_DIR_UP_RIGHT,
850
851     CMD_TARGET_DESCRIBE,
852     CMD_TARGET_PREV_TARGET,
853     CMD_TARGET_MAYBE_PREV_TARGET,
854     CMD_TARGET_SELECT,
855     CMD_TARGET_SELECT_ENDPOINT,
856     CMD_TARGET_SELECT_FORCE,
857     CMD_TARGET_SELECT_FORCE_ENDPOINT,
858     CMD_TARGET_GET,
859     CMD_TARGET_OBJ_CYCLE_BACK,
860     CMD_TARGET_OBJ_CYCLE_FORWARD,
861     CMD_TARGET_CYCLE_FORWARD,
862     CMD_TARGET_CYCLE_BACK,
863     CMD_TARGET_CYCLE_BEAM,
864     CMD_TARGET_CYCLE_MLIST = CMD_NO_CMD + 1000, // for indices a-z in the monster list
865     CMD_TARGET_CYCLE_MLIST_END = CMD_NO_CMD + 1025,
866     CMD_TARGET_TOGGLE_MLIST,
867     CMD_TARGET_TOGGLE_BEAM,
868     CMD_TARGET_CANCEL,
869     CMD_TARGET_SHOW_PROMPT,
870     CMD_TARGET_OLD_SPACE,
871     CMD_TARGET_EXCLUDE,
872     CMD_TARGET_FIND_TRAP,
873     CMD_TARGET_FIND_PORTAL,
874     CMD_TARGET_FIND_ALTAR,
875     CMD_TARGET_FIND_UPSTAIR,
876     CMD_TARGET_FIND_DOWNSTAIR,
877     CMD_TARGET_FIND_YOU,
878     CMD_TARGET_WIZARD_MAKE_FRIENDLY,
879     CMD_TARGET_WIZARD_BLESS_MONSTER,
880     CMD_TARGET_WIZARD_MAKE_SHOUT,
881     CMD_TARGET_WIZARD_GIVE_ITEM,
882     CMD_TARGET_WIZARD_MOVE,
883     CMD_TARGET_WIZARD_PATHFIND,
884     CMD_TARGET_WIZARD_GAIN_LEVEL,
885     CMD_TARGET_WIZARD_MISCAST,
886     CMD_TARGET_WIZARD_MAKE_SUMMONED,
887     CMD_TARGET_WIZARD_POLYMORPH,
888     CMD_TARGET_WIZARD_DEBUG_MONSTER,
889     CMD_TARGET_WIZARD_HEAL_MONSTER,
890     CMD_TARGET_WIZARD_HURT_MONSTER,
891     CMD_TARGET_WIZARD_DEBUG_PORTAL,
892     CMD_TARGET_WIZARD_KILL_MONSTER,
893     CMD_TARGET_WIZARD_BANISH_MONSTER,
894     CMD_TARGET_MOUSE_MOVE,
895     CMD_TARGET_MOUSE_SELECT,
896     CMD_TARGET_HELP,
897     CMD_MAX_TARGET = CMD_TARGET_HELP,
898
899 #ifdef USE_TILE
900     // Tile doll editing screen
901     CMD_DOLL_RANDOMIZE,
902     CMD_MIN_DOLL = CMD_DOLL_RANDOMIZE,
903     CMD_DOLL_SELECT_NEXT_DOLL,
904     CMD_DOLL_SELECT_PREV_DOLL,
905     CMD_DOLL_SELECT_NEXT_PART,
906     CMD_DOLL_SELECT_PREV_PART,
907     CMD_DOLL_CHANGE_PART_NEXT,
908     CMD_DOLL_CHANGE_PART_PREV,
909     CMD_DOLL_CONFIRM_CHOICE,
910     CMD_DOLL_COPY,
911     CMD_DOLL_PASTE,
912     CMD_DOLL_TAKE_OFF,
913     CMD_DOLL_TAKE_OFF_ALL,
914     CMD_DOLL_TOGGLE_EQUIP,
915     CMD_DOLL_TOGGLE_EQUIP_ALL,
916     CMD_DOLL_JOB_DEFAULT,
917     CMD_DOLL_CHANGE_MODE,
918     CMD_DOLL_SAVE,
919     CMD_DOLL_QUIT,
920     CMD_MAX_DOLL = CMD_DOLL_QUIT,
921 #endif
922
923     // Disable/enable -more- prompts.
924     CMD_DISABLE_MORE,
925     CMD_MIN_SYNTHETIC = CMD_DISABLE_MORE,
926     CMD_ENABLE_MORE,
927     CMD_UNWIELD_WEAPON,
928
929     // [ds] Silently ignored, requests another round of input.
930     CMD_NEXT_CMD,
931
932     // Must always be last
933     CMD_MAX_CMD
934 };
935
936 enum conduct_type
937 {
938     DID_NOTHING,
939     DID_NECROMANCY,                       // vamp/drain/pain/reap, Zong/Curses
940     DID_HOLY,                             // holy wrath, holy word scrolls
941     DID_UNHOLY,                           // demon weapons, demon spells
942     DID_ATTACK_HOLY,
943     DID_ATTACK_NEUTRAL,
944     DID_ATTACK_FRIEND,
945     DID_FRIEND_DIED,
946     DID_UNCHIVALRIC_ATTACK,
947     DID_POISON,
948     DID_KILL_LIVING,
949     DID_KILL_UNDEAD,
950     DID_KILL_DEMON,
951     DID_KILL_NATURAL_UNHOLY,              // TSO
952     DID_KILL_NATURAL_EVIL,                // TSO
953     DID_KILL_UNCLEAN,                     // Zin
954     DID_KILL_CHAOTIC,                     // Zin
955     DID_KILL_WIZARD,                      // Trog
956     DID_KILL_PRIEST,                      // Beogh
957     DID_KILL_HOLY,
958     DID_KILL_FAST,                        // Cheibriados
959     DID_LIVING_KILLED_BY_UNDEAD_SLAVE,
960     DID_LIVING_KILLED_BY_SERVANT,
961     DID_UNDEAD_KILLED_BY_UNDEAD_SLAVE,
962     DID_UNDEAD_KILLED_BY_SERVANT,
963     DID_DEMON_KILLED_BY_UNDEAD_SLAVE,
964     DID_DEMON_KILLED_BY_SERVANT,
965     DID_NATURAL_UNHOLY_KILLED_BY_SERVANT, // TSO
966     DID_NATURAL_EVIL_KILLED_BY_SERVANT,   // TSO
967     DID_HOLY_KILLED_BY_UNDEAD_SLAVE,
968     DID_HOLY_KILLED_BY_SERVANT,
969     DID_BANISH,
970     DID_SPELL_MEMORISE,
971     DID_SPELL_CASTING,
972     DID_SPELL_PRACTISE,
973     DID_CARDS,
974     DID_DRINK_BLOOD,
975     DID_CANNIBALISM,
976     DID_EAT_SOULED_BEING,                 // Zin
977     DID_DELIBERATE_MUTATING,              // Zin
978     DID_CAUSE_GLOWING,                    // Zin
979     DID_UNCLEAN,                          // Zin (used unclean weapon/magic)
980     DID_CHAOS,                            // Zin (used chaotic weapon/magic)
981     DID_DESECRATE_ORCISH_REMAINS,         // Beogh
982     DID_DESTROY_ORCISH_IDOL,              // Beogh
983     DID_KILL_SLIME,                       // Jiyva
984     DID_KILL_PLANT,                       // Fedhas
985     DID_PLANT_KILLED_BY_SERVANT,          // Fedhas
986     DID_HASTY,                            // Cheibriados
987     DID_CORPSE_VIOLATION,                 // Fedhas (Necromancy involving
988                                           // corpses/chunks).
989     DID_SOULED_FRIEND_DIED,               // Zin
990     DID_UNCLEAN_KILLED_BY_SERVANT,        // Zin
991     DID_CHAOTIC_KILLED_BY_SERVANT,        // Zin
992     DID_ATTACK_IN_SANCTUARY,              // Zin
993     DID_KILL_ARTIFICIAL,                  // Yredelemnul
994     DID_ARTIFICIAL_KILLED_BY_UNDEAD_SLAVE,// Yredelemnul
995     DID_ARTIFICIAL_KILLED_BY_SERVANT,     // Yredelemnul
996     DID_DESTROY_SPELLBOOK,                // Sif Muna
997     DID_EXPLORATION,                      // Ashenzari, wrath timers
998     DID_DESECRATE_HOLY_REMAINS,           // Zin/Ely/TSO/Yredelemnul
999     DID_SEE_MONSTER,                      // TSO
1000
1001     NUM_CONDUCTS
1002 };
1003
1004 enum confirm_butcher_type
1005 {
1006     CONFIRM_NEVER,
1007     CONFIRM_ALWAYS,
1008     CONFIRM_AUTO,
1009 };
1010
1011 enum confirm_prompt_type
1012 {
1013     CONFIRM_CANCEL,             // automatically answer 'no', i.e. disallow
1014     CONFIRM_PROMPT,             // prompt
1015     CONFIRM_NONE,               // automatically answer 'yes'
1016 };
1017
1018 enum confirm_level_type
1019 {
1020     CONFIRM_NONE_EASY,
1021     CONFIRM_SAFE_EASY,
1022     CONFIRM_ALL_EASY,
1023 };
1024
1025 enum chunk_drop_type
1026 {
1027     ADC_NEVER,
1028     ADC_ROTTEN,
1029     ADC_YES,
1030 };
1031
1032 // When adding new delays, update their names in delay.cc
1033 enum delay_type
1034 {
1035     DELAY_NOT_DELAYED,
1036     DELAY_EAT,
1037     DELAY_FEED_VAMPIRE,
1038     DELAY_ARMOUR_ON,
1039     DELAY_ARMOUR_OFF,
1040     DELAY_JEWELLERY_ON,
1041     DELAY_MEMORISE,
1042     DELAY_BUTCHER,
1043     DELAY_BOTTLE_BLOOD,
1044     DELAY_WEAPON_SWAP,
1045     DELAY_PASSWALL,
1046     DELAY_DROP_ITEM,
1047     DELAY_MULTIDROP,
1048     DELAY_ASCENDING_STAIRS,
1049     DELAY_DESCENDING_STAIRS,
1050     DELAY_RECITE,  // Zin's Recite invocation
1051
1052     // [dshaligram] Shift-running, resting, travel and macros are now
1053     // also handled as delays.
1054     DELAY_RUN,
1055     DELAY_REST,
1056     DELAY_TRAVEL,
1057
1058     DELAY_MACRO,
1059
1060     // In a macro delay, a stacked delay to tell Crawl to read and act on
1061     // one input command.
1062     DELAY_MACRO_PROCESS_KEY,
1063
1064     DELAY_INTERRUPTIBLE,                // simple interruptible delay
1065     DELAY_UNINTERRUPTIBLE,              // simple uninterruptible delay
1066
1067     NUM_DELAYS
1068 };
1069
1070 enum description_level_type
1071 {
1072     DESC_THE,
1073     DESC_A,
1074     DESC_YOUR,
1075     DESC_PLAIN,
1076     DESC_ITS,
1077     DESC_INVENTORY_EQUIP,
1078     DESC_INVENTORY,
1079
1080     // Partial item names.
1081     DESC_BASENAME,                     // Base name of item subtype
1082     DESC_QUALNAME,                     // Name without articles, quantities,
1083                                        // enchantments.
1084     DESC_DBNAME,                       // Name with which to look up item
1085                                        // description in the db.
1086
1087     DESC_NONE
1088 };
1089
1090 enum evoc_type
1091 {
1092     EVOC_WAND,
1093     EVOC_ROD,
1094     EVOC_DECK,
1095     EVOC_MISC,
1096 };
1097
1098 enum game_direction_type
1099 {
1100     GDT_GAME_START = 0,
1101     GDT_DESCENDING,
1102     GDT_ASCENDING,
1103 };
1104
1105 enum game_type
1106 {
1107     GAME_TYPE_UNSPECIFIED,
1108     GAME_TYPE_NORMAL,
1109     GAME_TYPE_TUTORIAL,
1110     GAME_TYPE_ARENA,
1111     GAME_TYPE_SPRINT,
1112     GAME_TYPE_HINTS,
1113     GAME_TYPE_ZOTDEF,
1114     GAME_TYPE_INSTRUCTIONS,
1115     GAME_TYPE_HIGH_SCORES,
1116     NUM_GAME_TYPE
1117 };
1118
1119 enum level_flag_type
1120 {
1121     LFLAG_NONE = 0,
1122
1123     LFLAG_NO_TELE_CONTROL = (1 << 0), // Teleport control not allowed.
1124     LFLAG_NO_MAP          = (1 << 2), // Level can't be persistently mapped.
1125 };
1126
1127 // Volatile state and cache.
1128 enum level_state_type
1129 {
1130     LSTATE_NONE = 0,
1131
1132     LSTATE_GOLUBRIA       = (1 << 0), // A Golubria trap exists.
1133     LSTATE_GLOW_MOLD      = (1 << 1), // Any glowing mold exists.
1134
1135     LSTATE_DELETED        = (1 << 2), // The level won't be saved.
1136     LSTATE_BEOGH          = (1 << 3), // Possibly an orcish priest around.
1137 };
1138
1139 // NOTE: The order of these is very important to their usage!
1140 // [dshaligram] If adding/removing from this list, also update view.cc!
1141 enum dungeon_char_type
1142 {
1143     DCHAR_WALL,
1144     DCHAR_WALL_MAGIC,
1145     DCHAR_FLOOR,
1146     DCHAR_FLOOR_MAGIC,
1147     DCHAR_DOOR_OPEN,
1148     DCHAR_DOOR_CLOSED,
1149     DCHAR_TRAP,
1150     DCHAR_STAIRS_DOWN,
1151     DCHAR_STAIRS_UP,
1152     DCHAR_GRATE,
1153     DCHAR_ALTAR,
1154     DCHAR_ARCH,
1155     DCHAR_FOUNTAIN,
1156     DCHAR_WAVY,
1157     DCHAR_STATUE,
1158     DCHAR_INVIS_EXPOSED,
1159     DCHAR_ITEM_DETECTED,
1160     DCHAR_ITEM_ORB,
1161     DCHAR_ITEM_WEAPON,
1162     DCHAR_ITEM_ARMOUR,
1163     DCHAR_ITEM_WAND,
1164     DCHAR_ITEM_FOOD,
1165     DCHAR_ITEM_SCROLL,
1166     DCHAR_ITEM_RING,
1167     DCHAR_ITEM_POTION,
1168     DCHAR_ITEM_MISSILE,
1169     DCHAR_ITEM_BOOK,
1170     DCHAR_ITEM_STAVE,
1171     DCHAR_ITEM_MISCELLANY,
1172     DCHAR_ITEM_CORPSE,
1173     DCHAR_ITEM_GOLD,
1174     DCHAR_ITEM_AMULET,
1175     DCHAR_CLOUD,
1176     DCHAR_TREE,
1177     DCHAR_TELEPORTER,
1178
1179     DCHAR_SPACE,
1180     DCHAR_FIRED_FLASK,
1181     DCHAR_FIRED_BOLT,
1182     DCHAR_FIRED_CHUNK,
1183     DCHAR_FIRED_BOOK,
1184     DCHAR_FIRED_WEAPON,
1185     DCHAR_FIRED_ZAP,
1186     DCHAR_FIRED_BURST,
1187     DCHAR_FIRED_STICK,
1188     DCHAR_FIRED_TRINKET,
1189     DCHAR_FIRED_SCROLL,
1190     DCHAR_FIRED_DEBUG,
1191     DCHAR_FIRED_ARMOUR,
1192     DCHAR_FIRED_MISSILE,
1193     DCHAR_EXPLOSION,
1194
1195     DCHAR_FRAME_HORIZ,
1196     DCHAR_FRAME_VERT,
1197     DCHAR_FRAME_TL,
1198     DCHAR_FRAME_TR,
1199     DCHAR_FRAME_BL,
1200     DCHAR_FRAME_BR,
1201
1202     NUM_DCHAR_TYPES
1203 };
1204
1205 // When adding:
1206 //
1207 // * New stairs/portals: update grid_stair_direction.
1208 // * Any: edit view.cc and add a glyph and colour for the feature.
1209 // * Any: edit directn.cc and add a description for the feature.
1210 // * Any: edit dat/descript/features.txt and add a
1211 //        long description if appropriate.
1212 // * Any: check the grid_* functions in misc.cc and make sure
1213 //        they return sane values for your new feature.
1214 // * Any: edit dungeon.cc and add a symbol to map_feature() and
1215 //        vault_grid() for the feature, if you want vault maps to
1216 //        be able to use it.  If you do, also update
1217 //        docs/develop/levels/syntax.txt with the new symbol.
1218 // * Any: edit l_dgngrd.cc and add the feature's name to the dngn_feature_names
1219 //        array, if you want vault map Lua code to be able to use the
1220 //        feature, and/or you want to be able to create the feature
1221 //        using the "create feature by name" wizard command.
1222 // Also take note of MINMOVE and MINSEE above.
1223 //
1224 enum dungeon_feature_type
1225 {
1226     DNGN_UNSEEN,
1227     DNGN_CLOSED_DOOR,
1228     DNGN_RUNED_DOOR,
1229     DNGN_SEALED_DOOR,
1230     DNGN_MANGROVE,
1231     DNGN_METAL_WALL,
1232         DNGN_MINWALL = DNGN_METAL_WALL,
1233     DNGN_GREEN_CRYSTAL_WALL,
1234     DNGN_ROCK_WALL,
1235     DNGN_SLIMY_WALL,
1236     DNGN_STONE_WALL,
1237     DNGN_PERMAROCK_WALL,               // for undiggable walls
1238         DNGN_MAXOPAQUE = DNGN_PERMAROCK_WALL,
1239     DNGN_CLEAR_ROCK_WALL,              // transparent walls
1240         // Lowest grid value which can be seen through.
1241         DNGN_MINSEE = DNGN_CLEAR_ROCK_WALL,
1242     DNGN_CLEAR_STONE_WALL,
1243     DNGN_CLEAR_PERMAROCK_WALL,
1244         DNGN_MAXWALL = DNGN_CLEAR_PERMAROCK_WALL,
1245     DNGN_GRATE,
1246     DNGN_TREE,
1247         DNGN_MAX_NONREACH = DNGN_TREE,
1248
1249     DNGN_OPEN_SEA,                     // Shoals equivalent for permarock
1250     DNGN_LAVA_SEA,                     // Gehenna equivalent for permarock
1251     DNGN_ORCISH_IDOL,
1252     DNGN_GRANITE_STATUE,
1253     DNGN_MALIGN_GATEWAY,
1254         // Highest solid grid value.
1255         DNGN_MAXSOLID = DNGN_MALIGN_GATEWAY,
1256
1257     DNGN_LAVA            = 30,
1258         DNGN_MINMOVE = DNGN_LAVA, // Can be moved through.
1259     DNGN_DEEP_WATER,
1260
1261     DNGN_SHALLOW_WATER,
1262         DNGN_MINWALK = DNGN_SHALLOW_WATER,
1263
1264     // Lowest grid value that an item can be placed on.
1265     DNGN_MINITEM = DNGN_SHALLOW_WATER,
1266
1267     DNGN_FLOOR,
1268     DNGN_OPEN_DOOR,
1269
1270     DNGN_TRAP_MECHANICAL,
1271     DNGN_TRAP_MAGICAL,
1272     DNGN_TRAP_NATURAL,
1273     DNGN_TRAP_WEB,
1274     DNGN_UNDISCOVERED_TRAP,
1275
1276     DNGN_ENTER_SHOP,
1277     DNGN_ABANDONED_SHOP,
1278
1279     DNGN_STONE_STAIRS_DOWN_I,
1280     DNGN_STONE_STAIRS_DOWN_II,
1281     DNGN_STONE_STAIRS_DOWN_III,
1282     DNGN_ESCAPE_HATCH_DOWN,
1283
1284     // corresponding up stairs (same order as above)
1285     DNGN_STONE_STAIRS_UP_I,
1286     DNGN_STONE_STAIRS_UP_II,
1287     DNGN_STONE_STAIRS_UP_III,
1288     DNGN_ESCAPE_HATCH_UP,
1289
1290     // Various gates
1291     DNGN_ENTER_DIS,
1292     DNGN_ENTER_GEHENNA,
1293     DNGN_ENTER_COCYTUS,
1294     DNGN_ENTER_TARTARUS,
1295     DNGN_ENTER_ABYSS,
1296     DNGN_EXIT_ABYSS,
1297 #if TAG_MAJOR_VERSION > 34
1298     DNGN_ABYSSAL_STAIR,
1299 #endif
1300     DNGN_STONE_ARCH,
1301     DNGN_ENTER_PANDEMONIUM,
1302     DNGN_EXIT_PANDEMONIUM,
1303     DNGN_TRANSIT_PANDEMONIUM,
1304     DNGN_EXIT_DUNGEON,
1305     DNGN_EXIT_THROUGH_ABYSS,
1306     DNGN_EXIT_HELL,
1307     DNGN_ENTER_HELL,
1308     DNGN_ENTER_LABYRINTH,
1309     DNGN_TELEPORTER,
1310     DNGN_ENTER_PORTAL_VAULT,
1311     DNGN_EXIT_PORTAL_VAULT,
1312     DNGN_EXPIRED_PORTAL,
1313
1314     // Entrances to various branches
1315     DNGN_ENTER_DWARVEN_HALL,
1316         DNGN_ENTER_FIRST_BRANCH = DNGN_ENTER_DWARVEN_HALL,
1317     DNGN_ENTER_ORCISH_MINES,
1318     DNGN_ENTER_LAIR,
1319     DNGN_ENTER_SLIME_PITS,
1320     DNGN_ENTER_VAULTS,
1321     DNGN_ENTER_CRYPT,
1322     DNGN_ENTER_HALL_OF_BLADES,
1323     DNGN_ENTER_ZOT,
1324     DNGN_ENTER_TEMPLE,
1325     DNGN_ENTER_SNAKE_PIT,
1326     DNGN_ENTER_ELVEN_HALLS,
1327     DNGN_ENTER_TOMB,
1328     DNGN_ENTER_SWAMP,
1329     DNGN_ENTER_SHOALS,
1330     DNGN_ENTER_SPIDER_NEST,
1331     DNGN_ENTER_FOREST,
1332         DNGN_ENTER_LAST_BRANCH = DNGN_ENTER_FOREST,
1333     DNGN_UNUSED_ENTER_BRANCH_1,
1334
1335     // Exits from various branches
1336     // Order must be the same as above
1337     DNGN_RETURN_FROM_DWARVEN_HALL,
1338         DNGN_RETURN_FROM_FIRST_BRANCH = DNGN_RETURN_FROM_DWARVEN_HALL,
1339     DNGN_RETURN_FROM_ORCISH_MINES,
1340     DNGN_RETURN_FROM_LAIR,
1341     DNGN_RETURN_FROM_SLIME_PITS,
1342     DNGN_RETURN_FROM_VAULTS,
1343     DNGN_RETURN_FROM_CRYPT,
1344     DNGN_RETURN_FROM_HALL_OF_BLADES,
1345     DNGN_RETURN_FROM_ZOT,
1346     DNGN_RETURN_FROM_TEMPLE,
1347     DNGN_RETURN_FROM_SNAKE_PIT,
1348     DNGN_RETURN_FROM_ELVEN_HALLS,
1349     DNGN_RETURN_FROM_TOMB,
1350     DNGN_RETURN_FROM_SWAMP,
1351     DNGN_RETURN_FROM_SHOALS,
1352     DNGN_RETURN_FROM_SPIDER_NEST,
1353     DNGN_RETURN_FROM_FOREST,
1354         DNGN_RETURN_FROM_LAST_BRANCH = DNGN_RETURN_FROM_FOREST,
1355     DNGN_UNUSED_RETURN_BRANCH_1,
1356
1357     // Order of altars must match order of gods (god_type)
1358     DNGN_ALTAR_ZIN,
1359         DNGN_ALTAR_FIRST_GOD = DNGN_ALTAR_ZIN,
1360     DNGN_ALTAR_SHINING_ONE,
1361     DNGN_ALTAR_KIKUBAAQUDGHA,
1362     DNGN_ALTAR_YREDELEMNUL,
1363     DNGN_ALTAR_XOM,
1364     DNGN_ALTAR_VEHUMET,
1365     DNGN_ALTAR_OKAWARU,
1366     DNGN_ALTAR_MAKHLEB,
1367     DNGN_ALTAR_SIF_MUNA,
1368     DNGN_ALTAR_TROG,
1369     DNGN_ALTAR_NEMELEX_XOBEH,
1370     DNGN_ALTAR_ELYVILON,
1371     DNGN_ALTAR_LUGONU,
1372     DNGN_ALTAR_BEOGH,
1373     DNGN_ALTAR_JIYVA,
1374     DNGN_ALTAR_FEDHAS,
1375     DNGN_ALTAR_CHEIBRIADOS,
1376     DNGN_ALTAR_ASHENZARI,
1377         DNGN_ALTAR_LAST_GOD = DNGN_ALTAR_ASHENZARI,
1378     DNGN_UNUSED_ALTAR_1,
1379
1380     DNGN_FOUNTAIN_BLUE,
1381     DNGN_FOUNTAIN_SPARKLING,           // aka 'Magic Fountain' {dlb}
1382     DNGN_FOUNTAIN_BLOOD,
1383     // same order as above!
1384     DNGN_DRY_FOUNTAIN_BLUE,
1385     DNGN_DRY_FOUNTAIN_SPARKLING,
1386     DNGN_DRY_FOUNTAIN_BLOOD,
1387     DNGN_PERMADRY_FOUNTAIN,
1388
1389     // Not meant to ever appear in grd().
1390     DNGN_EXPLORE_HORIZON, // dummy for redefinition
1391
1392     DNGN_UNKNOWN_ALTAR,
1393     DNGN_UNKNOWN_PORTAL,
1394
1395 #if TAG_MAJOR_VERSION == 34
1396     DNGN_ABYSSAL_STAIR,
1397     DNGN_BADLY_SEALED_DOOR,
1398 #endif
1399
1400     NUM_FEATURES
1401 };
1402
1403 enum duration_type
1404 {
1405     DUR_INVIS,
1406     DUR_CONF,
1407     DUR_PARALYSIS,
1408     DUR_SLOW,
1409     DUR_MESMERISED,
1410     DUR_HASTE,
1411     DUR_MIGHT,
1412     DUR_BRILLIANCE,
1413     DUR_AGILITY,
1414     DUR_FLIGHT,
1415     DUR_BERSERK,
1416     DUR_POISONING,
1417
1418     DUR_CONFUSING_TOUCH,
1419     DUR_SURE_BLADE,
1420     DUR_CORONA,
1421     DUR_DEATHS_DOOR,
1422     DUR_FIRE_SHIELD,
1423
1424     DUR_BUILDING_RAGE,          // countdown to starting berserk
1425     DUR_EXHAUSTED,              // fatigue counter for berserk
1426
1427     DUR_LIQUID_FLAMES,
1428     DUR_ICY_ARMOUR,
1429     DUR_REPEL_MISSILES,
1430     DUR_JELLY_PRAYER,
1431     DUR_PIETY_POOL,             // distribute piety over time
1432     DUR_DIVINE_VIGOUR,          // duration of Ely's Divine Vigour
1433     DUR_DIVINE_STAMINA,         // duration of Zin's Divine Stamina
1434     DUR_DIVINE_SHIELD,          // duration of TSO's Divine Shield
1435     DUR_REGENERATION,
1436     DUR_SWIFTNESS,
1437 #if TAG_MAJOR_VERSION == 34
1438     DUR_CONTROLLED_FLIGHT,
1439 #endif
1440     DUR_TELEPORT,
1441     DUR_CONTROL_TELEPORT,
1442     DUR_BREATH_WEAPON,
1443     DUR_TRANSFORMATION,
1444     DUR_DEATH_CHANNEL,
1445     DUR_DEFLECT_MISSILES,
1446     DUR_PHASE_SHIFT,
1447 #if TAG_MAJOR_VERSION == 34
1448     DUR_SEE_INVISIBLE,
1449 #endif
1450     DUR_WEAPON_BRAND,           // general "branding" spell counter
1451     DUR_DEMONIC_GUARDIAN,       // demonic guardian timeout
1452     DUR_POWERED_BY_DEATH,
1453     DUR_SILENCE,
1454     DUR_CONDENSATION_SHIELD,
1455     DUR_STONESKIN,
1456     DUR_GOURMAND,
1457     DUR_BARGAIN,
1458 #if TAG_MAJOR_VERSION == 34
1459     DUR_INSULATION,
1460 #endif
1461     DUR_RESISTANCE,
1462     DUR_SLAYING,
1463     DUR_STEALTH,
1464     DUR_MAGIC_SHIELD,
1465     DUR_SLEEP,
1466     DUR_TELEPATHY,
1467     DUR_PETRIFIED,
1468     DUR_LOWERED_MR,
1469     DUR_REPEL_STAIRS_MOVE,
1470     DUR_REPEL_STAIRS_CLIMB,
1471     DUR_COLOUR_SMOKE_TRAIL,
1472     DUR_SLIMIFY,
1473     DUR_TIME_STEP,
1474     DUR_ICEMAIL_DEPLETED,       // Wait this many turns for full Icemail
1475     DUR_MISLED,
1476     DUR_QUAD_DAMAGE,
1477     DUR_AFRAID,
1478     DUR_MIRROR_DAMAGE,
1479     DUR_SCRYING,
1480     DUR_TORNADO,
1481     DUR_LIQUEFYING,
1482     DUR_HEROISM,
1483     DUR_FINESSE,
1484     DUR_LIFESAVING,
1485     DUR_PARALYSIS_IMMUNITY,
1486     DUR_DARKNESS,
1487     DUR_PETRIFYING,
1488     DUR_SHROUD_OF_GOLUBRIA,
1489     DUR_TORNADO_COOLDOWN,
1490 #if TAG_MAJOR_VERSION == 34
1491     DUR_NAUSEA,
1492 #endif
1493     DUR_AMBROSIA,
1494 #if TAG_MAJOR_VERSION == 34
1495     DUR_TEMP_MUTATIONS,
1496 #endif
1497     DUR_DISJUNCTION,
1498     DUR_VEHUMET_GIFT,
1499 #if TAG_MAJOR_VERSION == 34
1500     DUR_BATTLESPHERE,
1501 #endif
1502     DUR_SENTINEL_MARK,
1503     DUR_SICKENING,
1504     DUR_WATER_HOLD,
1505     DUR_WATER_HOLD_IMMUNITY,
1506     DUR_FLAYED,
1507     DUR_RETCHING,
1508     DUR_WEAK,
1509     DUR_DIMENSION_ANCHOR,
1510     DUR_ANTIMAGIC,
1511     NUM_DURATIONS
1512 };
1513
1514 // This list must match the enchant_names array in mon-ench.cc
1515 // Enchantments that imply other enchantments should come first
1516 // to avoid timeout message confusion. Currently:
1517 //     berserk -> haste, might; fatigue -> slow
1518 enum enchant_type
1519 {
1520     ENCH_NONE = 0,
1521     ENCH_BERSERK,
1522     ENCH_HASTE,
1523     ENCH_MIGHT,
1524     ENCH_FATIGUE,        // Post-berserk fatigue.
1525     ENCH_SLOW,
1526     ENCH_FEAR,
1527     ENCH_CONFUSION,
1528     ENCH_INVIS,
1529     ENCH_POISON,
1530     ENCH_ROT,
1531     ENCH_SUMMON,
1532     ENCH_ABJ,
1533     ENCH_CORONA,
1534     ENCH_CHARM,
1535     ENCH_STICKY_FLAME,
1536     ENCH_GLOWING_SHAPESHIFTER,
1537     ENCH_SHAPESHIFTER,
1538     ENCH_TP,
1539     ENCH_SLEEP_WARY,
1540     ENCH_SUBMERGED,
1541     ENCH_SHORT_LIVED,
1542     ENCH_PARALYSIS,
1543     ENCH_SICK,
1544     ENCH_SLEEPY,         //   Monster can't wake until this wears off.
1545     ENCH_HELD,           //   Caught in a net.
1546     ENCH_BATTLE_FRENZY,  //   Monster is in a battle frenzy.
1547 #if TAG_MAJOR_VERSION == 34
1548     ENCH_TEMP_PACIF,
1549 #endif
1550     ENCH_PETRIFYING,
1551     ENCH_PETRIFIED,
1552     ENCH_LOWERED_MR,
1553     ENCH_SOUL_RIPE,
1554     ENCH_SLOWLY_DYING,
1555     ENCH_EAT_ITEMS,
1556     ENCH_AQUATIC_LAND,   // Water monsters lose hp while on land.
1557     ENCH_SPORE_PRODUCTION,
1558 #if TAG_MAJOR_VERSION == 34
1559     ENCH_SLOUCH,
1560 #endif
1561     ENCH_SWIFT,
1562     ENCH_TIDE,
1563     ENCH_INSANE,         // Berserk + changed attitude.
1564     ENCH_SILENCE,
1565     ENCH_AWAKEN_FOREST,
1566     ENCH_EXPLODING,
1567     ENCH_BLEED,
1568     ENCH_PORTAL_TIMER,
1569     ENCH_SEVERED,
1570     ENCH_ANTIMAGIC,
1571     ENCH_FADING_AWAY,
1572     ENCH_PREPARING_RESURRECT,
1573     ENCH_REGENERATION,
1574     ENCH_RAISED_MR,
1575     ENCH_MIRROR_DAMAGE,
1576     ENCH_STONESKIN,
1577     ENCH_FEAR_INSPIRING,
1578     ENCH_PORTAL_PACIFIED,
1579     ENCH_WITHDRAWN,
1580     ENCH_ATTACHED,
1581     ENCH_LIFE_TIMER,    // Minimum time demonic guardian must exist.
1582     ENCH_FLIGHT,
1583     ENCH_LIQUEFYING,
1584     ENCH_TORNADO,
1585     ENCH_FAKE_ABJURATION,
1586     ENCH_DAZED,         // Dazed - less chance of acting each turn.
1587     ENCH_MUTE,          // Silenced.
1588     ENCH_BLIND,         // Blind (everything is invisible).
1589     ENCH_DUMB,          // Stupefied (paralysis by a different name).
1590     ENCH_MAD,           // Confusion by another name.
1591     ENCH_SILVER_CORONA, // Zin's silver light.
1592     ENCH_RECITE_TIMER,  // Was recited against.
1593     ENCH_INNER_FLAME,
1594     ENCH_ROUSED,        // Monster has been roused to greatness
1595     ENCH_BREATH_WEAPON, // just a simple timer for dragon breathweapon spam
1596     ENCH_DEATHS_DOOR,
1597     ENCH_ROLLING,       // Boulder Beetle in ball form
1598     ENCH_OZOCUBUS_ARMOUR,
1599     ENCH_WRETCHED,      // An abstract placeholder for monster mutations
1600     ENCH_SCREAMED,      // Starcursed scream timer
1601     ENCH_WORD_OF_RECALL,// Chanting word of recall
1602     ENCH_INJURY_BOND,
1603     ENCH_WATER_HOLD,      // Silence and asphyxiation damage
1604     ENCH_FLAYED,
1605     ENCH_HAUNTING,
1606     ENCH_RETCHING,
1607     ENCH_WEAK,
1608     ENCH_DIMENSION_ANCHOR,
1609     // Update enchantment names in mon-ench.cc when adding or removing
1610     // enchantments.
1611     NUM_ENCHANTMENTS
1612 };
1613
1614 enum enchant_retval
1615 {
1616     ERV_FAIL,
1617     ERV_NEW,
1618     ERV_INCREASED,
1619 };
1620
1621 enum energy_use_type
1622 {
1623     EUT_MOVE,
1624     EUT_SWIM,
1625     EUT_ATTACK,
1626     EUT_MISSILE,
1627     EUT_SPELL,
1628     EUT_SPECIAL,
1629     EUT_ITEM,
1630     EUT_PICKUP,
1631 };
1632
1633 enum equipment_type
1634 {
1635     EQ_NONE = -1,
1636
1637     EQ_WEAPON,
1638     EQ_CLOAK,
1639     EQ_HELMET,
1640     EQ_GLOVES,
1641     EQ_BOOTS,
1642     EQ_SHIELD,
1643     EQ_BODY_ARMOUR,
1644     //Everything beyond here is jewellery
1645     EQ_LEFT_RING,
1646     EQ_RIGHT_RING,
1647     EQ_AMULET,
1648     //Octopodes don't have left and right rings. They have eight rings, instead.
1649     EQ_RING_ONE,
1650     EQ_RING_TWO,
1651     EQ_RING_THREE,
1652     EQ_RING_FOUR,
1653     EQ_RING_FIVE,
1654     EQ_RING_SIX,
1655     EQ_RING_SEVEN,
1656     EQ_RING_EIGHT,
1657     NUM_EQUIP,
1658
1659     EQ_MIN_ARMOUR = EQ_CLOAK,
1660     EQ_MAX_ARMOUR = EQ_BODY_ARMOUR,
1661     EQ_MAX_WORN   = EQ_RING_EIGHT,
1662     // these aren't actual equipment slots, they're categories for functions
1663     EQ_STAFF            = 100,         // weapon with base_type OBJ_STAVES
1664     EQ_RINGS,                          // check both rings
1665     EQ_RINGS_PLUS,                     // check both rings and sum plus
1666     EQ_RINGS_PLUS2,                    // check both rings and sum plus2
1667     EQ_ALL_ARMOUR,                     // check all armour types
1668 };
1669
1670 enum eq_type
1671 {
1672     ET_WEAPON,
1673     ET_SHIELD,
1674     ET_ARMOUR,
1675     ET_JEWELS,
1676     NUM_ET
1677 };
1678
1679 enum eq_type_flags
1680 {
1681     ETF_WEAPON = 0x1,
1682     ETF_SHIELD = 0x2,
1683     ETF_ARMOUR = 0x4,
1684     ETF_JEWELS = 0x8,
1685     ETF_ALL    = 0xF
1686 };
1687
1688 enum feature_flag_type
1689 {
1690     FFT_NONE          = 0,
1691     FFT_NOTABLE       = 0x1,           // should be noted for dungeon overview
1692     FFT_EXAMINE_HINT  = 0x2,           // could get an "examine-this" hint.
1693 };
1694
1695 enum flush_reason_type
1696 {
1697     FLUSH_ON_FAILURE,                  // spell/ability failed to cast
1698     FLUSH_BEFORE_COMMAND,              // flush before getting a command
1699     FLUSH_ON_MESSAGE,                  // flush when printing a message
1700     FLUSH_ON_WARNING_MESSAGE,          // flush on MSGCH_WARN messages
1701     FLUSH_ON_DANGER_MESSAGE,           // flush on MSGCH_DANGER messages
1702     FLUSH_ON_PROMPT,                   // flush on MSGCH_PROMPT messages
1703     FLUSH_ON_UNSAFE_YES_OR_NO_PROMPT,  // flush when !safe set to yesno()
1704     FLUSH_LUA,                         // flush when Lua wants to flush
1705     FLUSH_KEY_REPLAY_CANCEL,           // flush when key replay is cancelled
1706     FLUSH_ABORT_MACRO,                 // something wrong with macro being
1707                                        // processed, so stop it
1708     FLUSH_REPLAY_SETUP_FAILURE,        // setup for key replay failed
1709     FLUSH_REPEAT_SETUP_DONE,           // command repeat done manipulating
1710                                        // the macro buffer
1711     NUM_FLUSH_REASONS
1712 };
1713
1714 // The order of this enum must match the order of DNGN_ALTAR_FOO.
1715 enum god_type
1716 {
1717     GOD_NO_GOD,
1718     GOD_ZIN,
1719     GOD_SHINING_ONE,
1720     GOD_KIKUBAAQUDGHA,
1721     GOD_YREDELEMNUL,
1722     GOD_XOM,
1723     GOD_VEHUMET,
1724     GOD_OKAWARU,
1725     GOD_MAKHLEB,
1726     GOD_SIF_MUNA,
1727     GOD_TROG,
1728     GOD_NEMELEX_XOBEH,
1729     GOD_ELYVILON,
1730     GOD_LUGONU,
1731     GOD_BEOGH,
1732     GOD_JIYVA,
1733     GOD_FEDHAS,
1734     GOD_CHEIBRIADOS,
1735     GOD_ASHENZARI,
1736     NUM_GODS,                          // always after last god
1737
1738     GOD_RANDOM = 100,
1739     GOD_NAMELESS,                      // for monsters with non-player gods
1740     GOD_VIABLE,
1741 };
1742
1743 enum held_type
1744 {
1745     HELD_NONE = 0,
1746     HELD_NET,         // currently unused
1747     HELD_WEB,         // currently unused
1748     HELD_MONSTER,     // but no damage
1749     HELD_CONSTRICTED, // damaging
1750 };
1751
1752 enum holy_word_source_type
1753 {
1754     HOLY_WORD_GENERIC     = -1,
1755     HOLY_WORD_SCROLL      = -2,
1756     HOLY_WORD_ZIN         = -4,  // Zin effect
1757     HOLY_WORD_TSO         = -5,  // TSO effect
1758 };
1759
1760 enum hunger_state_t                    // you.hunger_state
1761 {
1762     HS_STARVING,
1763     HS_NEAR_STARVING,
1764     HS_VERY_HUNGRY,
1765     HS_HUNGRY,
1766     HS_SATIATED,                       // "not hungry" state
1767     HS_FULL,
1768     HS_VERY_FULL,
1769     HS_ENGORGED,
1770 };
1771
1772 enum immolation_source_type
1773 {
1774     IMMOLATION_GENERIC = -1,
1775     IMMOLATION_SCROLL  = -2,
1776     IMMOLATION_AFFIX   = -3, // effect when fixing fire brand
1777     IMMOLATION_TOME    = -4, // exploding Tome of Destruction
1778 };
1779
1780 enum item_status_flag_type  // per item flags: ie. ident status, cursed status
1781 {
1782     ISFLAG_KNOW_CURSE        = 0x00000001,  // curse status
1783     ISFLAG_KNOW_TYPE         = 0x00000002,  // artefact name, sub/special types
1784     ISFLAG_KNOW_PLUSES       = 0x00000004,  // to hit/to dam/to AC/charges
1785     ISFLAG_KNOW_PROPERTIES   = 0x00000008,  // know special artefact properties
1786     ISFLAG_IDENT_MASK        = 0x0000000F,  // mask of all id related flags
1787
1788     // these three masks are of the minimal flags set upon using equipment:
1789     ISFLAG_EQ_WEAPON_MASK    = 0x0000000B,  // mask of flags for weapon equip
1790     ISFLAG_EQ_ARMOUR_MASK    = 0x0000000F,  // mask of flags for armour equip
1791     ISFLAG_EQ_JEWELLERY_MASK = 0x0000000F,  // mask of flags for known jewellery
1792
1793     ISFLAG_CURSED            = 0x00000100,  // cursed
1794     ISFLAG_BLESSED_WEAPON    = 0x00000200,  // personalized TSO's gift
1795     ISFLAG_SEEN_CURSED       = 0x00000400,  // was seen being cursed
1796     ISFLAG_TRIED             = 0x00000800,  // tried but not (usually) ided
1797
1798     ISFLAG_RANDART           = 0x00001000,  // special value is seed
1799     ISFLAG_UNRANDART         = 0x00002000,  // is an unrandart
1800     ISFLAG_ARTEFACT_MASK     = 0x00003000,  // randart or unrandart
1801     ISFLAG_DROPPED           = 0x00004000,  // dropped item (no autopickup)
1802     ISFLAG_THROWN            = 0x00008000,  // thrown missile weapon
1803
1804     // these don't have to remain as flags
1805     ISFLAG_NO_DESC           = 0x00000000,  // used for clearing these flags
1806     ISFLAG_GLOWING           = 0x00010000,  // weapons or armour
1807     ISFLAG_RUNED             = 0x00020000,  // weapons or armour
1808     ISFLAG_EMBROIDERED_SHINY = 0x00040000,  // armour: depends on sub-type
1809     ISFLAG_COSMETIC_MASK     = 0x00070000,  // mask of cosmetic descriptions
1810
1811     ISFLAG_UNOBTAINABLE      = 0x00080000,  // vault on display
1812
1813     ISFLAG_MIMIC             = 0x00100000,  // mimic
1814     ISFLAG_NO_MIMIC          = 0x00200000,  // Can't be turned into a mimic
1815
1816     ISFLAG_NO_PICKUP         = 0x00400000,  // Monsters won't pick this up
1817
1818     ISFLAG_NO_RACE           = 0x00000000,  // used for clearing these flags
1819     ISFLAG_ORCISH            = 0x01000000,  // low quality items
1820     ISFLAG_DWARVEN           = 0x02000000,  // strong and robust items
1821     ISFLAG_ELVEN             = 0x04000000,  // light and accurate items
1822     ISFLAG_RACIAL_MASK       = 0x07000000,  // mask of racial equipment types
1823
1824     ISFLAG_NOTED_ID          = 0x08000000,
1825     ISFLAG_NOTED_GET         = 0x10000000,
1826
1827     ISFLAG_BEEN_IN_INV       = 0x20000000,  // Item has been in inventory
1828     ISFLAG_SUMMONED          = 0x40000000,  // Item generated on a summon
1829     ISFLAG_DROPPED_BY_ALLY   = 0x80000000,  // Item was dropped by an ally
1830 };
1831
1832 enum item_type_id_state_type
1833 {
1834     ID_UNKNOWN_TYPE = 0,
1835     ID_MON_TRIED_TYPE,
1836     ID_TRIED_TYPE,
1837     ID_TRIED_ITEM_TYPE,
1838     ID_KNOWN_TYPE,
1839     NUM_ID_STATE_TYPES
1840 };
1841
1842 enum job_type
1843 {
1844     JOB_FIGHTER,
1845     JOB_WIZARD,
1846 #if TAG_MAJOR_VERSION == 34
1847     JOB_PRIEST,
1848 #endif
1849     JOB_GLADIATOR,
1850     JOB_NECROMANCER,
1851     JOB_ASSASSIN,
1852     JOB_BERSERKER,
1853     JOB_HUNTER,
1854     JOB_CONJURER,
1855     JOB_ENCHANTER,
1856     JOB_FIRE_ELEMENTALIST,
1857     JOB_ICE_ELEMENTALIST,
1858     JOB_SUMMONER,
1859     JOB_AIR_ELEMENTALIST,
1860     JOB_EARTH_ELEMENTALIST,
1861     JOB_SKALD,
1862     JOB_VENOM_MAGE,
1863     JOB_CHAOS_KNIGHT,
1864     JOB_TRANSMUTER,
1865     JOB_HEALER,
1866 #if TAG_MAJOR_VERSION == 34
1867     JOB_STALKER,
1868 #endif
1869     JOB_MONK,
1870     JOB_WARPER,
1871     JOB_WANDERER,
1872     JOB_ARTIFICER,                     //   Greenberg/Bane
1873     JOB_ARCANE_MARKSMAN,
1874     JOB_DEATH_KNIGHT,
1875     JOB_ABYSSAL_KNIGHT,
1876     JOB_JESTER,
1877     NUM_JOBS,                          // always after the last job
1878
1879     JOB_UNKNOWN = 100,
1880     JOB_RANDOM,
1881     JOB_VIABLE,
1882 };
1883
1884 enum KeymapContext
1885 {
1886     KMC_DEFAULT,         // For no-arg getchm(), must be zero.
1887     KMC_LEVELMAP,        // When in the 'X' level map
1888     KMC_TARGETTING,      // Only during 'x' and other targetting modes
1889     KMC_CONFIRM,         // When being asked y/n/q questions
1890     KMC_MENU,            // For menus
1891 #ifdef USE_TILE
1892     KMC_DOLL,            // For the tiles doll menu editing screen
1893 #endif
1894
1895     KMC_CONTEXT_COUNT,   // Must always be the last real context
1896
1897     KMC_NONE
1898 };
1899
1900 // This order is *critical*. Don't mess with it (see mon_enchant)
1901 enum kill_category
1902 {
1903     KC_YOU,
1904     KC_FRIENDLY,
1905     KC_OTHER,
1906     KC_NCATEGORIES
1907 };
1908
1909 enum killer_type                       // monster_die(), thing_thrown
1910 {
1911     KILL_NONE,                         // no killer
1912     KILL_YOU,                          // you are the killer
1913     KILL_MON,                          // no, it was a monster!
1914     KILL_YOU_MISSILE,                  // in the library, with a dart
1915     KILL_MON_MISSILE,                  // in the dungeon, with a club
1916     KILL_YOU_CONF,                     // died while confused as caused by you
1917     KILL_MISCAST,                      // as a result of a spell miscast
1918     KILL_MISC,                         // any miscellaneous killing
1919     KILL_RESET,                        // ???
1920     KILL_DISMISSED,                    // ???
1921     KILL_BANISHED,                     // monsters what got banished
1922     KILL_UNSUMMONED,                   // summoned monsters whose timers ran out
1923     KILL_TIMEOUT,                      // non-summoned monsters whose times ran out
1924     KILL_PACIFIED,                     // only used by milestones and notes
1925     KILL_ENSLAVED,                     // only used by milestones and notes
1926 };
1927
1928 enum flight_type
1929 {
1930     FL_NONE = 0,
1931     FL_WINGED,                         // wings, etc... paralysis == fall
1932     FL_LEVITATE,                       // doesn't require physical effort
1933 };
1934
1935 // Can't change this order without breaking saves.
1936 enum map_marker_type
1937 {
1938     MAT_FEATURE,              // Stock marker.
1939     MAT_LUA_MARKER,
1940     MAT_CORRUPTION_NEXUS,
1941     MAT_WIZ_PROPS,
1942     MAT_TOMB,
1943     MAT_MALIGN,
1944     MAT_PHOENIX,
1945     MAT_POSITION,
1946 #if TAG_MAJOR_VERSION == 34
1947     MAT_DOOR_SEAL,
1948 #endif
1949     MAT_TERRAIN_CHANGE,
1950     MAT_CLOUD_SPREADER,
1951     NUM_MAP_MARKER_TYPES,
1952     MAT_ANY,
1953 };
1954
1955 enum terrain_change_type
1956 {
1957     TERRAIN_CHANGE_GENERIC,
1958     TERRAIN_CHANGE_FLOOD,
1959     TERRAIN_CHANGE_TOMB,
1960     TERRAIN_CHANGE_IMPRISON,
1961     TERRAIN_CHANGE_DOOR_SEAL,
1962     NUM_TERRAIN_CHANGE_TYPES
1963 };
1964
1965 enum map_feature
1966 {
1967     MF_UNSEEN,
1968     MF_FLOOR,
1969     MF_WALL,
1970     MF_MAP_FLOOR,
1971     MF_MAP_WALL,
1972     MF_DOOR,
1973     MF_ITEM,
1974     MF_MONS_FRIENDLY,
1975     MF_MONS_PEACEFUL,
1976     MF_MONS_NEUTRAL,
1977     MF_MONS_HOSTILE,
1978     MF_MONS_NO_EXP,
1979     MF_STAIR_UP,
1980     MF_STAIR_DOWN,
1981     MF_STAIR_BRANCH,
1982     MF_FEATURE,
1983     MF_WATER,
1984     MF_LAVA,
1985     MF_TRAP,
1986     MF_EXCL_ROOT,
1987     MF_EXCL,
1988     MF_PLAYER,
1989     MF_MAX,
1990
1991     MF_SKIP,
1992 };
1993
1994 enum menu_type
1995 {
1996     MT_ANY = -1,
1997
1998     MT_INVLIST,                        // List inventory
1999     MT_DROP,
2000     MT_PICKUP,
2001     MT_KNOW,
2002     MT_RUNES,
2003     MT_SELONE,                         // Select one
2004 };
2005
2006 enum mon_holy_type
2007 {
2008     MH_HOLY,
2009     MH_NATURAL,
2010     MH_UNDEAD,
2011     MH_DEMONIC,
2012     MH_NONLIVING, // golems and other constructs
2013     MH_PLANT,
2014 };
2015
2016 enum targ_mode_type
2017 {
2018     TARG_ANY,
2019     TARG_ENEMY,  // hostile + neutral
2020     TARG_FRIEND,
2021     TARG_INJURED_FRIEND, // for healing
2022     TARG_HOSTILE,
2023     TARG_HOSTILE_SUBMERGED, // Target hostiles including submerged ones
2024     TARG_EVOLVABLE_PLANTS,  // Targetting mode for Fedhas' evolution
2025     TARG_HOSTILE_UNDEAD,    // For dispel undead
2026     TARG_NUM_MODES
2027 };
2028
2029 // NOTE: Changing this order will break saves! Appending does not.
2030 enum monster_type                      // menv[].type
2031 {
2032     MONS_PROGRAM_BUG,
2033         MONS_0 = MONS_PROGRAM_BUG,
2034
2035     MONS_GIANT_NEWT,
2036     MONS_GIANT_GECKO,
2037     MONS_IGUANA,
2038     MONS_KOMODO_DRAGON,
2039     MONS_BASILISK,
2040     MONS_BAT,
2041     MONS_FIRE_BAT,
2042     MONS_BALL_PYTHON,
2043     MONS_ADDER,
2044     MONS_WATER_MOCCASIN,
2045     MONS_BLACK_MAMBA,
2046     MONS_ANACONDA,
2047     MONS_SEA_SNAKE,
2048     MONS_RAT,
2049     MONS_GREY_RAT,
2050     MONS_GREEN_RAT,
2051     MONS_ORANGE_RAT,
2052 #if TAG_MAJOR_VERSION == 34
2053     MONS_LABORATORY_RAT,
2054 #endif
2055     MONS_QUOKKA,         // Quokka are a type of wallaby, returned -- bwr 382
2056     MONS_PORCUPINE,
2057     MONS_JACKAL,
2058     MONS_HOUND,
2059     MONS_WAR_DOG,
2060     MONS_WOLF,
2061     MONS_WARG,
2062     MONS_HELL_HOUND,
2063     MONS_HOG,
2064     MONS_HELL_HOG,
2065     MONS_HOLY_SWINE,            // porkalator
2066     MONS_GIANT_SLUG,
2067     MONS_AGATE_SNAIL,
2068     MONS_ELEPHANT_SLUG,
2069     MONS_GIANT_LEECH,
2070     MONS_BABY_ALLIGATOR,
2071     MONS_ALLIGATOR,
2072     MONS_CROCODILE,
2073     MONS_HYDRA,
2074     MONS_SHEEP,
2075     MONS_YAK,
2076     MONS_DEATH_YAK,
2077     MONS_CATOBLEPAS,
2078     MONS_ELEPHANT,
2079     MONS_DIRE_ELEPHANT,
2080     MONS_HELLEPHANT,
2081     MONS_MANTICORE,
2082     MONS_HIPPOGRIFF,
2083     MONS_GRIFFON,
2084     MONS_GIANT_FROG,
2085     MONS_SPINY_FROG,
2086     MONS_BLINK_FROG,
2087     MONS_GRIZZLY_BEAR,
2088     MONS_POLAR_BEAR,
2089     MONS_BLACK_BEAR,
2090     MONS_WORM,
2091     MONS_BRAIN_WORM,
2092     MONS_ROCK_WORM,
2093     MONS_SPINY_WORM,
2094     MONS_WYVERN,
2095     MONS_LINDWURM,
2096     MONS_FIRE_DRAKE,
2097     MONS_SWAMP_DRAKE,
2098     MONS_DEATH_DRAKE,
2099     MONS_STEAM_DRAGON,
2100     MONS_MOTTLED_DRAGON,
2101     MONS_SWAMP_DRAGON,
2102     MONS_DRAGON,
2103     MONS_ICE_DRAGON,
2104     MONS_SHADOW_DRAGON,
2105     MONS_STORM_DRAGON,
2106     MONS_BONE_DRAGON,
2107     MONS_QUICKSILVER_DRAGON,
2108     MONS_IRON_DRAGON,
2109     MONS_GOLDEN_DRAGON,
2110     MONS_PEARL_DRAGON,
2111
2112     MONS_OOZE,
2113     MONS_JELLY,
2114     MONS_BROWN_OOZE,
2115     MONS_GIANT_AMOEBA,
2116     MONS_AZURE_JELLY,
2117     MONS_DEATH_OOZE,
2118     MONS_ACID_BLOB,
2119     MONS_SLIME_CREATURE,
2120     MONS_PULSATING_LUMP,
2121     MONS_GIANT_EYEBALL,
2122     MONS_EYE_OF_DRAINING,
2123     MONS_SHINING_EYE,
2124     MONS_EYE_OF_DEVASTATION,
2125     MONS_GREAT_ORB_OF_EYES,
2126     MONS_GIANT_ORANGE_BRAIN,
2127
2128     MONS_DANCING_WEAPON,
2129     MONS_HARPY,
2130     MONS_RAVEN,
2131     MONS_FIRE_CRAB,
2132     MONS_HOMUNCULUS,
2133     MONS_SOUPLING,
2134
2135     MONS_BUTTERFLY,
2136 #if TAG_MAJOR_VERSION == 34
2137     MONS_ANT_LARVA,
2138 #endif
2139     MONS_WORKER_ANT,
2140     MONS_SOLDIER_ANT,
2141     MONS_QUEEN_ANT,
2142     MONS_KILLER_BEE,
2143     MONS_QUEEN_BEE,
2144     MONS_VAMPIRE_MOSQUITO,
2145 #if TAG_MAJOR_VERSION == 34
2146     MONS_BUMBLEBEE,
2147 #endif
2148     MONS_YELLOW_WASP,
2149     MONS_RED_WASP,
2150     MONS_GOLIATH_BEETLE,
2151     MONS_BORING_BEETLE,
2152     MONS_BOULDER_BEETLE,
2153     MONS_GIANT_COCKROACH,
2154     MONS_GIANT_CENTIPEDE,
2155     MONS_GIANT_MITE,
2156     MONS_SPIDER,
2157     MONS_WOLF_SPIDER,
2158     MONS_TRAPDOOR_SPIDER,
2159     MONS_JUMPING_SPIDER,
2160     MONS_ORB_SPIDER,
2161     MONS_TARANTELLA,
2162     MONS_REDBACK,
2163     MONS_SCORPION,
2164     MONS_EMPEROR_SCORPION,
2165     MONS_MOTH,                  // genus
2166     MONS_MOTH_OF_SUPPRESSION,
2167     MONS_GHOST_MOTH,
2168     MONS_MOTH_OF_WRATH,
2169     MONS_DEMONIC_CRAWLER,
2170     MONS_SNAPPING_TURTLE,
2171     MONS_ALLIGATOR_SNAPPING_TURTLE,
2172     MONS_GNOME,                 // single vault
2173     MONS_HALFLING,              // recolouring + single vault.
2174     MONS_FELID,                 // recolouring + single vault.  Miaow!
2175     MONS_VAMPIRE_BAT,           // recolouring + vaults
2176     MONS_DEMIGOD,               // recolouring + single vault
2177     MONS_DEMONSPAWN,            // recolouring + single vault... but there are FRs
2178     MONS_GARGOYLE,
2179     MONS_METAL_GARGOYLE,
2180     MONS_MOLTEN_GARGOYLE,
2181     MONS_UGLY_THING,
2182     MONS_VERY_UGLY_THING,
2183     MONS_ICE_BEAST,
2184     MONS_SKY_BEAST,
2185     MONS_SPHINX,
2186     MONS_ORB_GUARDIAN,
2187
2188     MONS_GOLEM,                 // genus
2189     MONS_CLAY_GOLEM,
2190 #if TAG_MAJOR_VERSION == 34
2191     MONS_WOOD_GOLEM,
2192 #endif
2193     MONS_STONE_GOLEM,
2194     MONS_IRON_GOLEM,
2195     MONS_CRYSTAL_GOLEM,
2196     MONS_TOENAIL_GOLEM,
2197     MONS_ELECTRIC_GOLEM, // replacing the guardian robot -- bwr
2198     MONS_ORB_OF_FIRE,    // Swords renamed to fit -- bwr
2199     MONS_EARTH_ELEMENTAL,
2200     MONS_FIRE_ELEMENTAL,
2201     MONS_AIR_ELEMENTAL,
2202     MONS_TWISTER,        // air miscasts
2203     MONS_GOLDEN_EYE,
2204     MONS_FIRE_VORTEX,
2205     MONS_SPATIAL_VORTEX,
2206     MONS_INSUBSTANTIAL_WISP,
2207     MONS_VAPOUR,
2208
2209     // Mimics:
2210     MONS_INEPT_ITEM_MIMIC,
2211     MONS_ITEM_MIMIC,
2212     MONS_RAVENOUS_ITEM_MIMIC,
2213 #if TAG_MAJOR_VERSION == 34
2214     MONS_MONSTROUS_ITEM_MIMIC,
2215 #endif
2216     MONS_INEPT_FEATURE_MIMIC,
2217     MONS_FEATURE_MIMIC,
2218     MONS_RAVENOUS_FEATURE_MIMIC,
2219 #if TAG_MAJOR_VERSION == 34
2220     MONS_MONSTROUS_FEATURE_MIMIC, // unused
2221 #endif
2222
2223     // Plants:
2224     MONS_TOADSTOOL,
2225     MONS_FUNGUS,
2226     MONS_WANDERING_MUSHROOM,
2227     MONS_PLANT,
2228     MONS_OKLOB_SAPLING,
2229     MONS_OKLOB_PLANT,
2230     MONS_BUSH,
2231     MONS_BURNING_BUSH,
2232     MONS_GIANT_SPORE,
2233     MONS_BALLISTOMYCETE,
2234     MONS_HYPERACTIVE_BALLISTOMYCETE,
2235
2236     MONS_GOBLIN,
2237     MONS_HOBGOBLIN,
2238     MONS_GNOLL,
2239     MONS_GNOLL_SHAMAN,
2240     MONS_GNOLL_SERGEANT,
2241     MONS_BOGGART,
2242     MONS_KOBOLD,
2243     MONS_BIG_KOBOLD,
2244     MONS_KOBOLD_DEMONOLOGIST,
2245     MONS_ORC,
2246     MONS_ORC_WARRIOR,
2247     MONS_ORC_PRIEST,
2248     MONS_ORC_HIGH_PRIEST,
2249     MONS_ORC_WIZARD,
2250     MONS_ORC_KNIGHT,
2251     MONS_ORC_SORCERER,
2252     MONS_ORC_WARLORD,
2253     MONS_DWARF,
2254     MONS_DEEP_DWARF,
2255     MONS_DEEP_DWARF_SCION,
2256     MONS_DEEP_DWARF_ARTIFICER,
2257     MONS_DEEP_DWARF_NECROMANCER,
2258     MONS_DEEP_DWARF_BERSERKER,
2259     MONS_DEEP_DWARF_DEATH_KNIGHT,
2260     MONS_UNBORN_DEEP_DWARF,
2261     MONS_ELF,
2262     MONS_DEEP_ELF_SOLDIER,
2263     MONS_DEEP_ELF_FIGHTER,
2264     MONS_DEEP_ELF_KNIGHT,
2265     MONS_DEEP_ELF_MAGE,
2266     MONS_DEEP_ELF_SUMMONER,
2267     MONS_DEEP_ELF_CONJURER,
2268     MONS_DEEP_ELF_PRIEST,
2269     MONS_DEEP_ELF_HIGH_PRIEST,
2270     MONS_DEEP_ELF_DEMONOLOGIST,
2271     MONS_DEEP_ELF_ANNIHILATOR,
2272     MONS_DEEP_ELF_SORCERER,
2273     MONS_DEEP_ELF_DEATH_MAGE,
2274     MONS_DEEP_ELF_BLADEMASTER,
2275     MONS_DEEP_ELF_MASTER_ARCHER,
2276     MONS_SPRIGGAN,
2277     MONS_SPRIGGAN_DRUID,
2278     MONS_SPRIGGAN_ASSASSIN,
2279     MONS_SPRIGGAN_RIDER,
2280     MONS_SPRIGGAN_BERSERKER,
2281     MONS_SPRIGGAN_DEFENDER,
2282     MONS_SPRIGGAN_AIR_MAGE,
2283     MONS_FIREFLY,
2284     MONS_TENGU,
2285     MONS_MINOTAUR,
2286     MONS_NAGA,
2287     MONS_NAGA_WARRIOR,
2288     MONS_NAGA_MAGE,
2289     MONS_GREATER_NAGA,
2290     MONS_GUARDIAN_SERPENT,
2291     MONS_OCTOPODE,
2292     MONS_MERFOLK,
2293     MONS_MERMAID,
2294     MONS_SIREN,
2295     MONS_MERFOLK_IMPALER,
2296     MONS_MERFOLK_AQUAMANCER,
2297     MONS_MERFOLK_JAVELINEER,
2298     MONS_CENTAUR,
2299     MONS_CENTAUR_WARRIOR,
2300     MONS_YAKTAUR,
2301     MONS_YAKTAUR_CAPTAIN,
2302     MONS_OGRE,
2303     MONS_TWO_HEADED_OGRE,
2304     MONS_OGRE_MAGE,
2305     MONS_TROLL,
2306 #if TAG_MAJOR_VERSION == 34
2307     MONS_ROCK_TROLL,
2308 #endif
2309     MONS_IRON_TROLL,
2310     MONS_DEEP_TROLL,
2311     MONS_GIANT,                 // genus
2312     MONS_HILL_GIANT,
2313     MONS_CYCLOPS,
2314     MONS_ETTIN,
2315     MONS_STONE_GIANT,
2316     MONS_FIRE_GIANT,
2317     MONS_FROST_GIANT,
2318     MONS_TITAN,
2319     MONS_HUMAN,
2320     MONS_SLAVE,
2321     MONS_HELL_KNIGHT,
2322     MONS_NECROMANCER,
2323     MONS_WIZARD,
2324     MONS_VAULT_GUARD,
2325     MONS_KILLER_KLOWN,
2326     MONS_SHAPESHIFTER,
2327     MONS_GLOWING_SHAPESHIFTER,
2328
2329     // Draconians:
2330     MONS_DRACONIAN,
2331     MONS_FIRST_DRACONIAN = MONS_DRACONIAN,
2332
2333     // If adding more drac colours, sync up colour names in
2334     // mon-util.cc.
2335     MONS_BLACK_DRACONIAN,               // Should always be first colour.
2336     MONS_MOTTLED_DRACONIAN,
2337     MONS_YELLOW_DRACONIAN,
2338     MONS_GREEN_DRACONIAN,
2339     MONS_PURPLE_DRACONIAN,
2340     MONS_RED_DRACONIAN,
2341     MONS_WHITE_DRACONIAN,
2342     MONS_GREY_DRACONIAN,
2343     MONS_PALE_DRACONIAN,                //  Should always be last colour.
2344
2345     // Sync up with mon-place.cc's draconian selection if adding more.
2346     MONS_DRACONIAN_CALLER,
2347     MONS_DRACONIAN_MONK,
2348     MONS_DRACONIAN_ZEALOT,
2349     MONS_DRACONIAN_SHIFTER,
2350     MONS_DRACONIAN_ANNIHILATOR,
2351     MONS_DRACONIAN_KNIGHT,
2352     MONS_DRACONIAN_SCORCHER,
2353
2354     MONS_LAST_DRACONIAN = MONS_DRACONIAN_SCORCHER,
2355
2356     // Lava monsters:
2357     MONS_LAVA_WORM,
2358     MONS_LAVA_FISH,
2359     MONS_LAVA_SNAKE,
2360     MONS_SALAMANDER,
2361     // Water monsters:
2362     MONS_BIG_FISH,
2363     MONS_GIANT_GOLDFISH,
2364     MONS_ELECTRIC_EEL,
2365     MONS_JELLYFISH,
2366     MONS_WATER_ELEMENTAL,
2367     MONS_SWAMP_WORM,
2368     MONS_SHARK,
2369     MONS_KRAKEN,
2370     MONS_KRAKEN_TENTACLE,
2371     MONS_KRAKEN_TENTACLE_SEGMENT,
2372
2373     // Statuary
2374     MONS_ORANGE_STATUE,
2375     MONS_SILVER_STATUE,
2376     MONS_ICE_STATUE,
2377     MONS_STATUE,
2378     MONS_TRAINING_DUMMY,
2379     MONS_LIGHTNING_SPIRE,
2380
2381     // Demons:
2382     MONS_CRIMSON_IMP,
2383     MONS_QUASIT,
2384     MONS_WHITE_IMP,
2385     MONS_LEMURE,
2386     MONS_UFETUBUS,
2387     MONS_IRON_IMP,
2388     MONS_SHADOW_IMP,
2389     MONS_RED_DEVIL,
2390     MONS_ROTTING_DEVIL,
2391     MONS_HELLWING,
2392     MONS_SIXFIRHY,
2393     MONS_NEQOXEC,
2394     MONS_ORANGE_DEMON,
2395     MONS_SMOKE_DEMON,
2396     MONS_YNOXINUL,
2397     MONS_CHAOS_SPAWN,
2398     MONS_HELLION,
2399     MONS_LOROCYPROCA,
2400     MONS_TORMENTOR,
2401     MONS_REAPER,
2402     MONS_SOUL_EATER,
2403     MONS_ICE_DEVIL,
2404     MONS_BLUE_DEVIL,
2405     MONS_HELL_BEAST,
2406     MONS_IRON_DEVIL,
2407     MONS_EXECUTIONER,
2408     MONS_GREEN_DEATH,
2409     MONS_BLIZZARD_DEMON,
2410     MONS_BALRUG,
2411     MONS_CACODEMON,
2412     MONS_SUN_DEMON,
2413     MONS_SHADOW_DEMON,
2414     MONS_HELL_SENTINEL,
2415     MONS_BRIMSTONE_FIEND,
2416     MONS_ICE_FIEND,
2417     MONS_SHADOW_FIEND,
2418     MONS_PANDEMONIUM_LORD,
2419     MONS_EFREET,
2420     MONS_RAKSHASA,
2421     MONS_RAKSHASA_FAKE,
2422     MONS_UNSEEN_HORROR,
2423     MONS_TENTACLED_STARSPAWN,
2424     MONS_LURKING_HORROR,
2425     MONS_THRASHING_HORROR,
2426     MONS_STARCURSED_MASS,
2427     MONS_ANCIENT_ZYME,
2428     MONS_WRETCHED_STAR,
2429     MONS_ELDRITCH_TENTACLE,
2430     MONS_ELDRITCH_TENTACLE_SEGMENT,
2431     MONS_TENTACLED_MONSTROSITY,
2432     MONS_ABOMINATION_SMALL,
2433     MONS_ABOMINATION_LARGE,
2434     MONS_CRAWLING_CORPSE,
2435     MONS_MACABRE_MASS,
2436
2437     // Undead:
2438     MONS_PLAGUE_SHAMBLER,
2439     MONS_NECROPHAGE,
2440     MONS_GHOUL,
2441     MONS_FLAMING_CORPSE,
2442     MONS_MUMMY,
2443     MONS_BOG_BODY,
2444     MONS_GUARDIAN_MUMMY,
2445     MONS_GREATER_MUMMY,
2446     MONS_MUMMY_PRIEST,
2447     MONS_VAMPIRE,
2448     MONS_VAMPIRE_KNIGHT,
2449     MONS_VAMPIRE_MAGE,
2450     MONS_GHOST,                 // common genus for monster and player ghosts
2451     MONS_PHANTOM,
2452     MONS_SHADOW,
2453     MONS_HUNGRY_GHOST,
2454     MONS_FLAYED_GHOST,
2455     MONS_WIGHT,
2456     MONS_WRAITH,
2457     MONS_FREEZING_WRAITH,
2458     MONS_SHADOW_WRAITH,
2459     MONS_SILENT_SPECTRE,
2460     MONS_EIDOLON,
2461     MONS_FLYING_SKULL,
2462     MONS_SKELETAL_WARRIOR,
2463     MONS_PHANTASMAL_WARRIOR,
2464     MONS_LICH,
2465     MONS_ANCIENT_LICH,
2466     MONS_DEATH_COB,
2467     MONS_CURSE_TOE,
2468     MONS_CURSE_SKULL,
2469     MONS_PROFANE_SERVITOR,
2470     MONS_SKELETON_SMALL,   // recolouring only
2471     MONS_SKELETON_LARGE,   // recolouring only
2472     MONS_ZOMBIE_SMALL,     // recolouring only
2473     MONS_ZOMBIE_LARGE,     // recolouring only
2474     MONS_SPECTRAL_THING,
2475     MONS_SIMULACRUM_SMALL, // recolouring only
2476     MONS_SIMULACRUM_LARGE, // recolouring only
2477
2478     // Holies:
2479     MONS_ANGEL,
2480     MONS_DAEVA,
2481     MONS_CHERUB,
2482     MONS_SERAPH,
2483     MONS_PHOENIX,
2484     MONS_SILVER_STAR,
2485 #if TAG_MAJOR_VERSION == 34
2486     MONS_BLESSED_TOE,
2487 #endif
2488     MONS_SHEDU,
2489     MONS_OPHAN,
2490     MONS_SPIRIT,
2491     MONS_PALADIN,
2492     MONS_APIS,
2493
2494     // Fixed uniques:
2495     MONS_GERYON,
2496     MONS_DISPATER,
2497     MONS_ASMODEUS,
2498     MONS_ANTAEUS,
2499     MONS_ERESHKIGAL,
2500     MONS_ROYAL_JELLY,
2501     MONS_THE_ENCHANTRESS,
2502     // the four Pan lords, order must match runes
2503     MONS_MNOLEG,
2504     MONS_LOM_LOBON,
2505     MONS_CEREBOV,
2506     MONS_GLOORX_VLOQ,
2507     MONS_SERPENT_OF_HELL,
2508     // Random uniques:
2509     MONS_IJYB,
2510     MONS_JESSICA,
2511     MONS_SIGMUND,
2512     MONS_TERENCE,
2513     MONS_BLORK_THE_ORC,
2514     MONS_EDMUND,
2515     MONS_PSYCHE,
2516     MONS_EROLCHA,
2517     MONS_DONALD,
2518     MONS_URUG,
2519     MONS_JOSEPH,
2520     MONS_SNORG, // was Anita - 16jan2000 {dlb}
2521     MONS_ERICA,
2522     MONS_JOSEPHINE,
2523     MONS_HAROLD,
2524     MONS_AGNES,
2525     MONS_MAUD,
2526     MONS_LOUISE,
2527     MONS_FRANCES,
2528     MONS_RUPERT,
2529     MONS_WIGLAF,
2530     MONS_XTAHUA,
2531     MONS_NORRIS,
2532     MONS_FREDERICK,
2533     MONS_MARGERY,
2534     MONS_BORIS,
2535     MONS_POLYPHEMUS,
2536     MONS_MURRAY,
2537     MONS_TIAMAT,
2538     MONS_ROXANNE,
2539     MONS_SONJA,
2540     MONS_EUSTACHIO,
2541     MONS_AZRAEL,
2542     MONS_ILSUIW,
2543     MONS_PRINCE_RIBBIT,
2544     MONS_NERGALLE,
2545     MONS_SAINT_ROKA,
2546     MONS_NESSOS,
2547     MONS_LERNAEAN_HYDRA,
2548     MONS_DISSOLUTION,
2549     MONS_KIRKE,
2550     MONS_GRUM,
2551     MONS_PURGY,
2552     MONS_MENKAURE,
2553     MONS_DUVESSA,
2554     MONS_DOWAN,
2555     MONS_GASTRONOK,
2556     MONS_MAURICE,
2557     MONS_KHUFU,
2558     MONS_NIKOLA,
2559     MONS_AIZUL,
2560     MONS_PIKEL,
2561     MONS_CRAZY_YIUF,
2562     MONS_MENNAS,
2563     MONS_MARA,
2564     MONS_MARA_FAKE,
2565     MONS_GRINDER,
2566     MONS_JORY,
2567     MONS_IGNACIO,
2568     MONS_ARACHNE,
2569     // Sprint uniques:
2570     MONS_CHUCK,
2571     MONS_IRON_GIANT,
2572     MONS_NELLIE,
2573     MONS_IRON_ELEMENTAL,
2574
2575     // Specials:
2576     MONS_PLAYER_ILLUSION,
2577     MONS_PLAYER_GHOST,
2578     MONS_BALL_LIGHTNING,
2579     MONS_ORB_OF_DESTRUCTION,    // a projectile, not a real mon
2580     MONS_PILLAR_OF_SALT,
2581     MONS_HELL_LORD,             // genus
2582     MONS_MERGED_SLIME_CREATURE, // used only for recolouring
2583     MONS_SENSED,                // dummy monster for unspecified sensed mons
2584     MONS_SENSED_TRIVIAL,
2585     MONS_SENSED_EASY,
2586     MONS_SENSED_TOUGH,
2587     MONS_SENSED_NASTY,
2588     MONS_SENSED_FRIENDLY,
2589     MONS_PLAYER,                // a certain ugly creature
2590     MONS_TEST_SPAWNER,
2591
2592     // Add new monsters here:
2593     MONS_SERPENT_OF_HELL_COCYTUS,
2594     MONS_SERPENT_OF_HELL_DIS,
2595     MONS_SERPENT_OF_HELL_TARTARUS,
2596
2597     MONS_HELLBINDER,
2598     MONS_CLOUD_MAGE,
2599     MONS_ANIMATED_TREE,
2600
2601     MONS_BEAR,                  // genus
2602     MONS_ELEMENTAL,             // genus
2603
2604     MONS_FANNAR,
2605     MONS_APOCALYPSE_CRAB,
2606     MONS_STARSPAWN_TENTACLE,
2607     MONS_STARSPAWN_TENTACLE_SEGMENT,
2608
2609     MONS_SPATIAL_MAELSTROM,
2610     MONS_CHAOS_BUTTERFLY,
2611
2612     MONS_JORGRUN,
2613     MONS_LAMIA,
2614
2615     MONS_FULMINANT_PRISM,
2616     MONS_BATTLESPHERE,
2617
2618     MONS_GIANT_LIZARD,          // genus
2619     MONS_DRAKE,                 // genus
2620
2621 #if TAG_MAJOR_VERSION == 34
2622     MONS_ARACHNOID,             // genus
2623 #endif
2624
2625     MONS_DEEP_TROLL_EARTH_MAGE,
2626     MONS_DEEP_TROLL_SHAMAN,
2627     MONS_DIAMOND_OBELISK,
2628
2629     MONS_VAULT_SENTINEL,
2630     MONS_VAULT_WARDEN,
2631     MONS_IRONBRAND_CONVOKER,
2632     MONS_IRONHEART_PRESERVER,
2633
2634     MONS_ZOMBIE,
2635     MONS_SKELETON,
2636     MONS_SIMULACRUM,
2637
2638     MONS_ANCIENT_CHAMPION,
2639     MONS_REVENANT,
2640     MONS_LOST_SOUL,
2641     MONS_JIANGSHI,
2642
2643     MONS_DJINNI,
2644     MONS_LAVA_ORC,
2645
2646     MONS_DRYAD,
2647     MONS_WIND_DRAKE,
2648     MONS_FAUN,
2649     MONS_SATYR,
2650
2651     MONS_PAN,
2652
2653     MONS_TENGU_WARRIOR,
2654     MONS_TENGU_CONJURER,
2655     MONS_TENGU_REAVER,
2656
2657     MONS_SPRIGGAN_ENCHANTER,
2658
2659     MONS_SOJOBO,
2660
2661     NUM_MONSTERS,               // used for polymorph
2662
2663     // MONS_NO_MONSTER can get put in savefiles, so it shouldn't change
2664     // when NUM_MONSTERS increases.
2665     MONS_NO_MONSTER = 1000,
2666
2667     RANDOM_MONSTER = 2000, // used to distinguish between a random monster and using program bugs for error trapping {dlb}
2668     RANDOM_MOBILE_MONSTER, // used for monster generation (shadow creatures)
2669     RANDOM_COMPATIBLE_MONSTER, // used for player shadow creatures (prevents repulsing summons)
2670
2671     // A random draconian, either base coloured drac or specialised.
2672     RANDOM_DRACONIAN,
2673     // Any random base draconian colour.
2674     RANDOM_BASE_DRACONIAN,
2675     // Any random specialised draconian, such as a draconian knight.
2676     RANDOM_NONBASE_DRACONIAN,
2677
2678     RANDOM_DEMON_LESSER,               //    0: Class V
2679     RANDOM_DEMON_COMMON,               //    1: Class II-IV
2680     RANDOM_DEMON_GREATER,              //    2: Class I
2681     RANDOM_DEMON,                      //    any of the above
2682
2683     RANDOM_MODERATE_OOD, // +5 depth, AKA '9' glyph on maps
2684     RANDOM_SUPER_OOD, // *2 + 4 depth, AKA '8'
2685
2686     WANDERING_MONSTER = 3500, // only used in monster placement routines - forced limit checks {dlb}
2687 };
2688
2689 enum beh_type
2690 {
2691     BEH_SLEEP,
2692     BEH_WANDER,
2693     BEH_SEEK,
2694     BEH_FLEE,
2695     BEH_CORNERED,
2696     BEH_PANIC,                         //  like flee but without running away
2697     BEH_LURK,                          //  stay still until discovered or
2698                                        //  enemy close by
2699     BEH_RETREAT,                       //  like flee but when cannot attack
2700     BEH_WITHDRAW,                      //  an ally given a command to withdraw
2701                                        //  (will not respond to attacks)
2702     NUM_BEHAVIOURS,                    //  max # of legal states
2703     BEH_CHARMED,                       //  hostile-but-charmed; creation only
2704     BEH_FRIENDLY,                      //  used during creation only
2705     BEH_GOOD_NEUTRAL,                  //  creation only
2706     BEH_STRICT_NEUTRAL,
2707     BEH_NEUTRAL,                       //  creation only
2708     BEH_HOSTILE,                       //  creation only
2709     BEH_GUARD,                         //  creation only - monster is guard
2710     BEH_COPY,                          //  creation only - copy from summoner
2711 };
2712
2713 enum mon_attitude_type
2714 {
2715     ATT_HOSTILE,                       // 0, default in most cases
2716     ATT_NEUTRAL,                       // neutral
2717     ATT_STRICT_NEUTRAL,                // neutral, won't attack player. Used by Jiyva.
2718     ATT_GOOD_NEUTRAL,                  // neutral, but won't attack friendlies
2719     ATT_FRIENDLY,                      // created friendly (or tamed?)
2720 };
2721
2722 // Adding slots breaks saves. YHBW.
2723 enum mon_inv_type           // menv[].inv[]
2724 {
2725     MSLOT_WEAPON,           // Primary weapon (melee)
2726     MSLOT_ALT_WEAPON,       // Alternate weapon, ranged or second melee weapon
2727                             // for monsters that can use two weapons.
2728     MSLOT_MISSILE,
2729     MSLOT_ALT_MISSILE,
2730     MSLOT_ARMOUR,
2731     MSLOT_SHIELD,
2732     MSLOT_WAND,
2733     MSLOT_JEWELLERY,
2734     MSLOT_MISCELLANY,
2735
2736     // [ds] Last monster gear slot that the player can observe by examining
2737     // the monster; i.e. the last slot that goes into monster_info.
2738     MSLOT_LAST_VISIBLE_SLOT = MSLOT_MISCELLANY,
2739
2740     MSLOT_POTION,
2741     MSLOT_SCROLL,
2742     MSLOT_GOLD,
2743     NUM_MONSTER_SLOTS
2744 };
2745
2746 enum mutation_type
2747 {
2748     // body slot facets
2749     MUT_ANTENNAE,       // head
2750     MUT_BIG_WINGS,
2751     MUT_BEAK,           // head
2752     MUT_CLAWS,          // hands
2753     MUT_FANGS,
2754     MUT_HOOVES,         // feet
2755     MUT_HORNS,          // head
2756     MUT_STINGER,
2757     MUT_TALONS,         // feet
2758     MUT_TENTACLE_SPIKE, // Octopode only.
2759
2760     // scales
2761     MUT_DISTORTION_FIELD,
2762     MUT_ICY_BLUE_SCALES,
2763     MUT_IRIDESCENT_SCALES,
2764     MUT_LARGE_BONE_PLATES,
2765     MUT_MOLTEN_SCALES,
2766     MUT_ROUGH_BLACK_SCALES,
2767     MUT_RUGGED_BROWN_SCALES,
2768     MUT_SLIMY_GREEN_SCALES,
2769     MUT_THIN_METALLIC_SCALES,
2770     MUT_THIN_SKELETAL_STRUCTURE,
2771     MUT_YELLOW_SCALES,
2772     MUT_CAMOUFLAGE,
2773
2774     MUT_ACUTE_VISION,
2775     MUT_AGILE,
2776     MUT_BERSERK,
2777     MUT_BLINK,
2778     MUT_BLURRY_VISION,
2779     MUT_BREATHE_FLAMES,
2780     MUT_BREATHE_POISON,
2781     MUT_CARNIVOROUS,
2782     MUT_CLARITY,
2783     MUT_CLEVER,
2784     MUT_CLUMSY,
2785     MUT_COLD_RESISTANCE,
2786     MUT_CONSERVE_POTIONS,
2787     MUT_CONSERVE_SCROLLS,
2788     MUT_DEFORMED,
2789     MUT_DEMONIC_GUARDIAN,
2790     MUT_DETERIORATION,
2791     MUT_DOPEY,
2792     MUT_HEAT_RESISTANCE,
2793     MUT_HERBIVOROUS,
2794     MUT_HURL_HELLFIRE,
2795     MUT_FAST,
2796     MUT_FAST_METABOLISM,
2797     MUT_FLEXIBLE_WEAK,
2798     MUT_FRAIL,
2799     MUT_FOUL_STENCH,
2800     MUT_GOURMAND,
2801     MUT_HIGH_MAGIC,
2802     MUT_ICEMAIL,
2803     MUT_IGNITE_BLOOD,
2804     MUT_LOW_MAGIC,
2805     MUT_MAGIC_RESISTANCE,
2806     MUT_MUTATION_RESISTANCE,
2807     MUT_NEGATIVE_ENERGY_RESISTANCE,
2808     MUT_NIGHTSTALKER,
2809     MUT_PASSIVE_FREEZE,
2810     MUT_PASSIVE_MAPPING,
2811     MUT_POISON_RESISTANCE,
2812     MUT_POWERED_BY_DEATH,
2813     MUT_POWERED_BY_PAIN,
2814     MUT_REGENERATION,
2815     MUT_ROBUST,
2816     MUT_SAPROVOROUS,
2817     MUT_SCREAM,
2818     MUT_SHAGGY_FUR,
2819     MUT_SHOCK_RESISTANCE,
2820     MUT_SLOW,
2821     MUT_SLOW_HEALING,
2822     MUT_SLOW_METABOLISM,
2823     MUT_SPINY,
2824     MUT_SPIT_POISON,
2825     MUT_STOCHASTIC_TORMENT_RESISTANCE,
2826     MUT_STRONG,
2827     MUT_STRONG_STIFF,
2828     MUT_TELEPORT,
2829     MUT_TELEPORT_CONTROL,
2830     MUT_TORMENT_RESISTANCE,
2831     MUT_TOUGH_SKIN,
2832     MUT_WEAK,
2833     MUT_WILD_MAGIC,
2834     MUT_UNBREATHING,
2835     MUT_ACIDIC_BITE,
2836     MUT_EYEBALLS,
2837 #if TAG_MAJOR_VERSION == 34
2838     MUT_FOOD_JELLY,
2839 #endif
2840     MUT_GELATINOUS_BODY,
2841     MUT_PSEUDOPODS,
2842     MUT_TRANSLUCENT_SKIN,
2843     MUT_EVOLUTION,
2844     MUT_AUGMENTATION,
2845     MUT_TENDRILS,
2846     MUT_JELLY_GROWTH,
2847     MUT_JELLY_MISSILE,
2848     MUT_MANA_SHIELD,
2849     MUT_MANA_REGENERATION,
2850     MUT_MANA_LINK,
2851     MUT_PETRIFICATION_RESISTANCE,
2852     MUT_TRAMPLE_RESISTANCE,
2853     NUM_MUTATIONS,
2854
2855     RANDOM_MUTATION,
2856     RANDOM_XOM_MUTATION,
2857     RANDOM_GOOD_MUTATION,
2858     RANDOM_BAD_MUTATION,
2859     RANDOM_SLIME_MUTATION,
2860     RANDOM_NON_SLIME_MUTATION,
2861 };
2862
2863 enum object_class_type                 // mitm[].base_type
2864 {
2865     OBJ_WEAPONS,
2866     OBJ_MISSILES,
2867     OBJ_ARMOUR,
2868     OBJ_WANDS,
2869     OBJ_FOOD,
2870     OBJ_SCROLLS,
2871     OBJ_JEWELLERY,
2872     OBJ_POTIONS,
2873     OBJ_BOOKS,
2874     OBJ_STAVES,
2875     OBJ_ORBS,
2876     OBJ_MISCELLANY,
2877     OBJ_CORPSES,
2878     OBJ_GOLD,
2879     OBJ_RODS,
2880     NUM_OBJECT_CLASSES,
2881     OBJ_UNASSIGNED = 100,
2882     OBJ_RANDOM,      // used for blanket random sub_type .. see dungeon::items()
2883     OBJ_DETECTED,    // unknown item; item_info only
2884 };
2885
2886 enum operation_types
2887 {
2888     OPER_WIELD    = 'w',
2889     OPER_QUAFF    = 'q',
2890     OPER_DROP     = 'd',
2891     OPER_EAT      = 'e',
2892     OPER_TAKEOFF  = 'T',
2893     OPER_WEAR     = 'W',
2894     OPER_PUTON    = 'P',
2895     OPER_REMOVE   = 'R',
2896     OPER_READ     = 'r',
2897     OPER_MEMORISE = 'M',
2898     OPER_ZAP      = 'Z',
2899     OPER_EXAMINE  = 'x',
2900     OPER_FIRE     = 'f',
2901     OPER_PRAY     = 'p',
2902     OPER_EVOKE    = 'v',
2903     OPER_DESTROY  = 'D',
2904     OPER_QUIVER   = 'Q',
2905     OPER_ATTACK   = 'a',
2906     OPER_ANY      = 0,
2907 };
2908
2909 enum orb_type
2910 {
2911     ORB_ZOT,
2912 };
2913
2914 enum recite_type
2915 {
2916     RECITE_CHAOTIC,
2917     RECITE_IMPURE,
2918     RECITE_HERETIC,
2919     RECITE_UNHOLY,
2920     RECITE_ALLY,
2921     NUM_RECITE_TYPES
2922 };
2923
2924 enum size_part_type
2925 {
2926     PSIZE_BODY,         // entire body size -- used for EV/size of target
2927     PSIZE_TORSO,        // torso only (hybrids -- size of parts that use equip)
2928     PSIZE_PROFILE,      // profile only (for stealth checks)
2929 };
2930
2931 enum potion_type
2932 {
2933     POT_CURING,
2934     POT_HEAL_WOUNDS,
2935     POT_SPEED,
2936     POT_MIGHT,
2937     POT_BRILLIANCE,
2938     POT_AGILITY,
2939 #if TAG_MAJOR_VERSION == 34
2940     POT_GAIN_STRENGTH,
2941     POT_GAIN_DEXTERITY,
2942     POT_GAIN_INTELLIGENCE,
2943 #endif
2944     POT_FLIGHT,
2945     POT_POISON,
2946     POT_SLOWING,
2947     POT_PARALYSIS,
2948     POT_CONFUSION,
2949     POT_INVISIBILITY,
2950     POT_PORRIDGE,
2951     POT_DEGENERATION,
2952     POT_DECAY,
2953 #if TAG_MAJOR_VERSION == 34
2954     POT_WATER,
2955 #endif
2956     POT_EXPERIENCE,
2957     POT_MAGIC,
2958     POT_RESTORE_ABILITIES,
2959     POT_STRONG_POISON,
2960     POT_BERSERK_RAGE,
2961     POT_CURE_MUTATION,
2962     POT_MUTATION,
2963     POT_RESISTANCE,
2964     POT_BLOOD,
2965     POT_BLOOD_COAGULATED,
2966     POT_FIZZING,
2967     POT_BENEFICIAL_MUTATION,
2968     NUM_POTIONS
2969 };
2970
2971 enum pronoun_type
2972 {
2973     PRONOUN_SUBJECTIVE,
2974     PRONOUN_POSSESSIVE,
2975     PRONOUN_REFLEXIVE,
2976     PRONOUN_OBJECTIVE,
2977 };
2978
2979 enum artefact_prop_type
2980 {
2981     ARTP_BRAND,
2982     ARTP_AC,
2983     ARTP_EVASION,
2984     ARTP_STRENGTH,
2985     ARTP_INTELLIGENCE,
2986     ARTP_DEXTERITY,
2987     ARTP_FIRE,
2988     ARTP_COLD,
2989     ARTP_ELECTRICITY,
2990     ARTP_POISON,
2991     ARTP_NEGATIVE_ENERGY,
2992     ARTP_MAGIC,
2993     ARTP_EYESIGHT,
2994     ARTP_INVISIBLE,
2995     ARTP_FLY,
2996 #if TAG_MAJOR_VERSION != 34
2997     ARTP_FOG,
2998 #endif
2999     ARTP_BLINK,
3000     ARTP_BERSERK,
3001     ARTP_NOISES,
3002     ARTP_PREVENT_SPELLCASTING,
3003     ARTP_CAUSE_TELEPORTATION,
3004     ARTP_PREVENT_TELEPORTATION,
3005     ARTP_ANGRY,
3006     ARTP_METABOLISM,
3007     ARTP_MUTAGENIC,
3008     ARTP_ACCURACY,
3009     ARTP_DAMAGE,
3010     ARTP_CURSED,
3011     ARTP_STEALTH,
3012     ARTP_MAGICAL_POWER,
3013     ARTP_BASE_DELAY,
3014     ARTP_HP,
3015     ARTP_CLARITY,
3016     ARTP_BASE_ACC,
3017     ARTP_BASE_DAM,
3018     ARTP_RMSL,
3019 #if TAG_MAJOR_VERSION == 34
3020     ARTP_FOG,
3021 #endif
3022     ARTP_NUM_PROPERTIES
3023 };
3024
3025 enum score_format_type
3026 {
3027     SCORE_TERSE,                // one line
3028     SCORE_REGULAR,              // two lines (name, cause, blank)
3029     SCORE_VERBOSE,              // everything (dates, times, god, etc.)
3030 };
3031
3032 enum sense_type
3033 {
3034     SENSE_SMELL_BLOOD,
3035     SENSE_WEB_VIBRATION,
3036 };
3037
3038 enum shop_type
3039 {
3040     SHOP_WEAPON,
3041     SHOP_ARMOUR,
3042     SHOP_WEAPON_ANTIQUE,
3043     SHOP_ARMOUR_ANTIQUE,
3044     SHOP_GENERAL_ANTIQUE,
3045     SHOP_JEWELLERY,
3046     SHOP_WAND,
3047     SHOP_BOOK,
3048     SHOP_FOOD,
3049     SHOP_DISTILLERY,
3050     SHOP_SCROLL,
3051     SHOP_GENERAL,
3052     NUM_SHOPS, // must remain last 'regular' member {dlb}
3053     SHOP_UNASSIGNED = 100,
3054     SHOP_RANDOM,
3055 };
3056
3057 // These are often addressed relative to each other (esp. delta SIZE_MEDIUM).
3058 enum size_type
3059 {
3060     SIZE_TINY,              // rats/bats
3061     SIZE_LITTLE,            // spriggans
3062     SIZE_SMALL,             // halflings/kobolds
3063     SIZE_MEDIUM,            // humans/elves/dwarves
3064     SIZE_LARGE,             // trolls/ogres/centaurs/nagas
3065     SIZE_BIG,               // large quadrupeds
3066     SIZE_GIANT,             // giants
3067     SIZE_HUGE,              // dragons
3068     NUM_SIZE_LEVELS,
3069     SIZE_CHARACTER,         // transformations that don't change size
3070 };
3071
3072 // [dshaligram] If you add a new skill, update skills2.cc, specifically
3073 // the skills[] array and skill_display_order[]. New skills must go at the
3074 // end of the list or in the unused skill numbers. NEVER rearrange this enum or
3075 // move existing skills to new numbers; save file compatibility depends on this
3076 // order.
3077 enum skill_type
3078 {
3079     SK_FIGHTING,
3080     SK_FIRST_SKILL = SK_FIGHTING,
3081     SK_SHORT_BLADES,
3082     SK_LONG_BLADES,
3083     SK_AXES,
3084     SK_MACES_FLAILS,
3085     SK_POLEARMS,
3086     SK_STAVES,
3087     SK_SLINGS,
3088     SK_BOWS,
3089     SK_CROSSBOWS,
3090     SK_THROWING,
3091     SK_ARMOUR,
3092     SK_DODGING,
3093     SK_STEALTH,
3094 #if TAG_MAJOR_VERSION == 34
3095     SK_STABBING,
3096 #endif
3097     SK_SHIELDS,
3098     SK_TRAPS,
3099     SK_UNARMED_COMBAT,
3100     SK_LAST_MUNDANE = SK_UNARMED_COMBAT,
3101     SK_SPELLCASTING,
3102     SK_CONJURATIONS,
3103     SK_FIRST_MAGIC_SCHOOL = SK_CONJURATIONS, // not SK_FIRST_MAGIC as no Spc
3104     SK_HEXES,
3105     SK_CHARMS,
3106     SK_SUMMONINGS,
3107     SK_NECROMANCY,
3108     SK_TRANSLOCATIONS,
3109     SK_TRANSMUTATIONS,
3110     SK_FIRE_MAGIC,
3111     SK_ICE_MAGIC,
3112     SK_AIR_MAGIC,
3113     SK_EARTH_MAGIC,
3114     SK_POISON_MAGIC,
3115     SK_LAST_MAGIC = SK_POISON_MAGIC,
3116     SK_INVOCATIONS,
3117     SK_EVOCATIONS,
3118     SK_LAST_SKILL = SK_EVOCATIONS,
3119     NUM_SKILLS,                        // must remain last regular member
3120
3121     SK_BLANK_LINE,                     // used for skill output
3122     SK_COLUMN_BREAK,                   // used for skill output
3123     SK_TITLE,                          // used for skill output
3124     SK_NONE,
3125 };
3126
3127 enum skill_menu_state
3128 {
3129     SKM_NONE,
3130     SKM_DO_FOCUS,
3131     SKM_DO_PRACTISE,
3132     SKM_LEVEL_ENHANCED,
3133     SKM_LEVEL_NORMAL,
3134     SKM_MODE_AUTO,
3135     SKM_MODE_MANUAL,
3136     SKM_SHOW_DEFAULT,
3137     SKM_SHOW_KNOWN,
3138     SKM_SHOW_ALL,
3139     SKM_VIEW_NEW_LEVEL,
3140     SKM_VIEW_POINTS,
3141     SKM_VIEW_PROGRESS,
3142     SKM_VIEW_TRAINING,
3143     SKM_VIEW_TRANSFER,
3144 };
3145
3146 enum skill_focus_mode
3147 {
3148     SKM_FOCUS_OFF,
3149     SKM_FOCUS_ON,
3150     SKM_FOCUS_TOGGLE,
3151 };
3152
3153 // order is important on these (see player_speed())
3154 enum speed_type
3155 {
3156     SPEED_SLOWED,
3157     SPEED_NORMAL,
3158     SPEED_HASTED,
3159 };
3160
3161 enum species_type
3162 {
3163     SP_HUMAN,
3164     SP_HIGH_ELF,
3165     SP_DEEP_ELF,
3166 #if TAG_MAJOR_VERSION == 34
3167     SP_SLUDGE_ELF,
3168 #endif
3169     SP_HALFLING,
3170     SP_HILL_ORC,
3171     SP_KOBOLD,
3172     SP_MUMMY,
3173     SP_NAGA,
3174     SP_OGRE,
3175     SP_TROLL,
3176     SP_RED_DRACONIAN,
3177     SP_WHITE_DRACONIAN,
3178     SP_GREEN_DRACONIAN,
3179     SP_YELLOW_DRACONIAN,
3180     SP_GREY_DRACONIAN,
3181     SP_BLACK_DRACONIAN,
3182     SP_PURPLE_DRACONIAN,
3183     SP_MOTTLED_DRACONIAN,
3184     SP_PALE_DRACONIAN,
3185     SP_BASE_DRACONIAN,
3186     SP_CENTAUR,
3187     SP_DEMIGOD,
3188     SP_SPRIGGAN,
3189     SP_MINOTAUR,
3190     SP_DEMONSPAWN,
3191     SP_GHOUL,
3192     SP_TENGU,
3193     SP_MERFOLK,
3194     SP_VAMPIRE,
3195     SP_DEEP_DWARF,
3196     SP_FELID,
3197     SP_OCTOPODE,
3198     SP_DJINNI,
3199     SP_LAVA_ORC,
3200     SP_GARGOYLE,
3201       LAST_VALID_SPECIES = SP_GARGOYLE,
3202 // The high scores viewer still needs enums for removed species.
3203     SP_ELF,                            // (placeholder)
3204     SP_HILL_DWARF,                     // (placeholder)
3205     SP_OGRE_MAGE,                      // (placeholder)
3206     SP_GREY_ELF,                       // (placeholder)
3207     SP_GNOME,                          // (placeholder)
3208     SP_MOUNTAIN_DWARF,                 // (placeholder)
3209 #if TAG_MAJOR_VERSION > 34
3210     SP_SLUDGE_ELF,                     // (placeholder)
3211 #endif
3212
3213     NUM_SPECIES,                       // always after the last species
3214
3215     SP_UNKNOWN  = 100,
3216     SP_RANDOM   = 101,
3217     SP_VIABLE   = 102,
3218 };
3219
3220 enum spell_type
3221 {
3222     SPELL_NO_SPELL,
3223     SPELL_TELEPORT_SELF,
3224     SPELL_CAUSE_FEAR,
3225     SPELL_MAGIC_DART,
3226     SPELL_FIREBALL,
3227     SPELL_APPORTATION,
3228     SPELL_DELAYED_FIREBALL,
3229     SPELL_STRIKING,
3230     SPELL_CONJURE_FLAME,
3231     SPELL_DIG,
3232     SPELL_BOLT_OF_FIRE,
3233     SPELL_BOLT_OF_COLD,
3234     SPELL_LIGHTNING_BOLT,
3235     SPELL_BOLT_OF_MAGMA,
3236     SPELL_POLYMORPH,
3237     SPELL_SLOW,
3238     SPELL_HASTE,
3239     SPELL_PARALYSE,
3240     SPELL_CONFUSE,
3241     SPELL_INVISIBILITY,
3242     SPELL_THROW_FLAME,
3243     SPELL_THROW_FROST,
3244     SPELL_CONTROLLED_BLINK,
3245     SPELL_FREEZING_CLOUD,
3246     SPELL_MEPHITIC_CLOUD,
3247     SPELL_RING_OF_FLAMES,
3248     SPELL_VENOM_BOLT,
3249     SPELL_OLGREBS_TOXIC_RADIANCE,
3250     SPELL_TELEPORT_OTHER,
3251     SPELL_MINOR_HEALING,
3252     SPELL_MAJOR_HEALING,
3253     SPELL_DEATHS_DOOR,
3254     SPELL_MASS_CONFUSION,
3255     SPELL_SMITING,
3256     SPELL_SUMMON_SMALL_MAMMAL,
3257     SPELL_ABJURATION,
3258     SPELL_SUMMON_SCORPIONS,
3259     SPELL_BOLT_OF_DRAINING,
3260     SPELL_LEHUDIBS_CRYSTAL_SPEAR,
3261     SPELL_BOLT_OF_INACCURACY,
3262     SPELL_POISONOUS_CLOUD,
3263     SPELL_FIRE_STORM,
3264     SPELL_BLINK,
3265     SPELL_ISKENDERUNS_MYSTIC_BLAST,
3266     SPELL_SUMMON_SWARM,
3267     SPELL_SUMMON_HORRIBLE_THINGS,
3268     SPELL_ENSLAVEMENT,
3269     SPELL_ANIMATE_DEAD,
3270     SPELL_PAIN,
3271     SPELL_CONTROL_UNDEAD,
3272     SPELL_ANIMATE_SKELETON,
3273     SPELL_VAMPIRIC_DRAINING,
3274     SPELL_HAUNT,
3275     SPELL_BORGNJORS_REVIVIFICATION,
3276     SPELL_FREEZE,
3277     SPELL_SUMMON_ELEMENTAL,
3278     SPELL_OZOCUBUS_REFRIGERATION,
3279     SPELL_STICKY_FLAME,
3280     SPELL_SUMMON_ICE_BEAST,
3281     SPELL_OZOCUBUS_ARMOUR,
3282     SPELL_CALL_IMP,
3283     SPELL_REPEL_MISSILES,
3284     SPELL_BERSERKER_RAGE,
3285     SPELL_DISPEL_UNDEAD,
3286 #if TAG_MAJOR_VERSION == 34
3287     SPELL_FULSOME_DISTILLATION,
3288 #endif
3289     SPELL_POISON_ARROW,
3290     SPELL_TWISTED_RESURRECTION,
3291     SPELL_REGENERATION,
3292     SPELL_BANISHMENT,
3293 #if TAG_MAJOR_VERSION == 34
3294     SPELL_CIGOTUVIS_DEGENERATION,
3295 #endif
3296     SPELL_STING,
3297     SPELL_SUBLIMATION_OF_BLOOD,
3298     SPELL_TUKIMAS_DANCE,
3299     SPELL_HELLFIRE,
3300     SPELL_SUMMON_DEMON,
3301     SPELL_DEMONIC_HORDE,
3302     SPELL_SUMMON_GREATER_DEMON,
3303     SPELL_CORPSE_ROT,
3304     SPELL_FIRE_BRAND,
3305     SPELL_FREEZING_AURA,
3306     SPELL_LETHAL_INFUSION,
3307     SPELL_IRON_SHOT,
3308     SPELL_STONE_ARROW,
3309     SPELL_SHOCK,
3310     SPELL_SWIFTNESS,
3311     SPELL_FLY,
3312 #if TAG_MAJOR_VERSION == 34
3313     SPELL_INSULATION,
3314 #endif
3315     SPELL_CURE_POISON,
3316     SPELL_CONTROL_TELEPORT,
3317     SPELL_POISON_WEAPON,
3318     SPELL_DEBUGGING_RAY,
3319     SPELL_RECALL,
3320     SPELL_AGONY,
3321     SPELL_SPIDER_FORM,
3322     SPELL_DISINTEGRATE,
3323     SPELL_BLADE_HANDS,
3324     SPELL_STATUE_FORM,
3325     SPELL_ICE_FORM,
3326     SPELL_DRAGON_FORM,
3327     SPELL_NECROMUTATION,
3328     SPELL_DEATH_CHANNEL,
3329     SPELL_SYMBOL_OF_TORMENT,
3330     SPELL_DEFLECT_MISSILES,
3331     SPELL_THROW_ICICLE,
3332     SPELL_ICE_STORM,
3333     SPELL_AIRSTRIKE,
3334     SPELL_SHADOW_CREATURES,
3335     SPELL_CONFUSING_TOUCH,
3336     SPELL_SURE_BLADE,
3337     SPELL_FLAME_TONGUE,
3338     SPELL_PASSWALL,
3339     SPELL_IGNITE_POISON,
3340     SPELL_STICKS_TO_SNAKES,
3341     SPELL_CALL_CANINE_FAMILIAR,
3342     SPELL_SUMMON_DRAGON,
3343     SPELL_HIBERNATION,
3344     SPELL_ENGLACIATION,
3345 #if TAG_MAJOR_VERSION == 34
3346     SPELL_SEE_INVISIBLE,
3347 #endif
3348     SPELL_PHASE_SHIFT,
3349     SPELL_SUMMON_BUTTERFLIES,
3350     SPELL_WARP_BRAND,
3351     SPELL_SILENCE,
3352     SPELL_SHATTER,
3353     SPELL_DISPERSAL,
3354     SPELL_DISCHARGE,
3355     SPELL_CORONA,
3356     SPELL_INTOXICATE,
3357 #if TAG_MAJOR_VERSION == 34
3358     SPELL_EVAPORATE,
3359 #endif
3360     SPELL_LRD,
3361     SPELL_SANDBLAST,
3362     SPELL_CONDENSATION_SHIELD,
3363     SPELL_STONESKIN,
3364     SPELL_SIMULACRUM,
3365     SPELL_CONJURE_BALL_LIGHTNING,
3366     SPELL_CHAIN_LIGHTNING,
3367     SPELL_EXCRUCIATING_WOUNDS,
3368     SPELL_PORTAL_PROJECTILE,
3369     SPELL_SUMMON_UGLY_THING,
3370     SPELL_PETRIFY,
3371     SPELL_GOLUBRIAS_PASSAGE,
3372
3373     // Mostly monster-only spells after this point:
3374     SPELL_HELLFIRE_BURST,
3375 #if TAG_MAJOR_VERSION == 34
3376     SPELL_VAMPIRE_SUMMON,
3377 #endif
3378     SPELL_BRAIN_FEED,
3379     SPELL_FAKE_RAKSHASA_SUMMON,
3380     SPELL_STEAM_BALL,
3381     SPELL_SUMMON_UFETUBUS,
3382     SPELL_SUMMON_BEAST,
3383     SPELL_ENERGY_BOLT,
3384     SPELL_POISON_SPLASH,
3385     SPELL_SUMMON_UNDEAD,
3386     SPELL_CANTRIP,
3387     SPELL_QUICKSILVER_BOLT,
3388     SPELL_METAL_SPLINTERS,
3389     SPELL_MIASMA,
3390     SPELL_SUMMON_DRAKES,
3391     SPELL_BLINK_OTHER,
3392     SPELL_SUMMON_MUSHROOMS,
3393     SPELL_ACID_SPLASH,
3394     SPELL_STICKY_FLAME_SPLASH,
3395     SPELL_FIRE_BREATH,
3396     SPELL_COLD_BREATH,
3397     SPELL_DRACONIAN_BREATH,
3398     SPELL_WATER_ELEMENTALS,
3399     SPELL_PORKALATOR,
3400     SPELL_CREATE_TENTACLES,
3401     SPELL_TOMB_OF_DOROKLOHE,
3402     SPELL_SUMMON_EYEBALLS,
3403     SPELL_HASTE_OTHER,
3404     SPELL_FIRE_ELEMENTALS,
3405     SPELL_EARTH_ELEMENTALS,
3406     SPELL_AIR_ELEMENTALS,
3407     SPELL_SLEEP,
3408     SPELL_BLINK_OTHER_CLOSE,
3409     SPELL_BLINK_CLOSE,
3410     SPELL_BLINK_RANGE,
3411     SPELL_BLINK_AWAY,
3412     SPELL_MISLEAD,
3413     SPELL_FAKE_MARA_SUMMON,
3414     SPELL_SUMMON_RAKSHASA,
3415     SPELL_SUMMON_ILLUSION,
3416     SPELL_PRIMAL_WAVE,
3417     SPELL_CALL_TIDE,
3418     SPELL_IOOD,
3419     SPELL_INK_CLOUD,
3420     SPELL_MIGHT,
3421     SPELL_SUNRAY,
3422     SPELL_AWAKEN_FOREST,
3423     SPELL_SUMMON_CANIFORMS,
3424     SPELL_IRON_ELEMENTALS,
3425     SPELL_SUMMON_SPECTRAL_ORCS,
3426 #if TAG_MAJOR_VERSION == 34
3427     SPELL_RESURRECT,
3428 #endif
3429     SPELL_HOLY_LIGHT,
3430 #if TAG_MAJOR_VERSION == 34
3431     SPELL_HOLY_WORD,
3432     SPELL_SUMMON_HOLIES,
3433 #endif
3434     SPELL_HEAL_OTHER,
3435 #if TAG_MAJOR_VERSION == 34
3436     SPELL_SACRIFICE,
3437 #endif
3438     SPELL_HOLY_FLAMES,
3439     SPELL_HOLY_BREATH,
3440     SPELL_TROGS_HAND,
3441     SPELL_BROTHERS_IN_ARMS,
3442     SPELL_MIRROR_DAMAGE,
3443     SPELL_DRAIN_LIFE,
3444 #if TAG_MAJOR_VERSION == 34
3445     SPELL_MIASMA_CLOUD,
3446     SPELL_POISON_CLOUD,
3447     SPELL_FIRE_CLOUD,
3448     SPELL_STEAM_CLOUD,
3449 #endif
3450     SPELL_MALIGN_GATEWAY,
3451     SPELL_NOXIOUS_CLOUD,
3452     SPELL_TORNADO,
3453     SPELL_STICKY_FLAME_RANGE,
3454     SPELL_LEDAS_LIQUEFACTION,
3455     SPELL_HOMUNCULUS,
3456     SPELL_SUMMON_HYDRA,
3457     SPELL_DARKNESS,
3458     SPELL_MESMERISE,
3459     SPELL_MELEE, // like SPELL_NO_SPELL, but doesn't cause a re-roll
3460     SPELL_FIRE_SUMMON,
3461     SPELL_SHROUD_OF_GOLUBRIA,
3462     SPELL_INNER_FLAME,
3463     SPELL_PETRIFYING_CLOUD,
3464     SPELL_MASS_ABJURATION,
3465     SPELL_BEASTLY_APPENDAGE,
3466     SPELL_SILVER_BLAST,
3467     SPELL_ENSNARE,
3468     SPELL_THUNDERBOLT,
3469     SPELL_SUMMON_MINOR_DEMON,
3470     SPELL_DISJUNCTION,
3471     SPELL_CHAOS_BREATH,
3472     SPELL_FRENZY,
3473     SPELL_SUMMON_TWISTER,
3474     SPELL_BATTLESPHERE,
3475     SPELL_FULMINANT_PRISM,
3476     SPELL_DAZZLING_SPRAY,
3477     SPELL_FORCE_LANCE,
3478     SPELL_MALMUTATE,
3479     SPELL_MIGHT_OTHER,
3480     SPELL_SENTINEL_MARK,
3481     SPELL_WORD_OF_RECALL,
3482     SPELL_INJURY_BOND,
3483     SPELL_GHOSTLY_FLAMES,
3484     SPELL_GHOSTLY_FIREBALL,
3485     SPELL_CALL_LOST_SOUL,
3486     SPELL_DIMENSION_ANCHOR,
3487     SPELL_BLINK_ALLIES_ENCIRCLE,
3488     NUM_SPELLS
3489 };
3490
3491 enum slot_select_mode
3492 {
3493     SS_FORWARD      = 0,
3494     SS_BACKWARD     = 1,
3495 };
3496
3497 enum stat_type
3498 {
3499     STAT_STR,
3500     STAT_INT,
3501     STAT_DEX,
3502     NUM_STATS,
3503     STAT_ALL, // must remain after NUM_STATS
3504     STAT_RANDOM,
3505 };
3506
3507 enum targetting_type
3508 {
3509     DIR_NONE,
3510     DIR_TARGET,        // smite targetting
3511     DIR_DIR,           // needs a clear line to target
3512     DIR_TARGET_OBJECT, // targets items
3513 };
3514
3515 enum torment_source_type
3516 {
3517     TORMENT_GENERIC       = -1,
3518     TORMENT_CARDS         = -2,   // Symbol of torment
3519     TORMENT_SPWLD         = -3,   // Special wield torment
3520     TORMENT_SCROLL        = -4,
3521     TORMENT_SPELL         = -5,   // SPELL_SYMBOL_OF_TORMENT
3522     TORMENT_XOM           = -6,   // Xom effect
3523     TORMENT_KIKUBAAQUDGHA = -7,   // Kikubaaqudgha effect
3524 };
3525
3526 enum trap_type
3527 {
3528     TRAP_DART,
3529     TRAP_ARROW,
3530     TRAP_SPEAR,
3531     TRAP_TELEPORT,
3532     TRAP_ALARM,
3533     TRAP_BLADE,
3534     TRAP_BOLT,
3535     TRAP_NET,
3536     TRAP_ZOT,
3537     TRAP_NEEDLE,
3538     TRAP_SHAFT,
3539     TRAP_GOLUBRIA,
3540     TRAP_PLATE,
3541     TRAP_WEB,
3542     TRAP_GAS,
3543     NUM_TRAPS,
3544     TRAP_MAX_REGULAR = TRAP_SHAFT,
3545     TRAP_UNASSIGNED = 100,
3546 #if TAG_MAJOR_VERSION == 34
3547     TRAP_UNUSED1,                      // was TRAP_INDEPTH
3548 #endif
3549     TRAP_NONTELEPORT,
3550     TRAP_RANDOM,
3551 };
3552
3553 enum undead_state_type                // you.is_undead
3554 {
3555     US_ALIVE = 0,
3556     US_HUNGRY_DEAD,     // Ghouls
3557     US_UNDEAD,          // Mummies
3558     US_SEMI_UNDEAD,     // Vampires
3559 };
3560
3561 enum unique_item_status_type
3562 {
3563     UNIQ_NOT_EXISTS = 0,
3564     UNIQ_EXISTS = 1,
3565     UNIQ_LOST_IN_ABYSS = 2,
3566 };
3567
3568 enum friendly_pickup_type
3569 {
3570     FRIENDLY_PICKUP_NONE = 0,
3571     FRIENDLY_PICKUP_FRIEND,
3572     FRIENDLY_PICKUP_PLAYER,
3573     FRIENDLY_PICKUP_ALL,
3574 };
3575
3576 enum zap_type
3577 {
3578     ZAP_THROW_FLAME,
3579     ZAP_THROW_FROST,
3580     ZAP_SLOW,
3581     ZAP_HASTE,
3582     ZAP_MAGIC_DART,
3583     ZAP_MAJOR_HEALING,
3584     ZAP_PARALYSE,
3585     ZAP_BOLT_OF_FIRE,
3586     ZAP_BOLT_OF_COLD,
3587     ZAP_CONFUSE,
3588     ZAP_INVISIBILITY,
3589     ZAP_DIG,
3590     ZAP_FIREBALL,
3591     ZAP_TELEPORT_OTHER,
3592     ZAP_LIGHTNING_BOLT,
3593     ZAP_POLYMORPH,
3594     ZAP_VENOM_BOLT,
3595     ZAP_BOLT_OF_DRAINING,
3596     ZAP_LEHUDIBS_CRYSTAL_SPEAR,
3597     ZAP_BOLT_OF_INACCURACY,
3598     ZAP_ISKENDERUNS_MYSTIC_BLAST,
3599     ZAP_ENSLAVEMENT,
3600     ZAP_PAIN,
3601     ZAP_STICKY_FLAME,
3602     ZAP_STICKY_FLAME_RANGE,
3603     ZAP_DISPEL_UNDEAD,
3604     ZAP_BANISHMENT,
3605     ZAP_STING,
3606     ZAP_HELLFIRE,
3607     ZAP_IRON_SHOT,
3608     ZAP_STRIKING,
3609     ZAP_STONE_ARROW,
3610     ZAP_SHOCK,
3611     ZAP_ORB_OF_ELECTRICITY,
3612     ZAP_SPIT_POISON,
3613     ZAP_DEBUGGING_RAY,
3614     ZAP_BREATHE_FIRE,
3615     ZAP_BREATHE_FROST,
3616     ZAP_BREATHE_ACID,
3617     ZAP_BREATHE_POISON,
3618     ZAP_BREATHE_POWER,
3619     ZAP_AGONY,
3620     ZAP_DISINTEGRATE,
3621     ZAP_BREATHE_STEAM,
3622     ZAP_THROW_ICICLE,
3623     ZAP_ICE_STORM,
3624     ZAP_CORONA,
3625     ZAP_HIBERNATION,
3626     ZAP_FLAME_TONGUE,
3627     ZAP_LARGE_SANDBLAST,
3628     ZAP_SANDBLAST,
3629     ZAP_SMALL_SANDBLAST,
3630     ZAP_BOLT_OF_MAGMA,
3631     ZAP_POISON_ARROW,
3632     ZAP_BREATHE_STICKY_FLAME,
3633     ZAP_PETRIFY,
3634     ZAP_ENSLAVE_SOUL,
3635     ZAP_PORKALATOR,
3636     ZAP_SLEEP,
3637     ZAP_PRIMAL_WAVE,
3638     ZAP_IOOD,
3639     ZAP_HOLY_LIGHT,
3640     ZAP_BREATHE_MEPHITIC,
3641     ZAP_INNER_FLAME,
3642     ZAP_DAZZLING_SPRAY,
3643     ZAP_FORCE_LANCE,
3644
3645     NUM_ZAPS
3646 };
3647
3648 enum montravel_target_type
3649 {
3650     MTRAV_NONE = 0,
3651     MTRAV_PLAYER,      // Travelling to reach the player.
3652     MTRAV_PATROL,      // Travelling to reach the patrol point.
3653     MTRAV_SIREN,       // Sirens travelling towards deep water.
3654     MTRAV_WALL,        // Rock worms travelling towards a wall.
3655     MTRAV_UNREACHABLE, // Not travelling because target is unreachable.
3656     MTRAV_KNOWN_UNREACHABLE, // As above, and the player knows this.
3657 };
3658
3659 enum maybe_bool
3660 {
3661     MB_FALSE,
3662     MB_MAYBE,
3663     MB_TRUE,
3664 };
3665
3666 enum reach_type
3667 {
3668     REACH_NONE   = 2,
3669     REACH_KNIGHT = 5,
3670     REACH_TWO    = 8,
3671 };
3672
3673 enum daction_type
3674 {
3675     DACT_ALLY_HOLY,
3676     DACT_ALLY_UNHOLY_EVIL,
3677     DACT_ALLY_UNCLEAN_CHAOTIC,
3678     DACT_ALLY_SPELLCASTER,
3679     DACT_ALLY_YRED_SLAVE,
3680     DACT_ALLY_BEOGH, // both orcs and demons summoned by high priests
3681     DACT_ALLY_SLIME,
3682     DACT_ALLY_PLANT,
3683
3684     NUM_DA_COUNTERS,
3685
3686     // Leave space for new counters, as they need to be at the start.
3687     DACT_OLD_ENSLAVED_SOULS_POOF = 16,
3688     DACT_HOLY_NEW_ATTEMPT,
3689 #if TAG_MAJOR_VERSION > 34
3690     DACT_SLIME_NEW_ATTEMPT,
3691 #endif
3692     DACT_HOLY_PETS_GO_NEUTRAL,
3693     DACT_ALLY_TROG,
3694
3695     DACT_SHUFFLE_DECKS,
3696     DACT_REAUTOMAP,
3697     DACT_REMOVE_JIYVA_ALTARS,
3698     DACT_PIKEL_SLAVES,
3699     DACT_ROT_CORPSES,
3700     DACT_TOMB_CTELE,
3701 #if TAG_MAJOR_VERSION == 34
3702     DACT_SLIME_NEW_ATTEMPT,
3703 #endif
3704     DACT_KIRKE_HOGS,
3705     NUM_DACTIONS,
3706 };
3707
3708 enum disable_type
3709 {
3710     DIS_SPAWNS,
3711     DIS_MON_ACT,
3712     DIS_MON_REGEN,
3713     DIS_PLAYER_REGEN,
3714     DIS_HUNGER,
3715     DIS_DEATH,
3716     DIS_DELAY,
3717     DIS_CONFIRMATIONS,
3718     DIS_AFFLICTIONS,
3719     NUM_DISABLEMENTS
3720 };
3721
3722 enum seen_context_type
3723 {
3724     SC_NONE,
3725     SC_JUST_SEEN,       // has already been announced this turn
3726     SC_NEWLY_SEEN,      // regular walking into view
3727     SC_ALREADY_SEEN,    // wasn't a threat before, is now
3728     SC_TELEPORT_IN,
3729     SC_SURFACES,                      // land-capable
3730     SC_SURFACES_BRIEFLY,              // land-capable, submerged back
3731     SC_FISH_SURFACES_SHOUT,           // water/lava-only, shouting
3732     SC_FISH_SURFACES,                 // water/lava-only
3733     SC_NONSWIMMER_SURFACES_FROM_DEEP, // impossible?!?
3734     SC_UNCHARM,
3735     SC_DOOR,            // they opened a door
3736     SC_GATE,            // ... or a big door
3737     SC_LEAP_IN,         // leaps into view
3738 };
3739
3740 enum los_type
3741 {
3742     LOS_NONE         = 0,
3743     LOS_ARENA        = LOS_NONE,
3744     LOS_DEFAULT      = (1 << 0),
3745     LOS_NO_TRANS     = (1 << 1),
3746     LOS_SOLID        = (1 << 2),
3747     LOS_SOLID_SEE    = (1 << 3),
3748 };
3749
3750 enum ac_type
3751 {
3752     AC_NONE,
3753     // These types block small amounts of damage, hardly affecting big hits.
3754     AC_NORMAL,
3755     AC_HALF,
3756     AC_TRIPLE,
3757     // This one stays fair over arbitrary splits.
3758     AC_PROPORTIONAL,
3759 };
3760
3761 enum uncancellable_type
3762 {
3763     UNC_ACQUIREMENT,           // arg is AQ_SCROLL or AQ_CARD_GENIE
3764     UNC_DRAW_THREE,            // arg is inv slot of the deck
3765     UNC_STACK_FIVE,            // arg is inv slot of the deck
3766     UNC_MERCENARY,             // arg is mid of the monster
3767 };
3768
3769 // Tiles stuff.
3770
3771 enum screen_mode
3772 {
3773     SCREENMODE_WINDOW = 0,
3774     SCREENMODE_FULL   = 1,
3775     SCREENMODE_AUTO   = 2,
3776 };
3777
3778 enum cursor_type
3779 {
3780     CURSOR_MOUSE,
3781     CURSOR_TUTORIAL,
3782     CURSOR_MAP,
3783     CURSOR_MAX,
3784 };
3785
3786 // Ordering of tags is important: higher values cover up lower ones.
3787 enum text_tag_type
3788 {
3789     TAG_NAMED_MONSTER = 0,
3790     TAG_TUTORIAL      = 1,
3791     TAG_CELL_DESC     = 2,
3792     TAG_MAX,
3793 };
3794
3795 enum tag_pref
3796 {
3797     TAGPREF_NONE,     // never display text tags
3798     TAGPREF_TUTORIAL, // display text tags on "new" monsters
3799     TAGPREF_NAMED,    // display text tags on named monsters (incl. friendlies)
3800     TAGPREF_ENEMY,    // display text tags on enemy named monsters
3801     TAGPREF_MAX,
3802 };
3803 enum tile_flags ENUM_INT64
3804 {
3805     //// Foreground flags
3806
3807     // 3 mutually exclusive flags for attitude.
3808     TILE_FLAG_ATT_MASK   = 0x00030000ULL,
3809     TILE_FLAG_PET        = 0x00010000ULL,
3810     TILE_FLAG_GD_NEUTRAL = 0x00020000ULL,
3811     TILE_FLAG_NEUTRAL    = 0x00030000ULL,
3812
3813     TILE_FLAG_S_UNDER    = 0x00040000ULL,
3814     TILE_FLAG_FLYING     = 0x00080000ULL,
3815
3816     // 3 mutually exclusive flags for behaviour.
3817     TILE_FLAG_BEH_MASK   = 0x00300000ULL,
3818     TILE_FLAG_STAB       = 0x00100000ULL,
3819     TILE_FLAG_MAY_STAB   = 0x00200000ULL,
3820     TILE_FLAG_FLEEING    = 0x00300000ULL,
3821
3822     TILE_FLAG_NET        = 0x00400000ULL,
3823     TILE_FLAG_POISON     = 0x00800000ULL,
3824     TILE_FLAG_WEB        = 0x01000000ULL,
3825     TILE_FLAG_GLOWING    = 0x02000000ULL,
3826     TILE_FLAG_STICKY_FLAME = 0x04000000ULL,
3827     TILE_FLAG_BERSERK    = 0x08000000ULL,
3828     TILE_FLAG_INNER_FLAME= 0x10000000ULL,
3829     TILE_FLAG_CONSTRICTED= 0x20000000ULL,
3830     TILE_FLAG_SLOWED     = 0x8000000000ULL,
3831     TILE_FLAG_PAIN_MIRROR = 0x10000000000ULL,
3832     TILE_FLAG_HASTED     = 0x20000000000ULL,
3833     TILE_FLAG_MIGHT      = 0x40000000000ULL,
3834     TILE_FLAG_PETRIFYING = 0x80000000000ULL,
3835     TILE_FLAG_PETRIFIED  = 0x100000000000ULL,
3836     TILE_FLAG_BLIND      = 0x200000000000ULL,
3837     TILE_FLAG_ANIM_WEP   = 0x400000000000ULL,
3838     TILE_FLAG_SUMMONED   = 0x800000000000ULL,
3839
3840     // MDAM has 5 possibilities, so uses 3 bits.
3841     TILE_FLAG_MDAM_MASK  = 0x1C0000000ULL,
3842     TILE_FLAG_MDAM_LIGHT = 0x040000000ULL,
3843     TILE_FLAG_MDAM_MOD   = 0x080000000ULL,
3844     TILE_FLAG_MDAM_HEAVY = 0x0C0000000ULL,
3845     TILE_FLAG_MDAM_SEV   = 0x100000000ULL,
3846     TILE_FLAG_MDAM_ADEAD = 0x1C0000000ULL,
3847
3848     // Demon difficulty has 5 possibilities, so uses 3 bits.
3849     TILE_FLAG_DEMON      = 0xE00000000ULL,
3850     TILE_FLAG_DEMON_5    = 0x200000000ULL,
3851     TILE_FLAG_DEMON_4    = 0x400000000ULL,
3852     TILE_FLAG_DEMON_3    = 0x600000000ULL,
3853     TILE_FLAG_DEMON_2    = 0x800000000ULL,
3854     TILE_FLAG_DEMON_1    = 0xE00000000ULL,
3855
3856     // 3 mutually exclusive flags for mimics.
3857     TILE_FLAG_MIMIC_INEPT = 0x2000000000ULL,
3858     TILE_FLAG_MIMIC       = 0x4000000000ULL,
3859     TILE_FLAG_MIMIC_RAVEN = 0x6000000000ULL,
3860     TILE_FLAG_MIMIC_MASK  = 0x6000000000ULL,
3861
3862
3863     //// Background flags
3864
3865     TILE_FLAG_RAY        = 0x00010000ULL,
3866     TILE_FLAG_MM_UNSEEN  = 0x00020000ULL,
3867     TILE_FLAG_UNSEEN     = 0x00040000ULL,
3868
3869     // 3 mutually exclusive flags for cursors.
3870     TILE_FLAG_CURSOR1    = 0x00180000ULL,
3871     TILE_FLAG_CURSOR2    = 0x00080000ULL,
3872     TILE_FLAG_CURSOR3    = 0x00100000ULL,
3873     TILE_FLAG_CURSOR     = 0x00180000ULL,
3874
3875     TILE_FLAG_TUT_CURSOR = 0x00200000ULL,
3876     TILE_FLAG_TRAV_EXCL  = 0x00400000ULL,
3877     TILE_FLAG_EXCL_CTR   = 0x00800000ULL,
3878     TILE_FLAG_RAY_OOR    = 0x01000000ULL,
3879     TILE_FLAG_OOR        = 0x02000000ULL,
3880     TILE_FLAG_WATER      = 0x04000000ULL,
3881     TILE_FLAG_NEW_STAIR  = 0x08000000ULL,
3882