The Decorator Ward
Layering protective enchantments.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Decorator
ARCANUM SCHOOL: Abjuration // Layered Warding
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// PONY PATTERN //
trait val Shield
fun absorb(damage: U32): U32
class val FrostAura is Shield
let _base: Shield val
new create(b: Shield val) => _base = b
fun absorb(damage: U32): U32 => _base.absorb(damage) - 10
The Decorator Ward
Decorators augment capabilities. Stacking immutable objects safely chains their effects without mutating underlying states.
Runic Tags:
#pony
#decorator