Support group-funded Karama shipment pricing
Verify and publish checkpoint container / container (push) Canceled after 0s

This commit is contained in:
Quintine committed 2026-10-29 00:09:16 +11:00
1 parent 40c9651b80
commit 9cc659602c
7 files changed
+89 -10

No files matched your search

+29
View File
@@ -121,6 +121,35 @@ void test('group cross-planet shipment retains donor shares across permission an
conserved(game);
});
void test('group-funded purchased-rate cross-planet shipment keeps permission and pays the bank', () => {
const initial = fixture();
let {game} = initial;
// Keep Harkonnen's physical Karama available to exercise the permission
// window; the purchaser uses the other undealt physical Karama.
const index = game.deck.findIndex(card => card.effect === 'karama'); assert.ok(index >= 0);
const [karama] = game.deck.splice(index,1); seat(game,'e').hand.push(karama);
seat(game,'e').forces = {'imperial_basin:10':3}; seat(game,'e').reserves = 17;
game = fund(game,'e');
game = send(game,'e',{type:'card',mode:'shipment',card:karama.id});
assert.equal(game.karamaShipping?.player,'e');
game = send(game,'e',{type:'guildShip', forces:{'imperial_basin:10':3},
territory:'red_chasm', sector:7, allyPayment:0, coalitionContributions:shares('e')});
assert.equal(game.response?.kind,'guildTransportPermission');
assert.equal(seat(game,'e').forces['imperial_basin:10'],3);
assert.equal(pledge(game,'g','e'),2); assert.equal(pledge(game,'f','e'),2);
game = passKind(game,'guildTransportPermission');
assert.equal(game.response ?? null,null, 'Purchased rate and bank payment need no Guild-rate or income response.');
assert.equal(seat(game,'e').forces['red_chasm:7'],3);
assert.equal(seat(game,'e').forces['imperial_basin:10'] ?? 0,0);
assert.equal(seat(game,'e').spice,9);
assert.equal(seat(game,'g').spice,8, 'Guild receives none of the shipment payment.');
assert.equal(seat(game,'f').spice,8);
assert.equal(pledge(game,'g','e'),1); assert.equal(pledge(game,'f','e'),1);
assert.equal(game.karamaShipping,null);
assert.equal(game.discard.filter(card => card.id === karama.id).length,1);
conserved(game);
});
void test('Karama reprices the selected group shares while preserving cross-planet shipment and income', () => {
const initial = fixture();
let {game} = initial;