Validate RoM primary five hybrid stats and pair mechanics

This commit is contained in:
phenom committed 2026-09-23 19:08:44 -04:00
1 parent 8e95480d4f
commit c8b3a3d95a
18 files changed
+2061 -48

No files matched your search

+25 -1
View File
@@ -1,4 +1,7 @@
import type { AbilityDefinition, AbilityEffect } from "./abilityCatalog";
import { romPriestKnightCastEffects } from "./romPriestKnightOverrides";
import { romMageWarlockCastEffects } from "./romMageWarlockOverrides";
import { romScoutRogueCastEffects } from "./romScoutRogueOverrides";
const ROGUE_BLEED_ABILITIES = new Set([
"rom-rogue-primary-1", // Low Blow's conditional Grievous Wound
@@ -13,6 +16,8 @@ export interface RomCastMechanics {
readonly charged: boolean;
readonly mainHandDagger: boolean;
readonly casterMaxHealth: number;
readonly passiveTags?: readonly string[];
readonly targetTags?: readonly string[];
}
/** Source periodic values for self-sacrifice toggle skills are percentages of HP. */
@@ -61,10 +66,29 @@ function scaleOutput(effect: AbilityEffect, factor: number): AbilityEffect {
/** Select source-conditional RoM payloads once for both player and companion casts. */
export function romEffectsForCast(ability: AbilityDefinition, context: RomCastMechanics): readonly AbilityEffect[] {
if (ability.source !== "runewaker") return ability.effects;
const effects = ability.effects;
const priestKnightEffects = romPriestKnightCastEffects(
ability, ability.effects, context.passiveTags ?? [], context.casterMaxHealth,
);
const mageWarlockEffects = romMageWarlockCastEffects(ability, priestKnightEffects, new Set(context.passiveTags ?? []));
const effects = romScoutRogueCastEffects(ability, mageWarlockEffects, context.passiveTags ?? [], context.targetTags ?? []);
const damage = effects.filter((effect) => effect.kind === "damage");
const seals = Math.max(0, Math.min(4, context.sealStacks));
switch (ability.dbcSpellId) {
case 492625: // Infection's poison rider needs Poisonous active.
return context.passiveTags?.includes("rom-poisonous")
? effects : effects.filter((effect) => effect.kind !== "dot");
case 491156: // Electrostatic Charge's source shield is a percent of max HP.
return effects.map((effect) => effect.kind === "apply-aura" && effect.aura.absorbs?.length
? {
...effect,
aura: {
...effect.aura,
absorbs: effect.aura.absorbs.map((pool) => ({
...pool,
amount: Math.max(1, Math.round(context.casterMaxHealth * pool.amount / 100)),
})),
},
} : effect);
case 490148: // A new Holy Strike increases the target's Holy Seal bleed stack.
case 490150: { // Charge adds two stacks.
const gained = ability.dbcSpellId === 490148 ? 1 : 2;