fix(spells): load complete retail DAT catalog

Replace the incomplete 3,956-row production CSV with one immutable projection of all 6,266 records in portal.dat. Preserve retail formula targeting, shared Spellbook/MagicRuntime metadata ownership, and fail startup when the required SpellTable is absent.

Co-authored-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
Erik 2026-07-15 21:17:13 +02:00
parent 09612f9981
commit 0eab7497c1
19 changed files with 633 additions and 114 deletions

View file

@ -27,6 +27,17 @@ public sealed class SpellTableTests
Assert.False(SpellTable.Empty.TryGet(1u, out _));
}
[Fact]
public void Create_RejectsDuplicateSpellIds()
{
SpellMetadata spell = new(
1u, "One", "War Magic", 0u, 0u, "", 0f, 0,
false, false, "", 0, 0, 0u, 0, false, false, true,
0f, 0u, 0u, 0u, 0);
Assert.Throws<ArgumentException>(() => SpellTable.Create([spell, spell]));
}
[Fact]
public void LoadFromReader_HeaderOnly_EmptyTable()
{