✨ ARCANUM RUNE DIFFICULTY: Apprentice Behavioral

The State

Altering a monstrosity's behavior based on its current level of decay.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: State
ARCANUM SCHOOL: Transmutation // Form-Shifting
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
STATE ; State Pattern in MUMPS
;
ACTION(ID) ;
  N STATE
  S STATE=$G(^MONSTER(ID,"STATE"),"FRESH")
  I STATE="FRESH" D FRESHACT Q
  I STATE="DECAYING" D DECAYACT Q
  I STATE="DUST" D DUSTACT Q
  Q
;
FRESHACT W "Monster attacks with terrifying speed!",! S ^MONSTER(ID,"STATE")="DECAYING" Q
DECAYACT W "Monster shambles forward slowly.",! S ^MONSTER(ID,"STATE")="DUST" Q
DUSTACT W "A pile of dust does nothing.",! Q
Runic Tags: #behavioral #state #mumps #necromancy