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

+114
View File
@@ -0,0 +1,114 @@
import type { AbilityDefinition, AbilityEffect } from "./abilityCatalog";
import type { ActiveAura } from "./combatAuras";
import type { RomGeneratedAbilityLike } from "./romAbilitySemantics";
export const ROM_PRIEST_MAGE_ENLIGHTENMENT = Object.freeze({
passiveSpellId: 492_933,
triggerSpellId: 490_261,
wisdomComponentId: 503_197,
cooldownComponentId: 506_532,
wisdomPercent: 1,
durationMs: 8_000,
cooldownMs: 20_000,
cooldownAuraTag: "rom-priest-mage-enlightenment-cooldown",
});
export const ROM_PRIEST_MAGE_ENLIGHTENMENT_COOLDOWN_EFFECT: Extract<AbilityEffect, { kind: "apply-aura" }> = {
kind: "apply-aura",
recipient: "caster",
aura: {
id: ROM_PRIEST_MAGE_ENLIGHTENMENT.cooldownAuraTag,
name: "Enlightenment cooldown",
disposition: "buff",
durationMs: ROM_PRIEST_MAGE_ENLIGHTENMENT.cooldownMs,
hideFromAuraStrip: true,
utilityTags: [ROM_PRIEST_MAGE_ENLIGHTENMENT.cooldownAuraTag],
},
sourceEffectType: -1,
sourceAuraType: -1,
miscValue: 0,
triggerSpellId: ROM_PRIEST_MAGE_ENLIGHTENMENT.passiveSpellId,
};
/** Enlightenment is triggered by the Priest/Mage Heal cast, not a permanent passive aura. */
export function overrideRomPriestMageEffects(
row: RomGeneratedAbilityLike,
_translated: readonly AbilityEffect[],
): readonly AbilityEffect[] | null {
return row.classId === "rom-priest"
&& row.secondaryClassId === "rom-mage"
&& row.sourceSkillId === ROM_PRIEST_MAGE_ENLIGHTENMENT.passiveSpellId
? []
: null;
}
/** Find the active internal cooldown marker for one caster. */
export function romPriestMageEnlightenmentReadyAt(
activeAuras: readonly Pick<ActiveAura, "targetId" | "expiresAt" | "definition">[],
casterId: string,
now: number,
): number {
const cooldown = activeAuras.find((aura) => aura.targetId === casterId
&& aura.definition.utilityTags?.includes(ROM_PRIEST_MAGE_ENLIGHTENMENT.cooldownAuraTag)
&& (aura.expiresAt === null || aura.expiresAt > now));
return cooldown ? cooldown.expiresAt ?? Number.POSITIVE_INFINITY : now;
}
export interface RomPriestMageEnlightenmentResult {
readonly effect: AbilityEffect | null;
readonly nextReadyAt: number;
}
/**
* RuneWaker Enlightenment (492933): completing Heal (490261) while the
* Priest/Mage passive is learned grants +1% Wisdom for 8 seconds, with a
* 20-second internal cooldown. The source says "when you use Heal," so a
* completed cast is the trigger; hit or target health is not required.
*/
export function romPriestMageEnlightenmentProc(
classId: string | null,
secondaryClassId: string | null | undefined,
ability: Pick<AbilityDefinition, "classId" | "secondaryClassId" | "source" | "dbcSpellId">,
learnedPassiveSpellIds: readonly number[],
castCompleted: boolean,
readyAt: number,
now: number,
): RomPriestMageEnlightenmentResult {
const eligible = classId === "rom-priest"
&& secondaryClassId === "rom-mage"
&& ability.classId === "rom-priest"
&& ability.source === "runewaker"
&& ability.dbcSpellId === ROM_PRIEST_MAGE_ENLIGHTENMENT.triggerSpellId
&& learnedPassiveSpellIds.includes(ROM_PRIEST_MAGE_ENLIGHTENMENT.passiveSpellId)
&& castCompleted
&& now >= readyAt;
if (!eligible) return { effect: null, nextReadyAt: readyAt };
return {
effect: {
kind: "apply-aura",
recipient: "caster",
aura: {
id: "rom-priest-mage-enlightenment",
name: "Enlightenment",
description: "Completing Heal grants +1% Wisdom for 8 seconds. This effect has a 20-second internal cooldown.",
disposition: "buff",
durationMs: ROM_PRIEST_MAGE_ENLIGHTENMENT.durationMs,
maxStacks: 1,
stackBehavior: "refresh",
utilityTags: ["rom-priest-mage-enlightenment-active"],
modifiers: [{
kind: "stat",
stat: "wisdom",
operation: "percent",
value: ROM_PRIEST_MAGE_ENLIGHTENMENT.wisdomPercent / 100,
}],
},
sourceEffectType: -1,
sourceAuraType: 49,
miscValue: ROM_PRIEST_MAGE_ENLIGHTENMENT.wisdomPercent,
triggerSpellId: ROM_PRIEST_MAGE_ENLIGHTENMENT.passiveSpellId,
},
nextReadyAt: now + ROM_PRIEST_MAGE_ENLIGHTENMENT.cooldownMs,
};
}