Count the Advanced CHOAM Auditor in the expected Traitor deck

tools/sample-custody.ts built its expected Traitor deck from the printed
leaders only, but Advanced CHOAM adds its printed extra Auditor disc during
setup, so every fresh Advanced all-expansion sample failed at setup with
'physical traitor custody'. The expectation now includes the Auditor for
Advanced CHOAM seats; the resumed saved positions were unaffected because the
resume path recomputes the inventory from the game.

With the fix a fresh --profile combined-homeworld-nexus --rules both --players
all run completes 2/4 (both Advanced). The two Basic samples stop at phase 6
on 'Odd-force Basic Occupy awaits the preserved publisher casualty-rounding
ruling', one of the three other unresolved questions recorded in the capture
resumption note, not on the five implemented rulings.

tests/sample-custody.test.ts (11 cases) and the faction-games suite pass;
types and lint are green.
This commit is contained in:
Quintine committed 2026-10-07 22:39:43 +11:00
1 parent 7fa737f690
commit f36632accc
2 files changed
+26 -2

No files matched your search

+11 -2
View File
@@ -1,5 +1,5 @@
import assert from 'node:assert/strict';
import { leaders, treacheryDeck } from '../game/cards';
import { createAuditorLeader, leaders, treacheryDeck } from '../game/cards';
import type { Game } from '../game/engine';
import { richeseCards } from '../game/richese-cards';
import { ecazTreacheryCards } from '../game/ecaz-cards';
@@ -29,7 +29,16 @@ export function sampleInventory(game: Game) {
!game.moritaniAssassinatePreview
? null
: traitorDeck(
game.players.map((player) => ({ leaders: leaders(player.faction) })),
game.players.map((player) => ({
// Advanced CHOAM adds its printed extra Auditor disc during setup, so
// its Traitor Card is part of the physical deck.
leaders: [
...leaders(player.faction),
...(game.advanced && player.faction === 'choam'
? [createAuditorLeader()]
: []),
],
})),
game.expansions.includes('ix'),
).sort(),
};