Bridge
Decoupling a spell's temporal nature from the celestial power source fueling it.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Bridge
ARCANUM SCHOOL: Evocation // Channeling
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// RAKU PATTERN //
role CelestialPower {
method channel-energy() { ... }
}
class LunarEclipse does CelestialPower {
method channel-energy() { "the mysterious gravity of the Lunar Eclipse" }
}
class SolarFlare does CelestialPower {
method channel-energy() { "the blazing fury of a Solar Flare" }
}
class Ritual {
has CelestialPower $.power;
method enact() { ... }
}
class HundredYearRitual is Ritual {
method enact() {
say "The Hundred-Year Spell begins, fueled by ", $.power.channel-energy(), "!";
}
}
my $ritual = HundredYearRitual.new(power => LunarEclipse.new);
$ritual.enact();
A Hundred-Year Spell requires immense power to sustain itself. By using the Bridge pattern, we separate the structure of the ritual itself from the cosmic phenomena that fuel it. A ritual can easily be re-pointed to draw from a solar flare or a lunar eclipse without fundamentally changing the spell’s internal incantations.
Runic Tags:
#structural
#bridge
#raku
#hundred-year-spell