Deck Editor and Importer + some new features
This Merge Request includes a list of new features and BUGs fixed that mainly relate to the Deck Editors and Deck Importers (but not limited to).
The Deck importer has been improved in order to include additional new functionalities as well as fix some of the existing issues reported.
[FIX/NEW] Improved and extended support for Deck formats: now the deck importer is able to recognise deck files as downloaded/exported in the following formats:
- MTG Arena (MTGA)
- MTG Goldfish (MTGOO
This new set of features has been included starting from Issue 509 and related deck examples (used for testing): https://topdeck.ru/forums/topic/12711-ub-zombie/ (mentioned in Issue 509)
Note: DeckStats format has been supported to the extend of specifying a Deck Name, and include lines with
# symbol to denote comments.
This format sometimes also include indications for the Deck Section where a card should be included. This feature has NOT been supported intentionally (so far?) due to the way in which the whole import process is implemented.
This could be supported in the future, but requires heavy refactoring.
[NEW] It is possible to specify a Deck Name to be used for the new deck. This will also update the UI. To do that, it is just necessary to type
[Deck|Name]: <NAME>in the editor.
[NEW] It is possible to mark Deck Sections, as well as Card Types in the deck list. This will result in new highlighted visualisation.
Deck Section will be used to actually setup the deck. Card types are only meant for visualisation/better organisation of the card list and also to support some deck formats.
[FIX] Fixed a bug that did not allow for Sections to be correctly identified in the deck list. (e.g.
[NEW] Deck Section now include a new validation mechanism that allow to check each cards that has been assigned to them. This is triggered in deck importer to "correct" some typos/blunders and allow for proper cards organisation in Sections. For example, conspiracy cards added in main will be moved in
Regex Engine has been extended and improved to allow for more options in cards recognition:
- Amount of cards can be specified (e.g.
- Card Set can be specified (e.g.
20 Mountains [M13]or
20 [M13] MountainsCard Set expansion can be also specified using parenthesis, rather than square brackets.
- Also Collection Numbers can be specified (e.g. as supported in MTGA format) to specify a specific IMAGE of the card, e.g.
20 Island [ELD] 255where
255is the collection number of the card.
- Amount of cards can be specified (e.g.
As for cards, with no specified card set:
- [NEW] The deck importer now includes a new dropdown menu to select what is the policy to adopt when importing cards. Supported policy will be
Earliest(also combined with the
Core and Expansions onlyfilter). The effect of this policy on card selection will be described late in better details, as the support for this policies has been implemented game-wise.
Note: The implementation of this policy has also allowed to FIX a bug in which the editions of the cards automatically chosen by the forge engine is NOW reliable and always consistent. (Before, it was completely random and not always the same - even for NON random policy).
[FIX] Fixed a bug that did not allow to show the Welcome Text of the the Deck Importer.
[NEW] Instructions have been reformatted and used to include the list of new features now supported by the Deck Importer.
[NEW] Massive Card Import feature is now possible. In particular, when opening the deck importer, if another Deck is currently being edited, there is a new option allowing to specify whether the user would like to import the cards in the new deck, or replace the current deck with the card list. By default, the import option is enabled.
Issue 766 #766
Issue 1010 #1010
Issue 509 #509 (This issue has been partially fixed only regarding comments with
#. Support for deck section indication has not been supported intentionally (so far?).
Issue 1176 #1176
Issue 587 #587 Mass card importer is now possible to update current deck.
Other (related) Changes
CardDbAPI and implementation has been substantially revised and refactored in order to allow for a consistent, reproducible (for Random) and robust methods to retrieve cards based on specific card edition or a general preference.
[NEW] The Game now includes a new Preference option (under the Deck Editor Section) that allows to specify the policy to apply when loading cards from decks when no other card set edition is specified. Supported policies are:
- Earliest (Core and Exp. only)
- Latest (Core and Exp. only)
- Random (Core and Exp. only)
This option is configurable - and changes requires Restart.
- (Other FIX in
getLatestDateOfCardsnow work as expected.
getEarliestEditionWithAllCards: now works as expected. Previously applied the
Earliestbut selected the newest.
GetCardCollectionNumbernow more robust in case of variants
- Resource file of translation for Game Preferences has been refactored and aligned in format (e.g. all "requires restart" are now aligned.)
[NEW] Deck Cover Image
New feature has been implemented to allow for the visualisation of a Cover Image in
ImageView of Decks in the main window.
The visualisation of a Cover image is now supported for Decks of the following specified types: Constructed, Preconstructed, Quest Opponent, Archetype, Net Deck.
In more details:
[FIX] Archetype Deck have a cover card by default that will be used as Cover Image. This card will be selected by
ArchetypeDeck::getProbabiliteswhich now returns probabilities sorted in descent order to allow for selecting card with the highest probability.
The ImageKey shown for Preconstructed deck is the actual Image file of the Deck (NOTE: *all the missing images have been downloaded and are included in attachments to be pushed on the FTP).
The Image Key for Constructed, Quest, and Net Deck is automatically chosen, based on the most representative card for the deck (i.e. the card with the highest probability, considering Deck statistics)
[NEW] A new contextual menu has been implemented in Constructed Editor and Deck Viewer for Constructed and Net Decks only to allow to select a card of the deck to be used as Cover Image (to customise the cover of the image). This additional metadata will be now included in the corresponding Deck File.
[NEW] Deck image view now includes a
Tooltipshowing the name of the deck!
[FIX] Translation files have been aligned and updated;
Mystery Columnhas been now specified and unveiled. In Particular, the now-called
Card Setcolumn in list view of Decks visualisation, now reported the Card Set of the mostly used card set among cards in the deck.
CProbabilitieshave been refactored and simplified, leveraging on methods that have been now refactored in the
Deckclass for better delegation of responsibility. In particular, all the methods to calculate probs, and stats for a Deck have been now moved in the API of the Deck (plus the new inner
DeckStatistics(including filtering predicates).
[FIX] Fixed a bug for Draft and Booster Editor that did not updated the UI properly for Stats and Card Probability. Discovering this bug was quite luck, but to reproduce in current version: "Custom Editor, Open Deck --> Stats (or Prob) Pane. Then "Home --> Booster Draft --> New Booster (select any) --> DraftEditor" Visualisation of the same Stats pane, NOT UPDATED or refreshed.
Deckinstance now includes reference to
deckFile(set only for Constructed and Net Deck instances).
[FIX] Fixed Issue 1211 #1211 (closed)