fix: assign eldritch spells to Abyss - Primal Magic signature list

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-17 10:29:10 +02:00
co-authored by Claude Sonnet 5.5
parent 2f3f0057b1
commit 522aac8678
+3 -1
View File
@@ -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<string, string> = { eldritch: 'abyssPrimal' };
for (const disc of allDocs) {
if (disc.subType !== 'discipline') continue;
const sys = disc.system as Record<string, any>;
@@ -63,7 +65,7 @@ for (const disc of allDocs) {
.filter((d) => {
if (d.subType !== 'spell') return false;
const sp = d.system as Record<string, any>;
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);
}