Skip to main content

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_DOORS lets 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. With MONSTER_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_SOMETIMES makes 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_ACTION adds 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_LOSS may make the character lose an item; then MONSTER_CAP_POISONS, MONSTER_CAP_PARALYZES and MONSTER_CAP_PETRIFIES afflict 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 bit 0x80 of properties_raw: "name has lost his item." (or "her"). The item leaves the inventory without being placed anywhere.4
  • Drawing. MONSTER_CAP_ALT_FRAME_TABLE selects the alternate frame table and MONSTER_CAP_HIDDEN hides 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_HIT makes any damage fatal, and MONSTER_CAP_WALL_SPECIAL_TYPE_1 selects the level 16 death branch; see when a monster dies.7
  • Unused bits. No code tests MONSTER_CAP_BIT_6_UNKNOWN or MONSTER_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 has MONSTER_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

BitTypesWhere
MONSTER_CAP_LARGE8Levels 1, 3, 4, 11, 12 and 14.
MONSTER_CAP_ALT_FRAME_TABLE38Twelve of the sixteen levels.
MONSTER_CAP_WALL_SPECIAL_TYPE_12Both forms of the final opponent, level 16, sublevel 1.
MONSTER_CAP_POST_MOVE_ACTION20Levels 2, 5, 6, 7, 8, 9 and 16.
MONSTER_CAP_POISONS12Levels 1, 3, 7, 8 and 13.
MONSTER_CAP_PARALYZES10Levels 3, 7 and 9.
MONSTER_CAP_BIT_6_UNKNOWN0—
MONSTER_CAP_ITEM_LOSS1The first type of level 3, whose monsters use the cube graphics.
MONSTER_CAP_HIDDEN0—
MONSTER_CAP_SIDESTEP_SOMETIMES2Both forms of the final opponent, level 16, sublevel 1.
MONSTER_CAP_BIT_10_UNKNOWN1The first type of level 3.
MONSTER_CAP_ATTACKS_ANY_SIDE1The first type of level 3.
MONSTER_CAP_OPENS_DOORS26Levels 1, 2, 5, 6, 9, 15 and 16.
MONSTER_CAP_DIES_ON_HIT2Two types of level 8.
MONSTER_CAP_ATTACKS_ALL2The frost giant type of level 14 and the final opponent's second form, level 16.
MONSTER_CAP_PETRIFIES2Levels 11 and 13.

Sources​

Locations refer to the game executable reference; comparative sources are listed in the technical references.

Footnotes​

  1. The INF loader stores the word when it reads monster properties. ↩

  2. Check a candidate move and move toward a destination. Comparative source: walkMonster and walkMonsterNextStep in REF-SCUMM-020. ↩

  3. Pursuit decision, close-range action and target choice. ↩ ↩2

  4. Monster attack, lose an item and afflict a character with a condition, with the item-type table. Comparative source: monsterCloseAttack and statusAttack in REF-SCUMM-021. ↩ ↩2

  5. Draw the monsters of a visible block. ↩

  6. Target choice. Comparative source: monsterCloseAttack in REF-SCUMM-018. ↩

  7. Damage a monster and kill a monster. ↩

  8. The readers of the word are the routines cited above: check a candidate move, move toward a destination, pursuit decision, kill a monster, monster attack, target choice, a character's hit roll, damage a monster and draw the monsters of a visible block; the monster type properties entry lists their addresses. ↩

  9. The monster types and monster graphics of every sublevel of the 16 reference INF files, read with the INF schema. ↩