Commit Graph
29 Commits
Author SHA1 Message Date
Nick Vance 250a9e4b51 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)
2016-12-10 21:05:34 -08:00
Nick Vance c77e38824b Add Sauna/Avanto Promo Images (#80)
* Point Summon and Sauna promos to renamed promo.set.png
2016-10-17 11:53:13 +02:00
Wendel Voigt 669fa4c7e6 Add card counts and wrapper/slipcase features (#65)
This adds card counts and the option to print wrappers (aka slipcases).
It fixes issues #45, #47, and #48.
2016-07-06 14:16:06 -07:00
robertre2 eb338c77d8 Added Event and Landmarks. (#62)
Added Event and Landmarks from Empires, and the Summon Event.
Fixed some problems with display of Debt in descriptions.
2016-06-16 13:39:45 -07:00
Nick Vance 4219753e39 Action treasure banner add (#61)
* Add action-treasure banner image
2016-06-16 13:34:32 -07:00
Nick Vance 12ade488d6 Add Landmarks Banner (#58) 2016-06-14 16:50:17 -07:00
Mark Bogdanoff 9e07f2d1f6 add empires set image, debt image 2016-06-10 20:31:08 -07:00
Manuel 6aaa690473 Add empty coin symbol with example 2016-02-25 20:25:50 +01:00
Pekka Mikkola 2122c0eccc Fix banner for hovel 2015-05-05 11:26:44 +03:00
Pekka Mikkola 782edb061d Add image for event 2015-05-04 23:39:33 +03:00
Pekka Mikkola db174a4cde Add banner image for Caravan Guard 2015-05-04 23:19:40 +03:00
Pekka Mikkola a964908ff7 Add new separate banners for each shelter 2015-05-04 22:41:40 +03:00
Pekka Mikkola 88c819b26a Add images for reserve banners 2015-05-04 22:38:23 +03:00
Robert R. Enderlein db079630c2 Added icon for Adventures set. 2015-04-26 23:55:30 +02:00
Sumpfork e049f90d7b add Prince set image 2014-07-03 17:32:29 -07:00
sumpfork c2a3799885 shrink expansion tab image; add expansion dividers to release script 2013-07-20 20:24:06 -07:00
sumpfork 59902146c2 add background image for expansion divider 2013-07-20 18:27:46 -07:00
sumpfork@mailmight.com 6e45c13cb8 add preliminary guilds set icon 2013-06-19 18:03:39 -07:00
sumpfork@mailmight.com e207e24ee2 all set images except base; simplify offset code for heights in tabs 2012-11-09 17:32:59 -08:00
sumpfork@mailmight.com ed1ae76b30 alchemy set image added 2012-11-09 16:19:49 -08:00
sumpfork@mailmight.com e88d0ec5eb prosperity,seaside set images; adjust treasure tab image; start new CardType class to clean up code a bit 2012-11-08 18:17:16 -08:00
sumpfork@mailmight.com 4fd0773f2a scale tab images to be more like action one 2012-11-08 17:26:58 -08:00
sumpfork@mailmight.com 02aa832bc9 remove coin from tabs, draw it separately 2012-11-02 16:01:49 -07:00
sumpfork a2a78154e8 missed some hinterlands tab images 2012-09-04 16:14:06 -07:00
sumpfork 9d6ea0ebce new tab labels; separating out some tabs as options 2012-09-04 16:00:28 -07:00
Peter Gorniak 2c78c18dfc add treasure-reaction and victory-reaction tab images from hinterlands 2012-09-02 12:59:21 -07:00
sumpfork@mailmight.com d2b4def742 add VP icon 2012-08-22 01:37:50 +01:00
sumpfork@mailmight.com 16c1ea678e more fixes for coin inline images 2012-08-22 01:18:48 +01:00
sumpfork@mailmight.com aeb55f6383 first pass at Dark Ages; starting to add coins images to text instead of +x Coins; fix setup to include .txt files; bzr cleanup and additions 2012-08-22 00:44:51 +01:00