Card db refactoring (#105)
* Code refactoring for card db change (#86) This assumes the following file structure: ``` card_db/ cards_db.json sets_db.json <language>/ cards_text.json sets_text.json ``` Files that are needed are: - cards_db.json - cards_text.json and sets_text.json for each supported language **Other changes:** Added option called `--edition` that can be "1", "2", "latest", or "all". Defaults to "all". This allows for a quick filtering for those that don't want everything (i.e., "all"). - "1" is for all 1st editions of expansions. It also includes 2nd edition update packs. - "2" is for all 2nd editions of expansions. So base, Dominion 2nd ed., and Intrigue 2nd ed. (no update packs, since already in 2nd edition) - "latest" is for base, Dominion 2nd ed., and Intrigue 2nd ed., and all the remaining 1st editions. Cards can be grouped 3 ways: - No grouping (default) - In expansion grouping invoked with `--special_card_groups`. - Grouping across expansions with `--exclude_events` and `--exclude_landmarks`. These groups are placed in a set called "Extras". `--exclude_prizes` is not currently implemented. Added an option called `--upgrade_with_expansion` which will put the upgraded cards into the corresponding earlier expansion. So all 1st edition cards as well as the upgrade cards appear in the 1st edition set. That way the cards are listed on the expansion dividers and any tab/ordering fit the expansion as a whole. And because of the deleted cards in 2nd edition, this is a different list of cards than just using the 2nd edition. * update set image mapping for 2nd edition icons * add improved set icons from https://boardgamegeek.com/filepage/73273/dominion-card-icons-vector-images * recompress all images * new format for cards_db.json and translations * Added short name to sets * Updates to allow blank set images for base cards and fix blank set image for the "Extras" set. Also removed base_set.png which is no longer needed (again!) * scaled all set images to be exactly 300 x 300 pixels for consistency and better printing * Updated __init__.py and cards.py to automatically find the "lowest cost" value from all the cards in a group. * Update carddb_tests.py * Updated set information in testcases * Changed test of cardset to test cardset_tag instead. Since that is what everything keys off of now. * Updated the language tests to pull in the language parts before making the check. * Standardize on ISO8859-15 (#98) * Remove Trash Card from 2nd edition, replace HTML line breaks & unicode * Better Error Handling for Font Errors * Added text formating codes Added text formatting codes for "extra" and "description" fields. This includes: <tab> and <t> to add a tab (4 spaces) <n> as an alternative to \n (hard new line) <br> as an alternative to <br /> (soft new line) <c> and <center> to center text in this paragraph until the next hard new line <l> and <left> to left align text in this paragraph until the next hard new line <r> and <right> to right align text in this paragraph until the next hard new line. <line> to add a hard new line, a centered dividing line, and a trailing hard new line. <line> to put a centered line This goes with the <b>..</b> for bold, <i>..</i> for italics, and <u>..</u> for underline that was already existing (but probably not remembered. * Update card count presentation (#116) * wvoigt added automatic bonus highlighting (#119)
3652
card_db/cards_db.json
Normal file
18
card_db/de/bonuses_de.json
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"exclude": [
|
||||||
|
"Token",
|
||||||
|
"Tokens"
|
||||||
|
],
|
||||||
|
"include": [
|
||||||
|
"Coins",
|
||||||
|
"Coin",
|
||||||
|
"Karten",
|
||||||
|
"Karte",
|
||||||
|
"Käufe",
|
||||||
|
"Kauf",
|
||||||
|
"Aktionen",
|
||||||
|
"Aktion",
|
||||||
|
"Punkt",
|
||||||
|
"Punkte"
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -1,94 +0,0 @@
|
|||||||
{
|
|
||||||
"Tournament": {
|
|
||||||
"subcards": [
|
|
||||||
"Bag of Gold",
|
|
||||||
"Diadem",
|
|
||||||
"Followers",
|
|
||||||
"Princess",
|
|
||||||
"Trusty Steed"
|
|
||||||
],
|
|
||||||
"new_name": "Tournament and Prizes"
|
|
||||||
},
|
|
||||||
"Shelters": {
|
|
||||||
"subcards": [
|
|
||||||
"Hovel",
|
|
||||||
"Overgrown Estate",
|
|
||||||
"Necropolis"
|
|
||||||
],
|
|
||||||
"new_name": "Shelters"
|
|
||||||
},
|
|
||||||
"Page": {
|
|
||||||
"subcards": [
|
|
||||||
"Treasure Hunter",
|
|
||||||
"Warrior",
|
|
||||||
"Hero",
|
|
||||||
"Champion"
|
|
||||||
],
|
|
||||||
"new_name": "Page -> Champion"
|
|
||||||
},
|
|
||||||
"Peasant": {
|
|
||||||
"subcards": [
|
|
||||||
"Soldier",
|
|
||||||
"Fugitive",
|
|
||||||
"Disciple",
|
|
||||||
"Teacher"
|
|
||||||
],
|
|
||||||
"new_name": "Peasant -> Teacher"
|
|
||||||
},
|
|
||||||
"Hermit \/ Madman": {
|
|
||||||
"subcards": [
|
|
||||||
"Hermit",
|
|
||||||
"Madman"
|
|
||||||
],
|
|
||||||
"new_name": "Hermit \/ Madman"
|
|
||||||
},
|
|
||||||
"Urchin \/ Mercenary": {
|
|
||||||
"subcards": [
|
|
||||||
"Urchin",
|
|
||||||
"Mercenary"
|
|
||||||
],
|
|
||||||
"new_name": "Urchin \/ Mercenary"
|
|
||||||
},
|
|
||||||
"Catapult \/ Rocks" : {
|
|
||||||
"subcards": [
|
|
||||||
"Catapult",
|
|
||||||
"Rocks"
|
|
||||||
],
|
|
||||||
"new_name": "Catapult \/ Rocks"
|
|
||||||
},
|
|
||||||
"Encampment \/ Plunder": {
|
|
||||||
"subcards": [
|
|
||||||
"Encampment",
|
|
||||||
"Plunder"
|
|
||||||
],
|
|
||||||
"new_name": "Encampment \/ Plunder"
|
|
||||||
},
|
|
||||||
"Gladiator \/ Fortune": {
|
|
||||||
"subcards": [
|
|
||||||
"Gladiator",
|
|
||||||
"Fortune"
|
|
||||||
],
|
|
||||||
"new_name": "Gladiator \/ Fortune"
|
|
||||||
},
|
|
||||||
"Patrician \/ Emporium": {
|
|
||||||
"subcards": [
|
|
||||||
"Patrician",
|
|
||||||
"Emporium"
|
|
||||||
],
|
|
||||||
"new_name": "Patrician \/ Emporium"
|
|
||||||
},
|
|
||||||
"Settlers \/ Bustling Village": {
|
|
||||||
"subcards": [
|
|
||||||
"Settlers",
|
|
||||||
"Bustling Village"
|
|
||||||
],
|
|
||||||
"new_name": "Settlers \/ Bustling Village"
|
|
||||||
},
|
|
||||||
"Sauna \/ Avanto": {
|
|
||||||
"subcards": [
|
|
||||||
"Sauna",
|
|
||||||
"Avanto"
|
|
||||||
],
|
|
||||||
"new_name": "Sauna \/ Avanto"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
2265
card_db/de/cards_de.json
Normal file
@ -1,22 +0,0 @@
|
|||||||
{
|
|
||||||
"Blütezeit": "prosperity",
|
|
||||||
"Dominion": "dominion",
|
|
||||||
"Seaside": "seaside",
|
|
||||||
"Die Alchemisten": "alchemy",
|
|
||||||
"Hinterland": "hinterlands",
|
|
||||||
"Intrige": "intrigue",
|
|
||||||
"Reiche Ernte": "cornucopia",
|
|
||||||
"Abenteuer": "adventures",
|
|
||||||
"Dark Ages": "dark ages",
|
|
||||||
"Die Gilden": "guilds",
|
|
||||||
"Prinz": "prince",
|
|
||||||
"Schwarzmarkt": "black market",
|
|
||||||
"Einladung": "summon",
|
|
||||||
"Gouverneur": "Governor",
|
|
||||||
"Gesandter": "Envoy",
|
|
||||||
"Geldversteck": "Stash",
|
|
||||||
"Carcassonne": "Walled Village",
|
|
||||||
"Sauna \/ Eisloch": "Sauna \/ Avanto",
|
|
||||||
"Sauna": "Sauna",
|
|
||||||
"Eisloch": "Avanto"
|
|
||||||
}
|
|
||||||
96
card_db/de/sets_de.json
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
{
|
||||||
|
"adventures": {
|
||||||
|
"set_name": "Abenteuer",
|
||||||
|
"text_icon": "Ab"
|
||||||
|
},
|
||||||
|
"adventures extras": {
|
||||||
|
"set_name": "Adventures Extras",
|
||||||
|
"text_icon": "Ad"
|
||||||
|
},
|
||||||
|
"alchemy": {
|
||||||
|
"set_name": "Die Alchemisten",
|
||||||
|
"text_icon": "Al"
|
||||||
|
},
|
||||||
|
"base": {
|
||||||
|
"set_name": "Base",
|
||||||
|
"text_icon": "B"
|
||||||
|
},
|
||||||
|
"cornucopia": {
|
||||||
|
"set_name": "Reiche Ernte",
|
||||||
|
"text_icon": "RE"
|
||||||
|
},
|
||||||
|
"cornucopia extras": {
|
||||||
|
"set_name": "Cornucopia Extras",
|
||||||
|
"text_icon": "C"
|
||||||
|
},
|
||||||
|
"dark ages": {
|
||||||
|
"set_name": "Dark Ages",
|
||||||
|
"text_icon": "DA"
|
||||||
|
},
|
||||||
|
"dark ages extras": {
|
||||||
|
"set_name": "Dark Ages Extras",
|
||||||
|
"text_icon": "DA"
|
||||||
|
},
|
||||||
|
"dominion1stEdition": {
|
||||||
|
"set_name": "Dominion 1. Ausgabe",
|
||||||
|
"short_name": "Dominion",
|
||||||
|
"text_icon": "D1"
|
||||||
|
},
|
||||||
|
"dominion2ndEdition": {
|
||||||
|
"set_name": "Dominion 2. Ausgabe",
|
||||||
|
"short_name": "Dominion",
|
||||||
|
"text_icon": "D2"
|
||||||
|
},
|
||||||
|
"dominion2ndEditionUpgrade": {
|
||||||
|
"set_name": "Dominion 2. Ausgabe Aktualisierung",
|
||||||
|
"short_name": "Dominion",
|
||||||
|
"text_icon": "D2"
|
||||||
|
},
|
||||||
|
"empires": {
|
||||||
|
"set_name": "Empires",
|
||||||
|
"text_icon": "E"
|
||||||
|
},
|
||||||
|
"empires extras": {
|
||||||
|
"set_name": "Empires Extras",
|
||||||
|
"text_icon": "E"
|
||||||
|
},
|
||||||
|
"extras": {
|
||||||
|
"set_name": "Extras",
|
||||||
|
"text_icon": "Ex"
|
||||||
|
},
|
||||||
|
"guilds": {
|
||||||
|
"set_name": "Die Gilden",
|
||||||
|
"text_icon": "G"
|
||||||
|
},
|
||||||
|
"hinterlands": {
|
||||||
|
"set_name": "Hinterland",
|
||||||
|
"text_icon": "H"
|
||||||
|
},
|
||||||
|
"intrigue1stEdition": {
|
||||||
|
"set_name": "Intrige 2. Ausgabe",
|
||||||
|
"short_name": "Intrige",
|
||||||
|
"text_icon": "I1"
|
||||||
|
},
|
||||||
|
"intrigue2ndEdition": {
|
||||||
|
"set_name": "Intrige 2. Ausgabe",
|
||||||
|
"short_name": "Intrigue",
|
||||||
|
"text_icon": "I2"
|
||||||
|
},
|
||||||
|
"intrigue2ndEditionUpgrade": {
|
||||||
|
"set_name": "Intrige 2. Ausgabe Aktualisierung",
|
||||||
|
"short_name": "Intrigue",
|
||||||
|
"text_icon": "I2"
|
||||||
|
},
|
||||||
|
"promo": {
|
||||||
|
"set_name": "Promo",
|
||||||
|
"text_icon": "Pm"
|
||||||
|
},
|
||||||
|
"prosperity": {
|
||||||
|
"set_name": "Blütezeit",
|
||||||
|
"text_icon": "Bl"
|
||||||
|
},
|
||||||
|
"seaside": {
|
||||||
|
"set_name": "Seaside",
|
||||||
|
"text_icon": "S"
|
||||||
|
}
|
||||||
|
}
|
||||||
26
card_db/de/types_de.json
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"Action": "Aktion",
|
||||||
|
"Attack": "Angriff",
|
||||||
|
"Blank": "Blank",
|
||||||
|
"Castle": "Schloss",
|
||||||
|
"Curse": "Fluch",
|
||||||
|
"Duration": "Dauer",
|
||||||
|
"Event": "Ereigniss",
|
||||||
|
"Events": "Ereignisse",
|
||||||
|
"Expansion": "Expansion",
|
||||||
|
"Gathering": "Gathering",
|
||||||
|
"Landmark": "Wahrzeichen",
|
||||||
|
"Landmarks": "Wahrzeichen",
|
||||||
|
"Looter": "Plünderer",
|
||||||
|
"Prize": "Preis",
|
||||||
|
"Prizes": "Preise",
|
||||||
|
"Reaction": "Reaktion",
|
||||||
|
"Reserve": "Reserve",
|
||||||
|
"Ruins": "Ruinen",
|
||||||
|
"Shelter": "Unterschlupf",
|
||||||
|
"Shelters": "Unterschlupfe",
|
||||||
|
"Trash": "Müll",
|
||||||
|
"Traveller": "Reisender",
|
||||||
|
"Treasure": "Geld",
|
||||||
|
"Victory": "Punkte"
|
||||||
|
}
|
||||||
17
card_db/en_us/bonuses_en_us.json
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"exclude": [
|
||||||
|
"token",
|
||||||
|
"Tokens"
|
||||||
|
],
|
||||||
|
"include": [
|
||||||
|
"Coins",
|
||||||
|
"Coin",
|
||||||
|
"Cards",
|
||||||
|
"Card",
|
||||||
|
"Buys",
|
||||||
|
"Buy",
|
||||||
|
"Actions",
|
||||||
|
"Action",
|
||||||
|
"<VP>"
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -1,94 +0,0 @@
|
|||||||
{
|
|
||||||
"Tournament": {
|
|
||||||
"subcards": [
|
|
||||||
"Bag of Gold",
|
|
||||||
"Diadem",
|
|
||||||
"Followers",
|
|
||||||
"Princess",
|
|
||||||
"Trusty Steed"
|
|
||||||
],
|
|
||||||
"new_name": "Tournament and Prizes"
|
|
||||||
},
|
|
||||||
"Shelters": {
|
|
||||||
"subcards": [
|
|
||||||
"Hovel",
|
|
||||||
"Overgrown Estate",
|
|
||||||
"Necropolis"
|
|
||||||
],
|
|
||||||
"new_name": "Shelters"
|
|
||||||
},
|
|
||||||
"Page": {
|
|
||||||
"subcards": [
|
|
||||||
"Treasure Hunter",
|
|
||||||
"Warrior",
|
|
||||||
"Hero",
|
|
||||||
"Champion"
|
|
||||||
],
|
|
||||||
"new_name": "Page -> Champion"
|
|
||||||
},
|
|
||||||
"Peasant": {
|
|
||||||
"subcards": [
|
|
||||||
"Soldier",
|
|
||||||
"Fugitive",
|
|
||||||
"Disciple",
|
|
||||||
"Teacher"
|
|
||||||
],
|
|
||||||
"new_name": "Peasant -> Teacher"
|
|
||||||
},
|
|
||||||
"Hermit \/ Madman": {
|
|
||||||
"subcards": [
|
|
||||||
"Hermit",
|
|
||||||
"Madman"
|
|
||||||
],
|
|
||||||
"new_name": "Hermit \/ Madman"
|
|
||||||
},
|
|
||||||
"Urchin \/ Mercenary": {
|
|
||||||
"subcards": [
|
|
||||||
"Urchin",
|
|
||||||
"Mercenary"
|
|
||||||
],
|
|
||||||
"new_name": "Urchin \/ Mercenary"
|
|
||||||
},
|
|
||||||
"Catapult \/ Rocks": {
|
|
||||||
"subcards": [
|
|
||||||
"Catapult",
|
|
||||||
"Rocks"
|
|
||||||
],
|
|
||||||
"new_name": "Catapult \/ Rocks"
|
|
||||||
},
|
|
||||||
"Encampment \/ Plunder": {
|
|
||||||
"subcards": [
|
|
||||||
"Encampment",
|
|
||||||
"Plunder"
|
|
||||||
],
|
|
||||||
"new_name": "Encampment \/ Plunder"
|
|
||||||
},
|
|
||||||
"Gladiator \/ Fortune": {
|
|
||||||
"subcards": [
|
|
||||||
"Gladiator",
|
|
||||||
"Fortune"
|
|
||||||
],
|
|
||||||
"new_name": "Gladiator \/ Fortune"
|
|
||||||
},
|
|
||||||
"Patrician \/ Emporium": {
|
|
||||||
"subcards": [
|
|
||||||
"Patrician",
|
|
||||||
"Emporium"
|
|
||||||
],
|
|
||||||
"new_name": "Patrician \/ Emporium"
|
|
||||||
},
|
|
||||||
"Settlers \/ Bustling Village": {
|
|
||||||
"subcards": [
|
|
||||||
"Settlers",
|
|
||||||
"Bustling Village"
|
|
||||||
],
|
|
||||||
"new_name": "Settlers \/ Bustling Village"
|
|
||||||
},
|
|
||||||
"Sauna \/ Avanto": {
|
|
||||||
"subcards": [
|
|
||||||
"Sauna",
|
|
||||||
"Avanto"
|
|
||||||
],
|
|
||||||
"new_name": "Sauna \/ Avanto"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
1963
card_db/en_us/cards_en_us.json
Normal file
@ -1,2 +0,0 @@
|
|||||||
{
|
|
||||||
}
|
|
||||||
96
card_db/en_us/sets_en_us.json
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
{
|
||||||
|
"adventures": {
|
||||||
|
"set_name": "Adventures",
|
||||||
|
"text_icon": "Ad"
|
||||||
|
},
|
||||||
|
"adventures extras": {
|
||||||
|
"set_name": "Adventures Extras",
|
||||||
|
"text_icon": "Ad"
|
||||||
|
},
|
||||||
|
"alchemy": {
|
||||||
|
"set_name": "Alchemy",
|
||||||
|
"text_icon": "A"
|
||||||
|
},
|
||||||
|
"base": {
|
||||||
|
"set_name": "Base",
|
||||||
|
"text_icon": "B"
|
||||||
|
},
|
||||||
|
"cornucopia": {
|
||||||
|
"set_name": "Cornucopia",
|
||||||
|
"text_icon": "C"
|
||||||
|
},
|
||||||
|
"cornucopia extras": {
|
||||||
|
"set_name": "Cornucopia Extras",
|
||||||
|
"text_icon": "C"
|
||||||
|
},
|
||||||
|
"dark ages": {
|
||||||
|
"set_name": "Dark Ages",
|
||||||
|
"text_icon": "DA"
|
||||||
|
},
|
||||||
|
"dark ages extras": {
|
||||||
|
"set_name": "Dark Ages Extras",
|
||||||
|
"text_icon": "DA"
|
||||||
|
},
|
||||||
|
"dominion1stEdition": {
|
||||||
|
"set_name": "Dominion 1st Edition",
|
||||||
|
"short_name": "Dominion",
|
||||||
|
"text_icon": "D1"
|
||||||
|
},
|
||||||
|
"dominion2ndEdition": {
|
||||||
|
"set_name": "Dominion 2nd Edition",
|
||||||
|
"short_name": "Dominion",
|
||||||
|
"text_icon": "D2"
|
||||||
|
},
|
||||||
|
"dominion2ndEditionUpgrade": {
|
||||||
|
"set_name": "Dominion 2nd Edition Upgrade",
|
||||||
|
"short_name": "Dominion",
|
||||||
|
"text_icon": "D2"
|
||||||
|
},
|
||||||
|
"empires": {
|
||||||
|
"set_name": "Empires",
|
||||||
|
"text_icon": "E"
|
||||||
|
},
|
||||||
|
"empires extras": {
|
||||||
|
"set_name": "Empires Extras",
|
||||||
|
"text_icon": "E"
|
||||||
|
},
|
||||||
|
"extras": {
|
||||||
|
"set_name": "Extras",
|
||||||
|
"text_icon": "X"
|
||||||
|
},
|
||||||
|
"guilds": {
|
||||||
|
"set_name": "Guilds",
|
||||||
|
"text_icon": "G"
|
||||||
|
},
|
||||||
|
"hinterlands": {
|
||||||
|
"set_name": "Hinterlands",
|
||||||
|
"text_icon": "H"
|
||||||
|
},
|
||||||
|
"intrigue1stEdition": {
|
||||||
|
"set_name": "Intrigue 1st Edition",
|
||||||
|
"short_name": "Intrigue",
|
||||||
|
"text_icon": "I1"
|
||||||
|
},
|
||||||
|
"intrigue2ndEdition": {
|
||||||
|
"set_name": "Intrigue 2nd Edition",
|
||||||
|
"short_name": "Intrigue",
|
||||||
|
"text_icon": "I2"
|
||||||
|
},
|
||||||
|
"intrigue2ndEditionUpgrade": {
|
||||||
|
"set_name": "Intrigue 2nd Edition Upgrade",
|
||||||
|
"short_name": "Intrigue",
|
||||||
|
"text_icon": "I2"
|
||||||
|
},
|
||||||
|
"promo": {
|
||||||
|
"set_name": "Promo",
|
||||||
|
"text_icon": "Pm"
|
||||||
|
},
|
||||||
|
"prosperity": {
|
||||||
|
"set_name": "Prosperity",
|
||||||
|
"text_icon": "P"
|
||||||
|
},
|
||||||
|
"seaside": {
|
||||||
|
"set_name": "Seaside",
|
||||||
|
"text_icon": "S"
|
||||||
|
}
|
||||||
|
}
|
||||||
26
card_db/en_us/types_en_us.json
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"Action": "Action",
|
||||||
|
"Attack": "Attack",
|
||||||
|
"Blank": "Blank",
|
||||||
|
"Castle": "Castle",
|
||||||
|
"Curse": "Curse",
|
||||||
|
"Duration": "Duration",
|
||||||
|
"Event": "Event",
|
||||||
|
"Events": "Events",
|
||||||
|
"Expansion": "Expansion",
|
||||||
|
"Gathering": "Gathering",
|
||||||
|
"Landmark": "Landmark",
|
||||||
|
"Landmarks": "Landmarks",
|
||||||
|
"Looter": "Looter",
|
||||||
|
"Prize": "Prize",
|
||||||
|
"Prizes": "Prizes",
|
||||||
|
"Reaction": "Reaction",
|
||||||
|
"Reserve": "Reserve",
|
||||||
|
"Ruins": "Ruins",
|
||||||
|
"Shelter": "Shelter",
|
||||||
|
"Shelters": "Shelters",
|
||||||
|
"Trash": "Trash",
|
||||||
|
"Traveller": "Traveller",
|
||||||
|
"Treasure": "Treasure",
|
||||||
|
"Victory": "Victory"
|
||||||
|
}
|
||||||
16
card_db/fr/bonuses_fr.json
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"exclude": [
|
||||||
|
"token",
|
||||||
|
"Tokens"
|
||||||
|
],
|
||||||
|
"include": [
|
||||||
|
"Coins",
|
||||||
|
"Coin",
|
||||||
|
"Cards",
|
||||||
|
"Card",
|
||||||
|
"Buys",
|
||||||
|
"Buy",
|
||||||
|
"Actions",
|
||||||
|
"Action"
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -1,94 +0,0 @@
|
|||||||
{
|
|
||||||
"Tournament": {
|
|
||||||
"subcards": [
|
|
||||||
"Bag of Gold",
|
|
||||||
"Diadem",
|
|
||||||
"Followers",
|
|
||||||
"Princess",
|
|
||||||
"Trusty Steed"
|
|
||||||
],
|
|
||||||
"new_name": "Tournament and Prizes"
|
|
||||||
},
|
|
||||||
"Shelters": {
|
|
||||||
"subcards": [
|
|
||||||
"Hovel",
|
|
||||||
"Overgrown Estate",
|
|
||||||
"Necropolis"
|
|
||||||
],
|
|
||||||
"new_name": "Shelters"
|
|
||||||
},
|
|
||||||
"Page": {
|
|
||||||
"subcards": [
|
|
||||||
"Treasure Hunter",
|
|
||||||
"Warrior",
|
|
||||||
"Hero",
|
|
||||||
"Champion"
|
|
||||||
],
|
|
||||||
"new_name": "Page -> Champion"
|
|
||||||
},
|
|
||||||
"Peasant": {
|
|
||||||
"subcards": [
|
|
||||||
"Soldier",
|
|
||||||
"Fugitive",
|
|
||||||
"Disciple",
|
|
||||||
"Teacher"
|
|
||||||
],
|
|
||||||
"new_name": "Peasant -> Teacher"
|
|
||||||
},
|
|
||||||
"Hermit \/ Madman": {
|
|
||||||
"subcards": [
|
|
||||||
"Hermit",
|
|
||||||
"Madman"
|
|
||||||
],
|
|
||||||
"new_name": "Hermit \/ Madman"
|
|
||||||
},
|
|
||||||
"Urchin \/ Mercenary": {
|
|
||||||
"subcards": [
|
|
||||||
"Urchin",
|
|
||||||
"Mercenary"
|
|
||||||
],
|
|
||||||
"new_name": "Urchin \/ Mercenary"
|
|
||||||
},
|
|
||||||
"Catapult \/ Rocks": {
|
|
||||||
"subcards": [
|
|
||||||
"Catapult",
|
|
||||||
"Rocks"
|
|
||||||
],
|
|
||||||
"new_name": "Catapult \/ Rocks"
|
|
||||||
},
|
|
||||||
"Encampment \/ Plunder": {
|
|
||||||
"subcards": [
|
|
||||||
"Encampment",
|
|
||||||
"Plunder"
|
|
||||||
],
|
|
||||||
"new_name": "Encampment \/ Plunder"
|
|
||||||
},
|
|
||||||
"Gladiator \/ Fortune": {
|
|
||||||
"subcards": [
|
|
||||||
"Gladiator",
|
|
||||||
"Fortune"
|
|
||||||
],
|
|
||||||
"new_name": "Gladiator \/ Fortune"
|
|
||||||
},
|
|
||||||
"Patrician \/ Emporium": {
|
|
||||||
"subcards": [
|
|
||||||
"Patrician",
|
|
||||||
"Emporium"
|
|
||||||
],
|
|
||||||
"new_name": "Patrician \/ Emporium"
|
|
||||||
},
|
|
||||||
"Settlers \/ Bustling Village": {
|
|
||||||
"subcards": [
|
|
||||||
"Settlers",
|
|
||||||
"Bustling Village"
|
|
||||||
],
|
|
||||||
"new_name": "Settlers \/ Bustling Village"
|
|
||||||
},
|
|
||||||
"Sauna \/ Avanto": {
|
|
||||||
"subcards": [
|
|
||||||
"Sauna",
|
|
||||||
"Avanto"
|
|
||||||
],
|
|
||||||
"new_name": "Sauna \/ Avanto"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
2312
card_db/fr/cards_fr.json
Normal file
@ -1,11 +0,0 @@
|
|||||||
{
|
|
||||||
"alchimie": "alchemy",
|
|
||||||
"l'intrigue": "intrigue",
|
|
||||||
"l'arrière-pays": "hinterlands",
|
|
||||||
"prosperité": "prosperity",
|
|
||||||
"rivages": "seaside",
|
|
||||||
"abondance": "cornucopia",
|
|
||||||
"age des ténèbres": "dark ages",
|
|
||||||
"guildes": "guilds",
|
|
||||||
"aventures": "adventures"
|
|
||||||
}
|
|
||||||
96
card_db/fr/sets_fr.json
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
{
|
||||||
|
"adventures": {
|
||||||
|
"set_name": "Aventures",
|
||||||
|
"text_icon": "Ad"
|
||||||
|
},
|
||||||
|
"adventures extras": {
|
||||||
|
"set_name": "Adventures Extras",
|
||||||
|
"text_icon": "Ad"
|
||||||
|
},
|
||||||
|
"alchemy": {
|
||||||
|
"set_name": "Alchimie",
|
||||||
|
"text_icon": "Al"
|
||||||
|
},
|
||||||
|
"base": {
|
||||||
|
"set_name": "Base",
|
||||||
|
"text_icon": "B"
|
||||||
|
},
|
||||||
|
"cornucopia": {
|
||||||
|
"set_name": "Abondance",
|
||||||
|
"text_icon": "Ab"
|
||||||
|
},
|
||||||
|
"cornucopia extras": {
|
||||||
|
"set_name": "Cornucopia Extras",
|
||||||
|
"text_icon": "C"
|
||||||
|
},
|
||||||
|
"dark ages": {
|
||||||
|
"set_name": "Age Des Ténèbres",
|
||||||
|
"text_icon": "AT"
|
||||||
|
},
|
||||||
|
"dark ages extras": {
|
||||||
|
"set_name": "Dark Ages Extras",
|
||||||
|
"text_icon": "DA"
|
||||||
|
},
|
||||||
|
"dominion1stEdition": {
|
||||||
|
"set_name": "Dominion 1er Édition",
|
||||||
|
"short_name": "Dominion",
|
||||||
|
"text_icon": "D1"
|
||||||
|
},
|
||||||
|
"dominion2ndEdition": {
|
||||||
|
"set_name": "Dominion 2e Édition",
|
||||||
|
"short_name": "Dominion",
|
||||||
|
"text_icon": "D2"
|
||||||
|
},
|
||||||
|
"dominion2ndEditionUpgrade": {
|
||||||
|
"set_name": "Dominion 2e Édition Surclassement",
|
||||||
|
"short_name": "Dominion",
|
||||||
|
"text_icon": "D2"
|
||||||
|
},
|
||||||
|
"empires": {
|
||||||
|
"set_name": "Empires",
|
||||||
|
"text_icon": "E"
|
||||||
|
},
|
||||||
|
"empires extras": {
|
||||||
|
"set_name": "Empires Extras",
|
||||||
|
"text_icon": "E"
|
||||||
|
},
|
||||||
|
"extras": {
|
||||||
|
"set_name": "Supplémentaire",
|
||||||
|
"text_icon": "S"
|
||||||
|
},
|
||||||
|
"guilds": {
|
||||||
|
"set_name": "Guildes",
|
||||||
|
"text_icon": "G"
|
||||||
|
},
|
||||||
|
"hinterlands": {
|
||||||
|
"set_name": "L'Arrière-pays",
|
||||||
|
"text_icon": "Ar"
|
||||||
|
},
|
||||||
|
"intrigue1stEdition": {
|
||||||
|
"set_name": "L'Intrigue 1er Édition",
|
||||||
|
"short_name": "L'Intrigue",
|
||||||
|
"text_icon": "I1"
|
||||||
|
},
|
||||||
|
"intrigue2ndEdition": {
|
||||||
|
"set_name": "L'Intrigue 2e Édition",
|
||||||
|
"short_name": "L'Intrigue",
|
||||||
|
"text_icon": "I2"
|
||||||
|
},
|
||||||
|
"intrigue2ndEditionUpgrade": {
|
||||||
|
"set_name": "L'Intrigue 2e Édition Surclassement",
|
||||||
|
"short_name": "L'Intrigue",
|
||||||
|
"text_icon": "I2"
|
||||||
|
},
|
||||||
|
"promo": {
|
||||||
|
"set_name": "Promo",
|
||||||
|
"text_icon": "Pm"
|
||||||
|
},
|
||||||
|
"prosperity": {
|
||||||
|
"set_name": "Prosperité",
|
||||||
|
"text_icon": "P"
|
||||||
|
},
|
||||||
|
"seaside": {
|
||||||
|
"set_name": "Rivages",
|
||||||
|
"text_icon": "R"
|
||||||
|
}
|
||||||
|
}
|
||||||
26
card_db/fr/types_fr.json
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"Action": "Action",
|
||||||
|
"Attack": "Attack",
|
||||||
|
"Blank": "Blank",
|
||||||
|
"Castle": "Castle",
|
||||||
|
"Curse": "Curse",
|
||||||
|
"Duration": "Duration",
|
||||||
|
"Event": "Event",
|
||||||
|
"Events": "Events",
|
||||||
|
"Expansion": "Expansion",
|
||||||
|
"Gathering": "Gathering",
|
||||||
|
"Landmark": "Landmark",
|
||||||
|
"Landmarks": "Landmarks",
|
||||||
|
"Looter": "Looter",
|
||||||
|
"Prize": "Prize",
|
||||||
|
"Prizes": "Prizes",
|
||||||
|
"Reaction": "Reaction",
|
||||||
|
"Reserve": "Reserve",
|
||||||
|
"Ruins": "Ruins",
|
||||||
|
"Shelter": "Shelter",
|
||||||
|
"Shelters": "Shelters",
|
||||||
|
"Trash": "Trash",
|
||||||
|
"Traveller": "Traveller",
|
||||||
|
"Treasure": "Treasure",
|
||||||
|
"Victory": "Victory"
|
||||||
|
}
|
||||||
16
card_db/it/bonuses_it.json
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"exclude": [
|
||||||
|
"token",
|
||||||
|
"Tokens"
|
||||||
|
],
|
||||||
|
"include": [
|
||||||
|
"Monete",
|
||||||
|
"Moneta",
|
||||||
|
"Carte",
|
||||||
|
"Carta",
|
||||||
|
"Acquisti",
|
||||||
|
"Acquisto",
|
||||||
|
"Azioni",
|
||||||
|
"Azione"
|
||||||
|
]
|
||||||
|
}
|
||||||
@ -1,94 +0,0 @@
|
|||||||
{
|
|
||||||
"Tournament": {
|
|
||||||
"subcards": [
|
|
||||||
"Bag of Gold",
|
|
||||||
"Diadem",
|
|
||||||
"Followers",
|
|
||||||
"Princess",
|
|
||||||
"Trusty Steed"
|
|
||||||
],
|
|
||||||
"new_name": "Tournament and Prizes"
|
|
||||||
},
|
|
||||||
"Shelters": {
|
|
||||||
"subcards": [
|
|
||||||
"Hovel",
|
|
||||||
"Overgrown Estate",
|
|
||||||
"Necropolis"
|
|
||||||
],
|
|
||||||
"new_name": "Shelters"
|
|
||||||
},
|
|
||||||
"Page": {
|
|
||||||
"subcards": [
|
|
||||||
"Treasure Hunter",
|
|
||||||
"Warrior",
|
|
||||||
"Hero",
|
|
||||||
"Champion"
|
|
||||||
],
|
|
||||||
"new_name": "Page -> Champion"
|
|
||||||
},
|
|
||||||
"Peasant": {
|
|
||||||
"subcards": [
|
|
||||||
"Soldier",
|
|
||||||
"Fugitive",
|
|
||||||
"Disciple",
|
|
||||||
"Teacher"
|
|
||||||
],
|
|
||||||
"new_name": "Peasant -> Teacher"
|
|
||||||
},
|
|
||||||
"Hermit \/ Madman": {
|
|
||||||
"subcards": [
|
|
||||||
"Hermit",
|
|
||||||
"Madman"
|
|
||||||
],
|
|
||||||
"new_name": "Hermit \/ Madman"
|
|
||||||
},
|
|
||||||
"Urchin \/ Mercenary": {
|
|
||||||
"subcards": [
|
|
||||||
"Urchin",
|
|
||||||
"Mercenary"
|
|
||||||
],
|
|
||||||
"new_name": "Urchin \/ Mercenary"
|
|
||||||
},
|
|
||||||
"Catapult \/ Rocks": {
|
|
||||||
"subcards": [
|
|
||||||
"Catapult",
|
|
||||||
"Rocks"
|
|
||||||
],
|
|
||||||
"new_name": "Catapult \/ Rocks"
|
|
||||||
},
|
|
||||||
"Encampment \/ Plunder": {
|
|
||||||
"subcards": [
|
|
||||||
"Encampment",
|
|
||||||
"Plunder"
|
|
||||||
],
|
|
||||||
"new_name": "Encampment \/ Plunder"
|
|
||||||
},
|
|
||||||
"Gladiator \/ Fortune": {
|
|
||||||
"subcards": [
|
|
||||||
"Gladiator",
|
|
||||||
"Fortune"
|
|
||||||
],
|
|
||||||
"new_name": "Gladiator \/ Fortune"
|
|
||||||
},
|
|
||||||
"Patrician \/ Emporium": {
|
|
||||||
"subcards": [
|
|
||||||
"Patrician",
|
|
||||||
"Emporium"
|
|
||||||
],
|
|
||||||
"new_name": "Patrician \/ Emporium"
|
|
||||||
},
|
|
||||||
"Settlers \/ Bustling Village": {
|
|
||||||
"subcards": [
|
|
||||||
"Settlers",
|
|
||||||
"Bustling Village"
|
|
||||||
],
|
|
||||||
"new_name": "Settlers \/ Bustling Village"
|
|
||||||
},
|
|
||||||
"Sauna \/ Avanto": {
|
|
||||||
"subcards": [
|
|
||||||
"Sauna",
|
|
||||||
"Avanto"
|
|
||||||
],
|
|
||||||
"new_name": "Sauna \/ Avanto"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
2145
card_db/it/cards_it.json
Normal file
@ -1,7 +0,0 @@
|
|||||||
{
|
|
||||||
"alchimia": "alchemy",
|
|
||||||
"intrigo": "intrigue",
|
|
||||||
"nuovi orizzonti": "hinterlands",
|
|
||||||
"prosperità": "prosperity"
|
|
||||||
}
|
|
||||||
|
|
||||||
96
card_db/it/sets_it.json
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
{
|
||||||
|
"adventures": {
|
||||||
|
"set_name": "Adventures",
|
||||||
|
"text_icon": "Ad"
|
||||||
|
},
|
||||||
|
"adventures extras": {
|
||||||
|
"set_name": "Adventures Extras",
|
||||||
|
"text_icon": "Ad"
|
||||||
|
},
|
||||||
|
"alchemy": {
|
||||||
|
"set_name": "Alchimia",
|
||||||
|
"text_icon": "Al"
|
||||||
|
},
|
||||||
|
"base": {
|
||||||
|
"set_name": "Base",
|
||||||
|
"text_icon": "B"
|
||||||
|
},
|
||||||
|
"cornucopia": {
|
||||||
|
"set_name": "Cornucopia",
|
||||||
|
"text_icon": "C"
|
||||||
|
},
|
||||||
|
"cornucopia extras": {
|
||||||
|
"set_name": "Cornucopia Extras",
|
||||||
|
"text_icon": "C"
|
||||||
|
},
|
||||||
|
"dark ages": {
|
||||||
|
"set_name": "Dark Ages",
|
||||||
|
"text_icon": "D"
|
||||||
|
},
|
||||||
|
"dark ages extras": {
|
||||||
|
"set_name": "Dark Ages Extras",
|
||||||
|
"text_icon": "DA"
|
||||||
|
},
|
||||||
|
"dominion1stEdition": {
|
||||||
|
"set_name": "Dominion 1° Edizione",
|
||||||
|
"short_name": "Dominion",
|
||||||
|
"text_icon": "D1"
|
||||||
|
},
|
||||||
|
"dominion2ndEdition": {
|
||||||
|
"set_name": "Dominion 2° Edizione",
|
||||||
|
"short_name": "Dominion",
|
||||||
|
"text_icon": "D2"
|
||||||
|
},
|
||||||
|
"dominion2ndEditionUpgrade": {
|
||||||
|
"set_name": "Dominion 2° Edizione di Aggiornamento",
|
||||||
|
"short_name": "Dominion",
|
||||||
|
"text_icon": "D2"
|
||||||
|
},
|
||||||
|
"empires": {
|
||||||
|
"set_name": "Empires",
|
||||||
|
"text_icon": "E"
|
||||||
|
},
|
||||||
|
"empires extras": {
|
||||||
|
"set_name": "Empires Extras",
|
||||||
|
"text_icon": "E"
|
||||||
|
},
|
||||||
|
"extras": {
|
||||||
|
"set_name": "Extra",
|
||||||
|
"text_icon": "Ex"
|
||||||
|
},
|
||||||
|
"guilds": {
|
||||||
|
"set_name": "Guilds",
|
||||||
|
"text_icon": "G"
|
||||||
|
},
|
||||||
|
"hinterlands": {
|
||||||
|
"set_name": "Nuovi Orizzonti",
|
||||||
|
"text_icon": "NO"
|
||||||
|
},
|
||||||
|
"intrigue1stEdition": {
|
||||||
|
"set_name": "Intrigo 2° Edizione",
|
||||||
|
"short_name": "Intrigo",
|
||||||
|
"text_icon": "I1"
|
||||||
|
},
|
||||||
|
"intrigue2ndEdition": {
|
||||||
|
"set_name": "Intrigo 2° Edizione",
|
||||||
|
"short_name": "Intrigo",
|
||||||
|
"text_icon": "I2"
|
||||||
|
},
|
||||||
|
"intrigue2ndEditionUpgrade": {
|
||||||
|
"set_name": "Intrigo 2° Edizione di Aggiornamento",
|
||||||
|
"short_name": "Intrigo",
|
||||||
|
"text_icon": "I2"
|
||||||
|
},
|
||||||
|
"promo": {
|
||||||
|
"set_name": "Promo",
|
||||||
|
"text_icon": "Pm"
|
||||||
|
},
|
||||||
|
"prosperity": {
|
||||||
|
"set_name": "Prosperità",
|
||||||
|
"text_icon": "P"
|
||||||
|
},
|
||||||
|
"seaside": {
|
||||||
|
"set_name": "Seaside",
|
||||||
|
"text_icon": "S"
|
||||||
|
}
|
||||||
|
}
|
||||||
26
card_db/it/types_it.json
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"Action": "Action",
|
||||||
|
"Attack": "Attack",
|
||||||
|
"Blank": "Blank",
|
||||||
|
"Castle": "Castle",
|
||||||
|
"Curse": "Curse",
|
||||||
|
"Duration": "Duration",
|
||||||
|
"Event": "Event",
|
||||||
|
"Events": "Events",
|
||||||
|
"Expansion": "Expansion",
|
||||||
|
"Gathering": "Gathering",
|
||||||
|
"Landmark": "Landmark",
|
||||||
|
"Landmarks": "Landmarks",
|
||||||
|
"Looter": "Looter",
|
||||||
|
"Prize": "Prize",
|
||||||
|
"Prizes": "Prizes",
|
||||||
|
"Reaction": "Reaction",
|
||||||
|
"Reserve": "Reserve",
|
||||||
|
"Ruins": "Ruins",
|
||||||
|
"Shelter": "Shelter",
|
||||||
|
"Shelters": "Shelters",
|
||||||
|
"Trash": "Trash",
|
||||||
|
"Traveller": "Traveller",
|
||||||
|
"Treasure": "Treasure",
|
||||||
|
"Victory": "Victory"
|
||||||
|
}
|
||||||
17
card_db/nl_du/bonuses_nl_du.json
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"exclude": [
|
||||||
|
"fiche",
|
||||||
|
"Token",
|
||||||
|
"Tokens"
|
||||||
|
],
|
||||||
|
"include": [
|
||||||
|
"Coins",
|
||||||
|
"Coin",
|
||||||
|
"Kaarten",
|
||||||
|
"Kaart",
|
||||||
|
"Aanschaffen",
|
||||||
|
"Aanschaf",
|
||||||
|
"Acties",
|
||||||
|
"Actie"
|
||||||
|
]
|
||||||
|
}
|
||||||
2057
card_db/nl_du/cards_nl_du.json
Normal file
96
card_db/nl_du/sets_nl_du.json
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
{
|
||||||
|
"adventures": {
|
||||||
|
"set_name": "Avonturen",
|
||||||
|
"text_icon": "Av"
|
||||||
|
},
|
||||||
|
"adventures extras": {
|
||||||
|
"set_name": "Avonturen Extras",
|
||||||
|
"text_icon": "Av"
|
||||||
|
},
|
||||||
|
"alchemy": {
|
||||||
|
"set_name": "Alchemisten",
|
||||||
|
"text_icon": "A"
|
||||||
|
},
|
||||||
|
"base": {
|
||||||
|
"set_name": "Basis",
|
||||||
|
"text_icon": "B"
|
||||||
|
},
|
||||||
|
"cornucopia": {
|
||||||
|
"set_name": "Overvloed",
|
||||||
|
"text_icon": "O"
|
||||||
|
},
|
||||||
|
"cornucopia extras": {
|
||||||
|
"set_name": "Overvloed Extras",
|
||||||
|
"text_icon": "O"
|
||||||
|
},
|
||||||
|
"dark ages": {
|
||||||
|
"set_name": "De Donkere Middeleeuwen",
|
||||||
|
"text_icon": "DM"
|
||||||
|
},
|
||||||
|
"dark ages extras": {
|
||||||
|
"set_name": "De Donkere Middeleeuwen Extras",
|
||||||
|
"text_icon": "DM"
|
||||||
|
},
|
||||||
|
"dominion1stEdition": {
|
||||||
|
"set_name": "Dominion 1st Edition",
|
||||||
|
"short_name": "Dominion",
|
||||||
|
"text_icon": "D1"
|
||||||
|
},
|
||||||
|
"dominion2ndEdition": {
|
||||||
|
"set_name": "Dominion 2nd Edition",
|
||||||
|
"short_name": "Dominion",
|
||||||
|
"text_icon": "D2"
|
||||||
|
},
|
||||||
|
"dominion2ndEditionUpgrade": {
|
||||||
|
"set_name": "Dominion 2nd Edition Upgrade",
|
||||||
|
"short_name": "Dominion",
|
||||||
|
"text_icon": "D2"
|
||||||
|
},
|
||||||
|
"empires": {
|
||||||
|
"set_name": "Empires",
|
||||||
|
"text_icon": "E"
|
||||||
|
},
|
||||||
|
"empires extras": {
|
||||||
|
"set_name": "Empires Extras",
|
||||||
|
"text_icon": "E"
|
||||||
|
},
|
||||||
|
"extras": {
|
||||||
|
"set_name": "Extras",
|
||||||
|
"text_icon": "X"
|
||||||
|
},
|
||||||
|
"guilds": {
|
||||||
|
"set_name": "Gilden",
|
||||||
|
"text_icon": "G"
|
||||||
|
},
|
||||||
|
"hinterlands": {
|
||||||
|
"set_name": "Achterland",
|
||||||
|
"text_icon": "Ac"
|
||||||
|
},
|
||||||
|
"intrigue1stEdition": {
|
||||||
|
"set_name": "Intrige 1st Edition",
|
||||||
|
"short_name": "Intrige",
|
||||||
|
"text_icon": "I1"
|
||||||
|
},
|
||||||
|
"intrigue2ndEdition": {
|
||||||
|
"set_name": "Intrige 2nd Edition",
|
||||||
|
"short_name": "Intrige",
|
||||||
|
"text_icon": "I2"
|
||||||
|
},
|
||||||
|
"intrigue2ndEditionUpgrade": {
|
||||||
|
"set_name": "Intrige 2nd Edition Upgrade",
|
||||||
|
"short_name": "Intrige",
|
||||||
|
"text_icon": "I2"
|
||||||
|
},
|
||||||
|
"promo": {
|
||||||
|
"set_name": "Promo",
|
||||||
|
"text_icon": "Pm"
|
||||||
|
},
|
||||||
|
"prosperity": {
|
||||||
|
"set_name": "Welvaart",
|
||||||
|
"text_icon": "W"
|
||||||
|
},
|
||||||
|
"seaside": {
|
||||||
|
"set_name": "Hijs De Zeilen",
|
||||||
|
"text_icon": "HZ"
|
||||||
|
}
|
||||||
|
}
|
||||||
26
card_db/nl_du/types_nl_du.json
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"Action": "Actie",
|
||||||
|
"Attack": "Attack",
|
||||||
|
"Blank": "Blank",
|
||||||
|
"Castle": "Castle",
|
||||||
|
"Curse": "Curse",
|
||||||
|
"Duration": "Duration",
|
||||||
|
"Event": "Event",
|
||||||
|
"Events": "Events",
|
||||||
|
"Expansion": "Expansion",
|
||||||
|
"Gathering": "Gathering",
|
||||||
|
"Landmark": "Landmark",
|
||||||
|
"Landmarks": "Landmarks",
|
||||||
|
"Looter": "Looter",
|
||||||
|
"Prize": "Prijs",
|
||||||
|
"Prizes": "Prijzen",
|
||||||
|
"Reaction": "Reaction",
|
||||||
|
"Reserve": "Reserve",
|
||||||
|
"Ruins": "Ruïne",
|
||||||
|
"Shelter": "Shelter",
|
||||||
|
"Shelters": "Shelters",
|
||||||
|
"Trash": "Vernietigde Kaarten",
|
||||||
|
"Traveller": "Traveller",
|
||||||
|
"Treasure": "Treasure",
|
||||||
|
"Victory": "Victory"
|
||||||
|
}
|
||||||
206
card_db/sets_db.json
Normal file
@ -0,0 +1,206 @@
|
|||||||
|
{
|
||||||
|
"adventures": {
|
||||||
|
"edition": [
|
||||||
|
"1",
|
||||||
|
"latest"
|
||||||
|
],
|
||||||
|
"image": "adventures_set.png",
|
||||||
|
"set_name": "*adventures*",
|
||||||
|
"text_icon": "*"
|
||||||
|
},
|
||||||
|
"adventures extras": {
|
||||||
|
"edition": [
|
||||||
|
"1",
|
||||||
|
"latest"
|
||||||
|
],
|
||||||
|
"image": "adventures_set.png",
|
||||||
|
"no_randomizer": true,
|
||||||
|
"set_name": "*adventures extras*",
|
||||||
|
"text_icon": "*"
|
||||||
|
},
|
||||||
|
"alchemy": {
|
||||||
|
"edition": [
|
||||||
|
"1",
|
||||||
|
"latest"
|
||||||
|
],
|
||||||
|
"image": "alchemy_set.png",
|
||||||
|
"set_name": "*alchemy*",
|
||||||
|
"text_icon": "*"
|
||||||
|
},
|
||||||
|
"base": {
|
||||||
|
"edition": [
|
||||||
|
"1",
|
||||||
|
"2",
|
||||||
|
"latest"
|
||||||
|
],
|
||||||
|
"image": "",
|
||||||
|
"set_name": "*base*",
|
||||||
|
"text_icon": "*"
|
||||||
|
},
|
||||||
|
"cornucopia": {
|
||||||
|
"edition": [
|
||||||
|
"1",
|
||||||
|
"latest"
|
||||||
|
],
|
||||||
|
"image": "cornucopia_set.png",
|
||||||
|
"set_name": "*cornucopia*",
|
||||||
|
"text_icon": "*"
|
||||||
|
},
|
||||||
|
"cornucopia extras": {
|
||||||
|
"edition": [
|
||||||
|
"1",
|
||||||
|
"latest"
|
||||||
|
],
|
||||||
|
"image": "cornucopia_set.png",
|
||||||
|
"no_randomizer": true,
|
||||||
|
"set_name": "*cornucopia extras*",
|
||||||
|
"text_icon": "*"
|
||||||
|
},
|
||||||
|
"dark ages": {
|
||||||
|
"edition": [
|
||||||
|
"1",
|
||||||
|
"latest"
|
||||||
|
],
|
||||||
|
"image": "dark_ages_set.png",
|
||||||
|
"set_name": "*dark ages*",
|
||||||
|
"text_icon": "*"
|
||||||
|
},
|
||||||
|
"dark ages extras": {
|
||||||
|
"edition": [
|
||||||
|
"1",
|
||||||
|
"latest"
|
||||||
|
],
|
||||||
|
"image": "dark_ages_set.png",
|
||||||
|
"no_randomizer": true,
|
||||||
|
"set_name": "*dark ages extras*",
|
||||||
|
"text_icon": "*"
|
||||||
|
},
|
||||||
|
"dominion1stEdition": {
|
||||||
|
"edition": [
|
||||||
|
"1"
|
||||||
|
],
|
||||||
|
"image": "dominion1stEdition_set.png",
|
||||||
|
"set_name": "*dominion1stEdition*",
|
||||||
|
"short_name": "Dominion",
|
||||||
|
"text_icon": "*"
|
||||||
|
},
|
||||||
|
"dominion2ndEdition": {
|
||||||
|
"edition": [
|
||||||
|
"2",
|
||||||
|
"latest"
|
||||||
|
],
|
||||||
|
"image": "dominion2ndEdition_set.png",
|
||||||
|
"set_name": "*dominion2ndEdition*",
|
||||||
|
"short_name": "Dominion",
|
||||||
|
"text_icon": "*"
|
||||||
|
},
|
||||||
|
"dominion2ndEditionUpgrade": {
|
||||||
|
"edition": [
|
||||||
|
"1"
|
||||||
|
],
|
||||||
|
"image": "dominion2ndEdition_set.png",
|
||||||
|
"set_name": "*dominion2ndEditionUpgrade*",
|
||||||
|
"text_icon": "*"
|
||||||
|
},
|
||||||
|
"empires": {
|
||||||
|
"edition": [
|
||||||
|
"1",
|
||||||
|
"latest"
|
||||||
|
],
|
||||||
|
"image": "empires_set.png",
|
||||||
|
"set_name": "*empires*",
|
||||||
|
"text_icon": "*"
|
||||||
|
},
|
||||||
|
"empires extras": {
|
||||||
|
"edition": [
|
||||||
|
"1",
|
||||||
|
"latest"
|
||||||
|
],
|
||||||
|
"image": "empires_set.png",
|
||||||
|
"no_randomizer": true,
|
||||||
|
"set_name": "*empires extras*",
|
||||||
|
"text_icon": "*"
|
||||||
|
},
|
||||||
|
"extras": {
|
||||||
|
"edition": [
|
||||||
|
"1",
|
||||||
|
"latest"
|
||||||
|
],
|
||||||
|
"image": "",
|
||||||
|
"no_randomizer": true,
|
||||||
|
"set_name": "*extras*",
|
||||||
|
"text_icon": "*"
|
||||||
|
},
|
||||||
|
"guilds": {
|
||||||
|
"edition": [
|
||||||
|
"1",
|
||||||
|
"latest"
|
||||||
|
],
|
||||||
|
"image": "guilds_set.png",
|
||||||
|
"set_name": "*guilds*",
|
||||||
|
"text_icon": "*"
|
||||||
|
},
|
||||||
|
"hinterlands": {
|
||||||
|
"edition": [
|
||||||
|
"1",
|
||||||
|
"latest"
|
||||||
|
],
|
||||||
|
"image": "hinterlands_set.png",
|
||||||
|
"set_name": "*hinterlands*",
|
||||||
|
"text_icon": "*"
|
||||||
|
},
|
||||||
|
"intrigue1stEdition": {
|
||||||
|
"edition": [
|
||||||
|
"1"
|
||||||
|
],
|
||||||
|
"image": "intrigue1stEdition_set.png",
|
||||||
|
"set_name": "*intrigue1stEdition*",
|
||||||
|
"short_name": "Intrigue",
|
||||||
|
"text_icon": "*"
|
||||||
|
},
|
||||||
|
"intrigue2ndEdition": {
|
||||||
|
"edition": [
|
||||||
|
"2",
|
||||||
|
"latest"
|
||||||
|
],
|
||||||
|
"image": "intrigue2ndEdition_set.png",
|
||||||
|
"set_name": "*intrigue2ndEdition*",
|
||||||
|
"short_name": "Intrigue",
|
||||||
|
"text_icon": "*"
|
||||||
|
},
|
||||||
|
"intrigue2ndEditionUpgrade": {
|
||||||
|
"edition": [
|
||||||
|
"1"
|
||||||
|
],
|
||||||
|
"image": "intrigue2ndEdition_set.png",
|
||||||
|
"set_name": "*intrigue2ndEditionUpgrade*",
|
||||||
|
"text_icon": "*"
|
||||||
|
},
|
||||||
|
"promo": {
|
||||||
|
"edition": [
|
||||||
|
"1",
|
||||||
|
"latest"
|
||||||
|
],
|
||||||
|
"image": "promo_set.png",
|
||||||
|
"set_name": "*promo*",
|
||||||
|
"text_icon": "*"
|
||||||
|
},
|
||||||
|
"prosperity": {
|
||||||
|
"edition": [
|
||||||
|
"1",
|
||||||
|
"latest"
|
||||||
|
],
|
||||||
|
"image": "prosperity_set.png",
|
||||||
|
"set_name": "*prosperity*",
|
||||||
|
"text_icon": "*"
|
||||||
|
},
|
||||||
|
"seaside": {
|
||||||
|
"edition": [
|
||||||
|
"1",
|
||||||
|
"latest"
|
||||||
|
],
|
||||||
|
"image": "seaside_set.png",
|
||||||
|
"set_name": "*seaside*",
|
||||||
|
"text_icon": "*"
|
||||||
|
}
|
||||||
|
}
|
||||||
138
card_db/translation.txt
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
# Translation Instructions
|
||||||
|
|
||||||
|
## File Format
|
||||||
|
/card_db/
|
||||||
|
xx/
|
||||||
|
bonuses_xx.json
|
||||||
|
cards_xx.json
|
||||||
|
sets_xx.json
|
||||||
|
types_xx.json
|
||||||
|
|
||||||
|
where xx is ISO 639-1 standard language code in lower case with under bar '_' replacing dash '-'
|
||||||
|
Please rename the directory and the files to match the language you are providing.
|
||||||
|
|
||||||
|
|
||||||
|
## Character encoding
|
||||||
|
The files:
|
||||||
|
bonuses_xx.json
|
||||||
|
cards_xx.json
|
||||||
|
sets_xx.json
|
||||||
|
types_xx.json
|
||||||
|
must be encoded in ISO 8859-15, also known as "Latin alphabet no. 9"
|
||||||
|
This character set is used throughout the Americas, Western Europe, Oceania, and much of Africa.
|
||||||
|
It is also commonly used in most standard romanizations of East-Asian languages.
|
||||||
|
|
||||||
|
If you have a language that is not supported by ISO 8859-15 please contact the developers.
|
||||||
|
|
||||||
|
|
||||||
|
## Anatomy of sets_xx.json
|
||||||
|
Entries in this file represent Dominion sets/expansions. A typical entry looks like:
|
||||||
|
"alchemy": {
|
||||||
|
"set_name": "Alchimia",
|
||||||
|
"text_icon": "Al"
|
||||||
|
},
|
||||||
|
|
||||||
|
The set key word (e.g., "alchemy" for the above entry) MUST NOT BE CHANGED. This value is used to identify the translation entry.
|
||||||
|
The key word "set_name" MUST NOT BE CHANGED, but the value after the : should be changed to the name of the set in the target language.
|
||||||
|
The key word "text_icon" MUST NOT BE CHANGED, but the value after the : should be a one or two letter identifier to be used by the set if the set graphics are not displayed. This is usually the first letter of the set name in the target language.
|
||||||
|
Do not change any punctuation outside of the quotes '"'. For example, brackets '{' or '}', colons ':', quotes '"' or commas ','.
|
||||||
|
|
||||||
|
|
||||||
|
## Anatomy of bonuses_xx.json
|
||||||
|
Entries in this file represent Dominion bonuses. The items in the "include" list are items that will be marked bold (i.e., <b>..</b>)
|
||||||
|
when found in the card text in the following format:
|
||||||
|
+# item_from_include_list
|
||||||
|
as long as this is not followed by a item from the "exclude" list.
|
||||||
|
For example in English:
|
||||||
|
"+2 Buys" will be made bold, but
|
||||||
|
"+1 Action token" will not, since the key word token follows.
|
||||||
|
|
||||||
|
Just replace the English terms with the terms used in the target language.
|
||||||
|
Generally you should include the singular as well as the plural version of the term.
|
||||||
|
English versions do not need to be duplicated, since they are used automatically.
|
||||||
|
The key words "exclude" and "include" MUST NOT BE CHANGED.
|
||||||
|
Do not change any punctuation outside of the quotes '"'. For example, brackets '{' or '}', colons ':', quotes '"' or commas ','.
|
||||||
|
|
||||||
|
## Anatomy of types_xx.json
|
||||||
|
Entries in this file represent Dominion card types. A typical entry looks like:
|
||||||
|
"Action": "Action in new language",
|
||||||
|
|
||||||
|
The type key word (i.e., the "Action": for the above entry) MUST NOT BE CHANGED. This value is used to identify the translation entry.
|
||||||
|
Do not change any punctuation outside of the quotes '"'. For example, brackets '{' or '}', colons ':', quotes '"' or commas ','.
|
||||||
|
|
||||||
|
## Anatomy of cards_xx.json
|
||||||
|
Entries in this file represent Dominion cards, and groups of cards. A typical entry looks like:
|
||||||
|
"Gold": {
|
||||||
|
"description": "Worth 3 Coins.",
|
||||||
|
"extra": "30 cards per game.",
|
||||||
|
"name": "Gold",
|
||||||
|
"untranslated" : "description, extra, name"
|
||||||
|
},
|
||||||
|
The card key word (e.g., "Gold": for the above entry) MUST NOT BE CHANGED. This value is used to identify the translation entry.
|
||||||
|
The key word "name" MUST NOT BE CHANGED, but the value after the : should be changed to the name of the card in the target language.
|
||||||
|
The key word "description" MUST NOT BE CHANGED, but the value after the : should be changed to the card text in the target language.
|
||||||
|
The key word "extra" MUST NOT BE CHANGED, but the value after the : should be changed to any extra rules or explanations for the card in the target language. If you purposely want no extra text, enter "".
|
||||||
|
The key word "untranslated" MUST NOT BE CHANGED, but the value after the : should be changed. Removed any key word for which you have provided a translation.
|
||||||
|
For example:
|
||||||
|
- if you provided the "name" of the card, and only the "name", then change to "description, extra"
|
||||||
|
- if you provided the "name" of the card and it's "description", but have not translated the "extra", then change to "extra"
|
||||||
|
- if you provided all 3 entries, then change to ""
|
||||||
|
The "untranslated" entry is used during maintanance of the language files to update any remaining default language entries that might have changed.
|
||||||
|
|
||||||
|
|
||||||
|
## Special Text
|
||||||
|
These character sequences have special meaning in the "description" and "extra" text:
|
||||||
|
|
||||||
|
'<b>' ... '</b>' for bold
|
||||||
|
'<i>' ... '</i>' for italics
|
||||||
|
'<u>' ... '</u>' for underline
|
||||||
|
'<tab>' and '<t>' and '\t' to add a tab (4 spaces)
|
||||||
|
'<n>' and '\n' for a "hard new line"
|
||||||
|
'<br>' and '<br/>' and '<br />' for a "soft new line"
|
||||||
|
'<c>' and '<center>' add hard new line and center text until the next hard new line
|
||||||
|
'<l>' and '<left>' add hard new line and left align text until the next hard new line
|
||||||
|
'<r>' and '<right>' add hard new line and right align text until the next hard new line
|
||||||
|
'<j>' and '<justify>' add hard new line and justify align text until the next hard new line
|
||||||
|
'<line>' to add a hard new line, a centered dividing line, and a trailing hard new line
|
||||||
|
|
||||||
|
Hard new lines ('\n' and '<n>'), will reset the paragraph formatting back to the default.
|
||||||
|
Soft new lines will insert a new line, but will continue the current formatting.
|
||||||
|
The "description" will be default to "center" text.
|
||||||
|
The "extra" will default to "justify" text.
|
||||||
|
|
||||||
|
## Special Images
|
||||||
|
Special character sequences are recognized by the program to substitute graphics in the text. These include:
|
||||||
|
|
||||||
|
'<VP>' and ' VP ' for a Victory Point graphic
|
||||||
|
'Potion' for a small Potion graphic
|
||||||
|
'# Coin' where # is a number 0 - 13, a question mark '?', '_', or the letters 'empty' for a small coin graphic with the # on top
|
||||||
|
'# Coins' where # is a number 0 - 13, a question mark '?', '_', or the letters 'empty' for a small coin graphic with the # on top
|
||||||
|
'# coin' where # is a number 0 - 13, a question mark '?', '_', or the letters 'empty' for a small coin graphic with the # on top
|
||||||
|
'# coins' where # is a number 0 - 13, a question mark '?', '_', or the letters 'empty' for a small coin graphic with the # on top
|
||||||
|
For example:
|
||||||
|
- the text '1 coin' would produce a graphic of a coin with the number 1 on top.
|
||||||
|
- the text 'empty coin' and '_ coin' would produce a graphic of only a coin.
|
||||||
|
|
||||||
|
'# <*COIN*>' where # is a number 0 - 13, will produce a large coin graphic with the # on top
|
||||||
|
'# <*VP*>' where # is a number, will produce a large Victory Point graphic with the # before it
|
||||||
|
'# <*POTION*>' where # is a number, will produce a large Potion graphic with the # before it
|
||||||
|
|
||||||
|
To keep the special images, please do not translate '<VP>', 'Potion', or the 'coin' variations into the target language.
|
||||||
|
|
||||||
|
## Style Guide
|
||||||
|
|
||||||
|
- If bonuses_xx.json for the target language is configured correctly, bonuses within the text will automatically be bolded.
|
||||||
|
It will not bold the text if it is followed by 'token' or 'Token'.
|
||||||
|
Example: "Choose one: +3 Cards; or +2 Actions." will bold '+3 Cards' and '+2 Actions'.
|
||||||
|
|
||||||
|
- Bonuses should be listed in the following order:
|
||||||
|
+Cards, +Actions, +Buys, +Coins, then +<VP>
|
||||||
|
|
||||||
|
- When possible, bonuses should be listed vertically and centered.
|
||||||
|
Examples: "+1 Card<br>+1 Action<br>+1 Buy<br>+1 Coin<br>+2 <VP><n>"
|
||||||
|
"+1 Card\n+1 Action\n+1 Buy\n+1 Coin\n+2 <VP>\n"
|
||||||
|
The "description" field by default is centered. '<br>', '<n>', and '\n' will all provide new lines.
|
||||||
|
|
||||||
|
- If a Dividers/Tab has more than one card explanation, if space permits, try to mimic a stand alone Dividers/Tab in the overall format.
|
||||||
|
Example from "Settlers - Bustling Village": "<left><u>Settlers</u>:<n>+1 Card<br>+1 Action<n>Look through your discard pile. You may reveal a Copper from it and put it into your hand.<n><left><u>Bustling Village</u>:<n><center>+1 Card<br>+3 Actions<n>Look through your discard pile. You may reveal a Settlers from it and put it into your hand."
|
||||||
|
|
||||||
371
card_db/types_db.json
Normal file
@ -0,0 +1,371 @@
|
|||||||
|
[{
|
||||||
|
"card_type": [
|
||||||
|
"Action"
|
||||||
|
],
|
||||||
|
"card_type_image": "action.png",
|
||||||
|
"defaultCardCount": 10,
|
||||||
|
"tabCostHeightOffset": -1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Action",
|
||||||
|
"Attack"
|
||||||
|
],
|
||||||
|
"card_type_image": "action.png",
|
||||||
|
"defaultCardCount": 10,
|
||||||
|
"tabCostHeightOffset": -1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Action",
|
||||||
|
"Attack",
|
||||||
|
"Duration"
|
||||||
|
],
|
||||||
|
"card_type_image": "duration.png",
|
||||||
|
"defaultCardCount": 10,
|
||||||
|
"tabCostHeightOffset": -1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Action",
|
||||||
|
"Attack",
|
||||||
|
"Looter"
|
||||||
|
],
|
||||||
|
"card_type_image": "action.png",
|
||||||
|
"defaultCardCount": 10,
|
||||||
|
"tabCostHeightOffset": -1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Action",
|
||||||
|
"Attack",
|
||||||
|
"Prize"
|
||||||
|
],
|
||||||
|
"card_type_image": "action.png",
|
||||||
|
"defaultCardCount": 1,
|
||||||
|
"tabCostHeightOffset": -1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Action",
|
||||||
|
"Attack",
|
||||||
|
"Traveller"
|
||||||
|
],
|
||||||
|
"card_type_image": "action.png",
|
||||||
|
"defaultCardCount": 5,
|
||||||
|
"tabCostHeightOffset": -1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Action",
|
||||||
|
"Duration"
|
||||||
|
],
|
||||||
|
"card_type_image": "duration.png",
|
||||||
|
"defaultCardCount": 10,
|
||||||
|
"tabCostHeightOffset": -1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Action",
|
||||||
|
"Duration",
|
||||||
|
"Reaction"
|
||||||
|
],
|
||||||
|
"card_type_image": "duration-reaction.png",
|
||||||
|
"defaultCardCount": 10,
|
||||||
|
"tabCostHeightOffset": -1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Action",
|
||||||
|
"Gathering"
|
||||||
|
],
|
||||||
|
"card_type_image": "action.png",
|
||||||
|
"defaultCardCount": 10,
|
||||||
|
"tabCostHeightOffset": -1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Action",
|
||||||
|
"Looter"
|
||||||
|
],
|
||||||
|
"card_type_image": "action.png",
|
||||||
|
"defaultCardCount": 10,
|
||||||
|
"tabCostHeightOffset": -1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Action",
|
||||||
|
"Prize"
|
||||||
|
],
|
||||||
|
"card_type_image": "action.png",
|
||||||
|
"defaultCardCount": 1,
|
||||||
|
"tabCostHeightOffset": -1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Action",
|
||||||
|
"Reaction"
|
||||||
|
],
|
||||||
|
"card_type_image": "reaction.png",
|
||||||
|
"defaultCardCount": 10,
|
||||||
|
"tabCostHeightOffset": -1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Action",
|
||||||
|
"Reserve"
|
||||||
|
],
|
||||||
|
"card_type_image": "reserve.png",
|
||||||
|
"defaultCardCount": 10,
|
||||||
|
"tabCostHeightOffset": -1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Action",
|
||||||
|
"Reserve",
|
||||||
|
"Victory"
|
||||||
|
],
|
||||||
|
"card_type_image": "reserve-victory.png",
|
||||||
|
"defaultCardCount": 12,
|
||||||
|
"tabCostHeightOffset": -1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Action",
|
||||||
|
"Ruins"
|
||||||
|
],
|
||||||
|
"card_type_image": "ruins.png",
|
||||||
|
"defaultCardCount": 10,
|
||||||
|
"tabCostHeightOffset": 1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Action",
|
||||||
|
"Shelter"
|
||||||
|
],
|
||||||
|
"card_type_image": "action-shelter.png",
|
||||||
|
"defaultCardCount": 6,
|
||||||
|
"tabCostHeightOffset": -1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Action",
|
||||||
|
"Traveller"
|
||||||
|
],
|
||||||
|
"card_type_image": "action.png",
|
||||||
|
"defaultCardCount": 5,
|
||||||
|
"tabCostHeightOffset": -1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Action",
|
||||||
|
"Treasure"
|
||||||
|
],
|
||||||
|
"card_type_image": "action-treasure.png",
|
||||||
|
"defaultCardCount": 10,
|
||||||
|
"tabCostHeightOffset": -1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Action",
|
||||||
|
"Victory"
|
||||||
|
],
|
||||||
|
"card_type_image": "action-victory.png",
|
||||||
|
"defaultCardCount": 12,
|
||||||
|
"tabCostHeightOffset": -1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Blank"
|
||||||
|
],
|
||||||
|
"card_type_image": "",
|
||||||
|
"defaultCardCount": 10,
|
||||||
|
"tabCostHeightOffset": -1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Curse"
|
||||||
|
],
|
||||||
|
"card_type_image": "curse.png",
|
||||||
|
"defaultCardCount": 30,
|
||||||
|
"tabCostHeightOffset": -1,
|
||||||
|
"tabTextHeightOffset": 3
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Event"
|
||||||
|
],
|
||||||
|
"card_type_image": "event.png",
|
||||||
|
"defaultCardCount": 1,
|
||||||
|
"tabCostHeightOffset": -1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Events"
|
||||||
|
],
|
||||||
|
"card_type_image": "event.png",
|
||||||
|
"defaultCardCount": 0,
|
||||||
|
"tabCostHeightOffset": -1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Expansion"
|
||||||
|
],
|
||||||
|
"card_type_image": "expansion.png",
|
||||||
|
"defaultCardCount": 0,
|
||||||
|
"tabCostHeightOffset": -1,
|
||||||
|
"tabTextHeightOffset": 4
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Landmark"
|
||||||
|
],
|
||||||
|
"card_type_image": "landmark.png",
|
||||||
|
"defaultCardCount": 1,
|
||||||
|
"tabCostHeightOffset": -1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Landmarks"
|
||||||
|
],
|
||||||
|
"card_type_image": "landmark.png",
|
||||||
|
"defaultCardCount": 0,
|
||||||
|
"tabCostHeightOffset": -1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Prize"
|
||||||
|
],
|
||||||
|
"card_type_image": "action.png",
|
||||||
|
"defaultCardCount": 1,
|
||||||
|
"tabCostHeightOffset": -1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Prizes"
|
||||||
|
],
|
||||||
|
"card_type_image": "action.png",
|
||||||
|
"defaultCardCount": 0,
|
||||||
|
"tabCostHeightOffset": -1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Reaction"
|
||||||
|
],
|
||||||
|
"card_type_image": "reaction.png",
|
||||||
|
"defaultCardCount": 10,
|
||||||
|
"tabCostHeightOffset": -1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Reaction",
|
||||||
|
"Shelter"
|
||||||
|
],
|
||||||
|
"card_type_image": "reaction-shelter.png",
|
||||||
|
"defaultCardCount": 6,
|
||||||
|
"tabCostHeightOffset": -1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Shelters"
|
||||||
|
],
|
||||||
|
"card_type_image": "shelter.png",
|
||||||
|
"defaultCardCount": 0,
|
||||||
|
"tabCostHeightOffset": -1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Trash"
|
||||||
|
],
|
||||||
|
"card_type_image": "action.png",
|
||||||
|
"defaultCardCount": 1,
|
||||||
|
"tabCostHeightOffset": -1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Treasure"
|
||||||
|
],
|
||||||
|
"card_type_image": "treasure.png",
|
||||||
|
"defaultCardCount": 10,
|
||||||
|
"tabCostHeightOffset": 0,
|
||||||
|
"tabTextHeightOffset": 3
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Treasure",
|
||||||
|
"Attack"
|
||||||
|
],
|
||||||
|
"card_type_image": "treasure.png",
|
||||||
|
"defaultCardCount": 10,
|
||||||
|
"tabCostHeightOffset": -1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Treasure",
|
||||||
|
"Prize"
|
||||||
|
],
|
||||||
|
"card_type_image": "treasure.png",
|
||||||
|
"defaultCardCount": 1,
|
||||||
|
"tabCostHeightOffset": 0,
|
||||||
|
"tabTextHeightOffset": 3
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Treasure",
|
||||||
|
"Reaction"
|
||||||
|
],
|
||||||
|
"card_type_image": "treasure-reaction.png",
|
||||||
|
"defaultCardCount": 10,
|
||||||
|
"tabCostHeightOffset": 1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Treasure",
|
||||||
|
"Reserve"
|
||||||
|
],
|
||||||
|
"card_type_image": "reserve-treasure.png",
|
||||||
|
"defaultCardCount": 10,
|
||||||
|
"tabCostHeightOffset": -1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Treasure",
|
||||||
|
"Victory"
|
||||||
|
],
|
||||||
|
"card_type_image": "treasure-victory.png",
|
||||||
|
"defaultCardCount": 12,
|
||||||
|
"tabCostHeightOffset": -1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Victory"
|
||||||
|
],
|
||||||
|
"card_type_image": "victory.png",
|
||||||
|
"defaultCardCount": 12,
|
||||||
|
"tabCostHeightOffset": -1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Victory",
|
||||||
|
"Castle"
|
||||||
|
],
|
||||||
|
"card_type_image": "victory.png",
|
||||||
|
"defaultCardCount": 12,
|
||||||
|
"tabCostHeightOffset": -1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Victory",
|
||||||
|
"Reaction"
|
||||||
|
],
|
||||||
|
"card_type_image": "victory-reaction.png",
|
||||||
|
"defaultCardCount": 12,
|
||||||
|
"tabCostHeightOffset": 1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
},{
|
||||||
|
"card_type": [
|
||||||
|
"Victory",
|
||||||
|
"Shelter"
|
||||||
|
],
|
||||||
|
"card_type_image": "victory-shelter.png",
|
||||||
|
"defaultCardCount": 6,
|
||||||
|
"tabCostHeightOffset": -1,
|
||||||
|
"tabTextHeightOffset": 0
|
||||||
|
}
|
||||||
|
]
|
||||||
16
card_db/xx/bonuses_xx.json
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"exclude": [
|
||||||
|
"token",
|
||||||
|
"Tokens"
|
||||||
|
],
|
||||||
|
"include": [
|
||||||
|
"Coins",
|
||||||
|
"Coin",
|
||||||
|
"Cards",
|
||||||
|
"Card",
|
||||||
|
"Buys",
|
||||||
|
"Buy",
|
||||||
|
"Actions",
|
||||||
|
"Action"
|
||||||
|
]
|
||||||
|
}
|
||||||
2312
card_db/xx/cards_xx.json
Normal file
96
card_db/xx/sets_xx.json
Normal file
@ -0,0 +1,96 @@
|
|||||||
|
{
|
||||||
|
"adventures": {
|
||||||
|
"set_name": "Adventures",
|
||||||
|
"text_icon": "Ad"
|
||||||
|
},
|
||||||
|
"adventures extras": {
|
||||||
|
"set_name": "Adventures Extras",
|
||||||
|
"text_icon": "Ad"
|
||||||
|
},
|
||||||
|
"alchemy": {
|
||||||
|
"set_name": "Alchemy",
|
||||||
|
"text_icon": "A"
|
||||||
|
},
|
||||||
|
"base": {
|
||||||
|
"set_name": "Base",
|
||||||
|
"text_icon": "B"
|
||||||
|
},
|
||||||
|
"cornucopia": {
|
||||||
|
"set_name": "Cornucopia",
|
||||||
|
"text_icon": "C"
|
||||||
|
},
|
||||||
|
"cornucopia extras": {
|
||||||
|
"set_name": "Cornucopia Extras",
|
||||||
|
"text_icon": "C"
|
||||||
|
},
|
||||||
|
"dark ages": {
|
||||||
|
"set_name": "Dark Ages",
|
||||||
|
"text_icon": "DA"
|
||||||
|
},
|
||||||
|
"dark ages extras": {
|
||||||
|
"set_name": "Dark Ages Extras",
|
||||||
|
"text_icon": "DA"
|
||||||
|
},
|
||||||
|
"dominion1stEdition": {
|
||||||
|
"set_name": "Dominion 1st Edition",
|
||||||
|
"short_name": "Dominion",
|
||||||
|
"text_icon": "D1"
|
||||||
|
},
|
||||||
|
"dominion2ndEdition": {
|
||||||
|
"set_name": "Dominion 2nd Edition",
|
||||||
|
"short_name": "Dominion",
|
||||||
|
"text_icon": "D2"
|
||||||
|
},
|
||||||
|
"dominion2ndEditionUpgrade": {
|
||||||
|
"set_name": "Dominion 2nd Edition Upgrade",
|
||||||
|
"short_name": "Dominion",
|
||||||
|
"text_icon": "D2"
|
||||||
|
},
|
||||||
|
"empires": {
|
||||||
|
"set_name": "Empires",
|
||||||
|
"text_icon": "E"
|
||||||
|
},
|
||||||
|
"empires extras": {
|
||||||
|
"set_name": "Empires Extras",
|
||||||
|
"text_icon": "E"
|
||||||
|
},
|
||||||
|
"extras": {
|
||||||
|
"set_name": "Extras",
|
||||||
|
"text_icon": "X"
|
||||||
|
},
|
||||||
|
"guilds": {
|
||||||
|
"set_name": "Guilds",
|
||||||
|
"text_icon": "G"
|
||||||
|
},
|
||||||
|
"hinterlands": {
|
||||||
|
"set_name": "Hinterlands",
|
||||||
|
"text_icon": "H"
|
||||||
|
},
|
||||||
|
"intrigue1stEdition": {
|
||||||
|
"set_name": "Intrigue 1st Edition",
|
||||||
|
"short_name": "Intrigue",
|
||||||
|
"text_icon": "I1"
|
||||||
|
},
|
||||||
|
"intrigue2ndEdition": {
|
||||||
|
"set_name": "Intrigue 2nd Edition",
|
||||||
|
"short_name": "Intrigue",
|
||||||
|
"text_icon": "I2"
|
||||||
|
},
|
||||||
|
"intrigue2ndEditionUpgrade": {
|
||||||
|
"set_name": "Intrigue 2nd Edition Upgrade",
|
||||||
|
"short_name": "Intrigue",
|
||||||
|
"text_icon": "I2"
|
||||||
|
},
|
||||||
|
"promo": {
|
||||||
|
"set_name": "Promo",
|
||||||
|
"text_icon": "Po"
|
||||||
|
},
|
||||||
|
"prosperity": {
|
||||||
|
"set_name": "Prosperity",
|
||||||
|
"text_icon": "Py"
|
||||||
|
},
|
||||||
|
"seaside": {
|
||||||
|
"set_name": "Seaside",
|
||||||
|
"text_icon": "S"
|
||||||
|
}
|
||||||
|
}
|
||||||
138
card_db/xx/translation.txt
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
# Translation Instructions
|
||||||
|
|
||||||
|
## File Format
|
||||||
|
/card_db/
|
||||||
|
xx/
|
||||||
|
bonuses_xx.json
|
||||||
|
cards_xx.json
|
||||||
|
sets_xx.json
|
||||||
|
types_xx.json
|
||||||
|
|
||||||
|
where xx is ISO 639-1 standard language code in lower case with under bar '_' replacing dash '-'
|
||||||
|
Please rename the directory and the files to match the language you are providing.
|
||||||
|
|
||||||
|
|
||||||
|
## Character encoding
|
||||||
|
The files:
|
||||||
|
bonuses_xx.json
|
||||||
|
cards_xx.json
|
||||||
|
sets_xx.json
|
||||||
|
types_xx.json
|
||||||
|
must be encoded in ISO 8859-15, also known as "Latin alphabet no. 9"
|
||||||
|
This character set is used throughout the Americas, Western Europe, Oceania, and much of Africa.
|
||||||
|
It is also commonly used in most standard romanizations of East-Asian languages.
|
||||||
|
|
||||||
|
If you have a language that is not supported by ISO 8859-15 please contact the developers.
|
||||||
|
|
||||||
|
|
||||||
|
## Anatomy of sets_xx.json
|
||||||
|
Entries in this file represent Dominion sets/expansions. A typical entry looks like:
|
||||||
|
"alchemy": {
|
||||||
|
"set_name": "Alchimia",
|
||||||
|
"text_icon": "Al"
|
||||||
|
},
|
||||||
|
|
||||||
|
The set key word (e.g., "alchemy" for the above entry) MUST NOT BE CHANGED. This value is used to identify the translation entry.
|
||||||
|
The key word "set_name" MUST NOT BE CHANGED, but the value after the : should be changed to the name of the set in the target language.
|
||||||
|
The key word "text_icon" MUST NOT BE CHANGED, but the value after the : should be a one or two letter identifier to be used by the set if the set graphics are not displayed. This is usually the first letter of the set name in the target language.
|
||||||
|
Do not change any punctuation outside of the quotes '"'. For example, brackets '{' or '}', colons ':', quotes '"' or commas ','.
|
||||||
|
|
||||||
|
|
||||||
|
## Anatomy of bonuses_xx.json
|
||||||
|
Entries in this file represent Dominion bonuses. The items in the "include" list are items that will be marked bold (i.e., <b>..</b>)
|
||||||
|
when found in the card text in the following format:
|
||||||
|
+# item_from_include_list
|
||||||
|
as long as this is not followed by a item from the "exclude" list.
|
||||||
|
For example in English:
|
||||||
|
"+2 Buys" will be made bold, but
|
||||||
|
"+1 Action token" will not, since the key word token follows.
|
||||||
|
|
||||||
|
Just replace the English terms with the terms used in the target language.
|
||||||
|
Generally you should include the singular as well as the plural version of the term.
|
||||||
|
English versions do not need to be duplicated, since they are used automatically.
|
||||||
|
The key words "exclude" and "include" MUST NOT BE CHANGED.
|
||||||
|
Do not change any punctuation outside of the quotes '"'. For example, brackets '{' or '}', colons ':', quotes '"' or commas ','.
|
||||||
|
|
||||||
|
## Anatomy of types_xx.json
|
||||||
|
Entries in this file represent Dominion card types. A typical entry looks like:
|
||||||
|
"Action": "Action in new language",
|
||||||
|
|
||||||
|
The type key word (i.e., the "Action": for the above entry) MUST NOT BE CHANGED. This value is used to identify the translation entry.
|
||||||
|
Do not change any punctuation outside of the quotes '"'. For example, brackets '{' or '}', colons ':', quotes '"' or commas ','.
|
||||||
|
|
||||||
|
## Anatomy of cards_xx.json
|
||||||
|
Entries in this file represent Dominion cards, and groups of cards. A typical entry looks like:
|
||||||
|
"Gold": {
|
||||||
|
"description": "Worth 3 Coins.",
|
||||||
|
"extra": "30 cards per game.",
|
||||||
|
"name": "Gold",
|
||||||
|
"untranslated" : "description, extra, name"
|
||||||
|
},
|
||||||
|
The card key word (e.g., "Gold": for the above entry) MUST NOT BE CHANGED. This value is used to identify the translation entry.
|
||||||
|
The key word "name" MUST NOT BE CHANGED, but the value after the : should be changed to the name of the card in the target language.
|
||||||
|
The key word "description" MUST NOT BE CHANGED, but the value after the : should be changed to the card text in the target language.
|
||||||
|
The key word "extra" MUST NOT BE CHANGED, but the value after the : should be changed to any extra rules or explanations for the card in the target language. If you purposely want no extra text, enter "".
|
||||||
|
The key word "untranslated" MUST NOT BE CHANGED, but the value after the : should be changed. Removed any key word for which you have provided a translation.
|
||||||
|
For example:
|
||||||
|
- if you provided the "name" of the card, and only the "name", then change to "description, extra"
|
||||||
|
- if you provided the "name" of the card and it's "description", but have not translated the "extra", then change to "extra"
|
||||||
|
- if you provided all 3 entries, then change to ""
|
||||||
|
The "untranslated" entry is used during maintanance of the language files to update any remaining default language entries that might have changed.
|
||||||
|
|
||||||
|
|
||||||
|
## Special Text
|
||||||
|
These character sequences have special meaning in the "description" and "extra" text:
|
||||||
|
|
||||||
|
'<b>' ... '</b>' for bold
|
||||||
|
'<i>' ... '</i>' for italics
|
||||||
|
'<u>' ... '</u>' for underline
|
||||||
|
'<tab>' and '<t>' and '\t' to add a tab (4 spaces)
|
||||||
|
'<n>' and '\n' for a "hard new line"
|
||||||
|
'<br>' and '<br/>' and '<br />' for a "soft new line"
|
||||||
|
'<c>' and '<center>' add hard new line and center text until the next hard new line
|
||||||
|
'<l>' and '<left>' add hard new line and left align text until the next hard new line
|
||||||
|
'<r>' and '<right>' add hard new line and right align text until the next hard new line
|
||||||
|
'<j>' and '<justify>' add hard new line and justify align text until the next hard new line
|
||||||
|
'<line>' to add a hard new line, a centered dividing line, and a trailing hard new line
|
||||||
|
|
||||||
|
Hard new lines ('\n' and '<n>'), will reset the paragraph formatting back to the default.
|
||||||
|
Soft new lines will insert a new line, but will continue the current formatting.
|
||||||
|
The "description" will be default to "center" text.
|
||||||
|
The "extra" will default to "justify" text.
|
||||||
|
|
||||||
|
## Special Images
|
||||||
|
Special character sequences are recognized by the program to substitute graphics in the text. These include:
|
||||||
|
|
||||||
|
'<VP>' and ' VP ' for a Victory Point graphic
|
||||||
|
'Potion' for a small Potion graphic
|
||||||
|
'# Coin' where # is a number 0 - 13, a question mark '?', '_', or the letters 'empty' for a small coin graphic with the # on top
|
||||||
|
'# Coins' where # is a number 0 - 13, a question mark '?', '_', or the letters 'empty' for a small coin graphic with the # on top
|
||||||
|
'# coin' where # is a number 0 - 13, a question mark '?', '_', or the letters 'empty' for a small coin graphic with the # on top
|
||||||
|
'# coins' where # is a number 0 - 13, a question mark '?', '_', or the letters 'empty' for a small coin graphic with the # on top
|
||||||
|
For example:
|
||||||
|
- the text '1 coin' would produce a graphic of a coin with the number 1 on top.
|
||||||
|
- the text 'empty coin' and '_ coin' would produce a graphic of only a coin.
|
||||||
|
|
||||||
|
'# <*COIN*>' where # is a number 0 - 13, will produce a large coin graphic with the # on top
|
||||||
|
'# <*VP*>' where # is a number, will produce a large Victory Point graphic with the # before it
|
||||||
|
'# <*POTION*>' where # is a number, will produce a large Potion graphic with the # before it
|
||||||
|
|
||||||
|
To keep the special images, please do not translate '<VP>', 'Potion', or the 'coin' variations into the target language.
|
||||||
|
|
||||||
|
## Style Guide
|
||||||
|
|
||||||
|
- If bonuses_xx.json for the target language is configured correctly, bonuses within the text will automatically be bolded.
|
||||||
|
It will not bold the text if it is followed by 'token' or 'Token'.
|
||||||
|
Example: "Choose one: +3 Cards; or +2 Actions." will bold '+3 Cards' and '+2 Actions'.
|
||||||
|
|
||||||
|
- Bonuses should be listed in the following order:
|
||||||
|
+Cards, +Actions, +Buys, +Coins, then +<VP>
|
||||||
|
|
||||||
|
- When possible, bonuses should be listed vertically and centered.
|
||||||
|
Examples: "+1 Card<br>+1 Action<br>+1 Buy<br>+1 Coin<br>+2 <VP><n>"
|
||||||
|
"+1 Card\n+1 Action\n+1 Buy\n+1 Coin\n+2 <VP>\n"
|
||||||
|
The "description" field by default is centered. '<br>', '<n>', and '\n' will all provide new lines.
|
||||||
|
|
||||||
|
- If a Dividers/Tab has more than one card explanation, if space permits, try to mimic a stand alone Dividers/Tab in the overall format.
|
||||||
|
Example from "Settlers - Bustling Village": "<left><u>Settlers</u>:<n>+1 Card<br>+1 Action<n>Look through your discard pile. You may reveal a Copper from it and put it into your hand.<n><left><u>Bustling Village</u>:<n><center>+1 Card<br>+3 Actions<n>Look through your discard pile. You may reveal a Settlers from it and put it into your hand."
|
||||||
|
|
||||||
26
card_db/xx/types_xx.json
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
{
|
||||||
|
"Action": "Action",
|
||||||
|
"Attack": "Attack",
|
||||||
|
"Blank": "Blank",
|
||||||
|
"Castle": "Castle",
|
||||||
|
"Curse": "Curse",
|
||||||
|
"Duration": "Duration",
|
||||||
|
"Event": "Event",
|
||||||
|
"Events": "Events",
|
||||||
|
"Expansion": "Expansion",
|
||||||
|
"Gathering": "Gathering",
|
||||||
|
"Landmark": "Landmark",
|
||||||
|
"Landmarks": "Landmarks",
|
||||||
|
"Looter": "Looter",
|
||||||
|
"Prize": "Prize",
|
||||||
|
"Prizes": "Prizes",
|
||||||
|
"Reaction": "Reaction",
|
||||||
|
"Reserve": "Reserve",
|
||||||
|
"Ruins": "Ruins",
|
||||||
|
"Shelter": "Shelter",
|
||||||
|
"Shelters": "Shelters",
|
||||||
|
"Trash": "Trash",
|
||||||
|
"Traveller": "Traveller",
|
||||||
|
"Treasure": "Treasure",
|
||||||
|
"Victory": "Victory"
|
||||||
|
}
|
||||||
1009
domdiv/__init__.py
305
domdiv/cards.py
@ -1,74 +1,15 @@
|
|||||||
import json
|
import json
|
||||||
import os
|
import os
|
||||||
|
import re
|
||||||
from reportlab.lib.units import cm
|
from reportlab.lib.units import cm
|
||||||
|
|
||||||
|
|
||||||
def getType(typespec):
|
|
||||||
return cardTypes[tuple(typespec)]
|
|
||||||
|
|
||||||
setImages = {
|
|
||||||
'dominion': 'base_set.png',
|
|
||||||
'intrigue': 'intrigue_set.png',
|
|
||||||
'seaside': 'seaside_set.png',
|
|
||||||
'prosperity': 'prosperity_set.png',
|
|
||||||
'alchemy': 'alchemy_set.png',
|
|
||||||
'cornucopia': 'cornucopia_set.png',
|
|
||||||
'cornucopia extras': 'cornucopia_set.png',
|
|
||||||
'hinterlands': 'hinterlands_set.png',
|
|
||||||
'dark ages': 'dark_ages_set.png',
|
|
||||||
'dark ages extras': 'dark_ages_set.png',
|
|
||||||
'guilds': 'guilds_set.png',
|
|
||||||
'adventures': 'adventures_set.png',
|
|
||||||
'adventures extras': 'adventures_set.png',
|
|
||||||
'empires': 'empires_set.png',
|
|
||||||
'empires extras': 'empires_set.png'
|
|
||||||
}
|
|
||||||
promoImages = {
|
|
||||||
'walled village': 'walled_village_set.png',
|
|
||||||
'stash': 'stash_set.png',
|
|
||||||
'governor': 'governor_set.png',
|
|
||||||
'black market': 'black_market_set.png',
|
|
||||||
'envoy': 'envoy_set.png',
|
|
||||||
'prince': 'prince_set.png',
|
|
||||||
'summon': 'promo_set.png',
|
|
||||||
'sauna': 'promo_set.png',
|
|
||||||
'avanto': 'promo_set.png',
|
|
||||||
'sauna \/ avanto': 'promo_set.png'
|
|
||||||
}
|
|
||||||
|
|
||||||
setTextIcons = {
|
|
||||||
'dominion': 'D',
|
|
||||||
'intrigue': 'I',
|
|
||||||
'seaside': 'S',
|
|
||||||
'prosperity': 'P',
|
|
||||||
'alchemy': 'A',
|
|
||||||
'cornucopia': 'C',
|
|
||||||
'cornucopia extras': 'C',
|
|
||||||
'hinterlands': 'H',
|
|
||||||
'dark ages': 'DA',
|
|
||||||
'dark ages extras': 'DA',
|
|
||||||
'guilds': 'G',
|
|
||||||
'adventures': 'Ad',
|
|
||||||
'adventures extras': 'Ad',
|
|
||||||
'empires': 'E',
|
|
||||||
'empires extras': 'E'
|
|
||||||
}
|
|
||||||
|
|
||||||
promoTextIcons = {
|
|
||||||
'walled village': '',
|
|
||||||
'stash': '',
|
|
||||||
'governor': '',
|
|
||||||
'black market': '',
|
|
||||||
'envoy': '',
|
|
||||||
'prince': ''
|
|
||||||
}
|
|
||||||
|
|
||||||
language_mapping = None
|
|
||||||
|
|
||||||
|
|
||||||
class Card(object):
|
class Card(object):
|
||||||
|
|
||||||
language_mapping = None
|
sets = None
|
||||||
|
types = None
|
||||||
|
type_names = None
|
||||||
|
bonus_regex = None
|
||||||
|
|
||||||
class CardJSONEncoder(json.JSONEncoder):
|
class CardJSONEncoder(json.JSONEncoder):
|
||||||
|
|
||||||
@ -81,56 +22,94 @@ class Card(object):
|
|||||||
def decode_json(obj):
|
def decode_json(obj):
|
||||||
return Card(**obj)
|
return Card(**obj)
|
||||||
|
|
||||||
@classmethod
|
def __init__(self, name=None, cardset='', types=None, cost='', description='',
|
||||||
def getSetImage(cls, setName, cardName):
|
potcost=0, debtcost=0, extra='', count=-1, card_tag='missing card_tag',
|
||||||
if setName in setImages:
|
cardset_tags=None, group_tag='', group_top=False, image=None,
|
||||||
return setImages[setName]
|
text_icon=None, cardset_tag=''):
|
||||||
if cardName.lower() in promoImages:
|
|
||||||
return promoImages[cardName.lower()]
|
|
||||||
if setName in cls.language_mapping:
|
|
||||||
trans = cls.language_mapping[setName]
|
|
||||||
if trans in setImages:
|
|
||||||
return setImages[trans]
|
|
||||||
if cardName in cls.language_mapping:
|
|
||||||
trans = cls.language_mapping[cardName]
|
|
||||||
if trans.lower() in promoImages:
|
|
||||||
return promoImages[trans.lower()]
|
|
||||||
return None
|
|
||||||
|
|
||||||
@classmethod
|
if types is None:
|
||||||
def getSetText(cls, setName, cardName):
|
types = [] # make sure types is a list
|
||||||
if setName in setTextIcons:
|
if cardset_tags is None:
|
||||||
return setTextIcons[setName]
|
cardset_tags = [] # make sure cardset_tags is a list
|
||||||
if cardName.lower() in promoTextIcons:
|
if name is None:
|
||||||
return promoTextIcons[cardName.lower()]
|
name = card_tag # make sure there is a meaningful default name
|
||||||
return None
|
|
||||||
|
|
||||||
def __init__(self, name, cardset, types, cost, description='', potcost=0, debtcost=0, extra='', count=-1):
|
|
||||||
self.name = name.strip()
|
self.name = name.strip()
|
||||||
self.cardset = cardset.strip()
|
self.cardset = cardset.strip()
|
||||||
self.types = types
|
self.types = types
|
||||||
|
self.types_name = ""
|
||||||
self.cost = cost
|
self.cost = cost
|
||||||
|
self.description = description
|
||||||
self.potcost = potcost
|
self.potcost = potcost
|
||||||
self.debtcost = debtcost
|
self.debtcost = debtcost
|
||||||
self.description = description
|
|
||||||
self.extra = extra
|
self.extra = extra
|
||||||
|
self.card_tag = card_tag
|
||||||
|
self.cardset_tags = cardset_tags
|
||||||
|
self.group_tag = group_tag
|
||||||
|
self.group_top = group_top
|
||||||
|
self.image = image
|
||||||
|
self.text_icon = text_icon
|
||||||
|
self.cardset_tag = cardset_tag
|
||||||
if count < 0:
|
if count < 0:
|
||||||
self.count = getType(self.types).getTypeDefaultCardCount()
|
self.count = [self.getType().getTypeDefaultCardCount()]
|
||||||
|
elif count == 0:
|
||||||
|
self.count = []
|
||||||
else:
|
else:
|
||||||
self.count = count
|
self.count = [int(count)]
|
||||||
|
|
||||||
def getCardCount(self):
|
def getCardCount(self):
|
||||||
return self.count
|
return sum(i for i in self.count)
|
||||||
|
|
||||||
def setCardCount(self, value):
|
def setCardCount(self, value):
|
||||||
self.count = value
|
self.count = value
|
||||||
|
|
||||||
|
def addCardCount(self, value):
|
||||||
|
self.count.extend(value)
|
||||||
|
|
||||||
def getStackHeight(self, thickness):
|
def getStackHeight(self, thickness):
|
||||||
# return height of the stacked cards in cm. Using hight in cm of a stack of 60 Copper cards as thickness.
|
# return height of the stacked cards in cm. Using hight in cm of a stack of 60 Copper cards as thickness.
|
||||||
return self.count * cm * (thickness / 60.0) + 2
|
return self.getCardCount() * cm * (thickness / 60.0) + 2
|
||||||
|
|
||||||
def getType(self):
|
def getType(self):
|
||||||
return getType(self.types)
|
return Card.types[tuple(self.types)]
|
||||||
|
|
||||||
|
def getBonusBoldText(self, text):
|
||||||
|
for regex in Card.bonus_regex:
|
||||||
|
text = re.sub(regex, '<b>\\1</b>', text)
|
||||||
|
return text
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def addBonusRegex(bonus):
|
||||||
|
# Each bonus_regex matches the bonus keywords to be highlighted
|
||||||
|
# This only needs to be done once per language
|
||||||
|
if Card.bonus_regex is None:
|
||||||
|
# initialize the information holder
|
||||||
|
Card.bonus_regex = []
|
||||||
|
|
||||||
|
# Make sure have minimum to to anything
|
||||||
|
if not isinstance(bonus, dict):
|
||||||
|
return
|
||||||
|
if 'include' not in bonus:
|
||||||
|
return
|
||||||
|
if not bonus['include']:
|
||||||
|
return
|
||||||
|
if 'exclude' not in bonus:
|
||||||
|
bonus['exclude'] = []
|
||||||
|
|
||||||
|
# Start processing of lists into a single regex statement
|
||||||
|
# (?i) makes this case insensitive
|
||||||
|
# (?!\<b\>) and (?!\<\/b\>) prevents matching already bolded items
|
||||||
|
# (?!\w) prevents smaller word matches. Prevents matching "Action" in "Actions"
|
||||||
|
if bonus['exclude']:
|
||||||
|
bonus['exclude'].sort(reverse=True)
|
||||||
|
exclude_regex = '(?!\w)(?!\s*(' + '|'.join(bonus['exclude']) + '))'
|
||||||
|
else:
|
||||||
|
exclude_regex = ''
|
||||||
|
|
||||||
|
bonus['include'].sort(reverse=True)
|
||||||
|
include_regex = "(\+\s*\d+\s*(" + '|'.join(bonus['include']) + "))"
|
||||||
|
regex = "((?i)(?!\<b\>)" + include_regex + exclude_regex + "(?!\<\/b\>))"
|
||||||
|
Card.bonus_regex.append(regex)
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return '"' + self.name + '"'
|
return '"' + self.name + '"'
|
||||||
@ -139,35 +118,79 @@ class Card(object):
|
|||||||
return self.name + ' ' + self.cardset + ' ' + '-'.join(self.types)\
|
return self.name + ' ' + self.cardset + ' ' + '-'.join(self.types)\
|
||||||
+ ' ' + self.cost + ' ' + self.description + ' ' + self.extra
|
+ ' ' + self.cost + ' ' + self.description + ' ' + self.extra
|
||||||
|
|
||||||
def isExpansion(self):
|
|
||||||
return 'Expansion' in self.getType().getTypeNames()
|
|
||||||
|
|
||||||
def isEvent(self):
|
|
||||||
return 'Event' in self.getType().getTypeNames()
|
|
||||||
|
|
||||||
def isLandmark(self):
|
|
||||||
return 'Landmark' in self.getType().getTypeNames()
|
|
||||||
|
|
||||||
def isPrize(self):
|
|
||||||
return 'Prize' in self.getType().getTypeNames()
|
|
||||||
|
|
||||||
def isType(self, what):
|
def isType(self, what):
|
||||||
return what in self.getType().getTypeNames()
|
return what in self.getType().getTypeNames()
|
||||||
|
|
||||||
|
def isExpansion(self):
|
||||||
|
return self.isType('Expansion')
|
||||||
|
|
||||||
|
def isEvent(self):
|
||||||
|
return self.isType('Event')
|
||||||
|
|
||||||
|
def isLandmark(self):
|
||||||
|
return self.isType('Landmark')
|
||||||
|
|
||||||
|
def isPrize(self):
|
||||||
|
return self.isType('Prize')
|
||||||
|
|
||||||
|
def get_total_cost(self, c):
|
||||||
|
# Return a tuple that represents the total cost of card c
|
||||||
|
# Hightest cost cards are in order:
|
||||||
|
# - Landmarks to sort at the very end
|
||||||
|
# - cards with * since that can mean anything
|
||||||
|
# - cards with numeric errors
|
||||||
|
# convert cost (a string) into a number
|
||||||
|
if c.isLandmark():
|
||||||
|
c_cost = 999
|
||||||
|
elif not c.cost:
|
||||||
|
c_cost = 0 # if no cost, treat as 0
|
||||||
|
elif '*' in c.cost:
|
||||||
|
c_cost = 998 # make it a really big number
|
||||||
|
else:
|
||||||
|
try:
|
||||||
|
c_cost = int(c.cost)
|
||||||
|
except ValueError:
|
||||||
|
c_cost = 997 # can't, so make it a really big number
|
||||||
|
|
||||||
|
return c_cost, c.potcost, c.debtcost
|
||||||
|
|
||||||
|
def set_lowest_cost(self, other):
|
||||||
|
# set self cost fields to the lower of the two's total cost
|
||||||
|
self_cost = self.get_total_cost(self)
|
||||||
|
other_cost = self.get_total_cost(other)
|
||||||
|
if other_cost < self_cost:
|
||||||
|
self.cost = other.cost
|
||||||
|
self.potcost = other.potcost
|
||||||
|
self.debtcost = other.debtcost
|
||||||
|
|
||||||
def setImage(self):
|
def setImage(self):
|
||||||
setImage = Card.getSetImage(self.cardset, self.name)
|
setImage = None
|
||||||
if setImage is None and self.cardset != 'base':
|
if self.image is not None:
|
||||||
print 'warning, no set image for set "{}" card "{}"'.format(self.cardset, self.name)
|
setImage = self.image
|
||||||
|
else:
|
||||||
|
if self.cardset_tag in Card.sets:
|
||||||
|
if 'image' in Card.sets[self.cardset_tag]:
|
||||||
|
setImage = Card.sets[self.cardset_tag]['image']
|
||||||
|
|
||||||
|
if setImage is None and self.cardset_tag != 'base':
|
||||||
|
print 'warning, no set image for set "{}", card "{}"'.format(self.cardset, self.name)
|
||||||
return setImage
|
return setImage
|
||||||
|
|
||||||
def setTextIcon(self):
|
def setTextIcon(self):
|
||||||
setTextIcon = Card.getSetText(self.cardset, self.name)
|
setTextIcon = None
|
||||||
|
if self.text_icon:
|
||||||
|
setTextIcon = self.text_icon
|
||||||
|
else:
|
||||||
|
if self.cardset_tag in Card.sets:
|
||||||
|
if 'text_icon' in Card.sets[self.cardset_tag]:
|
||||||
|
setTextIcon = Card.sets[self.cardset_tag]['text_icon']
|
||||||
|
|
||||||
if setTextIcon is None and self.cardset != 'base':
|
if setTextIcon is None and self.cardset != 'base':
|
||||||
print 'warning, no set text for set "{}" card "{}"'.format(self.cardset, self.name)
|
print 'warning, no set text for set "{}", card "{}"'.format(self.cardset, self.name)
|
||||||
return setTextIcon
|
return setTextIcon
|
||||||
|
|
||||||
def isBlank(self):
|
def isBlank(self):
|
||||||
return False
|
return self.isType('Blank')
|
||||||
|
|
||||||
|
|
||||||
class BlankCard(Card):
|
class BlankCard(Card):
|
||||||
@ -181,12 +204,16 @@ class BlankCard(Card):
|
|||||||
|
|
||||||
class CardType(object):
|
class CardType(object):
|
||||||
|
|
||||||
def __init__(self, typeNames, tabImageFile, defaultCardCount=10, tabTextHeightOffset=0, tabCostHeightOffset=-1):
|
@staticmethod
|
||||||
self.typeNames = typeNames
|
def decode_json(obj):
|
||||||
self.tabImageFile = tabImageFile
|
return CardType(**obj)
|
||||||
|
|
||||||
|
def __init__(self, card_type, card_type_image, defaultCardCount=10, tabTextHeightOffset=0, tabCostHeightOffset=-1):
|
||||||
|
self.typeNames = tuple(card_type)
|
||||||
|
self.tabImageFile = card_type_image
|
||||||
|
self.defaultCardCount = defaultCardCount
|
||||||
self.tabTextHeightOffset = tabTextHeightOffset
|
self.tabTextHeightOffset = tabTextHeightOffset
|
||||||
self.tabCostHeightOffset = tabCostHeightOffset
|
self.tabCostHeightOffset = tabCostHeightOffset
|
||||||
self.defaultCardCount = defaultCardCount
|
|
||||||
|
|
||||||
def getTypeDefaultCardCount(self):
|
def getTypeDefaultCardCount(self):
|
||||||
return self.defaultCardCount
|
return self.defaultCardCount
|
||||||
@ -209,51 +236,3 @@ class CardType(object):
|
|||||||
|
|
||||||
def getTabCostHeightOffset(self):
|
def getTabCostHeightOffset(self):
|
||||||
return self.tabCostHeightOffset
|
return self.tabCostHeightOffset
|
||||||
|
|
||||||
cardTypes = [
|
|
||||||
CardType(('Action',), 'action.png'),
|
|
||||||
CardType(('Action', 'Attack'), 'action.png'),
|
|
||||||
CardType(('Action', 'Attack', 'Prize'), 'action.png', 1),
|
|
||||||
CardType(('Action', 'Reaction'), 'reaction.png'),
|
|
||||||
CardType(('Action', 'Victory'), 'action-victory.png', 12),
|
|
||||||
CardType(('Action', 'Duration'), 'duration.png', 10),
|
|
||||||
CardType(('Action', 'Duration', 'Reaction'), 'duration-reaction.png'),
|
|
||||||
CardType(('Action', 'Attack', 'Duration'), 'duration.png'),
|
|
||||||
CardType(('Action', 'Looter'), 'action.png'),
|
|
||||||
CardType(('Action', 'Prize'), 'action.png', 1),
|
|
||||||
CardType(('Action', 'Ruins'), 'ruins.png', 10, 0, 1),
|
|
||||||
CardType(('Action', 'Shelter'), 'action-shelter.png', 6),
|
|
||||||
CardType(('Action', 'Attack', 'Duration'), 'duration.png'),
|
|
||||||
CardType(('Action', 'Attack', 'Looter'), 'action.png'),
|
|
||||||
CardType(('Action', 'Attack', 'Traveller'), 'action.png', 5),
|
|
||||||
CardType(('Action', 'Reserve'), 'reserve.png', 10),
|
|
||||||
CardType(('Action', 'Reserve', 'Victory'), 'reserve-victory.png', 12),
|
|
||||||
CardType(('Action', 'Traveller'), 'action.png', 5),
|
|
||||||
CardType(('Action', 'Gathering'), 'action.png'),
|
|
||||||
CardType(('Action', 'Treasure'), 'action-treasure.png'),
|
|
||||||
CardType(('Prize',), 'action.png', 1),
|
|
||||||
CardType(('Event',), 'event.png', 1),
|
|
||||||
CardType(('Reaction',), 'reaction.png'),
|
|
||||||
CardType(('Reaction', 'Shelter'), 'reaction-shelter.png', 6),
|
|
||||||
CardType(('Treasure',), 'treasure.png', 10, 3, 0),
|
|
||||||
CardType(('Treasure', 'Attack'), 'treasure.png'),
|
|
||||||
CardType(('Treasure', 'Victory'), 'treasure-victory.png', 12),
|
|
||||||
CardType(('Treasure', 'Prize'), 'treasure.png', 1, 3, 0),
|
|
||||||
CardType(('Treasure', 'Reaction'), 'treasure-reaction.png', 10, 0, 1),
|
|
||||||
CardType(('Treasure', 'Reserve'), 'reserve-treasure.png'),
|
|
||||||
CardType(('Victory',), 'victory.png', 12),
|
|
||||||
CardType(('Victory', 'Reaction'), 'victory-reaction.png', 12, 0, 1),
|
|
||||||
CardType(('Victory', 'Shelter'), 'victory-shelter.png', 6),
|
|
||||||
CardType(('Victory', 'Castle'), 'victory.png', 12),
|
|
||||||
CardType(('Curse',), 'curse.png', 30, 3),
|
|
||||||
CardType(('Trash',), 'action.png', 1),
|
|
||||||
CardType(('Prizes',), 'action.png', 0),
|
|
||||||
CardType(('Events',), 'event.png', 0),
|
|
||||||
CardType(('Shelters',), 'shelter.png', 0),
|
|
||||||
CardType(('Expansion',), 'expansion.png', 0, 4),
|
|
||||||
CardType(('Blank',), ''),
|
|
||||||
CardType(('Landmark',), 'landmark.png', 1),
|
|
||||||
CardType(('Landmarks',), 'landmark.png', 0)
|
|
||||||
]
|
|
||||||
|
|
||||||
cardTypes = dict(((c.getTypeNames(), c) for c in cardTypes))
|
|
||||||
|
|||||||
253
domdiv/draw.py
@ -6,9 +6,10 @@ from reportlab.lib.units import cm
|
|||||||
from reportlab.pdfbase import pdfmetrics
|
from reportlab.pdfbase import pdfmetrics
|
||||||
from reportlab.lib.styles import getSampleStyleSheet
|
from reportlab.lib.styles import getSampleStyleSheet
|
||||||
from reportlab.platypus import Paragraph
|
from reportlab.platypus import Paragraph
|
||||||
from reportlab.lib.enums import TA_JUSTIFY
|
from reportlab.lib.enums import TA_JUSTIFY, TA_CENTER
|
||||||
from reportlab.pdfgen import canvas
|
from reportlab.pdfgen import canvas
|
||||||
from reportlab.pdfbase.ttfonts import TTFont
|
from reportlab.pdfbase.ttfonts import TTFont
|
||||||
|
from reportlab.pdfbase.pdfmetrics import stringWidth
|
||||||
|
|
||||||
|
|
||||||
def split(l, n):
|
def split(l, n):
|
||||||
@ -25,19 +26,21 @@ class DividerDrawer(object):
|
|||||||
self.canvas = None
|
self.canvas = None
|
||||||
|
|
||||||
def registerFonts(self):
|
def registerFonts(self):
|
||||||
try:
|
|
||||||
dirn = os.path.join(self.options.data_path, 'fonts')
|
dirn = os.path.join(self.options.data_path, 'fonts')
|
||||||
|
regularMpath = os.path.join(dirn, 'MinionPro-Regular.ttf')
|
||||||
|
boldMpath = os.path.join(dirn, 'MinionPro-Bold.ttf')
|
||||||
|
obliqueMpath = os.path.join(dirn, 'MinionPro-It.ttf')
|
||||||
|
|
||||||
|
if os.path.isfile(regularMpath) and os.path.isfile(boldMpath) and os.path.isfile(obliqueMpath):
|
||||||
self.fontNameRegular = 'MinionPro-Regular'
|
self.fontNameRegular = 'MinionPro-Regular'
|
||||||
pdfmetrics.registerFont(TTFont(self.fontNameRegular, os.path.join(
|
pdfmetrics.registerFont(TTFont(self.fontNameRegular, regularMpath))
|
||||||
dirn, 'MinionPro-Regular.ttf')))
|
|
||||||
self.fontNameBold = 'MinionPro-Bold'
|
self.fontNameBold = 'MinionPro-Bold'
|
||||||
pdfmetrics.registerFont(TTFont(self.fontNameBold, os.path.join(
|
pdfmetrics.registerFont(TTFont(self.fontNameBold, boldMpath))
|
||||||
dirn, 'MinionPro-Bold.ttf')))
|
|
||||||
self.fontNameOblique = 'MinionPro-Oblique'
|
self.fontNameOblique = 'MinionPro-Oblique'
|
||||||
pdfmetrics.registerFont(TTFont(self.fontNameOblique, os.path.join(
|
pdfmetrics.registerFont(TTFont(self.fontNameOblique, obliqueMpath))
|
||||||
dirn, 'MinionPro-It.ttf')))
|
else:
|
||||||
except:
|
print >> sys.stderr, "Warning, Minion Pro Font ttf file(s) not found! Falling back on Times. Tried:"
|
||||||
print >> sys.stderr, "Warning, Minion Pro Font ttf file not found! Falling back on Times"
|
print >> sys.stderr, regularMpath + ' ' + boldMpath + ' & ' + obliqueMpath
|
||||||
self.fontNameRegular = 'Times-Roman'
|
self.fontNameRegular = 'Times-Roman'
|
||||||
self.fontNameBold = 'Times-Bold'
|
self.fontNameBold = 'Times-Bold'
|
||||||
self.fontNameOblique = 'Times-Oblique'
|
self.fontNameOblique = 'Times-Oblique'
|
||||||
@ -205,7 +208,11 @@ class DividerDrawer(object):
|
|||||||
self.canvas.save()
|
self.canvas.save()
|
||||||
|
|
||||||
def add_inline_images(self, text, fontsize):
|
def add_inline_images(self, text, fontsize):
|
||||||
|
# Coins
|
||||||
path = os.path.join(self.options.data_path, 'images')
|
path = os.path.join(self.options.data_path, 'images')
|
||||||
|
replace = '<img src=' "'%s/coin_small_\\1.png'" ' width=%d height=' "'200%%'" ' valign=' "'middle'" '/>'
|
||||||
|
replace = replace % (path, fontsize * 2.4)
|
||||||
|
text = re.sub('(\d+)\s*\<\*COIN\*\>', replace, text)
|
||||||
replace = '<img src=' "'%s/coin_small_\\1.png'" ' width=%d height=' "'100%%'" ' valign=' "'middle'" '/>'
|
replace = '<img src=' "'%s/coin_small_\\1.png'" ' width=%d height=' "'100%%'" ' valign=' "'middle'" '/>'
|
||||||
replace = replace % (path, fontsize * 1.2)
|
replace = replace % (path, fontsize * 1.2)
|
||||||
text = re.sub('(\d+)\s(c|C)oin(s)?', replace, text)
|
text = re.sub('(\d+)\s(c|C)oin(s)?', replace, text)
|
||||||
@ -215,19 +222,66 @@ class DividerDrawer(object):
|
|||||||
replace = '<img src=' "'%s/coin_small_empty.png'" ' width=%d height=' "'100%%'" ' valign=' "'middle'" '/>'
|
replace = '<img src=' "'%s/coin_small_empty.png'" ' width=%d height=' "'100%%'" ' valign=' "'middle'" '/>'
|
||||||
replace = replace % (path, fontsize * 1.2)
|
replace = replace % (path, fontsize * 1.2)
|
||||||
text = re.sub('empty\s(c|C)oin(s)?', replace, text)
|
text = re.sub('empty\s(c|C)oin(s)?', replace, text)
|
||||||
|
text = re.sub('\_\s(c|C)oin(s)?', replace, text)
|
||||||
|
|
||||||
|
# VP
|
||||||
replace = '<img src=' "'%s/victory_emblem.png'" ' width=%d height=' "'120%%'" ' valign=' "'middle'" '/>'
|
replace = '<img src=' "'%s/victory_emblem.png'" ' width=%d height=' "'120%%'" ' valign=' "'middle'" '/>'
|
||||||
replace = replace % (path, fontsize * 1.5)
|
replace = replace % (path, fontsize * 1.5)
|
||||||
text = re.sub('\<VP\>', replace, text)
|
text = re.sub('(?:\s+|\<)VP(?:\s+|\>|\.|$)', replace, text)
|
||||||
|
replace = '<font size=%d>\\1</font> '
|
||||||
|
replace += '<img src=' "'%s/victory_emblem.png'" ' width=%d height=' "'200%%'" ' valign=' "'middle'" '/>'
|
||||||
|
replace = replace % (fontsize * 1.5, path, fontsize * 2.5)
|
||||||
|
text = re.sub('(\d+)\s*\<\*VP\*\>', replace, text)
|
||||||
|
|
||||||
|
# Debt
|
||||||
replace = '<img src=' "'%s/debt_\\1.png'" ' width=%d height=' "'105%%'" ' valign=' "'middle'" '/> '
|
replace = '<img src=' "'%s/debt_\\1.png'" ' width=%d height=' "'105%%'" ' valign=' "'middle'" '/> '
|
||||||
replace = replace % (path, fontsize * 1.2)
|
replace = replace % (path, fontsize * 1.2)
|
||||||
text = re.sub('(\d+)\sDebt', replace, text)
|
text = re.sub('(\d+)\sDebt', replace, text)
|
||||||
replace = '<img src=' "'%s/debt.png'" ' width=%d height=' "'105%%'" ' valign=' "'middle'" '/> '
|
replace = '<img src=' "'%s/debt.png'" ' width=%d height=' "'105%%'" ' valign=' "'middle'" '/> '
|
||||||
replace = replace % (path, fontsize * 1.2)
|
replace = replace % (path, fontsize * 1.2)
|
||||||
text = re.sub('Debt', replace, text)
|
text = re.sub('Debt', replace, text)
|
||||||
|
|
||||||
|
# Potion
|
||||||
|
replace = '<font size=%d>\\1</font> '
|
||||||
|
replace += '<img src=' "'%s/potion_small.png'" ' width=%d height=' "'140%%'" ' valign=' "'middle'" '/>'
|
||||||
|
replace = replace % (fontsize * 1.5, path, fontsize * 2.0)
|
||||||
|
text = re.sub('(\d+)\s*\<\*POTION\*\>', replace, text)
|
||||||
replace = '<img src=' "'%s/potion_small.png'" ' width=%d height=' "'100%%'" ' valign=' "'middle'" '/>'
|
replace = '<img src=' "'%s/potion_small.png'" ' width=%d height=' "'100%%'" ' valign=' "'middle'" '/>'
|
||||||
replace = replace % (path, fontsize * 1.2)
|
replace = replace % (path, fontsize * 1.2)
|
||||||
text = re.sub('Potion', replace, text)
|
text = re.sub('Potion', replace, text)
|
||||||
return text
|
|
||||||
|
return text.strip()
|
||||||
|
|
||||||
|
def add_inline_text(self, card, text):
|
||||||
|
# Bonuses
|
||||||
|
text = card.getBonusBoldText(text)
|
||||||
|
|
||||||
|
# <line>
|
||||||
|
replace = "<center>%s\n" % ("–" * 22)
|
||||||
|
text = re.sub("\<line\>", replace, text)
|
||||||
|
|
||||||
|
# <tab> and \t
|
||||||
|
text = re.sub("\<tab\>", '\t', text)
|
||||||
|
text = re.sub("\<t\>", '\t', text)
|
||||||
|
text = re.sub("\t", " " * 4, text)
|
||||||
|
|
||||||
|
# various breaks
|
||||||
|
text = re.sub("\<br\>", "<br />", text)
|
||||||
|
text = re.sub("\<n\>", "\n", text)
|
||||||
|
|
||||||
|
# alignments
|
||||||
|
text = re.sub("\<c\>", "<center>", text)
|
||||||
|
text = re.sub("\<center\>", "\n<para alignment='center'>", text)
|
||||||
|
|
||||||
|
text = re.sub("\<l\>", "<left>", text)
|
||||||
|
text = re.sub("\<left\>", "\n<para alignment='left'>", text)
|
||||||
|
|
||||||
|
text = re.sub("\<r\>", "<right>", text)
|
||||||
|
text = re.sub("\<right\>", "\n<para alignment='right'>", text)
|
||||||
|
|
||||||
|
text = re.sub("\<j\>", "<justify>", text)
|
||||||
|
text = re.sub("\<justify\>", "\n<para alignment='justify'>", text)
|
||||||
|
return text.strip().strip('\n')
|
||||||
|
|
||||||
def drawOutline(self,
|
def drawOutline(self,
|
||||||
card,
|
card,
|
||||||
@ -302,15 +356,22 @@ class DividerDrawer(object):
|
|||||||
self.canvas.restoreState()
|
self.canvas.restoreState()
|
||||||
|
|
||||||
def drawCardCount(self, card, x, y, offset=-1):
|
def drawCardCount(self, card, x, y, offset=-1):
|
||||||
if card.count < 1:
|
# Note that this is right justified.
|
||||||
|
# x represents the right most for the image (image grows to the left)
|
||||||
|
if card.getCardCount() < 1:
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
# base width is 16 (for image) + 2 (1 pt border on each side)
|
# draw_list = [(card.getCardCount(), 1)]
|
||||||
width = 18
|
draw_list = sorted([(i, card.count.count(i)) for i in set(card.count)])
|
||||||
|
|
||||||
cardIconHeight = y + offset
|
cardIconHeight = y + offset
|
||||||
countHeight = cardIconHeight - 4
|
countHeight = cardIconHeight - 4
|
||||||
|
width = 0
|
||||||
|
|
||||||
|
for value, count in draw_list:
|
||||||
|
# draw the image set with the number of cards inside it
|
||||||
|
width += 16
|
||||||
|
x -= 16
|
||||||
self.canvas.drawImage(
|
self.canvas.drawImage(
|
||||||
os.path.join(self.options.data_path, 'images', 'card.png'),
|
os.path.join(self.options.data_path, 'images', 'card.png'),
|
||||||
x,
|
x,
|
||||||
@ -319,21 +380,48 @@ class DividerDrawer(object):
|
|||||||
16,
|
16,
|
||||||
preserveAspectRatio=True,
|
preserveAspectRatio=True,
|
||||||
mask='auto')
|
mask='auto')
|
||||||
|
|
||||||
self.canvas.setFont(self.fontNameBold, 10)
|
self.canvas.setFont(self.fontNameBold, 10)
|
||||||
count = str(card.count)
|
self.canvas.drawCentredString(x + 8, countHeight + 4, str(value))
|
||||||
self.canvas.drawCentredString(x + 8, countHeight + 4, count)
|
|
||||||
return width
|
# now draw the number of sets
|
||||||
|
if count > 1:
|
||||||
|
count_string = u"{}\u00d7".format(count)
|
||||||
|
width_string = stringWidth(count_string, self.fontNameRegular, 10)
|
||||||
|
width_string -= 1 # adjust to make it closer to image
|
||||||
|
width += width_string
|
||||||
|
x -= width_string
|
||||||
|
self.canvas.setFont(self.fontNameRegular, 10)
|
||||||
|
self.canvas.drawString(x, countHeight + 4, count_string)
|
||||||
|
|
||||||
|
return width + 1
|
||||||
|
|
||||||
def drawCost(self, card, x, y, costOffset=-1):
|
def drawCost(self, card, x, y, costOffset=-1):
|
||||||
# base width is 16 (for image) + 2 (1 pt border on each side)
|
# width starts at 2 (1 pt border on each side)
|
||||||
width = 18
|
width = 2
|
||||||
|
|
||||||
costHeight = y + costOffset
|
costHeight = y + costOffset
|
||||||
coinHeight = costHeight - 5
|
coinHeight = costHeight - 5
|
||||||
potHeight = y - 3
|
potHeight = y - 3
|
||||||
potSize = 11
|
potSize = 11
|
||||||
|
|
||||||
|
if (not(card.cost == "" or
|
||||||
|
(card.debtcost and int(card.cost) == 0) or
|
||||||
|
(card.potcost and int(card.cost) == 0))):
|
||||||
|
|
||||||
|
self.canvas.drawImage(
|
||||||
|
os.path.join(self.options.data_path, 'images', 'coin_small.png'),
|
||||||
|
x,
|
||||||
|
coinHeight,
|
||||||
|
16,
|
||||||
|
16,
|
||||||
|
preserveAspectRatio=True,
|
||||||
|
mask='auto')
|
||||||
|
self.canvas.setFont(self.fontNameBold, 12)
|
||||||
|
self.canvas.drawCentredString(x + 8, costHeight, str(card.cost))
|
||||||
|
self.canvas.setFillColorRGB(0, 0, 0)
|
||||||
|
x += 17
|
||||||
|
width += 16
|
||||||
|
|
||||||
if card.debtcost:
|
if card.debtcost:
|
||||||
self.canvas.drawImage(
|
self.canvas.drawImage(
|
||||||
os.path.join(self.options.data_path, 'images', 'debt.png'),
|
os.path.join(self.options.data_path, 'images', 'debt.png'),
|
||||||
@ -342,53 +430,30 @@ class DividerDrawer(object):
|
|||||||
16,
|
16,
|
||||||
16,
|
16,
|
||||||
preserveAspectRatio=True,
|
preserveAspectRatio=True,
|
||||||
mask=[255, 255, 255, 255, 255, 255])
|
mask=[170, 255, 170, 255, 170, 255])
|
||||||
cost = str(card.debtcost)
|
|
||||||
if card.cost != "" and int(card.cost) > 0:
|
|
||||||
self.canvas.drawImage(
|
|
||||||
os.path.join(self.options.data_path, 'images',
|
|
||||||
'coin_small.png'),
|
|
||||||
x + 17,
|
|
||||||
coinHeight,
|
|
||||||
16,
|
|
||||||
16,
|
|
||||||
preserveAspectRatio=True,
|
|
||||||
mask=[255, 255, 255, 255, 255, 255])
|
|
||||||
self.canvas.setFont(self.fontNameBold, 12)
|
|
||||||
self.canvas.drawCentredString(x + 8 + 17, costHeight,
|
|
||||||
str(card.cost))
|
|
||||||
self.canvas.setFillColorRGB(0, 0, 0)
|
|
||||||
width += 16
|
|
||||||
self.canvas.setFillColorRGB(1, 1, 1)
|
self.canvas.setFillColorRGB(1, 1, 1)
|
||||||
else:
|
self.canvas.setFont(self.fontNameBold, 12)
|
||||||
self.canvas.drawImage(
|
self.canvas.drawCentredString(x + 8, costHeight, str(card.debtcost))
|
||||||
os.path.join(self.options.data_path, 'images',
|
self.canvas.setFillColorRGB(0, 0, 0)
|
||||||
'coin_small.png'),
|
x += 17
|
||||||
x,
|
width += 16
|
||||||
coinHeight,
|
|
||||||
16,
|
|
||||||
16,
|
|
||||||
preserveAspectRatio=True,
|
|
||||||
mask='auto')
|
|
||||||
cost = str(card.cost)
|
|
||||||
if card.potcost:
|
if card.potcost:
|
||||||
self.canvas.drawImage(
|
self.canvas.drawImage(
|
||||||
os.path.join(self.options.data_path, 'images', 'potion.png'),
|
os.path.join(self.options.data_path, 'images', 'potion.png'),
|
||||||
x + 17,
|
x,
|
||||||
potHeight,
|
potHeight,
|
||||||
potSize,
|
potSize,
|
||||||
potSize,
|
potSize,
|
||||||
preserveAspectRatio=True,
|
preserveAspectRatio=True,
|
||||||
mask=[255, 255, 255, 255, 255, 255])
|
mask='auto')
|
||||||
width += potSize
|
width += potSize
|
||||||
|
|
||||||
self.canvas.setFont(self.fontNameBold, 12)
|
|
||||||
self.canvas.drawCentredString(x + 8, costHeight, cost)
|
|
||||||
self.canvas.setFillColorRGB(0, 0, 0)
|
|
||||||
return width
|
return width
|
||||||
|
|
||||||
def drawSetIcon(self, setImage, x, y):
|
def drawSetIcon(self, setImage, x, y):
|
||||||
# set image
|
# set image
|
||||||
|
w = 2
|
||||||
self.canvas.drawImage(
|
self.canvas.drawImage(
|
||||||
os.path.join(self.options.data_path, 'images', setImage),
|
os.path.join(self.options.data_path, 'images', setImage),
|
||||||
x,
|
x,
|
||||||
@ -396,6 +461,7 @@ class DividerDrawer(object):
|
|||||||
14,
|
14,
|
||||||
12,
|
12,
|
||||||
mask='auto')
|
mask='auto')
|
||||||
|
return w + 14
|
||||||
|
|
||||||
def nameWidth(self, name, fontSize):
|
def nameWidth(self, name, fontSize):
|
||||||
w = 0
|
w = 0
|
||||||
@ -509,7 +575,6 @@ class DividerDrawer(object):
|
|||||||
width = self.nameWidth(name, fontSize)
|
width = self.nameWidth(name, fontSize)
|
||||||
while width > textWidth and fontSize > 8:
|
while width > textWidth and fontSize > 8:
|
||||||
fontSize -= .01
|
fontSize -= .01
|
||||||
# print 'decreasing font size for tab of',name,'now',fontSize
|
|
||||||
width = self.nameWidth(name, fontSize)
|
width = self.nameWidth(name, fontSize)
|
||||||
tooLong = width > textWidth
|
tooLong = width > textWidth
|
||||||
if tooLong:
|
if tooLong:
|
||||||
@ -539,7 +604,7 @@ class DividerDrawer(object):
|
|||||||
if wrapper == "back" and not self.options.tab_name_align == "centre":
|
if wrapper == "back" and not self.options.tab_name_align == "centre":
|
||||||
NotRightEdge = not NotRightEdge
|
NotRightEdge = not NotRightEdge
|
||||||
if NotRightEdge:
|
if NotRightEdge:
|
||||||
if self.options.tab_name_align == "centre":
|
if self.options.tab_name_align == "centre" or self.wantCentreTab(card):
|
||||||
w = self.options.labelWidth / 2 - self.nameWidth(
|
w = self.options.labelWidth / 2 - self.nameWidth(
|
||||||
line, fontSize) / 2
|
line, fontSize) / 2
|
||||||
else:
|
else:
|
||||||
@ -558,11 +623,18 @@ class DividerDrawer(object):
|
|||||||
w += drawWordPiece(word[0], fontSize)
|
w += drawWordPiece(word[0], fontSize)
|
||||||
w += drawWordPiece(word[1:], fontSize - 2)
|
w += drawWordPiece(word[1:], fontSize - 2)
|
||||||
else:
|
else:
|
||||||
# align text to the right if tab is on right side, to make
|
# align text to the right if tab is on right side
|
||||||
# tabs easier to read when grouped together extra 3pt is for
|
if self.options.tab_name_align == "centre" or self.wantCentreTab(card):
|
||||||
# space between text + set symbol
|
w = self.options.labelWidth / 2 - self.nameWidth(
|
||||||
|
line, fontSize) / 2
|
||||||
|
w = self.options.labelWidth - w
|
||||||
|
else:
|
||||||
|
w = self.options.labelWidth - textInsetRight
|
||||||
|
|
||||||
|
# to make tabs easier to read when grouped together extra 3pt is for
|
||||||
|
# space between text + set symbol
|
||||||
|
w -= 3
|
||||||
|
|
||||||
w = self.options.labelWidth - textInsetRight - 3
|
|
||||||
words.reverse()
|
words.reverse()
|
||||||
|
|
||||||
def drawWordPiece(text, fontSize):
|
def drawWordPiece(text, fontSize):
|
||||||
@ -628,25 +700,61 @@ class DividerDrawer(object):
|
|||||||
if self.options.notch_width1 > 0:
|
if self.options.notch_width1 > 0:
|
||||||
usedHeight += self.options.notch_height
|
usedHeight += self.options.notch_height
|
||||||
|
|
||||||
|
# Add 'body-top' items
|
||||||
drewTopIcon = False
|
drewTopIcon = False
|
||||||
|
Image_x_left = 4
|
||||||
if 'body-top' in self.options.cost and not card.isExpansion():
|
if 'body-top' in self.options.cost and not card.isExpansion():
|
||||||
self.drawCost(card, cm / 4.0, totalHeight - usedHeight - 0.5 * cm)
|
Image_x_left += self.drawCost(card, Image_x_left, totalHeight - usedHeight - 0.5 * cm)
|
||||||
drewTopIcon = True
|
drewTopIcon = True
|
||||||
|
|
||||||
Image_x = self.options.dividerWidth - 16
|
Image_x_right = self.options.dividerWidth - 4
|
||||||
if 'body-top' in self.options.set_icon and not card.isExpansion():
|
if 'body-top' in self.options.set_icon and not card.isExpansion():
|
||||||
setImage = card.setImage()
|
setImage = card.setImage()
|
||||||
if setImage:
|
if setImage:
|
||||||
self.drawSetIcon(setImage, Image_x,
|
Image_x_right -= 16
|
||||||
|
self.drawSetIcon(setImage, Image_x_right,
|
||||||
totalHeight - usedHeight - 0.5 * cm - 3)
|
totalHeight - usedHeight - 0.5 * cm - 3)
|
||||||
Image_x -= 16
|
|
||||||
drewTopIcon = True
|
drewTopIcon = True
|
||||||
|
|
||||||
if self.options.count:
|
if self.options.count:
|
||||||
self.drawCardCount(card, Image_x,
|
Image_x_right -= self.drawCardCount(card, Image_x_right,
|
||||||
totalHeight - usedHeight - 0.5 * cm)
|
totalHeight - usedHeight - 0.5 * cm)
|
||||||
drewTopIcon = True
|
drewTopIcon = True
|
||||||
|
|
||||||
|
if (self.options.types and not card.isExpansion()):
|
||||||
|
|
||||||
|
# Calculate how much width have for printing
|
||||||
|
# Want centered, but number of other items can limit
|
||||||
|
left_margin = Image_x_left
|
||||||
|
right_margin = self.options.dividerWidth - Image_x_right
|
||||||
|
worst_margin = max(left_margin, right_margin)
|
||||||
|
w = self.options.dividerWidth / 2
|
||||||
|
textWidth = self.options.dividerWidth - 2 * worst_margin
|
||||||
|
textWidth2 = self.options.dividerWidth - left_margin - right_margin
|
||||||
|
|
||||||
|
# Calculate font size that will fit in the area
|
||||||
|
# Start with centering type. But if the fontSize gets too small
|
||||||
|
# use all the available space, even if it is not centered on the card
|
||||||
|
fontSize = 8
|
||||||
|
failover = False
|
||||||
|
width = stringWidth(card.types_name, self.fontNameRegular, fontSize)
|
||||||
|
while width > textWidth:
|
||||||
|
fontSize -= .01
|
||||||
|
if fontSize < 6 and not failover:
|
||||||
|
# Start over using all available space left on line
|
||||||
|
textWidth = textWidth2
|
||||||
|
w = left_margin + (textWidth2 / 2)
|
||||||
|
fontSize = 8
|
||||||
|
failover = True
|
||||||
|
width = stringWidth(card.types_name, self.fontNameRegular, fontSize)
|
||||||
|
|
||||||
|
# Print out the text in the right spot
|
||||||
|
h = totalHeight - usedHeight - 0.5 * cm
|
||||||
|
self.canvas.setFont(self.fontNameRegular, fontSize)
|
||||||
|
if card.types_name != ' ':
|
||||||
|
self.canvas.drawCentredString(w, h, card.types_name)
|
||||||
|
drewTopIcon = True
|
||||||
|
|
||||||
if drewTopIcon:
|
if drewTopIcon:
|
||||||
usedHeight += 15
|
usedHeight += 15
|
||||||
|
|
||||||
@ -657,19 +765,22 @@ class DividerDrawer(object):
|
|||||||
elif divider_text == "rules":
|
elif divider_text == "rules":
|
||||||
# Add the extra rules text to the divider
|
# Add the extra rules text to the divider
|
||||||
if card.extra:
|
if card.extra:
|
||||||
descriptions = (card.extra, )
|
descriptions = card.extra
|
||||||
else:
|
else:
|
||||||
# Asked for rules and they don't exist, so don't print anything
|
# Asked for rules and they don't exist, so don't print anything
|
||||||
return
|
return
|
||||||
elif divider_text == "card":
|
elif divider_text == "card":
|
||||||
# Add the card text to the divider
|
# Add the card text to the divider
|
||||||
descriptions = re.split("\n", card.description)
|
descriptions = card.description
|
||||||
else:
|
else:
|
||||||
# Don't know what was asked, so don't print anything
|
# Don't know what was asked, so don't print anything
|
||||||
return
|
return
|
||||||
|
|
||||||
s = getSampleStyleSheet()['BodyText']
|
s = getSampleStyleSheet()['BodyText']
|
||||||
s.fontName = "Times-Roman"
|
s.fontName = "Times-Roman"
|
||||||
|
if divider_text == "card" and not card.isExpansion():
|
||||||
|
s.alignment = TA_CENTER
|
||||||
|
else:
|
||||||
s.alignment = TA_JUSTIFY
|
s.alignment = TA_JUSTIFY
|
||||||
|
|
||||||
textHorizontalMargin = .5 * cm
|
textHorizontalMargin = .5 * cm
|
||||||
@ -679,11 +790,17 @@ class DividerDrawer(object):
|
|||||||
spacerHeight = 0.2 * cm
|
spacerHeight = 0.2 * cm
|
||||||
minSpacerHeight = 0.05 * cm
|
minSpacerHeight = 0.05 * cm
|
||||||
|
|
||||||
|
if not card.isExpansion():
|
||||||
|
descriptions = self.add_inline_text(card, descriptions)
|
||||||
|
descriptions = re.split("\n", descriptions)
|
||||||
while True:
|
while True:
|
||||||
paragraphs = []
|
paragraphs = []
|
||||||
# this accounts for the spacers we insert between paragraphs
|
# this accounts for the spacers we insert between paragraphs
|
||||||
h = (len(descriptions) - 1) * spacerHeight
|
h = (len(descriptions) - 1) * spacerHeight
|
||||||
for d in descriptions:
|
for d in descriptions:
|
||||||
|
if card.isExpansion():
|
||||||
|
dmod = d
|
||||||
|
else:
|
||||||
dmod = self.add_inline_images(d, s.fontSize)
|
dmod = self.add_inline_images(d, s.fontSize)
|
||||||
p = Paragraph(dmod, s)
|
p = Paragraph(dmod, s)
|
||||||
h += p.wrap(textBoxWidth, textBoxHeight)[1]
|
h += p.wrap(textBoxWidth, textBoxHeight)[1]
|
||||||
@ -794,7 +911,7 @@ class DividerDrawer(object):
|
|||||||
|
|
||||||
sets = []
|
sets = []
|
||||||
for c in pageCards:
|
for c in pageCards:
|
||||||
setTitle = c.cardset.title()
|
setTitle = c.cardset
|
||||||
if setTitle not in sets:
|
if setTitle not in sets:
|
||||||
sets.append(setTitle)
|
sets.append(setTitle)
|
||||||
|
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 68 KiB After Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 59 KiB After Width: | Height: | Size: 23 KiB |
|
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 77 KiB |
|
Before Width: | Height: | Size: 73 KiB After Width: | Height: | Size: 70 KiB |
|
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 84 KiB |
|
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 72 KiB |
|
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 63 KiB |
|
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 5.9 KiB After Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 7.8 KiB |
BIN
images/card.png
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.0 KiB |
BIN
images/coin.png
|
Before Width: | Height: | Size: 1005 KiB After Width: | Height: | Size: 925 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 8.4 KiB |
|
Before Width: | Height: | Size: 9.0 KiB After Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 9.1 KiB After Width: | Height: | Size: 7.8 KiB |
|
Before Width: | Height: | Size: 9.2 KiB After Width: | Height: | Size: 9.1 KiB |
|
Before Width: | Height: | Size: 9.3 KiB After Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 9.8 KiB After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 8.7 KiB |
|
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 8.6 KiB |
|
Before Width: | Height: | Size: 9.9 KiB After Width: | Height: | Size: 8.5 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 7.1 KiB |
BIN
images/curse.png
|
Before Width: | Height: | Size: 89 KiB After Width: | Height: | Size: 87 KiB |
|
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 79 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 5.2 KiB |
BIN
images/debt.png
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 3.0 KiB After Width: | Height: | Size: 1.9 KiB |
BIN
images/dominion1stEdition_set.png
Normal file
|
After Width: | Height: | Size: 7.3 KiB |
BIN
images/dominion2ndEdition_set.png
Normal file
|
After Width: | Height: | Size: 8.8 KiB |
|
Before Width: | Height: | Size: 82 KiB After Width: | Height: | Size: 65 KiB |
|
Before Width: | Height: | Size: 77 KiB After Width: | Height: | Size: 75 KiB |
|
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 78 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 13 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 16 KiB |
|
Before Width: | Height: | Size: 131 KiB After Width: | Height: | Size: 110 KiB |
|
Before Width: | Height: | Size: 245 KiB After Width: | Height: | Size: 218 KiB |
|
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 15 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 5.5 KiB |
BIN
images/intrigue1stEdition_set.png
Normal file
|
After Width: | Height: | Size: 6.3 KiB |
BIN
images/intrigue2ndEdition_set.png
Normal file
|
After Width: | Height: | Size: 5.1 KiB |
|
Before Width: | Height: | Size: 9.1 KiB |