Release Healer Man 0.1.59
This commit is contained in:
1 parent
11934a3979
commit
ab1434a3b8
44 files changed
+1242
-103
No files matched your search
@@ -1,6 +1,6 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import { abilitiesForClass } from "./abilityCatalog";
|
||||
import { channelAmountEffects, channelPulseCount } from "./combatChannelAmounts";
|
||||
import { channelAmountEffects, channelPulseAt, channelPulseCount } from "./combatChannelAmounts";
|
||||
|
||||
describe("channel amount expansion", () => {
|
||||
it("spreads a normal channel's full amount across its pulses", () => {
|
||||
@@ -32,4 +32,44 @@ describe("channel amount expansion", () => {
|
||||
{ effect: ability.effects.find((effect) => effect.kind === "damage"), multiplier: 1 },
|
||||
]);
|
||||
});
|
||||
|
||||
it("uses source intervals for classic channels and starts Penance immediately", () => {
|
||||
const cases = [
|
||||
["priest", "Penance", 3, 0, 1_000],
|
||||
["priest", "Mind Flay", 3, 1_000, 1_000],
|
||||
["priest", "Divine Hymn", 4, 2_000, 2_000],
|
||||
["hunter", "Volley", 6, 1_000, 1_000],
|
||||
["mage", "Blizzard", 8, 1_000, 1_000],
|
||||
["warlock", "Rain of Fire", 4, 2_000, 2_000],
|
||||
["druid", "Tranquility", 4, 2_000, 2_000],
|
||||
["druid", "Hurricane", 10, 1_000, 1_000],
|
||||
] as const;
|
||||
for (const [classId, name, pulses, firstAt, interval] of cases) {
|
||||
const ability = abilitiesForClass(classId).find((candidate) => candidate.name === name)!;
|
||||
expect(ability.castMode, name).toBe("channel");
|
||||
expect(channelPulseCount(ability), name).toBe(pulses);
|
||||
expect(channelPulseAt(ability, 0, ability.castTimeMs, 0), name).toBe(firstAt);
|
||||
expect(channelPulseAt(ability, 0, ability.castTimeMs, 1), name).toBe(firstAt + interval);
|
||||
}
|
||||
const penance = abilitiesForClass("priest").find((candidate) => candidate.name === "Penance")!;
|
||||
const accelerated = { ...penance, castTimeMs: 1_000 };
|
||||
expect(channelPulseCount(accelerated)).toBe(3);
|
||||
expect(channelPulseAt(accelerated, 0, 1_000, 1)).toBe(500);
|
||||
});
|
||||
|
||||
it("gives damaging and healing classic channels a pulse payload", () => {
|
||||
const expected = [
|
||||
["priest", "Penance"], ["priest", "Mind Flay"], ["priest", "Mind Sear"],
|
||||
["priest", "Divine Hymn"], ["hunter", "Volley"],
|
||||
["mage", "Arcane Missiles"], ["mage", "Blizzard"],
|
||||
["warlock", "Drain Life"], ["warlock", "Drain Soul"],
|
||||
["warlock", "Health Funnel"], ["warlock", "Rain of Fire"], ["warlock", "Hellfire"],
|
||||
["druid", "Tranquility"], ["druid", "Hurricane"],
|
||||
] as const;
|
||||
const missing = expected.filter(([classId, name]) => {
|
||||
const ability = abilitiesForClass(classId).find((candidate) => candidate.name === name)!;
|
||||
return channelAmountEffects(ability, channelPulseCount(ability)).length === 0;
|
||||
});
|
||||
expect(missing).toEqual([]);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user