This FIX relies on the new method in CardDb to query cards by also using collector numbers.
This has solved the issue of repeated card index/images in card catalog for Brawl (or any other limited game format in the future)
getUnique previously returned random results, based on the internal order in which entries were found.
Now, filtering by Unique Cards in Catalog is aware of the current Cart Art Preference
Also, the algorithm takes into account the case in which card image is missing.
In that case, the method tries to fill in the gaps with those alternatives having images. If not possible, the original entries are returned.
The new implementation now contains a completely refactored version of the algorithm, also including the invocation of the latest method for getAlternativeCardPrint in StaticData (with extra statistics paramenters gathered from current pool). This include optimisation for card frame, and cards from Expansion sets.
Moreover, the new implementation now automatically distribute card arts for **all** the cards in the pool - regardless they need to be "replaced" with alternative print or not.
THE ONLY case when this is not happening is when there is NO card to update in the current pool. This makes sense as this means editions has been specified, so the Deck won't receive any UNDESIRED alteration.
CardPool API has been extended by including utility methods to gather specific statistics about a cardPool. These statistics include:
- Distribution (card count frequency) of the Card Edition included in the Pool
- Distribution of the Card Edition Type included in the Pool
- Retrieving the most common Card Edition Type among those included in the Pool
- Determine whether or not the Pool "isModern" (i.e. the majority of cards is gathered from Modern Sets)
- get the PivotCardEdition: this is the cornerstone of card art optimisation for decks
The PivotCardEdition is the edition that will be considered the threshold boundary for cards in the pool. Any decision of card arts for other cards will be considered based on the PivotEdition, that is "alternativeCardPrint" released BEFORE or AFTER (depending on the current Card Art Preference) the PIVOT EDITION RELEASE DATE.
Also, this commit includes an optimisation in add method implementation, getting rid of lots of duplicated code!
Methods related to Card Art Preference Settings, and for Card Art Smart Selection have been renamed with better wording.
Most importantly, StaticData now includes a new method to retrieve the number of art count for a given PaperCard, as well as a completely refactored and improved method for getAlternativeCardPrint.
In particular, the class now provides three different implementation of getAlternativeCardPrint, with the more sophisticated one also including normalisation wrt. the card frame, and whether or not the chosen alternative print should be gathered from an Expansion edition.
All these specialisation are part of the "Card Art Optimisation" algorithm included in Deck, and instructed by statistics gathered from Card Pool (next commit)
DeckChooser uses it's own `selectedDeckType` to get current selected deck type (instead of querying it from deckComboBox) to update forge perferences, accordingly.
All the NetDeckXX classes now traverse their corresponding download dir recursively to look for deck files to load.
So far, from what I can tell, this is only necessary to correctly (re)load Net Decks >> Pro Tour.
However, this opens up the possibility to enable Net Decks to be organised in subfolders that will still be loaded back into Forge.