32 lines
1.4 KiB
TypeScript
32 lines
1.4 KiB
TypeScript
import assert from 'node:assert/strict';
|
|
import { viewGame, type Game } from '../game/engine';
|
|
import { richeseHomeworldMarkerChoice } from '../game/homeworld-shipment-options';
|
|
import type { NoFieldValue } from '../game/richese-no-field';
|
|
import {
|
|
createRicheseHomeworldShipmentFixture,
|
|
passRicheseHomeworldShipment,
|
|
richeseHomeworldShipmentPlayer,
|
|
} from './fixture-richese-homeworld-shipment';
|
|
|
|
export const owner = 'richese';
|
|
export const native = 'homeworld:richese';
|
|
export const pass = passRicheseHomeworldShipment;
|
|
export const player = richeseHomeworldShipmentPlayer;
|
|
|
|
/** Public Richese/Emperor setup and actual shipment opportunity. The shared
|
|
* fixture controls unopened card/spice ordering and obtains ordinary funding;
|
|
* it does not stage the marker, forces, or an in-flight decision. */
|
|
export function freshNativeMarkerFixture(advanced: boolean, value: NoFieldValue = 3) {
|
|
const f = createRicheseHomeworldShipmentFixture({advanced, companions:1, value});
|
|
const game = f.game;
|
|
const view = viewGame(game, owner);
|
|
const token = view.richeseNoField?.private?.tokens.find(row => row.value === value);
|
|
assert.ok(token, 'The original hidden marker must be available');
|
|
const quote = richeseHomeworldMarkerChoice(view, native, token.id, 0);
|
|
return {game, view, token:token.id, quote};
|
|
}
|
|
|
|
export function nativeMarkerQuote(game: Game, token: string) {
|
|
return richeseHomeworldMarkerChoice(viewGame(game, owner), native, token, 0);
|
|
}
|