🌙 LUA GLYPH DIFFICULTY: Adept Structural

The Bridge of Spectral Planes

Separating the abstraction of a magical ritual from its specific elemental implementation.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Bridge
ARCANUM SCHOOL: Conjuration // Planar
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// LUA PATTERN //
local FireElement = { ignite = function() return "Flames burst" end }
local FrostElement = { ignite = function() return "Frost shatters" end }

local Ritual = {}
Ritual.__index = Ritual

function Ritual:new(element)
  return setmetatable({ element = element }, self)
end
function Ritual:perform()
  return "Performing ritual: " .. self.element.ignite()
end

local fireRitual = Ritual:new(FireElement)
print(fireRitual:perform())

Bridge

A ritual of power should not be tied inextricably to a single element. By employing the Bridge, we separate the structure of the spell (the Abstraction) from the elemental fury (the Implementation), linking them via Lua’s dynamic table references.

Runic Tags: #fae #bridge #decoupling