The Decorator
Layering resonant enchantments upon a Gallina Ward without mutating its core structural proofs.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Decorator
ARCANUM SCHOOL: Enchantment // Augmentation
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
(* Gallina Ward: Decorator *)
Require Import String.
Record Shield := {
deflect : string -> string
}.
Definition baseShield : Shield := {|
deflect := fun atk => "Blocked " ++ atk
|}.
Definition addFireThorns (s : Shield) : Shield := {|
deflect := fun atk => s.(deflect) atk ++ " and burned attacker"
|}.
Definition addVoidMirror (s : Shield) : Shield := {|
deflect := fun atk => s.(deflect) atk ++ " and reflected into void"
|}.
Definition ultimateWard : Shield :=
addVoidMirror (addFireThorns baseShield).
Runic Tags:
#decorator
#gallina
#wards