Commit Graph

1668 Commits

Author SHA1 Message Date
tool4EvEr
3109745a9d Fix missing zone ordering e.g. Plow Under 2021-12-08 21:49:46 +01:00
Hans Mackowiak
a2cfe96a10 CardType: All Creature Types except something 2021-12-05 03:44:14 +00:00
tool4EvEr
e98fea8879 Clean up 2021-11-19 23:56:24 +01:00
Hans Mackowiak
53b000515b Token Scripts: add Token to Name 2021-11-19 10:26:46 +01:00
Michael Kamensky
299e737716 [maven-release-plugin] prepare for next development iteration 2021-11-15 07:33:57 +03:00
Michael Kamensky
13b1a4150c [maven-release-plugin] prepare release forge-1.6.46 2021-11-15 07:33:45 +03:00
Valerio Maggio
0d99dd6df0 Quick Fix PivotEdition on DeckSections containing just lands 2021-11-12 12:59:19 +00:00
leriomaggio
e86745fb34 Merge remote-tracking branch 'upstream/master' into smart-card-art-deck-import-desktop-and-mobile 2021-11-08 07:20:07 +00:00
leriomaggio
e4cddbef1b Removed unnecessary duplication in deck for card art optimisation
All the logic for smart card art in deck import is embedded in DeckImportController - leveraging on fetch method from StaticData :)
2021-11-04 07:32:45 +00:00
leriomaggio
a93eb31629 Changes to Token to replace card, new filter on types as for cardToken importable, and getText method to be dynamic for card tokens. 2021-11-03 16:32:44 +00:00
Anthony Calosa
de74c9e62d Minor Performance
- Clear image cache if necessary (prevent clearing if the downloaded data is not image)
- Cache missing cards (prevent finding missing cards unless the user has fetched/downloads an image)
- Clear preselected options for New Gauntlet Match (easier to filter decks for Gauntlet)
2021-11-03 15:50:07 +08:00
leriomaggio
79923806c8 Few typos in Doc + added a new parameter for alternative card art to consider also a list of allowed set codes.
This change relies on the robust cardDb methods to retrieve a card also under the circumstances of a filter in place.
This change has been introduced as this is going to be leveraged by Card Art optimisation applied to DeckList in DeckImport.
2021-11-02 17:51:16 +00:00
leriomaggio
3cbd974f18 Renamed method to bluntly optimise all card art in Main (used on Mobile)
Renamed method only to make it more clearly distinguishable from other internal method for card optimisation.
2021-11-02 17:49:22 +00:00
leriomaggio
915aa75a99 DeckRecognizer.Token to include whether request in card list had any set code
This commit adds in a new piece of information to Token in DeckRecognizer to mark whether original card request included or not a set code.
This flag will be only used by actual CardToken and will be leveraged later on by "smart card optimisation option" to be added to DeckImport on desktop too.

Majority of tests in DeckRecognizerTest have been updated to cross-check that no bug has been unintentionally introduced.
2021-11-02 17:47:30 +00:00
Northmoc
0067702836 if/else for Nickname 2021-10-31 21:40:29 -04:00
leriomaggio
003646be6e Merge remote-tracking branch 'upstream/master' into deck-importer-decks-file-format 2021-10-31 08:39:22 +00:00
Anthony Calosa
cb0101fc52 [Mobile] Auto optimize card art when importing 2021-10-30 04:58:45 +08:00
leriomaggio
663ebd4120 Merge remote-tracking branch 'upstream/master' into deck-importer-decks-file-format 2021-10-28 23:20:48 +01:00
leriomaggio
40dac70ebf QuickFIX deckSection validation in Decks that inhibited the smart card art option to trigger
This MR brings a quick FIX to `validateDeferredSections` method in Deck which erroneously considered entries in filtered Card Pool as for the valid deck entries, instead of the original one.
Incidentally this affected only decks with no specified edition, imposing one given by card Db query using default Card Art Preference.
In other word, no card with NO edition was found and smart card art was never triggered.

This now won't be the case!

Another quick fix in `getAllCardNamesWithNoSpecifiedEdition` to skip all sections that are not MAIN | SIDE | Commander for which card art harmonisation is necessary.
2021-10-28 21:35:32 +01:00
tool4EvEr
1d0739d728 Fix Fury 2021-10-27 20:38:15 +02:00
leriomaggio
c31d4cbb1f Implementing (deep) deck comparison based on similarity of parts (cardPool) 2021-10-26 17:30:28 +02:00
TRT
5e050765a3 Clean up 2021-10-26 13:41:31 +02:00
tool4EvEr
fb88fcfe9c Fix deck loading not restoring foiled status 2021-10-25 23:54:08 +02:00
leriomaggio
b350a2d110 FIXED issue with race condition when updating deferredSections 2021-10-24 10:40:27 +02:00
leriomaggio
526d41bddd Added dungeon section in DeckSection matching for cards 2021-10-24 10:39:59 +02:00
leriomaggio
9f97b34a3a Recognise new Dungeon DeckSection Placeholder, and improved support to .dec files
.Dec files have collector nr//art-index as separated by a Pipe.
RegExps with collector numbers have been extended to further support decks in this format (with simply copy & paste the listing).
Tests updated/added to verify the new regexp & behaviour.
2021-10-23 21:45:04 +02:00
leriomaggio
ed19bf0a22 New Dungeon DeckSection and corresponding validator 2021-10-23 21:43:24 +02:00
leriomaggio
87439388db Improved support for Unknown cards in DeckImport
DeckImport now avoids including non-deck and metadata info in decklist as UnknownText, whilst any line that looks like a card request (i.e. includes a card quantity in the beginning) is interpreted as Unknown card.

This seems a good compromise with showing typo and any mispelling in card list whilst avoiding flooding decklist with unnecessary info.
2021-10-20 10:47:44 +02:00
leriomaggio
ca45deb935 Added patch to handle corner case with Conspiracy section as formatted in dec files. 2021-10-19 23:32:51 +02:00
TRT
0762d0877a Fix for Dewdrop Spy 2021-10-19 17:29:09 +02:00
Northmoc
80171918dd initial Friends forever 2021-10-18 07:58:01 -04:00
Michael Kamensky
1f0e7f7348 Merge branch 'vulns' into 'master'
update to fix known vulnerabilities

See merge request core-developers/forge!5576
2021-10-17 13:49:21 +00:00
Jamin W. Collins
920c5bceea upgrade to fix known vulnerabilities
* https://snyk.io/vuln/SNYK-JAVA-COMGOOGLEGUAVA-1015415
* https://snyk.io/vuln/SNYK-JAVA-COMGOOGLEGUAVA-32236

Signed-off-by: Jamin W. Collins <jamin.collins@gmail.com>
2021-10-16 20:54:11 -07:00
tool4EvEr
654e671afb Clean up 2021-10-16 23:16:32 +02:00
tool4EvEr
1a1088399e Cleanup 2021-10-16 21:34:12 +02:00
Michael Kamensky
87521416b2 Merge branch 'deck-importer-decks-file-format' into 'master'
NEW Deck Importer

See merge request core-developers/forge!5296
2021-10-16 16:47:29 +00:00
Michael Kamensky
5520cd2a67 [maven-release-plugin] prepare for next development iteration 2021-10-16 18:52:21 +03:00
Michael Kamensky
340a6b2af5 [maven-release-plugin] prepare release forge-1.6.45 2021-10-16 18:52:12 +03:00
leriomaggio
d056d2a683 Added "Special" placeholder for card rarity
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
2021-10-15 19:40:02 +01:00
leriomaggio
30a7c6aed4 Adding support for Dual/Double-sided cards in parsing + patch for commander export from Deckstats
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
2021-10-15 19:33:13 +01:00
leriomaggio
e91277f271 Merge remote-tracking branch 'upstream/master' into deck-importer-decks-file-format 2021-10-15 13:39:00 +01:00
leriomaggio
a012b236a5 Few changes to Deck Name and CC tokens trimmed and uppercase (resp).
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
2021-10-15 13:11:25 +01:00
leriomaggio
44cfc76552 Added support for Foiled cards in Token Key (w. tests)
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
2021-10-10 08:24:47 +01:00
leriomaggio
1934f27da3 Typo in documentation
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
2021-10-09 00:17:34 +01:00
leriomaggio
9f04f0cec7 Improved Token Mana Symbol Regexp with support for two colours tokens (and symbols)
All corresponding tests have been extended, and improved to cover the new supported Mana Tokens

Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
2021-10-08 13:45:31 +01:00
Michael Kamensky
ccc423dd26 - Patch getPaperCardFromImageKey not to crash for the Commander replacement effect 2021-10-07 22:09:53 +03:00
leriomaggio
835b05e573 Added support for corner case to match correct section accounting for unsupported sections.
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
2021-10-06 20:13:25 +01:00
leriomaggio
65001478b7 Heavy refactoring of DeckRecognizer to introduce cardList parsing, allowed sections, and revised TokenTypes
This commit includes a substantial change//integration into main body of DeckRecognizer API.
First off, the types of tokens emitted by recognised as now increased, leaving place to newly specialised WARNING messages, as well as tokens for cards in invalid set or sections. Moreover, a new token for UNSUPPORTED_DECK_SECTION has been introduced, which works in pair with the new extra addition of allowed Deck sections.
This new list of allowed sections is also used whenever a new DeckSection token is created (constructor) so that if the section is not currently supported, an UNSUPPORTED_DECK_SECTION token is emitted instead.

Similarly, the card recognition step has been updated so that now deck validation mechanism has been integrated at the token level. In other words, everytime each card token is now matched to the most correct section, regardless of what's been specified in card list.

Last but not least, DeckRecognizer now includes the method to parse the whole card list (and not just a single line) to better encapsulate all the logics.
Added control to include Banned and Restricted cards, as well as a newly regExp to specify Mana colour tokens using MANA symbols placeholders (e.g. {G} for green).

Tests for new features have been added and internal documentation improved, and old ones updated with new tokens and APIs.

Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
2021-10-06 16:43:24 +01:00
leriomaggio
08ca0bf175 Improved implementation of DeckSection Matching
Previous implementation was lacking to check for commander section, plus re-used the code of validators. This one is a refined and refactored implementation.

Note: as default, the method will always return Main, as there is no possibility, in general, to say whether Sideboard should be preferred instead - without any other knowledge about the deck.
Signed-off-by: leriomaggio <valeriomaggio@gmail.com>
2021-10-02 07:38:17 +01:00
leriomaggio
3e3cdc6808 Remove duplicated code to align all card tokens to have the same message.
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>
2021-09-29 08:03:39 +01:00