From 522aac86786e144bb00006c18d5ec0579da03796 Mon Sep 17 00:00:00 2001 From: Octoturge Date: Sat, 17 Oct 2026 10:29:10 +0200 Subject: [PATCH] fix: assign eldritch spells to Abyss - Primal Magic signature list Co-Authored-By: Claude Sonnet 5.5 --- scripts/build-packs.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/build-packs.ts b/scripts/build-packs.ts index cef495c..bbb9cf7 100644 --- a/scripts/build-packs.ts +++ b/scripts/build-packs.ts @@ -56,6 +56,8 @@ console.log(`[build-packs] parsed ${allDocs.length} documents total`); // 2b. signatureSpells = every spell belonging to the discipline (own school or // listed in the spell's requirements.discipline). +// Spells with school `eldritch` belong to Abyss - Primal Magic. +const SCHOOL_TO_DISCIPLINE: Record = { eldritch: 'abyssPrimal' }; for (const disc of allDocs) { if (disc.subType !== 'discipline') continue; const sys = disc.system as Record; @@ -63,7 +65,7 @@ for (const disc of allDocs) { .filter((d) => { if (d.subType !== 'spell') return false; const sp = d.system as Record; - return sp.school === disc.id || (sp.requirements?.discipline ?? []).includes(disc.id); + return (SCHOOL_TO_DISCIPLINE[sp.school] ?? sp.school) === disc.id || (sp.requirements?.discipline ?? []).includes(disc.id); }) .map((d) => d.name); }