Interpreter for Sprite Enchantment
Parse ancient runic syntax to apply dynamic sprite alterations.
✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Interpreter
ARCANUM SCHOOL: Divination // Sprite Enchantment
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
function Expression() constructor {
static interpret = function(_context) { return false; };
}
function ContainsRuneExpression(_rune) : Expression() constructor {
rune = _rune;
static interpret = function(_context) {
return string_pos(rune, _context) > 0;
};
}
function OrExpression(_expr1, _expr2) : Expression() constructor {
expr1 = _expr1;
expr2 = _expr2;
static interpret = function(_context) {
return expr1.interpret(_context) || expr2.interpret(_context);
};
}
The Interpreter brings ancient languages to life. When an unreadable scroll of visual properties is discovered, parsing expressions determine whether the cryptic strings dictate an aura of decay or a halo of light, directly translating syntax into sprite enchantments.
Runic Tags:
#gml
#behavioral
#interpreter