Skip to content

Commit 9b2eb6d

Browse files
committed
Fixed tests, reran doit update_languages
1 parent 2f7d9c8 commit 9b2eb6d

5 files changed

Lines changed: 28 additions & 17 deletions

File tree

card_db_src/cards_db.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1696,8 +1696,8 @@
16961696
"group_tag": "Colony - Platinum",
16971697
"randomizer": false,
16981698
"types": [
1699-
"Victory",
1700-
"Treasure"
1699+
"Treasure",
1700+
"Victory"
17011701
]
17021702
},
17031703
{
1 Byte
Binary file not shown.

src/domdiv/card_db/sets_db.json.gz

37 Bytes
Binary file not shown.

tests/carddb_tests.py

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
def test_cardread():
1616
# we test the number of cards only to make sure it doesn't get changed
1717
# inadvertently by unrelated changes
18-
num_cards_expected = 1074
18+
num_cards_expected = 1148
1919

2020
total_cards = sum(c.num_ungrouped_cards for c in expected_card_counts)
2121
assert total_cards == num_cards_expected
@@ -44,6 +44,7 @@ def test_cardread():
4444
"prosperity2ndEditionUpgrade",
4545
"cornucopia1stEdition",
4646
"cornucopia1stEditionRemoved",
47+
"cornucopia2ndEdition",
4748
"cornucopia2ndEditionUpgrade",
4849
"cornucopiaAndGuilds2ndEdition",
4950
"hinterlands1stEdition",
@@ -53,6 +54,7 @@ def test_cardread():
5354
"darkAges",
5455
"guilds1stEdition",
5556
"guilds1stEditionRemoved",
57+
"guilds2ndEdition",
5658
"guilds2ndEditionUpgrade",
5759
"guilds-bigbox2-de",
5860
"adventures",
@@ -191,14 +193,14 @@ def assert_total_card_count(self, cards: list[Card]):
191193
),
192194
ExpectedSetCardCount(
193195
"prosperity1stEdition",
194-
25 + 2, # 25 kingdom, 2 base
195-
25 + 2, # no grouping
196+
25 + 2 + 1, # 25 kingdom, 2 base (Colony/Platinum), Colony-Platinum group header
197+
25 + 2 - 1, # Colony + Platinum grouped into Colony-Platinum
196198
300 - 25 - 1, # 300 cards printed, 25 blue kingdom randomizers, 1 blank
197199
),
198200
ExpectedSetCardCount(
199201
"prosperity2ndEdition",
200-
25 + 2, # 25 kingdom, 2 base
201-
25 + 2, # no grouping
202+
25 + 2 + 1, # 25 kingdom, 2 base (Colony/Platinum), Colony-Platinum group header
203+
25 + 2 - 1, # Colony + Platinum grouped into Colony-Platinum
202204
300 - 25 - 1, # 300 cards printed, 25 blue kingdom randomizers, 1 blank
203205
),
204206
ExpectedSetCardCount(
@@ -249,6 +251,12 @@ def assert_total_card_count(self, cards: list[Card]):
249251
5, # Prizes grouped with Tournament
250252
55,
251253
),
254+
ExpectedSetCardCount(
255+
"cornucopia2ndEdition",
256+
19, # 8 original + Joust + 10 rewards
257+
13, # rewards grouped with Joust
258+
144,
259+
),
252260
ExpectedSetCardCount(
253261
"cornucopia2ndEditionUpgrade",
254262
5 + 6, # 6 rewards
@@ -267,6 +275,12 @@ def assert_total_card_count(self, cards: list[Card]):
267275
3,
268276
30,
269277
),
278+
ExpectedSetCardCount(
279+
"guilds2ndEdition",
280+
13, # 10 original + 3 new cards
281+
13, # no grouping
282+
130,
283+
),
270284
ExpectedSetCardCount(
271285
"guilds2ndEditionUpgrade",
272286
3,
@@ -281,9 +295,8 @@ def assert_total_card_count(self, cards: list[Card]):
281295
),
282296
ExpectedSetCardCount( # There was only ever one upgrade pack sold for both cornucopia and guilds combined
283297
"darkAges",
284-
# TODO update when ungrouping ruins
285-
35 + 4 + 3, # 35 kingdom, spoils, ruins, madman, mercenary, 3 shelters.
286-
35 + 3, # spoils, ruins, shelters
298+
58, # 35 kingdom + Knights header + 10 individual knights + Ruins header + 5 individual ruins + Shelters header + 3 shelters + spoils + madman + mercenary
299+
39, # grouped: individual knights/ruins/shelters merged into group headers
287300
500 - 35, # 500 cards printed, 35 randomizers
288301
),
289302
ExpectedSetCardCount(
@@ -294,8 +307,7 @@ def assert_total_card_count(self, cards: list[Card]):
294307
),
295308
ExpectedSetCardCount(
296309
"empires",
297-
# TODO this includes all the split pile cards and also their randomizers.
298-
24 + 10 + 13 + 21, # 24 kingdom, 10 2-card split piles, 13 events, 21 landmarks
310+
76, # 24 kingdom, split pile cards, events, landmarks
299311
24 + 2,
300312
300 - 24,
301313
),
@@ -327,8 +339,7 @@ def assert_total_card_count(self, cards: list[Card]):
327339
),
328340
ExpectedSetCardCount(
329341
"plunder",
330-
# TODO update when ungrouping loot
331-
40 + 15 + 15 + 1, # 40 kingdom, 15 trait, 15 event, loot
342+
86, # 40 kingdom, traits, events, loot cards
332343
40 + 1 + 1 + 1, # 40 kingdom, traits, events, loot
333344
500 - 40,
334345
),
@@ -346,8 +357,8 @@ def assert_total_card_count(self, cards: list[Card]):
346357
),
347358
ExpectedSetCardCount(
348359
"base",
349-
11, # Curse, 4 victory, 4 treasure, potion, trash
350-
11,
360+
12, # Curse, 4 victory, 4 treasure, potion, trash, Colony-Platinum group header
361+
10, # Colony + Platinum grouped into Colony-Platinum
351362
250 - 1, # 250 printed, including 1 trash, 1 blank
352363
),
353364
ExpectedSetCardCount(

tests/selection_tests.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def test_group_special():
2828
assert gladiator_fortune.cost == "3*"
2929

3030
joust_matches = [c for c in cards if c.group_tag == "Joust and Rewards"]
31-
assert len(joust_matches) == 1
31+
assert len(joust_matches) == 2
3232
joust_rewards = joust_matches[0]
3333
assert joust_rewards.name.startswith("Joust")
3434
assert "Rewards" in joust_rewards.name

0 commit comments

Comments
 (0)