Files
healer-man/src/game/romMageRuntime.ts
T
2026-09-28 22:46:45 -04:00

25 lines
891 B
TypeScript

import type { AbilityDefinition } from "./abilityCatalog";
const ELECTROSTATIC_CHARGE_EXPERTISE_SPELL_ID = 498_871;
const ELECTROSTATIC_CHARGE_SPELL_ID = 491_156;
/** Mage/Champion's level-45 passive shortens Electrostatic Charge by 30 seconds. */
export function romMageCooldownReductionMs(
classId: string | null,
secondaryClassId: string | null | undefined,
ability: Pick<AbilityDefinition, "dbcSpellId">,
level: number,
abilities: readonly Pick<AbilityDefinition, "dbcSpellId" | "unlockLevel" | "passive">[],
): number {
if (classId !== "rom-mage"
|| secondaryClassId !== "rom-champion"
|| ability.dbcSpellId !== ELECTROSTATIC_CHARGE_SPELL_ID
|| level < 45) return 0;
return abilities.some((candidate) => candidate.passive
&& candidate.dbcSpellId === ELECTROSTATIC_CHARGE_EXPERTISE_SPELL_ID
&& candidate.unlockLevel <= level)
? 30_000
: 0;
}