getBlockFormat becomes also getBlockList, inline with other methods in GameFormat.Collection. DeckManager and CardManager have been updated accordingly.
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
Latest version of the UI with expandable panel with options.
Options include Release Date, Card Art Preference, and Block Filter (if available).
This new UI update also fixes some small imperfections in the previous version, with better management of spacing.
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
Added tests for new setting w/ CardArtPreference and FIX bug on foil request when no edition is specified.
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
This method is currently used in CardManager and DeckManager for Block Filter when Historic format are supported in forge. However, now the same method will also be used in Deck Import so this refactoring was very much necessary!
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
BufferedImage (deep) copy procedure applied in CardPicturePanel may not always work when the input image has been originally cropped.
The issue is caused by `image.copyData(null)` which may sometimes work on the original (uncropped) underlying raster.
This patch fixes this issue!
Source: https://stackoverflow.com/a/26894825/2969461
On Mobile Forge Port (only) there is the possibility to set a preferred art for a card, from card catalog.
Once a card art is selected, it will always be returned for that specific art whenever no other specific edition is specified.
This commit adds changes to cardDb setPreferredArtMethod (API) and CardRequest.fromString to work with any preferred art (if any).
CardRequests reflects this change by adding another (private) constructor which expects to create a CardRequest from a preferredArt entry in the form of (CardName|SetCode|ArtIndex)
On Mobile Forge Port (only) there is the possibility to set a preferred art for a card, from card catalog.
Once a card art is selected, it will always be returned for that specific art.
This commit adds changes to cardDb setPreferredArtMethod (API) and CardRequest.fromString to work with any preferred art (if any).
CardRequests reflects this change by adding another (private) constructor which expects to create a CardRequest from a preferredArt entry in the form of (CardName|SetCode|ArtIndex)
Now DeckRecognizer supports all the exports of decks from Deckstats.net.
This now also includes card lists grouped by Rarity, CMC, and Mana Colours.
A new set of tests have been also added to test for the new non-card token types parsing, as well as a condition with multiple constraints imposed on the deck recogniser at a time. In particular, now all the combinations of constraints (also together) have been tested, and therefore the types of token returned has been adjusted.
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
This is another extra improvement which avoids setting up card catalog in current editor whenever it is actually **not** needed.
To do so, ItemPool now implements and equal method, which reflects to equality of contained items.
This is because card pool is set up multiple times whenever the Deck Editor tab is initialised - and the operation of setting up the catalog manager is particularly expensive (let alone useless when it's already done!)
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
This commit includes support to the XMage format in Deck Recognizer along with corresponding new tests and updates to labels for UI
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>