Update Healer Man server
This commit is contained in:
1 parent
35dfdaed61
commit
4fb7a0b9c8
161 files changed
+24618
-529
No files matched your search
@@ -0,0 +1,33 @@
|
||||
import type { DamageSchool } from "./itemStats";
|
||||
|
||||
const MOLTEN_FURY_SCHOOLS = new Set<DamageSchool>(["fire", "frost", "arcane"]);
|
||||
|
||||
export const WOW335_MAGE_MOLTEN_FURY_TALENT_ID = "talent-1732";
|
||||
|
||||
/** Returns the local generated Molten Fury multiplier for one eligible Mage hit. */
|
||||
export function wow335MageMoltenFuryMultiplier(
|
||||
rank: number,
|
||||
school: DamageSchool,
|
||||
targetHealth: number,
|
||||
targetMaxHealth: number,
|
||||
): number {
|
||||
const normalizedRank = Math.max(0, Math.min(2, Math.trunc(rank)));
|
||||
if (normalizedRank <= 0 || !MOLTEN_FURY_SCHOOLS.has(school)
|
||||
|| !Number.isFinite(targetHealth) || !Number.isFinite(targetMaxHealth)
|
||||
|| targetMaxHealth <= 0 || targetHealth / targetMaxHealth >= 0.35) {
|
||||
return 1;
|
||||
}
|
||||
return 1 + normalizedRank * 0.06;
|
||||
}
|
||||
|
||||
/** Applies Molten Fury to a Mage damage event using the target's pre-hit health. */
|
||||
export function wow335MageMoltenFuryDamage(
|
||||
amount: number,
|
||||
rank: number,
|
||||
school: DamageSchool,
|
||||
targetHealth: number,
|
||||
targetMaxHealth: number,
|
||||
): number {
|
||||
const multiplier = wow335MageMoltenFuryMultiplier(rank, school, targetHealth, targetMaxHealth);
|
||||
return multiplier === 1 ? amount : Math.round(amount * multiplier);
|
||||
}
|
||||
Reference in new issue
Block a user