forked from phenom/healer-man
Release Healer Man 0.1.6
This commit is contained in:
1 parent
55cfd43d66
commit
b12fb84859
96 files changed
+10874
-609
No files matched your search
@@ -1,4 +1,5 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
import type { AbilityEffect } from "./abilityCatalog";
|
||||
import { ROM_ALL_ABILITIES } from "./romAbilityCatalog";
|
||||
import generated from "./romPlayerCatalog.generated.json";
|
||||
|
||||
@@ -8,6 +9,33 @@ function named(name: string) {
|
||||
return ability;
|
||||
}
|
||||
|
||||
function isMeaningfulEffect(effect: AbilityEffect): boolean {
|
||||
if (effect.kind === "scripted" || effect.kind === "unsupported") return false;
|
||||
if (["damage", "heal", "dot", "hot", "shield"].includes(effect.kind)) {
|
||||
const output = effect as Extract<AbilityEffect, { kind: "damage" | "heal" | "dot" | "hot" | "shield" }>;
|
||||
return (
|
||||
output.coefficient > 0
|
||||
|| (output.coefficientPerLevel ?? 0) > 0
|
||||
|| (output.basePoints ?? 0) > 0
|
||||
|| (output.pointsPerLevel ?? 0) > 0
|
||||
|| (output.kind === "heal" && (output.percentMaxHealth ?? 0) > 0)
|
||||
);
|
||||
}
|
||||
if (effect.kind === "apply-aura") {
|
||||
return Boolean(
|
||||
effect.control
|
||||
|| effect.aura.modifiers?.length
|
||||
|| effect.aura.absorbs?.length
|
||||
|| effect.aura.procs?.length
|
||||
|| effect.aura.utilityTags?.length
|
||||
|| effect.aura.controlImmunities?.length
|
||||
|| effect.aura.reflectSpellChance
|
||||
|| effect.aura.redirectDamagePercent,
|
||||
);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
describe("executable RuneWaker ability mappings", () => {
|
||||
it("maps Taunt, Shout, and Cleanse to their real combat mechanics", () => {
|
||||
expect(named("Taunt").effects).toEqual(expect.arrayContaining([
|
||||
@@ -31,7 +59,7 @@ describe("executable RuneWaker ability mappings", () => {
|
||||
expect(holyAura).toMatchObject({
|
||||
aura: {
|
||||
disposition: "buff",
|
||||
modifiers: [{ kind: "damage", direction: "taken", operation: "percent", value: -100 }],
|
||||
modifiers: [{ kind: "damage", direction: "taken", operation: "percent", value: -1 }],
|
||||
},
|
||||
});
|
||||
const electrostatic = named("Electrostatic Charge").effects.find((effect) => (
|
||||
@@ -63,16 +91,61 @@ describe("executable RuneWaker ability mappings", () => {
|
||||
expect(named("Spreading Pain").effects.filter((effect) => effect.kind === "trigger-spell")).toHaveLength(3);
|
||||
});
|
||||
|
||||
it("leaves only genuinely stateful combo transformations as script-only active skills", () => {
|
||||
it("gives every active base skill and playable rank a concrete runtime effect", () => {
|
||||
const versions = ROM_ALL_ABILITIES.flatMap((ability) => [
|
||||
{ name: ability.name, rank: 0, passive: ability.passive, effects: ability.effects },
|
||||
...(ability.ranks ?? []).map((rank) => ({
|
||||
name: ability.name,
|
||||
rank: rank.rank,
|
||||
passive: ability.passive,
|
||||
effects: rank.effects,
|
||||
})),
|
||||
]);
|
||||
|
||||
expect(versions).toHaveLength(1_863);
|
||||
const scriptOnly = ROM_ALL_ABILITIES
|
||||
.filter((ability) => !ability.passive && ability.effects.every((effect) => effect.kind === "scripted"))
|
||||
.map((ability) => ability.name)
|
||||
.sort();
|
||||
expect(scriptOnly).toEqual([
|
||||
"Electric Compression",
|
||||
"Entling Offering",
|
||||
"Frost Arrow",
|
||||
"Holy Salvation Candle",
|
||||
]);
|
||||
expect(scriptOnly).toEqual([]);
|
||||
for (const version of versions.filter((entry) => !entry.passive)) {
|
||||
expect(
|
||||
version.effects.some(isMeaningfulEffect),
|
||||
`${version.name} rank ${version.rank}`,
|
||||
).toBe(true);
|
||||
}
|
||||
});
|
||||
|
||||
it("implements source state for RuneWaker's active transformations", () => {
|
||||
expect(named("Frost Arrow").effects).toEqual(expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
kind: "apply-aura",
|
||||
aura: expect.objectContaining({
|
||||
utilityTags: ["rom-frost-arrow"],
|
||||
procs: [expect.objectContaining({ action: { kind: "custom", id: "rom-frost-arrow" } })],
|
||||
}),
|
||||
}),
|
||||
]));
|
||||
expect(named("Electric Compression").effects).toEqual(expect.arrayContaining([
|
||||
expect.objectContaining({ kind: "apply-aura", aura: expect.objectContaining({ utilityTags: ["rom-static-field-charge"] }) }),
|
||||
]));
|
||||
expect(named("Entling Offering").effects).toEqual(expect.arrayContaining([
|
||||
expect.objectContaining({
|
||||
kind: "apply-aura",
|
||||
aura: expect.objectContaining({
|
||||
utilityTags: ["rom-entling-offering"],
|
||||
procs: [expect.objectContaining({ action: { kind: "custom", id: "rom-entling-offering" } })],
|
||||
}),
|
||||
}),
|
||||
]));
|
||||
expect(named("Holy Salvation Candle").effects).toEqual(expect.arrayContaining([
|
||||
expect.objectContaining({ kind: "apply-aura", aura: expect.objectContaining({ utilityTags: ["rom-holy-salvation-candle"] }) }),
|
||||
]));
|
||||
expect(named("Remodeled Body").effects).toEqual(expect.arrayContaining([
|
||||
expect.objectContaining({ kind: "apply-aura", aura: expect.objectContaining({ utilityTags: ["rom-remodeled-body"] }) }),
|
||||
]));
|
||||
expect(named("Revival").effects).toEqual(expect.arrayContaining([
|
||||
expect.objectContaining({ kind: "utility", action: "class-script" }),
|
||||
]));
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user