Compose selected E1/E2 independent cards with Nexus rules

Retain selected decks and original optional modules through normal setup, distinguish native Ixian Betrayal from absent-faction replacement, route explicit CHOAM fuel before printed effects, and preserve native No-Field invoices and pair continuation. Connect canonical native cancellation stock and existing human/minimal AI consumers.

Validation: 194 affected tests across 19 files, types/lint/build, bounded native invoice review and seven finite original-action/rendered-control programmes. Runtime ec5ad6c18996d8d958ec0d01132ef3e3ea6d23d36188902eca9a63d4db2efbf8; documentation-only proof overlay a5892004937434429916496497c07a3838a324b4a5d64d4a0eb804ab5212d5bd. Other envelopes, full combinations, comprehensive assurance and deployed acceptance remain open. No saved-room/provider changes.
This commit is contained in:
Quintine committed 2026-10-18 10:46:21 +11:00
1 parent 999edb67e6
commit 8422cf1f2d
20 files changed
+1413 -97

No files matched your search

@@ -22,6 +22,7 @@ export type IndependentCardModulesOptions = {
/** False keeps the original native deck for revealed-card comparisons. */
independent?: boolean;
homeworlds?: boolean;
nexus?: boolean;
};
/** Select only the original undealt fourteen-card lottery, never assignments. */
@@ -56,6 +57,7 @@ export function createIndependentCardModulesFixture(options: IndependentCardModu
advanced, options.expansions ?? []);
for (const faction of factions.slice(1)) joinGame(game, newPlayer(faction, faction, faction));
if (options.homeworlds) game = applyAction(game, game.host, { type: 'homeworlds', enabled: true });
if (options.nexus) game = applyAction(game, game.host, { type: 'moduleOption', module: 'nexusCards', enabled: true });
if (options.tech ?? true) game.techTokens = createTechTokens();
if (options.strongholds) game.strongholdCards = createStrongholdCards();
const steps: IndependentCardModulesStep[] = [];
@@ -106,6 +108,13 @@ export function createIndependentCardModulesFixture(options: IndependentCardModu
/** Reuse original native choices, including all phase/module windows. */
export function nextIndependentCardModulesStep(game: Game): IndependentCardModulesStep | null {
if (!game.response && !game.phaseOpening && !game.decision && game.nexusCards?.phase?.stage === 'drawing') {
const phase = game.nexusCards.phase;
const actor = phase.eligible.find(id => !phase.done.includes(id));
assert.ok(actor);
return { actor, action: { type: 'nexusCardChoice', turn: game.turn,
card: game.nexusCards.cards!.hands[actor] ?? null, choice: 'keep', ownRedraws: 0 } };
}
return nextStrongholdFactionsNativeStep(game);
}