Release Healer Man 0.1.49

This commit is contained in:
phenom committed 2026-09-17 09:13:15 -04:00
1 parent 39425f2494
commit 612170afd0
91 files changed
+2278 -263

No files matched your search

+54 -1
View File
@@ -2,9 +2,11 @@ import { beforeEach, describe, expect, it } from "vitest";
import { PLAYER_AGGRO_ID } from "./aggro";
import { applyAura, type AuraDefinition } from "./combatAuras";
import { useCombatStore } from "./combatStore";
import { abilityById } from "./abilityCatalog";
import { clearMobRuntimeRegistry, setMobPosition } from "./mobRuntimeRegistry";
import { clearPartyRuntimeRegistry } from "./partyRuntimeRegistry";
import { usePartyStore } from "./partyStore";
import { createConfiguredPartyMember, usePartyStore } from "./partyStore";
import { runtimePartyTalentRanksForLevel } from "./partyTalentRuntime";
function registerTarget(id = "target", distance = 2): void {
useCombatStore.getState().registerMob(id, { name: id, maxHealth: 1_000, xpReward: 0 });
@@ -99,6 +101,57 @@ describe("named aura combat runtime", () => {
))).toHaveLength(1);
});
it("enters the dungeon with spec maintenance and permanent pets already prepared", () => {
const now = 30_000;
useCombatStore.getState().initializeCharacter({
classId: "hunter",
specializationId: "hunter:beast-mastery",
role: "damage",
level: 80,
inventory: [],
equipment: {},
});
const warlock = createConfiguredPartyMember({
name: "Demo",
classId: "warlock",
specialization: "Demonology",
specializationId: "warlock:demonology",
talentTreeId: "warlock-demonology",
talentRanks: runtimePartyTalentRanksForLevel("warlock", "Demonology", 80),
role: "damage",
}, 80, 0, "precombat-preparation");
usePartyStore.setState({ members: [warlock], playerRole: "damage" });
useCombatStore.getState().synchronizeActors();
const playerResource = useCombatStore.getState().resource;
const companionResource = warlock.resource;
useCombatStore.getState().applyPrecombatPreparation(now);
const prepared = useCombatStore.getState();
expect(prepared.auras).toContainEqual(expect.objectContaining({
targetId: PLAYER_AGGRO_ID,
definition: expect.objectContaining({ exclusiveGroup: "hunter:aspect" }),
}));
expect(prepared.auras).toContainEqual(expect.objectContaining({
targetId: warlock.id,
definition: expect.objectContaining({ exclusiveGroup: "warlock:armor" }),
}));
expect(prepared.summons.some((summon) => summon.ownerActorId === PLAYER_AGGRO_ID
&& abilityById(summon.sourceAbilityId)?.name === "Call Pet")).toBe(true);
expect(prepared.summons.some((summon) => summon.ownerActorId === warlock.id
&& abilityById(summon.sourceAbilityId)?.name === "Summon Felguard")).toBe(true);
expect(prepared.resource).toBe(playerResource);
expect(prepared.globalCooldownEndsAt).toBe(0);
expect(usePartyStore.getState().members[0]).toMatchObject({
resource: companionResource,
globalCooldownEndsAt: 0,
cooldowns: {},
});
const summonIds = prepared.summons.map((summon) => summon.id);
useCombatStore.getState().applyPrecombatPreparation(now + 1_000);
expect(useCombatStore.getState().summons.map((summon) => summon.id)).toEqual(summonIds);
});
it("consumes a named absorb before player health", () => {
const now = Date.now();
expect(useCombatStore.getState().castAbility(