Monster capabilities
MonsterCapabilityFlags · 16-bit capability_flags field of an
INF monster type
Monsters · The engine in ten minutes · Monster catalogue
Each monster type has a word of combinable capability bits. They let a monster open doors, act again after moving, attack from any side or attack several characters at once, poison, paralyze or petrify its victims, take their items, and die from any hit; others change how it moves, how it is drawn and which damage profile weapons roll against it.1
typedef enum MonsterCapabilityFlags {
MONSTER_CAP_LARGE = 0x0001, /* Weapons roll their second damage profile; "large" is an inferred name. */
MONSTER_CAP_ALT_FRAME_TABLE = 0x0002, /* Choose frames from the alternate frame table when drawn. */
MONSTER_CAP_WALL_SPECIAL_TYPE_1 = 0x0004, /* Type 1 only: replaces a closed switch door with wall reference 72; also the level 16 death branch. */
MONSTER_CAP_POST_MOVE_ACTION = 0x0008, /* Try a melee attack again after moving. */
MONSTER_CAP_POISONS = 0x0010, /* A damaging melee attack may poison the character. */
MONSTER_CAP_PARALYZES = 0x0020, /* A damaging melee attack may paralyze the character. */
MONSTER_CAP_BIT_6_UNKNOWN = 0x0040, /* Never tested; no reference type sets it. */
MONSTER_CAP_ITEM_LOSS = 0x0080, /* A damaging melee attack makes the character lose an item, 3 times in 4. */
MONSTER_CAP_HIDDEN = 0x0100, /* Not drawn unless revealed or seen through a party-wide state. */
MONSTER_CAP_SIDESTEP_SOMETIMES = 0x0200, /* Takes the side step toward a diagonal destination only 3 times in 4. */
MONSTER_CAP_BIT_10_UNKNOWN = 0x0400, /* Never tested; set on one reference type. */
MONSTER_CAP_ATTACKS_ANY_SIDE = 0x0800, /* Attacks a party in any orthogonal neighbor without facing it. */
MONSTER_CAP_OPENS_DOORS = 0x1000, /* Opens closed doors with a switch and waits while they open. */
MONSTER_CAP_DIES_ON_HIT = 0x2000, /* Any damage sets hit points to 0. */
MONSTER_CAP_ATTACKS_ALL = 0x4000, /* A melee attack goes on to every eligible character of the attack order. */
MONSTER_CAP_PETRIFIES = 0x8000 /* A damaging melee attack may turn the character to stone. */
} MonsterCapabilityFlags;
Where it is used
- Movement.
MONSTER_CAP_OPENS_DOORSlets a monster open a closed door with a switch and wait in front of it while it opens; without it, a monster passes only faces that let monsters through. WithMONSTER_CAP_WALL_SPECIAL_TYPE_1, monster type 1 replaces the closed door with wall reference 72 instead of opening it. See walls and doors.MONSTER_CAP_SIDESTEP_SOMETIMESmakes the side step toward a diagonally adjacent destination happen only three times in four; see moving toward the destination.2 - Pursuit.
MONSTER_CAP_POST_MOVE_ACTIONadds a second melee attempt; see how a monster acts.3 - Reach. With
MONSTER_CAP_ATTACKS_ANY_SIDE, the block a pursuing monster tests is the neighbor toward the party whenever the party lies in a straight direction, not the block it faces: it attacks a party in any of the four neighboring blocks without turning, and still chooses the characters it hits from its own facing. See what stops an attack.3 - Attacks. After a melee attack with a positive total,
MONSTER_CAP_ITEM_LOSSmay make the character lose an item; thenMONSTER_CAP_POISONS,MONSTER_CAP_PARALYZESandMONSTER_CAP_PETRIFIESafflict the character with that condition unless it saves. See melee attacks and effects on characters.4 - Items. The item lost to
MONSTER_CAP_ITEM_LOSS, three times in four, is the first one met from a random inventory slot onward whose item type has bit0x80ofproperties_raw: "name has lost his item." (or "her"). The item leaves the inventory without being placed anywhere.4 - Drawing.
MONSTER_CAP_ALT_FRAME_TABLEselects the alternate frame table andMONSTER_CAP_HIDDENhides the monster unless it is revealed; see monsters in the view.5 - Several targets. With
MONSTER_CAP_ATTACKS_ALL, a monster's melee attack does not stop after the first character: it attacks every eligible character of its order in turn; see who a monster attacks. In the original levels two monster types have it: the type of level 14 whose graphics are the frost giant's, and the second form of the final opponent on level 16.6 - Damage and death.
MONSTER_CAP_DIES_ON_HITmakes any damage fatal, andMONSTER_CAP_WALL_SPECIAL_TYPE_1selects the level 16 death branch; see when a monster dies.7 - Unused bits. No code tests
MONSTER_CAP_BIT_6_UNKNOWNorMONSTER_CAP_BIT_10_UNKNOWN: every reader of the capability word masks one of the other bits, and the word is not copied anywhere else. Setting either bit changes nothing in play; the first type of level 3, which hasMONSTER_CAP_BIT_10_UNKNOWN, behaves as if it were clear.8
Use in the reference files
The 16 reference INF files declare 63 monster types over all their sublevels. Each bit is set on these types:9
| Bit | Types | Where |
|---|---|---|
MONSTER_CAP_LARGE | 8 | Levels 1, 3, 4, 11, 12 and 14. |
MONSTER_CAP_ALT_FRAME_TABLE | 38 | Twelve of the sixteen levels. |
MONSTER_CAP_WALL_SPECIAL_TYPE_1 | 2 | Both forms of the final opponent, level 16, sublevel 1. |
MONSTER_CAP_POST_MOVE_ACTION | 20 | Levels 2, 5, 6, 7, 8, 9 and 16. |
MONSTER_CAP_POISONS | 12 | Levels 1, 3, 7, 8 and 13. |
MONSTER_CAP_PARALYZES | 10 | Levels 3, 7 and 9. |
MONSTER_CAP_BIT_6_UNKNOWN | 0 | — |
MONSTER_CAP_ITEM_LOSS | 1 | The first type of level 3, whose monsters use the cube graphics. |
MONSTER_CAP_HIDDEN | 0 | — |
MONSTER_CAP_SIDESTEP_SOMETIMES | 2 | Both forms of the final opponent, level 16, sublevel 1. |
MONSTER_CAP_BIT_10_UNKNOWN | 1 | The first type of level 3. |
MONSTER_CAP_ATTACKS_ANY_SIDE | 1 | The first type of level 3. |
MONSTER_CAP_OPENS_DOORS | 26 | Levels 1, 2, 5, 6, 9, 15 and 16. |
MONSTER_CAP_DIES_ON_HIT | 2 | Two types of level 8. |
MONSTER_CAP_ATTACKS_ALL | 2 | The frost giant type of level 14 and the final opponent's second form, level 16. |
MONSTER_CAP_PETRIFIES | 2 | Levels 11 and 13. |
Sources
Locations refer to the game executable reference; comparative sources are listed in the technical references.