Support printed Kull during market Ghola
Verify and publish checkpoint container / container (push) Successful in 11m25s
Verify and publish checkpoint container / container (push) Successful in 11m25s
This commit is contained in:
1 parent
79fc12c1c1
commit
bcca08cac5
10 files changed
+232
-25
No files matched your search
@@ -11,15 +11,17 @@ export const semutaMarketGholaInventory = inventory;
|
||||
/** Public Basic setup and real CHOAM market declaration. The original
|
||||
* starting card order and Spice positions are selected before they are drawn.
|
||||
* After setup, the real Ghola and Semuta cards are moved from their respective
|
||||
* decks to their owners' hands and one CHOAM reserve is moved to Tanks. Those
|
||||
* decks to their owners' hands and one CHOAM reserve is moved to Tanks. When
|
||||
* selected, physical Kull and a second Karama are also moved from the deck to
|
||||
* CHOAM and Tleilaxu respectively. Those
|
||||
* conserved staging choices establish the relevant holdings and casualty; no
|
||||
* response, market, discard receipt, wallet, revival or income is staged. */
|
||||
export function createSemutaMarketGholaFixture(options: {fullHand?: boolean; withoutTleilaxu?: boolean} = {}) {
|
||||
export function createSemutaMarketGholaFixture(options: {fullHand?: boolean; withoutTleilaxu?: boolean; withKull?: boolean} = {}) {
|
||||
const owner = 'choam', claimant = 'richese',
|
||||
incomeOwner = options.withoutTleilaxu ? 'atreides' : 'tleilaxu', counterOwner = 'emperor';
|
||||
let game = createGame('SEMUTAMARKETGHOLA', newPlayer(claimant, 'Richese', 'richese'), false, ['choam', 'ix']);
|
||||
for (const id of [owner, incomeOwner, counterOwner] as const) joinGame(game, newPlayer(id, id, id));
|
||||
game = act(game, claimant, {type:'moduleOption', module:'kullPreview', enabled:false});
|
||||
if (!options.withKull) game = act(game, claimant, {type:'moduleOption', module:'kullPreview', enabled:false});
|
||||
for (const seat of game.players) game = act(game, seat.id, {type:'ready'});
|
||||
game = act(game, claimant, {type:'start'});
|
||||
assert.equal(game.status, 'setup');
|
||||
@@ -45,6 +47,15 @@ export function createSemutaMarketGholaFixture(options: {fullHand?: boolean; wit
|
||||
player(game, claimant).hand.push(game.richeseCache!.splice(semutaIndex, 1)[0]);
|
||||
const gholaIndex = game.deck.findIndex(card => card.effect === 'ghola'); assert.ok(gholaIndex >= 0);
|
||||
const ghola = game.deck.splice(gholaIndex, 1)[0]; player(game, owner).hand.push(ghola);
|
||||
let kull: string | undefined, kullCounter: string | undefined;
|
||||
if (options.withKull) {
|
||||
assert.equal(game.kullPreview, true);
|
||||
const index = game.deck.findIndex(card => card.id === 'ix-kull-wahad'); assert.ok(index >= 0);
|
||||
const card = game.deck.splice(index, 1)[0]; player(game, owner).hand.push(card); kull = card.id;
|
||||
const counterIndex = game.deck.findIndex(candidate => candidate.effect === 'karama'); assert.ok(counterIndex >= 0);
|
||||
const secondCounter = game.deck.splice(counterIndex, 1)[0]; player(game, incomeOwner).hand.push(secondCounter);
|
||||
kullCounter = secondCounter.id;
|
||||
}
|
||||
const choam = player(game, owner); assert.ok(choam.reserves > 0);
|
||||
choam.reserves--; choam.tanks++;
|
||||
if (options.fullHand) while (player(game, claimant).hand.length < 4) {
|
||||
@@ -63,7 +74,7 @@ export function createSemutaMarketGholaFixture(options: {fullHand?: boolean; wit
|
||||
const event = game.pendingTreacheryDiscard!.batch.event;
|
||||
assert.deepEqual(inventory(game), originalInventory);
|
||||
return {game, source, owner, claimant, incomeOwner, counterOwner, ghola:ghola.id,
|
||||
semuta:SEMUTA_DRUG_ID, counter:counter.id, sale:sale.id, event, originalInventory,
|
||||
semuta:SEMUTA_DRUG_ID, counter:counter.id, sale:sale.id, event, originalInventory, kull, kullCounter,
|
||||
market, response, gholaAction, fullHand:!!options.fullHand};
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user