Update Healer Man server
This commit is contained in:
1 parent
9d7e0e2f9e
commit
35dfdaed61
94 files changed
+17034
-418
No files matched your search
@@ -0,0 +1,33 @@
|
||||
import type { AbilityDefinition, AbilityEffect } from "./abilityCatalog";
|
||||
|
||||
/** Select local Prayer of Tribulation buff stacks from its tooltip HP gates. */
|
||||
export function romPriestWarlockCastEffects(
|
||||
ability: AbilityDefinition,
|
||||
effects: readonly AbilityEffect[],
|
||||
friendlyTargetHealthPercent: number,
|
||||
): readonly AbilityEffect[] {
|
||||
if (ability.source !== "runewaker"
|
||||
|| ability.classId !== "rom-priest"
|
||||
|| ability.secondaryClassId !== "rom-warlock"
|
||||
|| ability.dbcSpellId !== 498770) return effects;
|
||||
|
||||
const buff = effects.find((effect): effect is Extract<AbilityEffect, { kind: "apply-aura" }> => (
|
||||
effect.kind === "apply-aura"
|
||||
));
|
||||
if (!buff || friendlyTargetHealthPercent === 0.4) return effects.filter((effect) => effect !== buff);
|
||||
|
||||
const stacks = friendlyTargetHealthPercent < 0.4 ? 2 : 1;
|
||||
const stackedBuff: Extract<AbilityEffect, { kind: "apply-aura" }> = {
|
||||
...buff,
|
||||
aura: {
|
||||
...buff.aura,
|
||||
maxStacks: 8,
|
||||
stackBehavior: "add",
|
||||
modifiers: buff.aura.modifiers?.map((modifier) => ({ ...modifier, perStack: true })),
|
||||
},
|
||||
};
|
||||
return [
|
||||
...effects.filter((effect) => effect !== buff),
|
||||
...Array.from({ length: stacks }, () => stackedBuff),
|
||||
];
|
||||
}
|
||||
Reference in new issue
Block a user