🦉 PROLOG ORACLE DIFFICULTY: Adept Structural

The Decorator of Wards and Runes

Dynamically attach magical properties to artifacts using layered rules.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Decorator
ARCANUM SCHOOL: Abjuration // Runemancy
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// PROLOG PATTERN //
% Base Component
artifact_power(base_amulet, 10).

% Decorator: Add Fire Resistance
artifact_power(fire_warded(Artifact), TotalPower) :-
    artifact_power(Artifact, BasePower),
    TotalPower is BasePower + 15.

% Decorator: Add Glowing Aura
artifact_power(glowing(Artifact), TotalPower) :-
    artifact_power(Artifact, BasePower),
    TotalPower is BasePower + 5.

% Applying decorators by wrapping terms
% ?- artifact_power(glowing(fire_warded(base_amulet)), Power).
% Power = 30.
Runic Tags: #decorator #structural #prolog #wrapper #runes