Repair deterministic Occupy test transitions and card staging

This commit is contained in:
Quintine committed 2026-10-09 02:53:09 +11:00
1 parent 38b1ba3419
commit f2fd274502
5 files changed
+61 -18

No files matched your search

+4 -1
View File
@@ -157,7 +157,10 @@ export function stageEcazOccupyCard(game: Game, owner: string,
assert.ok(donor, 'A conserved original physical card must supply this rule case.');
const donorIndex = donor.hand.findIndex(predicate);
card = donor.hand[donorIndex];
const replacement = player.hand.shift() ?? game.deck.shift();
// Keep previously staged battle cards when there is still hand capacity.
// A donor's replacement comes from the original deck, just as a direct
// staging draw does; only a full hand must fund it with a held card.
const replacement = player.hand.length >= 4 ? player.hand.shift() : game.deck.shift();
assert.ok(replacement, 'A conserved physical face must preserve the donor hand.');
donor.hand[donorIndex] = replacement;
}