Update Healer Man server
This commit is contained in:
1 parent
35dfdaed61
commit
4fb7a0b9c8
161 files changed
+24618
-529
No files matched your search
@@ -27,6 +27,35 @@ describe("talent runtime modifiers", () => {
|
||||
expect(applyTalentModifierValue(100, maxRank, "damage-percent", { tags: ["cast-time", "holy"] })).toBe(105);
|
||||
});
|
||||
|
||||
it("keeps Arcane Potency's next-spell crit bonus out of passive modifiers", () => {
|
||||
for (const rank of [1, 2]) {
|
||||
const modifiers = talentModifiersForRanks({ "talent-1725": rank }, "mage");
|
||||
expect(modifiers.filter((modifier) => modifier.kind === "critical-chance-percent")).toEqual([]);
|
||||
}
|
||||
});
|
||||
|
||||
it("keeps Molten Fury's target-health bonus out of unconditional scalar modifiers", () => {
|
||||
for (const rank of [1, 2]) {
|
||||
const modifiers = talentModifiersForRanks({ "talent-1732": rank }, "mage");
|
||||
expect(modifiers.filter((modifier) => modifier.kind === "damage-percent")).toEqual([]);
|
||||
expect(applyTalentModifierValue(100, modifiers, "damage-percent", {
|
||||
abilityName: "Fireball",
|
||||
tags: ["damage", "fire"],
|
||||
})).toBe(100);
|
||||
}
|
||||
});
|
||||
|
||||
it("keeps Master of Elements' passive crit modifier single-counted", () => {
|
||||
const modifiers = talentModifiersForRanks({ "talent-1639": 3 }, "mage");
|
||||
expect(modifiers.filter((modifier) => modifier.kind === "critical-chance-percent")).toEqual([
|
||||
expect.objectContaining({
|
||||
amount: 3,
|
||||
sourceTalentId: "talent-1639",
|
||||
sourceTalentName: "Master of Elements",
|
||||
}),
|
||||
]);
|
||||
});
|
||||
|
||||
it("parses common passive stat, cost, cast-time, cooldown, and mitigation categories", () => {
|
||||
expect(parseTalentModifiers("Increases your maximum health by 10%.")).toContainEqual(
|
||||
expect.objectContaining({ kind: "max-health-percent", amount: 10 }),
|
||||
@@ -67,6 +96,40 @@ describe("talent runtime modifiers", () => {
|
||||
]));
|
||||
});
|
||||
|
||||
it("applies Spell Warding to direct and periodic magic damage, but not physical damage", () => {
|
||||
const spellWarding = parseTalentModifiers(
|
||||
"Reduces all direct and periodic magic damage taken by 3%.",
|
||||
).map((modifier) => ({
|
||||
...modifier,
|
||||
sourceTalentId: "test:spell-warding",
|
||||
sourceTalentName: "Spell Warding",
|
||||
rank: 3,
|
||||
description: "Reduces all direct and periodic magic damage taken by 3%.",
|
||||
}));
|
||||
const generatedMaxRank = talentModifiersForRanks({ "talent-411": 3 }, "priest");
|
||||
|
||||
expect(spellWarding).toContainEqual(expect.objectContaining({
|
||||
kind: "damage-taken-percent",
|
||||
amount: -3,
|
||||
scope: "all direct and periodic magic damage taken",
|
||||
}));
|
||||
expect(generatedMaxRank).toContainEqual(expect.objectContaining({
|
||||
kind: "damage-taken-percent",
|
||||
amount: -3,
|
||||
sourceTalentId: "talent-411",
|
||||
rank: 3,
|
||||
}));
|
||||
expect(applyTalentModifierValue(100, spellWarding, "damage-taken-percent", {
|
||||
tags: ["magic", "shadow"],
|
||||
})).toBe(97);
|
||||
expect(applyTalentModifierValue(100, spellWarding, "damage-taken-percent", {
|
||||
tags: ["magic", "fire", "periodic"],
|
||||
})).toBe(97);
|
||||
expect(applyTalentModifierValue(100, spellWarding, "damage-taken-percent", {
|
||||
tags: ["physical"],
|
||||
})).toBe(100);
|
||||
});
|
||||
|
||||
it("scopes Improved Rejuvenation's effect bonus to Rejuvenation healing", () => {
|
||||
const improvedRejuvenation = TALENT_NODES.find((node) => node.id === "talent-830")!;
|
||||
const modifiers = talentModifiersForRanks({ [improvedRejuvenation.id]: 3 }, "druid");
|
||||
@@ -110,6 +173,32 @@ describe("talent runtime modifiers", () => {
|
||||
expect(applyTalentModifierValue(10_000, disciplineModifiers, "cooldown-flat-ms", { abilityName: "Mortal Strike" })).toBe(10_000);
|
||||
});
|
||||
|
||||
it("scopes WoW Mage Impact's rank-scaled damage bonus to Fire Blast and Meteor", () => {
|
||||
const impact = TALENT_NODES.find((node) => node.id === "talent-30")!;
|
||||
|
||||
for (const rank of [1, 2, 3]) {
|
||||
const modifiers = talentModifiersForRanks({ [impact.id]: rank }, "mage");
|
||||
const expectedBonus = rank * 3;
|
||||
expect(modifiers).toContainEqual(expect.objectContaining({
|
||||
kind: "damage-percent",
|
||||
amount: expectedBonus,
|
||||
scope: "damage of your Fire Blast and Meteor abilities",
|
||||
}));
|
||||
for (const abilityName of ["Fire Blast", "Meteor"]) {
|
||||
expect(
|
||||
applyTalentModifierValue(100, modifiers, "damage-percent", { abilityName, tags: ["fire"] }),
|
||||
`${abilityName} at Impact rank ${rank}`,
|
||||
).toBeCloseTo(100 + expectedBonus);
|
||||
}
|
||||
expect(applyTalentModifierValue(100, modifiers, "damage-percent", {
|
||||
abilityName: "Fireball", tags: ["fire"],
|
||||
})).toBe(100);
|
||||
expect(applyTalentModifierValue(100, modifiers, "damage-percent", {
|
||||
abilityName: "Frostbolt", tags: ["frost"],
|
||||
})).toBe(100);
|
||||
}
|
||||
});
|
||||
|
||||
it("keeps critical damage bonuses out of ordinary hit damage", () => {
|
||||
const modifiers = parseTalentModifiers("Increases the critical damage of your spells by 150%.")
|
||||
.map((modifier) => ({ ...modifier, sourceTalentId: "test", sourceTalentName: "Thunderous", rank: 1, description: "" }));
|
||||
@@ -166,4 +255,23 @@ describe("talent runtime modifiers", () => {
|
||||
tags: ["damage", "physical"],
|
||||
})).toBe(100);
|
||||
});
|
||||
|
||||
it("applies Mage Flame Throwing's generated flat range only to damaging spells", () => {
|
||||
for (const [rank, bonus] of [[1, 2], [2, 4], [3, 6]] as const) {
|
||||
const modifiers = talentModifiersForRanks({ "talent-28": rank }, "mage");
|
||||
expect(applyTalentModifierValue(30, modifiers, "range-flat-yards", {
|
||||
abilityName: "Fireball",
|
||||
tags: ["cast-time", "damage", "fire"],
|
||||
})).toBe(30 + bonus);
|
||||
expect(applyTalentModifierValue(30, modifiers, "range-flat-yards", {
|
||||
abilityName: "Flash Heal",
|
||||
tags: ["cast-time", "healing", "holy"],
|
||||
})).toBe(30);
|
||||
expect(applyTalentModifierValue(30, talentModifiersForRanks({ "talent-28": rank }, "priest"),
|
||||
"range-flat-yards", {
|
||||
abilityName: "Smite",
|
||||
tags: ["cast-time", "damage", "holy"],
|
||||
})).toBe(30);
|
||||
}
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user