✨ ARCANUM RUNE DIFFICULTY: Adept Behavioral

The Mediator of Spirits

Centralizing communication between disparate elemental spirits to prevent chaos.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Mediator
ARCANUM SCHOOL: Conjuration // Binding
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
interface SpiritMediator
    exposes [Spirit, Event, handleEvent]
    imports []

Spirit : [Ignis, Aquam, Terram]
Event : [Attack, Defend]

# The Mediator manages how spirits react to events globally
handleEvent : Event, List Spirit -> Str
handleEvent = \event, spirits ->
    when event is
        Attack ->
            if List.contains spirits Ignis then
                "Ignis launches a fireball!"
            else
                "No offensive spirit available."
        Defend ->
            if List.contains spirits Terram then
                "Terram raises an earth wall!"
            else
                "No defensive spirit available."
Runic Tags: #fast-functional-wards #roc #mediator