Release Healer Man 0.1.22

This commit is contained in:
phenom committed 2026-09-09 11:21:33 -04:00
1 parent f6f2375145
commit 7f6001723a
144 files changed
+54107 -690

No files matched your search

@@ -3,9 +3,17 @@ import { applyDungeonEncounterEffect } from "./DungeonEncounterEffectBridge";
import { clearPartyRuntimeRegistry, getPartyRuntimePosition, updatePartyRuntimePosition } from "./partyRuntimeRegistry";
import { usePartyStore } from "./partyStore";
import { useGameStore } from "./store";
import { useCombatStore } from "./combatStore";
import {
clearMobRuntimeRegistry,
getMobRuntimePosition,
registerMobRuntime,
} from "./mobRuntimeRegistry";
import { DUNGEON_REGISTRY } from "./dungeonRegistry";
afterEach(() => {
clearPartyRuntimeRegistry();
clearMobRuntimeRegistry();
usePartyStore.setState({ members: [] });
});
@@ -26,4 +34,34 @@ describe("dungeon encounter effects", () => {
expect(useGameStore.getState().playerPosition).toEqual([12, 3, -8]);
expect(getPartyRuntimePosition(allyId)).toEqual([12, 3, -8]);
});
it("removes every combat and spatial actor owned by a deactivated spawn group", () => {
const dungeon = DUNGEON_REGISTRY["wailing-caverns"];
const group = dungeon.encounterSpawnGroups?.find(
(candidate) => candidate.id === "naralex-ravagers",
);
expect(group).toBeDefined();
for (const spawn of group!.spawns) {
useCombatStore.getState().registerMob(spawn.id, { name: spawn.id, maxHealth: 100 });
registerMobRuntime(spawn.id, spawn.position);
}
useCombatStore.getState().registerMob("unrelated", { name: "Unrelated", maxHealth: 100 });
applyDungeonEncounterEffect({
dungeonId: dungeon.id,
encounterId: "wailing-caverns:naralex",
effect: {
kind: "despawn-group",
actionId: "cleanup-ravagers",
spawnGroupId: group!.id,
},
}, 100);
for (const spawn of group!.spawns) {
expect(useCombatStore.getState().mobs[spawn.id]).toBeUndefined();
expect(getMobRuntimePosition(spawn.id)).toBeNull();
}
expect(useCombatStore.getState().mobs.unrelated).toBeDefined();
useCombatStore.getState().removeMob("unrelated");
});
});