Update Healer Man server
This commit is contained in:
1 parent
4c768fbec6
commit
b16821e92e
330 files changed
+35406
-1760
No files matched your search
@@ -0,0 +1,30 @@
|
||||
import type { AbilityEffect } from "./abilityCatalog";
|
||||
import { WOW335_TALENT_NODES } from "./wow335Talents.generated";
|
||||
|
||||
export const WOW335_DEATH_KNIGHT_EPIDEMIC_TALENT_ID = "talent-1963";
|
||||
|
||||
const DISEASE_TAGS = new Set(["blood-plague", "frost-fever"]);
|
||||
const EPIDEMIC_TALENT = WOW335_TALENT_NODES.find(
|
||||
(node) => node.id === WOW335_DEATH_KNIGHT_EPIDEMIC_TALENT_ID,
|
||||
);
|
||||
|
||||
/** Read the added disease duration directly from the local generated DBC rank effect. */
|
||||
export function wow335DeathKnightEpidemicDurationMs(rank: number): number {
|
||||
const normalizedRank = Math.trunc(rank);
|
||||
const effect = EPIDEMIC_TALENT?.rankEffects[normalizedRank - 1]?.effects.find(
|
||||
(candidate) => candidate.auraType === 107,
|
||||
);
|
||||
return normalizedRank > 0 ? Math.max(0, effect?.basePoints ?? 0) : 0;
|
||||
}
|
||||
|
||||
/** Extend only Death Knight Blood Plague and Frost Fever by the sourced duration. */
|
||||
export function wow335DeathKnightEpidemicDotEffect(
|
||||
effect: AbilityEffect,
|
||||
rank: number,
|
||||
): AbilityEffect {
|
||||
if (effect.kind !== "dot" || !effect.tag || !DISEASE_TAGS.has(effect.tag)) return effect;
|
||||
const durationMs = wow335DeathKnightEpidemicDurationMs(rank);
|
||||
if (durationMs <= 0 || effect.intervalMs <= 0) return effect;
|
||||
const additionalTicks = Math.floor(durationMs / effect.intervalMs);
|
||||
return additionalTicks > 0 ? { ...effect, ticks: effect.ticks + additionalTicks } : effect;
|
||||
}
|
||||
Reference in new issue
Block a user