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.