The Observer of Astral Alignments
Notify bound familiars and wards when cosmic conditions change.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Observer
ARCANUM SCHOOL: Divination // Binding
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// PROLOG PATTERN //
:- dynamic observer/2.
% Register Observers
bind_familiar(Event, Familiar) :-
assertz(observer(Event, Familiar)).
% The Subject Event
trigger_alignment(Event) :-
format('The cosmic alignment ~w has occurred!', [Event]), nl,
notify_observers(Event).
% Notify all registered observers
notify_observers(Event) :-
observer(Event, Familiar),
format('~w feels the shift in the aether.', [Familiar]), nl,
fail.
notify_observers(_).
% ?- bind_familiar(blood_moon, shadow_bat), bind_familiar(blood_moon, night_stalker).
% ?- trigger_alignment(blood_moon).
% The cosmic alignment blood_moon has occurred!
% shadow_bat feels the shift in the aether.
% night_stalker feels the shift in the aether.
Runic Tags:
#observer
#behavioral
#prolog
#events
#familiars