Update Healer Man server
This commit is contained in:
1 parent
4c768fbec6
commit
b16821e92e
330 files changed
+35406
-1760
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { abilityById, type AbilityEffect } from "./abilityCatalog";
|
||||
import { abilityById, type AbilityDefinition, type AbilityEffect } from "./abilityCatalog";
|
||||
import { ROM_ALL_ABILITIES } from "./romAbilityCatalog";
|
||||
import { romAbilityNeedsRangedWeapon, romAbilityNeedsShield, romAbilityNeedsTwoHand, romAbilityRequiredTargetStateTag, romEffectsForCast, romTargetBleedCount, romTargetHasSlashBleed, romWarriorAbilityAdjustment, romWarriorThreatMultiplier, type RomCastMechanics } from "./romCombatMechanics";
|
||||
|
||||
@@ -19,6 +19,26 @@ function kinds(effects: readonly AbilityEffect[]): readonly string[] {
|
||||
}
|
||||
|
||||
describe("RoM primary class conditional combat effects", () => {
|
||||
it("applies learned Priest/Warrior Condensed Rage only to physical damage", () => {
|
||||
const source = ROM_ALL_ABILITIES.find((ability) => ability.classId === "rom-priest")!;
|
||||
const physicalAbility: AbilityDefinition = {
|
||||
...source,
|
||||
effects: [{ kind: "damage", coefficient: 0, basePoints: 100, school: "physical" }],
|
||||
};
|
||||
const holyAbility: AbilityDefinition = {
|
||||
...physicalAbility,
|
||||
effects: [{ kind: "damage", coefficient: 0, basePoints: 100, school: "holy" }],
|
||||
};
|
||||
const otherClassAbility: AbilityDefinition = { ...physicalAbility, classId: "rom-warrior" };
|
||||
const withPassive = { ...empty, learnedPassiveSpellIds: [493038] };
|
||||
const withoutPassive = { ...empty, learnedPassiveSpellIds: [] };
|
||||
|
||||
expect(romEffectsForCast(physicalAbility, withPassive)[0]).toMatchObject({ basePoints: 122, school: "physical" });
|
||||
expect(romEffectsForCast(physicalAbility, withoutPassive)[0]).toMatchObject({ basePoints: 100 });
|
||||
expect(romEffectsForCast(holyAbility, withPassive)[0]).toMatchObject({ basePoints: 100, school: "holy" });
|
||||
expect(romEffectsForCast(otherClassAbility, withPassive)[0]).toMatchObject({ basePoints: 100 });
|
||||
});
|
||||
|
||||
it("recognizes source-required shields and ranged weapons across primary and elite rows", () => {
|
||||
const sourceAbility = (spellId: number) => ROM_ALL_ABILITIES.find((ability) => ability.dbcSpellId === spellId)!;
|
||||
for (const spellId of [491333, 491484]) expect(romAbilityNeedsShield(sourceAbility(spellId))).toBe(true);
|
||||
@@ -73,7 +93,7 @@ describe("RoM primary class conditional combat effects", () => {
|
||||
expect(cast("rom-knight-general-0")).toEqual([]);
|
||||
const one = cast("rom-knight-general-0", { sealStacks: 1 });
|
||||
const four = cast("rom-knight-general-0", { sealStacks: 4 });
|
||||
expect(kinds(one)).toEqual(["damage", "dot", "combo"]);
|
||||
expect(kinds(one)).toEqual(["damage", "combo"]);
|
||||
expect((four[0] as Extract<AbilityEffect, { kind: "damage" }>).basePoints)
|
||||
.toBe(4 * ((one[0] as Extract<AbilityEffect, { kind: "damage" }>).basePoints ?? 0));
|
||||
});
|
||||
@@ -139,7 +159,7 @@ describe("RoM primary class conditional combat effects", () => {
|
||||
expect(romWarriorAbilityAdjustment(sourceAbility(490133), [499491]))
|
||||
.toEqual({ rageCostReduction: 25, cooldownReductionMs: 15_000 });
|
||||
expect(romWarriorAbilityAdjustment(sourceAbility(490133), [494377]))
|
||||
.toEqual({ rageCostReduction: 10, cooldownReductionMs: 10_000 });
|
||||
.toEqual({ rageCostReduction: 0, cooldownReductionMs: 0 });
|
||||
expect(romWarriorAbilityAdjustment(sourceAbility(490121), [])).toEqual({
|
||||
rageCostReduction: 0, cooldownReductionMs: 0,
|
||||
});
|
||||
@@ -147,6 +167,28 @@ describe("RoM primary class conditional combat effects", () => {
|
||||
.toEqual({ rageCostReduction: 10, cooldownReductionMs: 0 });
|
||||
});
|
||||
|
||||
it("removes only the four retired Holy Seal DoTs and applies CoA Probing Attack's conditional weapon-DPS value", () => {
|
||||
for (const spellId of [490148, 490149, 490150, 490151]) {
|
||||
const ability = ROM_ALL_ABILITIES.find((candidate) => candidate.dbcSpellId === spellId)!;
|
||||
const resolved = romEffectsForCast(ability, spellId === 490151 ? { ...empty, sealStacks: 4 } : empty);
|
||||
expect(resolved.some((effect) => effect.kind === "dot")).toBe(false);
|
||||
expect(resolved.some((effect) => effect.kind === "damage")).toBe(true);
|
||||
if (spellId === 490148 || spellId === 490150) {
|
||||
expect(resolved.some((effect) => effect.kind === "combo")).toBe(true);
|
||||
}
|
||||
}
|
||||
|
||||
const probing = ROM_ALL_ABILITIES.find((candidate) => candidate.dbcSpellId === 493283)!;
|
||||
const base = romEffectsForCast(probing, empty).find((effect) => effect.kind === "damage");
|
||||
const bleedEmpowered = romEffectsForCast(probing, { ...empty, bleedCount: 1 })
|
||||
.find((effect) => effect.kind === "damage");
|
||||
const hammerEmpowered = romEffectsForCast(probing, { ...empty, mainHandTwoHandHammer: true })
|
||||
.find((effect) => effect.kind === "damage");
|
||||
expect(base).toMatchObject({ kind: "damage", weaponDpsCoefficient: 6.643 });
|
||||
expect(bleedEmpowered).toMatchObject({ kind: "damage", weaponDpsCoefficient: 11.169 });
|
||||
expect(hammerEmpowered).toMatchObject({ kind: "damage", weaponDpsCoefficient: 11.169 });
|
||||
});
|
||||
|
||||
it("applies Warrior/Warlock's physical-damage passive and Heroic Surprise Attack's on-hit payload", () => {
|
||||
const sourceAbility = (spellId: number) => ROM_ALL_ABILITIES.find((ability) => ability.dbcSpellId === spellId)!;
|
||||
const rageBlow = sourceAbility(498706);
|
||||
@@ -213,10 +255,11 @@ describe("RoM primary class conditional combat effects", () => {
|
||||
});
|
||||
|
||||
it("uses one breakable control effect for each single-target restraint", () => {
|
||||
for (const id of ["rom-scout-primary-4", "rom-rogue-primary-5", "rom-mage-primary-56"]) {
|
||||
for (const id of ["rom-scout-primary-4", "rom-mage-primary-56"]) {
|
||||
const effects = cast(id);
|
||||
expect(effects).toHaveLength(1);
|
||||
expect(effects[0]).toMatchObject({ kind: "status", maxTargets: 1, breakOnDamage: true });
|
||||
}
|
||||
expect(kinds(cast("rom-rogue-primary-5"))).toEqual(["apply-aura"]);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user