Release Healer Man 0.1.30

This commit is contained in:
phenom committed 2026-09-11 18:49:33 -04:00
1 parent 544c1bee91
commit 7d7fd567f0
845 files changed
+2040 -87

No files matched your search

+16
View File
@@ -19,6 +19,7 @@ import {
} from "./partyRuntime";
import { usePartyStore } from "./partyStore";
import { EMPTY_ITEM_STATS } from "./itemStats";
import { subscribeCombatPresentation, type CombatPresentationEvent } from "./combatPresentation";
function registerEngagedMob(id = "pack:a", maxHealth = 200): void {
useCombatStore.getState().registerMob(id, { name: id, maxHealth, xpReward: 0 });
@@ -53,6 +54,10 @@ describe("party combat runtime", () => {
}
const beforeMobHealth = useCombatStore.getState().mobs["pack:a"].health;
const fullPlayerHealth = useCombatStore.getState().health;
const events: CombatPresentationEvent[] = [];
const unsubscribe = subscribeCombatPresentation((message) => {
if (message.kind === "event" && message.event.actorGroup === "party") events.push(message.event);
});
advanceDungeonPartyCombat(1_000);
const party = usePartyStore.getState();
@@ -69,10 +74,21 @@ describe("party combat runtime", () => {
const woundedTank = usePartyStore.getState().members.find((member) => member.id === tank.id)!;
expect(woundedTank.health).toBeLessThan(woundedTank.maxHealth);
expect(useCombatStore.getState().health).toBe(fullPlayerHealth);
const instantReleases = events.filter((event) => event.phase === "release" && event.instantCast);
expect(instantReleases.length).toBeGreaterThan(0);
expect(instantReleases.every((event) => (
events.some((impact) => (
impact.phase === "impact"
&& impact.sourceActorId === event.sourceActorId
&& impact.abilityId === event.abilityId
&& impact.instantCast
))
))).toBe(true);
const actionRevisions = party.members.map((member) => member.nextActionAt);
advanceDungeonPartyCombat(1_100);
expect(usePartyStore.getState().members.map((member) => member.nextActionAt)).toEqual(actionRevisions);
unsubscribe();
});
it("keeps living companions in the fight while the player waits for resurrection", () => {