The Command Scroll
Encapsulating a spell invocation as an object.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Command
ARCANUM SCHOOL: Enchantment // Binding
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// EIFFEL PATTERN //
deferred class
SPELL_COMMAND
feature
execute
deferred
end
undo
deferred
end
end
class
FIREBALL_COMMAND
inherit
SPELL_COMMAND
feature
execute
do
-- ignite target
end
undo
do
-- extinguish and heal
end
end
A Command turns a spell into a tangible scroll, allowing it to be queued, delayed, or reversed (undone) dynamically.
Runic Tags:
#behavioral
#command
#eiffel