Release Healer Man 0.1.12
This commit is contained in:
1 parent
13970d03c8
commit
65e24f644e
201 files changed
+5061
-123
No files matched your search
@@ -8,6 +8,8 @@ import {
|
||||
derivePartySpawnSlots,
|
||||
effectiveManastormCatalog,
|
||||
isGameMasterSession,
|
||||
normalizeManastormAdminConfig,
|
||||
publicManastormAdminConfig,
|
||||
resolveBossAdminEntry,
|
||||
resolvedBossAdminCatalog,
|
||||
type ManastormAdminConfig,
|
||||
@@ -21,6 +23,60 @@ function configWithBoss(key: string, record: ManastormAdminConfig["bosses"][stri
|
||||
}
|
||||
|
||||
describe("Manastorm GM catalog", () => {
|
||||
it("migrates schema-v1 records to schema v2 without losing authored content", () => {
|
||||
const candidate = UNIFIED_MANASTORM_BOSS_CATALOG.find((entry) => entry.baseStage);
|
||||
expect(candidate).toBeTruthy();
|
||||
const boss = bossAdminRecordForStatus(candidate!, DEFAULT_MANASTORM_ADMIN_CONFIG, "ready");
|
||||
const legacy = {
|
||||
...DEFAULT_MANASTORM_ADMIN_CONFIG,
|
||||
schemaVersion: 1,
|
||||
dungeonSpawns: { "wailing-caverns": { footPosition: [1, 2, 3], yaw: 0.5 } },
|
||||
bosses: { [candidate!.key]: boss },
|
||||
};
|
||||
delete (legacy as { dungeons?: unknown }).dungeons;
|
||||
|
||||
const migrated = normalizeManastormAdminConfig(legacy);
|
||||
|
||||
expect(migrated.schemaVersion).toBe(2);
|
||||
expect(migrated.dungeons).toEqual({});
|
||||
expect(migrated.dungeonSpawns["wailing-caverns"]).toEqual({ footPosition: [1, 2, 3], yaw: 0.5 });
|
||||
expect(migrated.bosses[candidate!.key]).toEqual(boss);
|
||||
});
|
||||
|
||||
it("normalizes dungeon readiness independently from player availability", () => {
|
||||
const normalized = normalizeManastormAdminConfig({
|
||||
...DEFAULT_MANASTORM_ADMIN_CONFIG,
|
||||
dungeons: {
|
||||
"wailing-caverns": { status: "not-ready" },
|
||||
deadmines: { status: "unknown" },
|
||||
},
|
||||
});
|
||||
expect(normalized.dungeons["wailing-caverns"]?.status).toBe("not-ready");
|
||||
expect(normalized.dungeons.deadmines?.status).toBe("needs-tested");
|
||||
});
|
||||
|
||||
it("preserves normalized review notes and server-owned review metadata", () => {
|
||||
const normalized = normalizeManastormAdminConfig({
|
||||
...DEFAULT_MANASTORM_ADMIN_CONFIG,
|
||||
dungeons: {
|
||||
deadmines: {
|
||||
status: "not-ready",
|
||||
note: "Door trigger needs another pass.\r\nRetest with a full party.",
|
||||
reviewedAt: 1_700_000_000_000,
|
||||
reviewedBy: " Phenom ",
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
expect(normalized.dungeons.deadmines).toEqual({
|
||||
status: "not-ready",
|
||||
note: "Door trigger needs another pass.\nRetest with a full party.",
|
||||
reviewedAt: 1_700_000_000_000,
|
||||
reviewedBy: "Phenom",
|
||||
});
|
||||
expect(publicManastormAdminConfig(normalized).dungeons.deadmines).toEqual({ status: "not-ready" });
|
||||
});
|
||||
|
||||
it("deduplicates map/name records and defaults every boss to Needs tested", () => {
|
||||
const identities = UNIFIED_MANASTORM_BOSS_CATALOG.map((entry) => `${entry.mapId}:${entry.name.toLowerCase()}`);
|
||||
expect(new Set(identities).size).toBe(identities.length);
|
||||
|
||||
Reference in new issue
Block a user