Spells you write, not spells you're handed
Magic is not a fixed spell list. You write a spell like a sentence: an effect, a target, a shape, and an element recipe. Save it, cast it. If the grammar holds it works; if it does not, you get the error and fix it.
Six elements sit on three opposed axes: Water against Earth, Nature against Arcane, Cold against Heat. You cannot hold both ends of one axis in a single spell, but the rest combine. Water and Heat make Steam. Water and Cold make Ice. Heat and Earth make Magma. The recipe decides what your spell actually becomes.
Named spells are not special. Firebolt is just a saved recipe that happens to hold together: damage, an enemy, a bolt, a pinch of Heat. Anyone with the room to spend could re-derive it from the same parts. The names are cosmetic; the grammar is the rule.
Intelligence is the magic stat. A higher Intelligence means a deeper mana pool and a stronger spell, and casting is one of the things that grows it. How stats rise, and what each one governs, lives on the Progression card.
Save it, cast it. If the grammar holds, it works.
The spell-crafting engine is fully specified and treats a spell like source code. None of it is written yet; this is documented design, not running code. An author-time validator checks the structure before the spell ever exists in castable form: opposed poles rejected, a token cap, target-and-effect polarity, and a complexity ceiling driven by Intelligence. A separate cast-time gate handles range, line of sight against the voxel world, and affordability, with mana as the cast cost. Both are pure decision functions that mutate nothing on failure, built the same way as the terrain-edit handler already running on the server.
Element fusion is a deterministic resolver. A canonical sorted recipe runs through a fixed greedy priority list and resolves to exactly one primary damage type plus non-damage riders, so the same recipe produces the same result on every machine. The design was hardened against 63 adversarial edge cases (free-cast exploits, dangling targets, self-damaging area spells, channel self-sustain) before any code was written, so the validator has its test list ahead of its implementation.
The hooks that magic will plug into are real today. Mana already exists as a derived pool on the player record; the spell engine will spend it, but nothing spends it yet. Area effects will reuse the same brush-aware claim gate that already stops a terrain brush from reaching into land you cannot edit, so AoE cannot grief a protected claim by construction. Intelligence is the magic primary; how the stat itself works is on the Progression card.
- Magic is spec-only: no spell, cast, or affinity code exists in the server yet (the crate compiles).
- Six elements on three opposed axes (Water|Earth, Nature|Arcane, Cold|Heat); same-axis poles are illegal, cross-axis pairs fuse (Water+Heat=Steam, Water+Cold=Ice, Heat+Earth=Magma).
- A named spell (Firebolt, Meteor) is just a saved valid recipe; the names are cosmetic, not special engine entries.
- Spell validation is two-stage and server-authoritative by design: an author-time structural gate plus a cast-time range/LOS/mana gate; both pure, both reject without side effects.
- Fusion resolves deterministically (a sorted recipe through a fixed priority list), so a recipe yields the same result on every machine; the design is pre-hardened against 63 adversarial edge cases.