✨ ARCANUM RUNE DIFFICULTY: Adept Behavioral

Template Method for Sprite Enchantment

Define the skeletal framework of an enchantment ritual, allowing subclasses to flesh out the details.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Template Method
ARCANUM SCHOOL: Conjuration // Sprite Enchantment
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
function EnchantmentRitual() constructor {
    static perform_ritual = function(_x, _y) {
        prepare_circle(_x, _y);
        chant_words();
        ignite_sprite(_x, _y);
    };
    
    static prepare_circle = function(_x, _y) { /* base circle */ };
    static chant_words = function() {}; // Hook to override
    static ignite_sprite = function(_x, _y) {}; // Hook to override
}

function ShadowRitual() : EnchantmentRitual() constructor {
    static chant_words = function() { show_debug_message("Tenebris..."); };
    static ignite_sprite = function(_x, _y) { draw_sprite(spr_shadow, 0, _x, _y); };
}

The Template Method enforces ritualistic purity. The grand spell always flows in the same sequence: prepare, chant, ignite. However, shadow weavers or light bearers may infuse their specific incantations into the empty hooks, ensuring the ritual’s integrity is preserved.

Runic Tags: #gml #behavioral #template-method