Skip to main content

Character conditions

CharacterStatusFlags · 1 byte, status_flags of CharacterRuntime

The party · Character eligibility tests · Attack spells

A character's status byte records whether it is in the party and the conditions that keep it from acting. The eligibility tests read it, and the curing spells clear its bits.1

/* Conditions of a party character (EOB II DOS). */
typedef enum CharacterStatusFlags {
CHARACTER_STATUS_PRESENT = 0x01, /* The party slot holds a character. Kept when the character dies. */
CHARACTER_STATUS_POISONED = 0x02, /* Set by monster poison: 5 damage every 546 ticks. Tested by Slow Poison; cleared by Neutralize Poison. */
CHARACTER_STATUS_PARALYZED = 0x04, /* Set for 2,730 ticks by monster paralysis, the mind blast or Hold Person. Cleared by Remove Paralysis. */
CHARACTER_STATUS_PETRIFIED = 0x08 /* Set by monster petrification. Cleared by Stone to Flesh; counts as dead for the eligibility tests. */
} CharacterStatusFlags;

These four bits are the whole byte: among every access to it found in the code, none sets or tests bits 0x10 to 0x80. Besides setting and clearing single bits, the game writes the whole byte in three places: it is set to CHARACTER_STATUS_PRESENT when the party enters the game, it keeps only that bit when the character dies, and it is cleared when the character leaves the party, which frees the slot.2

How a character gets a condition​

Monsters poison, paralyze and petrify characters through one routine: the character makes a saving throw, and on a failure gets the bit and, for poison and paralysis, a character timer that deals the poison damage or ends the paralysis. Petrification also ends every spell on the character and leaves only CHARACTER_STATUS_PRESENT and CHARACTER_STATUS_PETRIFIED. See effects on characters. Hold Person cast at the party also paralyzes characters; see the attack spells.3

Sources​

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

Footnotes​

  1. The character eligibility routine, the death path and the spell routines of Slow Poison, Neutralize Poison, Remove Paralysis and Stone to Flesh. Comparative source: EoBCoreEngine::testCharacter and the curing spell callbacks in REF-SCUMM-013. ↩

  2. Starting status and items, the death path and remove a character from the party. ↩

  3. Afflict a character with a condition, the character saving throw and the character timer events. Comparative source: statusAttack and timerSpecialCharacterUpdate in REF-SCUMM-021. ↩