Guard Duke grants using public capture uncertainty
Verify and publish checkpoint container / container (push) Successful in 11m21s

This commit is contained in:
Quintine committed 2026-10-29 19:22:46 +11:00
1 parent 5f4eeee4f1
commit 57e7611468
15 files changed
+500 -19

No files matched your search

+20 -9
View File
@@ -281,15 +281,26 @@ void test('Advanced new-ally Duke grant transfers available shared custody while
assert.deepEqual(done.dukeVidal!.leader, duke!.leader);
}
}
const g = fixture(true);
g.players[2] = newPlayer('a', 'Harkonnen', 'harkonnen');
const entered = enter(g);
assert.ok(viewGame(entered, 'ec').ambassadorEntry!.dukeAcquisition!.blocked);
assert.equal(
viewGame(entered, 'ec').ambassadorEntry!.allianceOffer!.blocked,
null,
);
assert.equal(seat(answer(propose(entered), true), 'ec').ally, 'in');
for (const uncertainty of [false, true, undefined] as const) {
const g = fixture(true);
g.players[2] = newPlayer('a', 'Harkonnen', 'harkonnen');
if (uncertainty === undefined) delete g.dukeCaptureUncertain;
else g.dukeCaptureUncertain = uncertainty;
const duke = json(g).dukeVidal;
const entered = enter(g);
const entry = viewGame(entered, 'ec').ambassadorEntry!;
if (uncertainty === false) assert.equal(entry.dukeAcquisition!.blocked, null);
else assert.match(entry.dukeAcquisition!.blocked!, /Harkonnen capture history may be unresolved/);
assert.equal(entry.allianceOffer!.blocked, null);
const done = answer(propose(entered), true);
assert.equal(seat(done, 'ec').ally, 'in');
assert.equal(seat(done, 'in').ally, 'ec');
if (uncertainty === false) {
assert.equal(done.dukeVidal!.controller, 'in');
assert.equal(done.dukeVidal!.source, 'ally');
assert.deepEqual(done.dukeVidal!.leader, duke!.leader);
} else assert.deepEqual(done.dukeVidal, duke, 'An uncertain loan leaves the physical Duke unchanged.');
}
});
void test('changing BG private prediction and unrelated private hands does not change the public alliance offer', () => {