Support group-funded Karama shipment pricing
Verify and publish checkpoint container / container (push) Canceled after 0s
Verify and publish checkpoint container / container (push) Canceled after 0s
This commit is contained in:
1 parent
40c9651b80
commit
9cc659602c
7 files changed
+89
-10
No files matched your search
@@ -151,6 +151,30 @@ void test('Guild-allied group shipment uses half price and sends each non-Guild
|
||||
conserved(done);
|
||||
});
|
||||
|
||||
void test('a group-funded Karama shipment sends every payment to the bank', () => {
|
||||
const {game: initial, karama} = fixture();
|
||||
// Move the fixture's physical card to the shipper before buying the rate.
|
||||
player(initial, 'h').hand = player(initial, 'h').hand.filter(card => card.id !== karama.id);
|
||||
player(initial, 'a').hand.push(karama);
|
||||
let game = fundAlly(initial);
|
||||
game = send(game, 'a', {type:'card', card:karama.id, mode:'shipment'});
|
||||
assert.equal(game.karamaShipping?.player, 'a');
|
||||
assert.equal(viewGame(game, 'a').coalitionFunding?.incoming.length, 2,
|
||||
'Both existing pledges remain available after purchasing the rate.');
|
||||
game = send(game, 'a', discounted);
|
||||
assert.equal(game.response ?? null, null, 'Karama shipment payments do not trigger Guild income.');
|
||||
assert.equal(game.karamaShipping, null);
|
||||
assert.equal(player(game, 'a').spice, 9);
|
||||
assert.equal(player(game, 'g').spice, 7, 'Guild receives no payer share.');
|
||||
assert.equal(player(game, 'e').spice, 8);
|
||||
assert.equal(pledged(game, 'g', 'a'), 2);
|
||||
assert.equal(pledged(game, 'e', 'a'), 1);
|
||||
assert.equal(spiceIncludingEscrow(game), 37, 'All three spice went to the bank.');
|
||||
assert.equal(player(game, 'a').forces['red_chasm:7'], 3);
|
||||
assert.equal(game.discard.filter(card => card.id === karama.id).length, 1);
|
||||
conserved(game);
|
||||
});
|
||||
|
||||
void test('Karama removes the group Guild discount and preserves the declared donor shares', () => {
|
||||
const {game: initial, karama} = fixture();
|
||||
const declared = send(fundAlly(initial), 'a', discounted);
|
||||
|
||||
Reference in new issue
Block a user