CardPicturePanel now supports back auto-download of card image whenever a placeholder image is being used. This has been enabled for PaperCard instances only, and currently being activated from DeckImport UI. This change won't affect in any way the deck editor as card image is being downloaded from catalog.
Also, the alpha level set to image panel has been now set to 0.5 to control grey-coloured overlay.
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
The "disabled" card effect will be used in Deck Import to show the preview of those cards that won't be imported in the deck. The new improved overlay effect has been achieved by adding a grey colour to image with alpha.
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
ImageCache now includes a new method to get the full info pair (image, placeHolderFlag) when retrieving a card image.
This will be used in CardPicturePanel to re-enable support for auto-download now that default image is not being used anymore.
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
All card tokens (those having an instance of PaperCard set) now share the same message with no code duplication.
The message has been also update - and so corresponding tests - to include set code in square brackets, and collector number (identified by sharp symbol).
This change will also simplify token formatting in Deck import.
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
Now statistics do also support to account for any "Limited Card"-Type token found in the list, if the flag to include them is set to true.
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
TokenType instantiated by the DeckRecognizer have been further specialised and extended to also include Banned and Restricted Cards.
Therefore, controls when recognising cards has also been extended and improved.
Now DeckRecognizer include specific extensions for additional constraints imposed by Game Format, Deck Format, release date and art preference. Consequently, all methods used to retrieve cards from CardDb have been updated accordingly, using recognizer settings.
Test suite has been updated accordingly - and all tests re-organised with comments for better code navigation.
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
This FIX includes:
- improvements to general UI for better rendering;
- full added support to localisation
- CardEditions in ComboBox are now sorted (using getSortedEditions) in descending order, from recent first.
- inverted order of + and - button (IMHO more intuitive)
Fixed Issue in CardManager for Unique Card Filters.
Now, only one entry of card will be returned per-edition, also accounting for Card images.
In other words, Card entry will be selected considering the default Card Art Preference. Therefore, candidate editions will be iterated in order, looking for an entry having a card with an image.
If none could be found, the original first entry (even with no image) will be returned instead.
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>