The State of the Homunculus
Changing behavior of an alchemical construct based on its internal elemental phase.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: State
ARCANUM SCHOOL: Transmutation // Alchemy
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
interface HomunculusState
exposes [Phase, Homunculus, act, transition]
imports []
Phase : [Solid, Liquid, Gas]
Homunculus : { phase : Phase, power : U64 }
act : Homunculus -> Str
act = \homunculus ->
when homunculus.phase is
Solid -> "The homunculus strikes with crushing force!"
Liquid -> "The homunculus flows around the attack!"
Gas -> "The homunculus suffocates the target!"
transition : Homunculus, Phase -> Homunculus
transition = \homunculus, newPhase ->
{ homunculus & phase: newPhase }
Runic Tags:
#fast-functional-wards
#roc
#state
#fsm