import type { CoaClassId } from "../app/characterCatalog"; import type { AbilityDefinition, ClassResourceProfile } from "./abilityCatalog"; import generated from "./generated/coaAbilityRuntimeCatalog.json"; interface CoaAbilityRuntimeSnapshot { readonly schemaVersion: 1; readonly abilitiesByClass: Readonly>; readonly resourcesByClass: Readonly>; readonly triggeredAbilitiesBySpellId: Readonly>; } const snapshot = generated as unknown as CoaAbilityRuntimeSnapshot; export const COA_RUNTIME_ABILITIES_BY_CLASS = snapshot.abilitiesByClass; export const COA_RUNTIME_CLASS_RESOURCES = snapshot.resourcesByClass; export const COA_RUNTIME_TRIGGERED_ABILITIES_BY_SPELL_ID = snapshot.triggeredAbilitiesBySpellId; export function coaTriggeredAbilityBySpellId(spellId: number): AbilityDefinition | null { return COA_RUNTIME_TRIGGERED_ABILITIES_BY_SPELL_ID[spellId] ?? null; }