The Bridge of Spheres
Decoupling abstraction of spells from their elemental implementation.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Bridge
ARCANUM SCHOOL: Transmutation // Dimensional
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// EIFFEL PATTERN //
class
SPELL_ABSTRACTION
create
make
feature {NONE} -- Initialization
make (imp: ELEMENTAL_IMPLEMENTOR)
require
imp_exists: imp /= Void
do
implementor := imp
end
feature -- Execution
cast_spell
do
implementor.ignite_mana
implementor.channel_force
end
feature {NONE} -- Internal
implementor: ELEMENTAL_IMPLEMENTOR
end
By establishing a Bridge, a mage can swap out the elemental core of a spell without changing the fundamental incantation structure.
Runic Tags:
#structural
#bridge
#eiffel