1 #ifndef MON_CLASS_FLAGS_H
2 #define MON_CLASS_FLAGS_H
4 #define BIT(x) ((uint64_t)1<<(x))
6 // properties of the monster class (other than resists/vulnerabilities).
7 // NOT using enum, since C++ doesn't guarantee support for 64-bit enum
9 const uint64_t M_NO_FLAGS
= 0;
11 // any non-physical-attack powers,
12 const uint64_t M_SPELLCASTER
= 1<< 0;
14 // monster is a wizard (hated by Trog; affected by silence)
15 const uint64_t M_ACTUAL_SPELLS
= 1<< 1;
17 // monster is a priest
18 const uint64_t M_PRIEST
= 1<< 2;
20 // monster is skilled fighter
21 const uint64_t M_FIGHTER
= 1<< 3;
23 // do not give (unique) a wand
24 const uint64_t M_NO_WAND
= 1<< 4;
26 // do not give a high tier wand
27 const uint64_t M_NO_HT_WAND
= 1<< 5;
30 const uint64_t M_INVIS
= 1<< 6;
33 const uint64_t M_SEE_INVIS
= 1<< 7;
35 // can sense invisible things
36 const uint64_t M_SENSE_INVIS
= 1<< 8;
39 const uint64_t M_SPEAKS
= 1<< 9;
41 // monster is perma-confused;
42 const uint64_t M_CONFUSED
= 1<<10;
45 const uint64_t M_BATTY
= 1<<11;
48 const uint64_t M_SPLITS
= 1<<12;
50 // monster glows with light
51 const uint64_t M_GLOWS_LIGHT
= 1<<13;
53 // monster is stationary
54 const uint64_t M_STATIONARY
= 1<<14;
56 // monster can smell blood
57 const uint64_t M_BLOOD_SCENT
= 1<<15;
59 // susceptible to cold; drainable by vampires
60 const uint64_t M_COLD_BLOOD
= 1<<16;
62 // drainable by vampires, no other effect currently
63 const uint64_t M_WARM_BLOOD
= 1<<17;
65 // monster glows with radiation
66 const uint64_t M_GLOWS_RADIATION
= 1<<18;
68 // monster digs through rock
69 const uint64_t M_BURROWS
= 1<<19;
71 // monster can submerge
72 const uint64_t M_SUBMERGES
= 1<<20;
74 // monster is a unique
75 const uint64_t M_UNIQUE
= 1<<21;
77 // Passive acid splash when hit.
78 const uint64_t M_ACID_SPLASH
= 1<<22;
80 // gets various archery boosts
81 const uint64_t M_ARCHER
= 1<<23;
84 const uint64_t M_INSUBSTANTIAL
= 1<<24;
86 // wields two weapons at once
87 const uint64_t M_TWO_WEAPONS
= 1<<25;
89 // XXX: eventually make these spells?
90 const uint64_t M_SPECIAL_ABILITY
= 1<<26;
93 const uint64_t M_NO_REGEN
= 1<<27;
95 // cannot cast spells when silenced; even though it's not a priest or
97 const uint64_t M_SPELL_NO_SILENT
= 1<<28;
99 // can cast spells when silenced; but casting makes noise when not
101 const uint64_t M_NOISY_SPELLS
= 1<<29;
104 const uint64_t M_NO_SKELETON
= 1<<30;
107 const uint64_t M_NO_EXP_GAIN
= (uint64_t)1<<31;
109 // has a deflection effect
110 const uint64_t M_DEFLECT_MISSILES
= (uint64_t)1<<32;
112 // phase shift (EV bonus not included)
113 const uint64_t M_PHASE_SHIFT
= (uint64_t)1<<33;
115 // not a valid polymorph target (but can be polymorphed)
116 const uint64_t M_NO_POLY_TO
= (uint64_t)1<<34;
118 // has special abilities coded as spells which are entirely non-magical
119 const uint64_t M_FAKE_SPELLS
= (uint64_t)1<<35;
121 // always leaves a corpse
122 const uint64_t M_ALWAYS_CORPSE
= (uint64_t)1<<36;
124 // is constantly "fleeing"
125 const uint64_t M_FLEEING
= (uint64_t)1<<37;
127 // is an artificial being
128 const uint64_t M_ARTIFICIAL
= (uint64_t)1<<38;
130 // doesn't need to breathe; immune to asphyxiation and Mephitic Cloud
131 const uint64_t M_UNBREATHING
= (uint64_t)1<<39;
133 // not fully coded; causes a warning
134 const uint64_t M_UNFINISHED
= (uint64_t)1<<40;
136 const uint64_t M_HERD
= (uint64_t)1<<41;
139 // Same for flags for actual monsters.
140 typedef uint64_t monster_flag_type
;
141 const uint64_t MF_NO_REWARD
= BIT(0); // no benefit from killing
142 const uint64_t MF_JUST_SUMMONED
= BIT(1); // monster skips next available action
143 const uint64_t MF_TAKING_STAIRS
= BIT(2); // is following player through stairs
144 const uint64_t MF_INTERESTING
= BIT(3); // Player finds monster interesting
146 const uint64_t MF_SEEN
= BIT(4); // Player has already seen monster
147 const uint64_t MF_KNOWN_MIMIC
= BIT(5); // Mimic that has taken a swing at the PC,
148 // or that the player has inspected with ?
149 const uint64_t MF_BANISHED
= BIT(6); // Monster that has been banished.
151 const uint64_t MF_HARD_RESET
= BIT(7); // Summoned, should not drop gear on reset
152 const uint64_t MF_WAS_NEUTRAL
= BIT(8); // mirror to CREATED_FRIENDLY for neutrals
153 const uint64_t MF_ATT_CHANGE_ATTEMPT
= BIT(9); // Saw player and attitude changed (or
154 // not); currently used for holy beings
155 // (good god worshippers -> neutral)
156 // orcs (Beogh worshippers -> friendly),
157 // and slimes (Jiyva worshippers -> neutral)
158 const uint64_t MF_WAS_IN_VIEW
= BIT(10); // Was in view during previous turn.
160 const uint64_t MF_BAND_MEMBER
= BIT(11); // Created as a member of a band
161 const uint64_t MF_GOT_HALF_XP
= BIT(12); // Player already got half xp value earlier
162 const uint64_t MF_FAKE_UNDEAD
= BIT(13); // Consider this monster to have MH_UNDEAD
163 // holiness, regardless of its actual type
164 const uint64_t MF_ENSLAVED_SOUL
= BIT(14); // An undead monster soul enslaved by
165 // Yredelemnul's power
167 const uint64_t MF_NAME_SUFFIX
= BIT(15); // mname is a suffix.
168 const uint64_t MF_NAME_ADJECTIVE
= BIT(16); // mname is an adjective.
169 // between it and the monster type name.
170 const uint64_t MF_NAME_REPLACE
= MF_NAME_SUFFIX
|MF_NAME_ADJECTIVE
;
171 // mname entirely replaces normal monster
173 const uint64_t MF_NAME_MASK
= MF_NAME_REPLACE
;
174 const uint64_t MF_GOD_GIFT
= BIT(17); // Is a god gift.
175 const uint64_t MF_FLEEING_FROM_SANCTUARY
= BIT(18); // Is running away from player sanctuary
176 const uint64_t MF_EXPLODE_KILL
= BIT(19); // Is being killed with disintegration
178 // These are based on the flags in monster class, but can be set for
179 // monsters that are not normally fighters.
180 const uint64_t MF_FIGHTER
= BIT(20); // Monster is skilled fighter.
181 const uint64_t MF_TWO_WEAPONS
= BIT(21); // Monster wields two weapons.
182 const uint64_t MF_ARCHER
= BIT(22); // Monster gets various archery boosts.
183 const uint64_t MF_MELEE_MASK
= MF_FIGHTER
|MF_TWO_WEAPONS
|MF_ARCHER
;
185 // These are based on the flags in monster class, but can be set for
186 // monsters that are not normally spellcasters (in vaults).
187 const uint64_t MF_SPELLCASTER
= BIT(23);
188 const uint64_t MF_ACTUAL_SPELLS
= BIT(24); // Can use spells and is a spellcaster for
190 const uint64_t MF_PRIEST
= BIT(25); // Is a priest (divine spells)
192 const uint64_t MF_SPELL_MASK
= MF_SPELLCASTER
|MF_ACTUAL_SPELLS
|MF_PRIEST
;
194 const uint64_t MF_NO_REGEN
= BIT(26); // This monster cannot regenerate.
196 const uint64_t MF_NAME_DESCRIPTOR
= BIT(27); // mname should be treated with normal
197 // grammar, ie, prevent "You hit red rat"
198 // and other such constructs.
199 const uint64_t MF_NAME_DEFINITE
= BIT(28); // give this monster the definite "the"
200 // article, instead of the indefinite "a"
202 const uint64_t MF_INTERLEVEL_FOLLOWER
= BIT(29); // will travel with the player regardless
203 // of where the monster is at on the level
204 const uint64_t MF_DEMONIC_GUARDIAN
= BIT(30); // is a demonic_guardian
205 const uint64_t MF_NAME_SPECIES
= BIT(31); // mname should be used for corpses as well,
206 // preventing "human corpse of halfling"
207 // Note: at least name flags get passed in a 32-bit variable
208 // (fill_out_corpse()), and perhaps other flags as well. Be
209 // careful when extending.