Release Healer Man 0.1.11

This commit is contained in:
phenom committed 2026-08-31 14:12:51 -04:00
1 parent 5f1a14d8de
commit 13970d03c8
18 files changed
+514 -19

No files matched your search

+38
View File
@@ -1,6 +1,8 @@
import { describe, expect, it } from "vitest";
import {
createLoopedPath,
hasUsableLoopedMobPath,
normalizeMobPopulationPaths,
sampleLoopedPath,
samplePackFormation,
samplePackMember,
@@ -11,6 +13,7 @@ import {
WAILING_CAVERNS_STATIC_SPAWNS,
} from "./mobPopulation";
import { DUNGEON_MANIFEST } from "./dungeonManifest";
import { DUNGEON_DEFINITIONS } from "./dungeonRegistry";
const square = createLoopedPath([
[0, 0, 0],
@@ -78,6 +81,41 @@ describe("looped mob path sampling", () => {
expect(() => createLoopedPath([[1, 2, 3], [1, 2, 3]])).toThrow(/distinct waypoints/i);
});
it("converts malformed imported patrols into stationary spawns", () => {
const pack = {
id: "stationary-patrol",
name: "Stationary Patrol",
speed: 1,
formationSource: "database-solo",
spawnMask: 2,
waypoints: [[4, 5, 6], [4, 5, 6]],
members: [{
id: "member",
entityId: "guard",
role: "leader",
formationOffset: [1, 0.5, 2],
}],
} as const;
const normalized = normalizeMobPopulationPaths([pack], []);
expect(normalized.roamingPacks).toEqual([]);
expect(normalized.staticSpawns).toEqual([{
id: "stationary-patrol:member",
entityId: "guard",
position: [5, 5.5, 4],
spawnMask: 2,
}]);
});
it("keeps every packaged dungeon patrol on a usable loop", () => {
expect(DUNGEON_DEFINITIONS).toHaveLength(84);
for (const dungeon of DUNGEON_DEFINITIONS) {
for (const pack of dungeon.roamingPacks) {
expect(hasUsableLoopedMobPath(pack.waypoints), `${dungeon.id}:${pack.id}`).toBe(true);
}
}
});
it("keeps the shipped patrol population internally consistent", () => {
expect(WAILING_CAVERNS_ROAMING_PACKS).toHaveLength(6);