🌙 LUA GLYPH DIFFICULTY: Adept Creational

The Factory Method of Sylvan Spawning

Delegates the manifestation of fae spirits to specific lunar sub-tables.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Factory Method
ARCANUM SCHOOL: Conjuration // Spawning
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// LUA PATTERN //
local SpiritSpawner = {}
SpiritSpawner.__index = SpiritSpawner

function SpiritSpawner:new()
  return setmetatable({}, self)
end
function SpiritSpawner:manifest()
  error("Subclasses must override manifest")
end
function SpiritSpawner:summon()
  local spirit = self:manifest()
  print("Summoning " .. spirit)
  return spirit
end

local SylphSpawner = setmetatable({}, {__index = SpiritSpawner})
function SylphSpawner:manifest() return "Sylph of the West Wind" end

Factory Method

A delicate technique in symbiotic magic, the Factory Method leaves the exact nature of the summoned spirit to the specific localized glyphs. The host engine calls upon a generalized invocation, while the specialized Lua table dictates the exact form of the entity.

Runic Tags: #fae #factory-method #creation