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

+80
View File
@@ -1,5 +1,31 @@
import type { AbilityDefinition, AbilityEffect } from "./abilityCatalog";
import type { RomGeneratedAbilityLike } from "./romAbilitySemantics";
import { romPriestChampionCastEffects } from "./romPriestChampionOverrides";
export const ROM_PRIEST_WARRIOR_BATTLE_MONK_STANCE_TAG = "rom-priest-warrior-battle-monk-stance";
const BATTLE_MONK_STANCE_GATED_SKILLS = new Set([491362, 491363, 491364, 492635, 493038]);
export const ROM_PRIEST_KNIGHT_HOLY_POWER_HEAL_USES_TAG = "rom-priest-knight-holy-power-heal-uses";
export function romPriestWarriorStanceRequired(
ability: Pick<AbilityDefinition, "source" | "classId" | "secondaryClassId" | "dbcSpellId">,
): boolean {
return ability.source === "runewaker"
&& ability.classId === "rom-priest"
&& ability.secondaryClassId === "rom-warrior"
&& BATTLE_MONK_STANCE_GATED_SKILLS.has(ability.dbcSpellId);
}
/** Player and companion cast gates share the source-specific Priest/Warrior condition. */
export function romPriestWarriorStanceUseAllowed(
ability: Pick<AbilityDefinition, "source" | "classId" | "secondaryClassId" | "dbcSpellId">,
activeAuraTags: readonly string[] | ReadonlySet<string>,
): boolean {
if (!romPriestWarriorStanceRequired(ability)) return true;
return Array.isArray(activeAuraTags)
? activeAuraTags.includes(ROM_PRIEST_WARRIOR_BATTLE_MONK_STANCE_TAG)
: (activeAuraTags as ReadonlySet<string>).has(ROM_PRIEST_WARRIOR_BATTLE_MONK_STANCE_TAG);
}
function passiveState(sourceId: number, name: string, tag: string): readonly AbilityEffect[] {
return [{
@@ -24,6 +50,33 @@ export function overrideRomPriestKnightEffects(
row: RomGeneratedAbilityLike,
translated: readonly AbilityEffect[],
): readonly AbilityEffect[] | null {
// These RuneWaker party buffs are self-targeted in their source rows, and
// their tooltip wording does not match the generic party-scope detector.
// Preserve the locally translated components and apply their auras to the
// party named by the source descriptions.
const partyBuff = (row.classId === "rom-priest" && row.secondaryClassId === undefined && row.sourceSkillId === 490298)
|| (row.classId === "rom-priest" && row.secondaryClassId === "rom-scout" && row.sourceSkillId === 491323)
|| (row.classId === "rom-priest" && row.secondaryClassId === "rom-rogue" && row.sourceSkillId === 492932);
if (partyBuff) {
return translated.map((effect) => effect.kind === "apply-aura" && (effect.aura.modifiers?.length ?? 0) > 0
? { ...effect, scope: "party" as const }
: effect);
}
if (row.classId === "rom-priest" && row.secondaryClassId === "rom-warrior" && row.sourceSkillId === 491600) {
return translated.map((effect) => effect.kind === "apply-aura" && effect.recipient === "caster"
? {
...effect,
aura: {
...effect.aura,
// All native Battle Monk stance components have a 900-second duration.
durationMs: 900_000,
utilityTags: [...(effect.aura.utilityTags ?? []), ROM_PRIEST_WARRIOR_BATTLE_MONK_STANCE_TAG],
},
}
: effect);
}
switch (row.sourceSkillId) {
case 492355: // Enhanced Grace of Life: Grace of Life also raises maximum MP.
return passiveState(492355, row.name, "rom-enhanced-grace-of-life");
@@ -35,6 +88,8 @@ export function overrideRomPriestKnightEffects(
return passiveState(499957, row.name, "rom-light-guidance");
case 492638: // Lightning Rod: Lightning shocks targets already afflicted by Bone Chill.
return passiveState(492638, row.name, "rom-priest-mage-lightning-rod");
case 492928: // Grand Dispel: Purify also removes harmful effects, beyond curses.
return passiveState(492928, row.name, "rom-priest-mage-grand-dispel");
case 491610: // Enhanced Holy Strike: improves Holy Strike weapon damage.
return passiveState(491610, row.name, "rom-enhanced-holy-strike");
case 490066: // Weaken Weapon Strength: Heavenly Arrow weakens target physical damage.
@@ -157,6 +212,18 @@ export function romPriestKnightCastEffects(
learnedPassiveSpellIds: readonly number[] = [],
): readonly AbilityEffect[] {
if (ability.source !== "runewaker" || casterMaxHealth <= 0) return effects;
const priestChampionEffects = romPriestChampionCastEffects(ability, effects, learnedPassiveSpellIds);
if (priestChampionEffects !== effects) return priestChampionEffects;
if (ability.dbcSpellId === 491588
&& ability.classId === "rom-mage"
&& ability.secondaryClassId === "rom-priest"
&& hasTag(passiveTags, "rom-priest-mage-grand-dispel")) {
// Purify's base tooltip/source row allows curse removal. Grand Dispel
// broadens the same one-effect friendly cleanse to harmful status types.
return effects.map((effect) => effect.kind === "dispel" && effect.mode === "cleanse"
? { ...effect, categories: ["magic", "curse", "poison", "disease"] }
: effect);
}
if (ability.dbcSpellId === 490261
&& learnedPassiveSpellIds.includes(493039)
&& friendlyTargetHealthPercent < 0.3) {
@@ -184,6 +251,19 @@ export function romPriestKnightCastEffects(
}, ...effects];
}
switch (ability.dbcSpellId) {
case 493044: // Holy Power expires after three successful casts of Heal.
return effects.map((effect) => effect.kind === "apply-aura" && effect.recipient === "caster"
? {
...effect,
aura: {
...effect.aura,
maxStacks: 3,
initialStacks: 3,
stackBehavior: "replace",
utilityTags: [...(effect.aura.utilityTags ?? []), ROM_PRIEST_KNIGHT_HOLY_POWER_HEAL_USES_TAG],
},
}
: effect);
case 490290: // Enhanced Grace of Life mirrors source Grace's +50 and +1% HP as MP.
if (!hasTag(passiveTags, "rom-enhanced-grace-of-life")) return effects;
return [...effects, {