The Command Incantation
Encapsulating tactical ward deployments as executable, queueable objects.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Command
ARCANUM SCHOOL: Abjuration // Tactical Execution
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// ADA PATTERN //
package Ward_Commands is
type Command is abstract tagged null record;
procedure Execute (C : in Command) is abstract;
procedure Undo (C : in Command) is abstract;
type Receiver is tagged null record;
procedure Activate_Rune (R : in Receiver);
procedure Deactivate_Rune (R : in Receiver);
type Deploy_Rune_Command is new Command with record
Target : access Receiver;
end record;
overriding procedure Execute (C : in Deploy_Rune_Command);
overriding procedure Undo (C : in Deploy_Rune_Command);
end Ward_Commands;
package body Ward_Commands is
procedure Activate_Rune (R : in Receiver) is begin null; end;
procedure Deactivate_Rune (R : in Receiver) is begin null; end;
procedure Execute (C : in Deploy_Rune_Command) is
begin
C.Target.Activate_Rune;
end Execute;
procedure Undo (C : in Deploy_Rune_Command) is
begin
C.Target.Deactivate_Rune;
end Undo;
end Ward_Commands;
In chaotic engagements, commands must be queued, logged, and potentially reversed. By encapsulating a spellcast into an object, the military can audit exactly which ward was deployed and roll back magical fatigue safely if conditions permit.
Runic Tags:
#ada
#abjuration
#command