Skip to main content

Monster immunities

MonsterImmunityFlags · 16-bit immunity_flags of a monster type, from the INF monster properties

Combat · Monster catalogue · Kinds of damage · Spell effects on a monster

A monster type can ignore some kinds of damage, resist ordinary weapons or shrug off some spells. These bits are tested by the hit roll, the damage calculation and the spell effects.1

/* Immunities of a monster type (EOB II DOS). */
typedef enum MonsterImmunityFlags {
MONSTER_IMMUNE_BIT_0_UNKNOWN = 0x0001, /* Never tested; set on four original monster types. */
MONSTER_IMMUNE_PARALYSIS = 0x0002, /* Hold Person, Hold Monster and Power Word Stun have no effect. */
MONSTER_IMMUNE_FEAR = 0x0004, /* Fear has no effect. */
MONSTER_IMMUNE_DEATH = 0x0008, /* Finger of Death and Slay Living do not kill. */
MONSTER_IMMUNE_MAGIC = 0x0010, /* Cancels MONSTER_DAMAGE_MAGIC; spell effects are evaded. */
MONSTER_IMMUNE_ELECTRICITY = 0x0020, /* Cancels MONSTER_DAMAGE_ELECTRICITY. */
MONSTER_IMMUNE_UNKNOWN_0040 = 0x0040, /* Cancels MONSTER_DAMAGE_UNKNOWN_0400, which never occurs. */
MONSTER_IMMUNE_COLD = 0x0080, /* Cancels MONSTER_DAMAGE_COLD. */
MONSTER_IMMUNE_WEAPON_HALVED = 0x0100, /* Weapon damage halved, unless a class byte has CHARACTER_CLASS_CLERIC (see anomaly). */
MONSTER_IMMUNE_NEEDS_MAGIC_WEAPON = 0x0200, /* Hit only by a weapon whose value is above 0. */
MONSTER_IMMUNE_UNKNOWN_0400 = 0x0400, /* Cancels MONSTER_DAMAGE_UNKNOWN_0080, which never occurs. */
MONSTER_IMMUNE_FIRE = 0x0800, /* Cancels MONSTER_DAMAGE_FIRE. */
MONSTER_IMMUNE_NEEDS_PLUS_TWO = 0x1000, /* Hit only by a weapon whose value is above 1. */
MONSTER_IMMUNE_WEAPON_REDUCED = 0x2000 /* Weapon damage quartered or halved according to the weapon's value. */
} MonsterImmunityFlags;

MONSTER_IMMUNE_BIT_0_UNKNOWN and bits 0x4000 and 0x8000 are never tested: every read of the immunity word is known. Four monster types of the original levels have MONSTER_IMMUNE_BIT_0_UNKNOWN, those of levels 11 and 12 numbered 0 and those of level 16 numbered 0 and 1, without effect. MONSTER_IMMUNE_UNKNOWN_0040 and MONSTER_IMMUNE_UNKNOWN_0400 answer kinds of damage that the game never produces, and no original monster type has them; see kinds that never occur. The two weapon tests of the hit roll also apply to attacks made without an item, such as the wound spells, which therefore always miss such monsters. The exact rules are in damage to a monster and a character's hit roll.

Anomaly

MONSTER_IMMUNE_WEAPON_HALVED reads the class byte of the item-type entry numbered like the item, not like its type, so the result depends on the item's number in the item table.

Sources​

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

Footnotes​

  1. The character hit roll, the monster damage calculation and the spell effects on a monster, the readers of the monster-type table and the monster types of the INF schema. Comparative source: characterAttackHitTest, calcMonsterDamage and magicObjectStatusHit in REF-SCUMM-013. ↩