Release Healer Man 0.1.19

This commit is contained in:
phenom committed 2026-09-06 11:06:03 -04:00
1 parent eaddad4134
commit d9bebb4e81
13 files changed
+343 -37

No files matched your search

+42
View File
@@ -24,6 +24,8 @@ describe("named aura combat runtime", () => {
it("applies and expires an imported named player buff", () => {
const now = 10_000;
const baseHealth = useCombatStore.getState().health;
const baseMaxHealth = useCombatStore.getState().maxHealth;
const result = useCombatStore.getState().castAbility(
"wow335-priest-power-word-fortitude",
undefined,
@@ -46,9 +48,49 @@ describe("named aura combat runtime", () => {
))?.icon,
},
});
expect(useCombatStore.getState().maxHealth).toBeGreaterThan(baseMaxHealth);
expect(useCombatStore.getState().health - baseHealth).toBe(
useCombatStore.getState().maxHealth - baseMaxHealth,
);
useCombatStore.getState().tick(0, now + 1_800_000);
expect(useCombatStore.getState().auras.some((aura) => aura.definition.id === fortitude?.definition.id)).toBe(false);
expect(useCombatStore.getState()).toMatchObject({ health: baseHealth, maxHealth: baseMaxHealth });
});
it("grants learned long-term stat buffs to the full party on load", () => {
useCombatStore.getState().initializeCharacter({ classId: "priest", level: 8 });
usePartyStore.getState().initializeParty("default-party-buffs", 8, useCombatStore.getState().health);
useCombatStore.getState().synchronizeActors();
const playerMaxHealth = useCombatStore.getState().maxHealth;
const memberMaxHealth = new Map(usePartyStore.getState().members.map((member) => [member.id, member.maxHealth]));
useCombatStore.getState().applyDefaultPartyBuffs(20_000);
const state = useCombatStore.getState();
const targetIds = [PLAYER_AGGRO_ID, ...usePartyStore.getState().members.map((member) => member.id)];
for (const targetId of targetIds) {
expect(state.auras).toContainEqual(expect.objectContaining({
targetId,
definition: expect.objectContaining({ exclusiveGroup: "default-party-buff:fortitude" }),
}));
}
expect(state.maxHealth).toBeGreaterThan(playerMaxHealth);
for (const member of usePartyStore.getState().members) {
expect(member.maxHealth).toBeGreaterThan(memberMaxHealth.get(member.id)!);
}
const buffedPlayerMaxHealth = state.maxHealth;
expect(state.auras.filter((aura) => (
aura.targetId === PLAYER_AGGRO_ID
&& aura.definition.exclusiveGroup === "default-party-buff:fortitude"
))).toHaveLength(1);
expect(state.castAbility("wow335-priest-power-word-fortitude", undefined, 21_000).ok).toBe(true);
expect(useCombatStore.getState().maxHealth).toBe(buffedPlayerMaxHealth);
expect(useCombatStore.getState().auras.filter((aura) => (
aura.targetId === PLAYER_AGGRO_ID
&& aura.definition.exclusiveGroup === "default-party-buff:fortitude"
))).toHaveLength(1);
});
it("consumes a named absorb before player health", () => {