✨ ARCANUM RUNE DIFFICULTY: Apprentice Creational

Prototype for Sprite Enchantment

Copy fully formed sprite enchantments without reconstructing them from scratch.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Prototype
ARCANUM SCHOOL: Illusion // Sprite Enchantment
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
function EnchantmentPrototype(_color, _intensity) constructor {
    color = _color;
    intensity = _intensity;
    
    static clone = function() {
        return new EnchantmentPrototype(color, intensity);
    };
}

// Usage
var master_rune = new EnchantmentPrototype(c_fuchsia, 0.8);
var duplicated_rune = master_rune.clone();

The Prototype is the art of magical duplication. Instead of performing a strenuous ritual anew, a spellcaster takes an existing sprite effect and clones its memory, tweaking only minor parameters if necessary.

Runic Tags: #gml #creational #prototype