Open supported optional modules through normal lobby previews

This commit is contained in:
Quintine committed 2026-10-17 17:22:08 +11:00
1 parent b8ad2f011f
commit 210aa04811
17 files changed
+275 -78

No files matched your search

+2 -2
View File
@@ -207,7 +207,7 @@ function assertCardCustody(g: Game) {
assert.equal(g.ixSetupCards ?? null, null);
}
void test('Homeworld lobby choice belongs to the host, resets readiness, and preserves both public start gates', () => {
void test('Homeworld lobby choice belongs to the host, resets readiness, and opens the genuine Homeworld start', () => {
let g = lobby(['atreides', 'emperor'], false, false);
rejectUnchanged(g, 'emperor', { type: 'homeworlds', enabled: true });
rejectUnchanged(g, g.host, { type: 'homeworlds', enabled: 1 });
@@ -215,7 +215,7 @@ void test('Homeworld lobby choice belongs to the host, resets readiness, and pre
assert.deepEqual(g.homeworlds, { custody: null });
assert.ok(g.players.every((p) => !p.ready));
for (const p of g.players) g = applyAction(g, p.id, { type: 'ready' });
rejectUnchanged(g, g.host, { type: 'start' });
assert.ok(applyAction(g, g.host, { type: 'start' }).homeworlds, 'A normal start keeps the selected Homeworld module');
const before = structuredClone(g);
assert.throws(() => initializeBaseGameForAudit(g));
assert.deepEqual(g, before);