Update Healer Man server

This commit is contained in:
phenom committed 2026-09-30 09:57:13 -04:00
1 parent 35dfdaed61
commit 4fb7a0b9c8
161 files changed
+24618 -529

No files matched your search

+83 -2
View File
@@ -1,9 +1,45 @@
import type { AbilityDefinition, AbilityEffect } from "./abilityCatalog";
import { weaponDps, type WeaponStats } from "./itemStats";
import { runewakerOrgPower } from "./runewakerCombatFormula";
export const ROM_WARDEN_BRIAR_SHIELD_TAG = "rom-briar-shield";
export const ROM_WARDEN_WILL_ATTACK_TAG = "rom-will-attack";
export const ROM_WARDEN_DAMAGE_TRANSFER_TAG = "rom-warden-damage-transfer";
export const ROM_WARDEN_TOUGH_OAK_TAG = "rom-warden-tough-oak";
export const ROM_WARDEN_OAK_BLESSING_TAG = "rom-warden-oak-blessing";
export const ROM_WARDEN_DAMAGE_TRANSFER_FRACTION = 0.3;
/** RuneWaker component 503959's level-scaled physical rebound coefficient. */
export function romWardenBriarShieldReflectFraction(characterLevel: number): number {
return Math.abs(runewakerOrgPower(-0.01, characterLevel, 8));
}
/** The local tooltip defines the rebound basis as main-hand weapon DPS. */
export function romWardenBriarShieldReflectDamage(
characterLevel: number,
mainHandWeapon: WeaponStats | null,
): number {
return mainHandWeapon
? Math.max(0, Math.round(weaponDps(mainHandWeapon) * romWardenBriarShieldReflectFraction(characterLevel)))
: 0;
}
export function romWardenBriarShieldShouldReflect(input: {
readonly auraActive: boolean;
readonly landed: boolean;
readonly school: string;
readonly attackKind: "melee" | "ranged" | "spell";
readonly withinRange: boolean;
}): boolean {
return input.auraActive
&& input.landed
&& input.school === "physical"
&& input.attackKind !== "spell"
&& input.withinRange;
}
const ROM_WARDEN_TOUGH_OAK_COOLDOWN_SPELLS = new Set([493382, 493385]);
const classPair = (ability: AbilityDefinition, primary: string, secondary: string): boolean => (
ability.classId === primary && ability.secondaryClassId === secondary
);
@@ -41,6 +77,51 @@ export function romWardenCastEffects(
): readonly AbilityEffect[] {
if (ability.source !== "runewaker") return effects;
if (ability.classId === "rom-warden"
&& ability.dbcSpellId !== undefined
&& ROM_WARDEN_TOUGH_OAK_COOLDOWN_SPELLS.has(ability.dbcSpellId)
&& passiveTags.includes(ROM_WARDEN_TOUGH_OAK_TAG)) {
return [...effects, {
kind: "cooldown-reset",
mode: "reduce",
abilityName: ability.name,
amountMs: 1_000,
}];
}
if (ability.classId === "rom-warden"
&& ability.dbcSpellId === 491668
&& passiveTags.includes(ROM_WARDEN_OAK_BLESSING_TAG)) {
// Warden/Mage's local Oak Blessing component 620679 is conditional on
// Heart of the Oak: +5% physical attack and 1% maximum HP every 3s for
// 60s. The generated passive itself is only a marker so it cannot apply
// this rider outside the parent buff's lifetime.
return [...effects,
{
kind: "apply-aura",
recipient: "caster",
aura: {
id: "rom-warden-oak-blessing-attack",
name: "Oak Blessing",
disposition: "buff",
durationMs: 60_000,
modifiers: [{ kind: "stat", stat: "attack-power", operation: "percent", value: 0.05 }],
},
sourceEffectType: -1,
sourceAuraType: 134,
miscValue: 5,
triggerSpellId: 491668,
},
{
kind: "hot",
coefficient: 0,
percentMaxHealth: 0.01,
ticks: 20,
intervalMs: 3_000,
},
];
}
if (ability.dbcSpellId === 493391 && ability.classId === "rom-warden") {
// The source row includes Will Attack's component, but it belongs on the
// target only when the Warden has learned that passive.
@@ -108,7 +189,7 @@ export function romWardenCastEffects(
if (naturePower < 1) return [heals[0]!];
return [
...heals.slice(0, 2),
{ kind: "resource-drain", amount: 1, burn: false, resource: "nature-power" },
{ kind: "resource-drain", amount: 1, burn: false, resource: "nature-power", recipient: "caster" },
];
}
@@ -128,7 +209,7 @@ export function romWardenCastEffects(
coefficientPerLevel: 0,
bonusPowerCoefficient: 0,
},
{ kind: "resource-drain", amount: points, burn: false, resource: "nature-power" },
{ kind: "resource-drain", amount: points, burn: false, resource: "nature-power", recipient: "caster" },
];
}