Files
healer-man/src/game/coaAbilityRuntimeCatalog.ts
T
2026-08-20 14:05:50 -04:00

21 lines
1006 B
TypeScript

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<Record<CoaClassId, readonly AbilityDefinition[]>>;
readonly resourcesByClass: Readonly<Record<CoaClassId, ClassResourceProfile>>;
readonly triggeredAbilitiesBySpellId: Readonly<Record<number, AbilityDefinition>>;
}
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;
}