Skip to content

Commit

Permalink
Cloud Tourism should include this
Browse files Browse the repository at this point in the history
  • Loading branch information
kberg committed Jun 2, 2024
1 parent 7643703 commit 9765dd4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/server/cards/prelude2/CloudTourism.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ export class CloudTourism extends ActionCard {
// This does its own calculation because player.tags isn't robust enough at the moment
const counts = {
earth: player.tags.count(Tag.EARTH, 'raw'),
venus: player.tags.count(Tag.VENUS, 'raw'),
// The +1 is "including this"
venus: player.tags.count(Tag.VENUS, 'raw') + 1,
};
if (player.cardIsInEffect(CardName.EARTH_EMBASSY)) {
counts.earth += player.tags.count(Tag.MOON, 'raw');
Expand Down
10 changes: 5 additions & 5 deletions tests/cards/prelude2/CloudTourism.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ describe('CloudTourism', () => {
const playTests = [
{earth: 0, venus: 0, wild: 0, expected: 0},
{earth: 0, venus: 1, wild: 0, expected: 0},
{earth: 1, venus: 0, wild: 0, expected: 0},
{earth: 1, venus: 0, wild: 0, expected: 1},
{earth: 1, venus: 1, wild: 0, expected: 1},
{earth: 2, venus: 1, wild: 0, expected: 1},
{earth: 2, venus: 1, wild: 0, expected: 2},
{earth: 2, venus: 2, wild: 0, expected: 2},
{earth: 2, venus: 1, wild: 1, expected: 2},
{earth: 3, venus: 1, wild: 1, expected: 2},
{earth: 3, venus: 1, wild: 1, expected: 3},
{earth: 3, venus: 1, wild: 2, expected: 3},
{earth: 3, venus: 1, wild: 3, expected: 3},
{earth: 3, venus: 1, wild: 3, expected: 4},
{earth: 3, venus: 1, wild: 4, expected: 4},
] as const;
for (const run of playTests) {
Expand All @@ -39,7 +39,7 @@ describe('CloudTourism', () => {
{earth: 0, venus: 4, played: true, moon: 4, expected: 4},
{earth: 2, venus: 4, played: true, moon: 1, expected: 3},
{earth: 2, venus: 4, played: true, moon: 2, expected: 4},
{earth: 2, venus: 4, played: true, moon: 3, expected: 4},
{earth: 2, venus: 4, played: true, moon: 3, expected: 5},
] as const;
for (const run of earthEmbassyPlayTests) {
it('play, compatible with earth embassy ' + JSON.stringify(run), () => {
Expand Down

0 comments on commit 9765dd4

Please sign in to comment.