forked from phenom/healer-man
Release Healer Man 0.1.24
This commit is contained in:
1 parent
c4346751a9
commit
bac0da9300
118 files changed
+857
-289
No files matched your search
@@ -1,5 +1,5 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import type { AbilityDefinition, AbilityEffect } from "./abilityCatalog";
|
||||
import { abilityAtLevel, type AbilityDefinition, type AbilityEffect } from "./abilityCatalog";
|
||||
import { WOW335_ABILITIES_BY_CLASS } from "./wow335AbilityCatalog";
|
||||
|
||||
function byId(id: string): AbilityDefinition {
|
||||
@@ -60,12 +60,40 @@ describe("WoW 3.3.5 executable effect mapping", () => {
|
||||
expect(byId("wow335-death-knight-death-coil").ranks?.map((rank) => rank.spellId)).not.toContain(47632);
|
||||
});
|
||||
|
||||
it("keeps percentage costs and form resources source-correct", () => {
|
||||
expect(byId("wow335-mage-frostbolt").cost).toMatchObject({ resource: "mana", amount: 14, percentage: true });
|
||||
it("freezes mana costs per learned rank while keeping form resources source-correct", () => {
|
||||
expect(byId("wow335-mage-frostbolt").cost).toEqual({ resource: "mana", amount: 17 });
|
||||
|
||||
const pain = byId("wow335-priest-shadow-word-pain");
|
||||
expect(abilityAtLevel(pain, 26)).toMatchObject({
|
||||
dbcSpellId: 992,
|
||||
cost: { resource: "mana", amount: 133 },
|
||||
});
|
||||
expect(abilityAtLevel(pain, 32)).toMatchObject({
|
||||
dbcSpellId: 992,
|
||||
cost: { resource: "mana", amount: 133 },
|
||||
});
|
||||
expect(abilityAtLevel(pain, 34)).toMatchObject({
|
||||
dbcSpellId: 2767,
|
||||
cost: { resource: "mana", amount: 188 },
|
||||
});
|
||||
|
||||
expect(byId("wow335-druid-claw").cost).toMatchObject({ resource: "energy", amount: 45 });
|
||||
expect(byId("wow335-druid-maul").cost).toMatchObject({ resource: "rage", amount: 15 });
|
||||
});
|
||||
|
||||
it("never leaves an imported player mana cost tied to maximum mana", () => {
|
||||
const manaRanks = Object.values(WOW335_ABILITIES_BY_CLASS)
|
||||
.flat()
|
||||
.flatMap((ability) => ability.ranks ?? [])
|
||||
.filter((rank) => rank.cost.resource === "mana");
|
||||
|
||||
expect(manaRanks.length).toBeGreaterThan(100);
|
||||
for (const rank of manaRanks) {
|
||||
expect(rank.cost.percentage, `spell ${rank.spellId} rank ${rank.rank}`).not.toBe(true);
|
||||
expect(Number.isFinite(rank.cost.amount), `spell ${rank.spellId} rank ${rank.rank}`).toBe(true);
|
||||
}
|
||||
});
|
||||
|
||||
it("provides mechanics for previously silent class scripts and hidden proc spells", () => {
|
||||
expect(effectsOfKind(byId("wow335-warrior-slam"), "damage")).not.toEqual([]);
|
||||
expect(effectsOfKind(byId("wow335-death-knight-death-grip"), "pull")).not.toEqual([]);
|
||||
|
||||
Reference in new issue
Block a user