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,41 @@
|
||||
const TORMENT_THE_WEAK_SPELLS = new Set([
|
||||
"Frostbolt",
|
||||
"Fireball",
|
||||
"Frostfire Bolt",
|
||||
"Pyroblast",
|
||||
"Arcane Missiles",
|
||||
"Arcane Blast",
|
||||
"Arcane Barrage",
|
||||
]);
|
||||
|
||||
export const WOW335_MAGE_TORMENT_THE_WEAK_TALENT_ID = "talent-2222";
|
||||
|
||||
export interface Wow335MageTargetSlow {
|
||||
readonly kind: string;
|
||||
readonly endsAt: number;
|
||||
}
|
||||
|
||||
/** Returns the generated Torment the Weak bonus for a Mage hit on this target. */
|
||||
export function wow335MageTormentTheWeakMultiplier(
|
||||
rank: number,
|
||||
abilityName: string,
|
||||
targetStatuses: readonly Wow335MageTargetSlow[],
|
||||
now: number,
|
||||
): number {
|
||||
const normalizedRank = Math.max(0, Math.min(3, Math.trunc(rank)));
|
||||
if (normalizedRank <= 0 || !TORMENT_THE_WEAK_SPELLS.has(abilityName)) return 1;
|
||||
const targetIsSlowed = targetStatuses.some((status) => (
|
||||
(status.kind === "slow" || status.kind === "attack-speed") && status.endsAt > now
|
||||
));
|
||||
return targetIsSlowed ? 1 + normalizedRank * 0.03 : 1;
|
||||
}
|
||||
|
||||
export function wow335MageTormentTheWeakDamage(
|
||||
amount: number,
|
||||
rank: number,
|
||||
abilityName: string,
|
||||
targetStatuses: readonly Wow335MageTargetSlow[],
|
||||
now: number,
|
||||
): number {
|
||||
return Math.round(amount * wow335MageTormentTheWeakMultiplier(rank, abilityName, targetStatuses, now));
|
||||
}
|
||||
Reference in new issue
Block a user