export interface Wow335LightwellRenewProfile { readonly childSpellId: number; readonly baseHealPerTick: number; readonly ticks: number; readonly intervalMs: number; readonly durationMs: number; /** AzerothCore 3.3.5 spell_bonus_data dot coefficient, applied per tick. */ readonly spellPowerCoefficientPerTick?: number; } const LIGHTWELL_RENEW_PROFILE_BY_CREATURE: Readonly> = { // Child spell IDs and tick amounts come from the local 3.3.5 Spell.dbc rows. // Spell.dbc lists the 6s aura and 2s tick interval for each rank. // The 3.3.5 spell_bonus_data table gives dot_bonus=0.3333 for the first // five child IDs; rank 6 (48085) has no matching coefficient row. 31897: { childSpellId: 7001, baseHealPerTick: 267, ticks: 3, intervalMs: 2_000, durationMs: 6_000, spellPowerCoefficientPerTick: 0.3333 }, 31896: { childSpellId: 27873, baseHealPerTick: 388, ticks: 3, intervalMs: 2_000, durationMs: 6_000, spellPowerCoefficientPerTick: 0.3333 }, 31895: { childSpellId: 27874, baseHealPerTick: 533, ticks: 3, intervalMs: 2_000, durationMs: 6_000, spellPowerCoefficientPerTick: 0.3333 }, 31894: { childSpellId: 28276, baseHealPerTick: 787, ticks: 3, intervalMs: 2_000, durationMs: 6_000, spellPowerCoefficientPerTick: 0.3333 }, 31893: { childSpellId: 48084, baseHealPerTick: 1_305, ticks: 3, intervalMs: 2_000, durationMs: 6_000, spellPowerCoefficientPerTick: 0.3333 }, // WotLKDB's exact 3.3.5a page for child 48085 (Lightwell Renew Rank 6) // reports +62.60% spell power per tick. Keep this distinct from AzerothCore's // 0.3333 override for sibling rank 5 (48084), which has no 48085 row there. 31883: { childSpellId: 48085, baseHealPerTick: 1_540, ticks: 3, intervalMs: 2_000, durationMs: 6_000, spellPowerCoefficientPerTick: 0.626 }, }; export function wow335LightwellRenewProfileForCreature( creatureId: number, ): Wow335LightwellRenewProfile | null { return LIGHTWELL_RENEW_PROFILE_BY_CREATURE[creatureId] ?? null; } /** Returns the cancellation fraction stated in the generated Lightwell rank tooltip. */ export function wow335LightwellDamageCancellationFraction(description: string): number | null { const match = /attacks done to you equal to\s+(\d+(?:\.\d+)?)%\s+of your total health will cancel the effect/i .exec(description); if (!match) return null; const percent = Number(match[1]); return Number.isFinite(percent) && percent > 0 ? percent / 100 : null; }