Update Healer Man server

This commit is contained in:
phenom committed 2026-09-28 22:46:45 -04:00
1 parent 9d7e0e2f9e
commit 35dfdaed61
94 files changed
+17034 -418

No files matched your search

+117
View File
@@ -0,0 +1,117 @@
import type { AbilityDefinition, AbilityEffect } from "./abilityCatalog";
import type { AuraDefinition } from "./combatAuras";
export const ROM_CHAMPION_FORGE_STACK_AURA: AuraDefinition = {
id: "rom-champion-forge-stack",
name: "Forge",
description: "Each normal attack hit grants 2% physical attack for 8 seconds, stacking up to 5 times.",
disposition: "buff",
durationMs: 8_000,
maxStacks: 5,
stackBehavior: "add",
modifiers: [{
kind: "stat",
stat: "attack-power",
operation: "percent",
value: 0.02,
perStack: true,
}],
};
export const ROM_CHAMPION_RUNE_OVERLOAD_TAG = "rom-champion-rune-overload";
export const ROM_CHAMPION_RUNE_OVERLOAD_RAGE_PER_SECOND = 15;
const ROM_CHAMPION_FORGE_ACTIVE_AURA: AuraDefinition = {
id: "rom-champion-forge-active",
name: "Forge",
description: "For 5 minutes, normal attack hits build Forge stacks and restore Rage.",
disposition: "buff",
durationMs: 300_000,
utilityTags: ["rom-champion-forge-active"],
procs: [{
id: "rom-champion-forge-normal-hit",
triggers: ["hit", "crit"],
attackKinds: ["melee"],
chance: 1,
action: { kind: "custom", id: "rom-champion-forge-hit" },
}],
};
function scaleDamage(effect: Extract<AbilityEffect, { kind: "damage" }>, factor: number): AbilityEffect {
return {
...effect,
coefficient: effect.coefficient * factor,
...(effect.coefficientPerLevel === undefined ? {} : { coefficientPerLevel: effect.coefficientPerLevel * factor }),
...(effect.basePoints === undefined ? {} : { basePoints: effect.basePoints * factor }),
...(effect.pointsPerLevel === undefined ? {} : { pointsPerLevel: effect.pointsPerLevel * factor }),
...(effect.bonusPowerCoefficient === undefined ? {} : { bonusPowerCoefficient: effect.bonusPowerCoefficient * factor }),
};
}
/** Apply source-backed Champion cast branches that need runtime state. */
export function romChampionCastEffects(
ability: AbilityDefinition,
effects: readonly AbilityEffect[],
targetHealthPercent: number,
casterMaxHealth: number,
): readonly AbilityEffect[] {
if (ability.source !== "runewaker" || ability.classId !== "rom-champion") return effects;
switch (ability.dbcSpellId) {
case 498584: // Champion/Warrior Determination Rune is a 30%-of-max-HP caster shield.
if (ability.secondaryClassId !== "rom-warrior") return effects;
return effects.map((effect) => effect.kind === "apply-aura" && effect.aura.absorbs?.length
? {
...effect,
aura: {
...effect.aura,
absorbs: effect.aura.absorbs.map((absorb) => ({
...absorb,
amount: Math.max(1, Math.round(Math.max(0, casterMaxHealth) * absorb.amount / 100)),
})),
},
}
: effect);
case 498523: // Rank 1 Forge's guaranteed on-normal-attack trigger is child skill 498524.
return [{
kind: "apply-aura",
aura: ROM_CHAMPION_FORGE_ACTIVE_AURA,
recipient: "caster",
sourceEffectType: 0,
sourceAuraType: 0,
miscValue: 0,
triggerSpellId: 498524,
}];
case 498572: // Rune Overload ends when its Rage drain reaches zero.
return effects.map((effect) => effect.kind === "apply-aura"
? {
...effect,
aura: {
...effect.aura,
utilityTags: [...(effect.aura.utilityTags ?? []), ROM_CHAMPION_RUNE_OVERLOAD_TAG],
},
}
: effect);
case 498531: // Fearless Blow's +30% hit applies only below 30% target health.
return effects.flatMap((effect) => {
if (effect.kind === "apply-aura" && effect.aura.id.includes("-621179-")) return [];
if (effect.kind === "apply-aura" && effect.aura.id.includes("-621183-")) {
return [{ ...effect, recipient: "caster" as const }];
}
if (effect.kind === "damage" && targetHealthPercent < 0.3) return [scaleDamage(effect, 1.3)];
return [effect];
});
case 498535: // Chain Drive's proc chance and damage bonus are absent from the source payload.
return effects.filter((effect) => effect.kind !== "cooldown-reset");
case 498599: // Dark Energy Strike's cooldown proc chance is absent from the source payload.
if (ability.secondaryClassId !== "rom-warlock") return effects;
return effects.filter((effect) => effect.kind !== "cooldown-reset");
case 498651: // Heart Collection Rune explicitly resets Rune Siphon.
if (ability.secondaryClassId !== "rom-warlock") return effects;
return effects.map((effect) => effect.kind === "cooldown-reset"
? { ...effect, abilityName: "Rune Siphon" }
: effect);
default:
return effects;
}
}