Add opt-in printed Kull interception and saved counter continuation

This commit is contained in:
Quintine committed 2026-09-30 21:08:33 +10:00
1 parent 3285172eec
commit aeae152370
32 files changed
+2487 -146

No files matched your search

+16
View File
@@ -9,6 +9,7 @@ import {
type Game,
} from '../game/engine';
import { tableActionOwner } from '../game/table-turn';
import { choamKullGame, kullShipmentAttempt } from './fixture-choam-kull';
function battle(advanced = false) {
let g = createGame(
@@ -204,3 +205,18 @@ void test('full-plan prescience names its publicly selected target before either
assert.deepEqual(g.battle!.fullPlan, { owner: 'a', target: 'b' });
assert.deepEqual(owners(g), ['b', 'b', 'b', 'b']);
});
void test('real Kull offer gives CHOAM public decision ownership before the suspended actor', () => {
const initial = choamKullGame();
const choam = initial.players[0].id, actor = initial.players[1].id;
const offered = applyAction(initial, actor, kullShipmentAttempt(initial, actor));
assert.ok(offered.pendingKull);
assert.deepEqual(owners(offered), offered.players.map(() => choam));
const saved = JSON.parse(JSON.stringify(offered)) as Game;
assert.deepEqual(owners(saved), owners(offered));
const counter = applyAction(saved, choam, {
type: 'kullDecision', event: saved.pendingKull!.event, card: 'ix-kull-wahad',
});
assert.equal(counter.response?.kind, 'choamWorthless');
assert.deepEqual(owners(counter), counter.players.map(() => null));
});