Commit Graph

52035 Commits

Author SHA1 Message Date
leriomaggio
e54916e837 Extended API with new methods to gather Pool Statistics and the Pivot CardEdition
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!
2021-08-12 16:30:33 +01:00
leriomaggio
13429991ee Updated method call reflecting the API change in StaticData 2021-08-12 16:18:01 +01:00
leriomaggio
788c2d8c14 Better renaming to existing methods for Card Art Preference and NEW getAlternativeCardPrint implementations
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)
2021-08-12 16:17:31 +01:00
leriomaggio
000622cfae Added MEMO comment to get rid of retrieveCollectorNumber method 2021-08-12 15:52:58 +01:00
leriomaggio
21da278eec Aligned to latest constructor including Artist Name for foiled version. 2021-08-12 15:52:11 +01:00
leriomaggio
a195bfd2b6 Minor adjustment to getArtCount implementation. 2021-08-11 08:16:21 +01:00
leriomaggio
f0e1d123b2 FIX Issue #1948
DeckChooser uses it's own `selectedDeckType` to get current selected deck type (instead of querying it from deckComboBox) to update forge perferences, accordingly.
2021-08-11 08:14:47 +01:00
leriomaggio
e71a44e76e FIX Issue #1949
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.
2021-08-11 08:08:51 +01:00
leriomaggio
8f99123059 Add new method to traverse and extract all directories recursively given a FilenameFilter
This method is part of the FIX for Issue #1949, that will be invoked by all the NetDeckXXX classes.
2021-08-11 08:05:08 +01:00
leriomaggio
fd7e5b1bba Added test case to verify that null is returned whenever a request for a card after date of release of latest edition ever is requested. 2021-08-11 00:54:04 +01:00
leriomaggio
9f3e78459e Merge remote-tracking branch 'upstream/master' into collector-number-in-card-list-and-card-db-refactoring 2021-08-05 19:25:52 +01:00
Michael Kamensky
1d4f68d95f Merge branch 'fixes' into 'master'
Fix Minimus Containment

See merge request core-developers/forge!5182
2021-08-05 15:59:06 +00:00
tool4EvEr
bb2c967f6e Fix Minimus Containment on equipment 2021-08-05 17:48:51 +02:00
tool4EvEr
6ccb41cfa6 NPE protection 2021-08-05 17:48:27 +02:00
Michael Kamensky
118e81d046 Merge branch 'master' into 'master'
update simplified chinese translation

See merge request core-developers/forge!5181
2021-08-05 11:42:55 +00:00
leriomaggio
05cfc48b43 Improved mechanism for on-the-fly (no restart) card art update in decks.
Now the smart card art selection is also included in the set of checkings that are performed to see whether or not card arts in Pools require any update.
2021-08-05 12:36:43 +01:00
CCTV-1
a146996c33 translate new settings. 2021-08-05 16:40:12 +08:00
Michael Kamensky
f6977fad35 Merge branch 'j21_4' into 'master'
J21 - 4 Aug

See merge request core-developers/forge!5179
2021-08-05 03:44:32 +00:00
Michael Kamensky
9c71c7914b Merge branch 'twosat-master-patch-87442' into 'master'
Update de-DE.properties

See merge request core-developers/forge!5180
2021-08-05 03:44:21 +00:00
Andreas Bendel
88e3f473d7 Update de-DE.properties
translated cbpCardArtFormat and nlCardArtFormat
2021-08-04 20:08:45 +00:00
leriomaggio
fe9274dabb Added mechanism to update card art when necessary
Deferred sections for deck are only used once, and just when the deck needs to be loaded. At that time, if any optimisation to card art is enabled (and required, that is "there are cards with no pre-specified edition").

After that, sections are memorised and later updated if anything needs updates, and the last used card art preference was different.
2021-08-04 18:00:13 +01:00
Northmoc
a44452f3c9 benalish_partisan.txt 2021-08-04 12:20:19 -04:00
leriomaggio
13687a0380 New test for cardDb with lazy card loading
CardDatabaseHelper has been extended to also support a db with lazy card loading.
2021-08-04 16:50:09 +01:00
leriomaggio
f0f881dbeb Attempt to load Card now with setcode in use (also overloaded when not necessary) 2021-08-04 16:01:56 +01:00
leriomaggio
7dc65d2ef1 Removed duplicate and trailing spaces 2021-08-04 16:01:17 +01:00
leriomaggio
40b20e961a CASE INSENSITIVE card map lookup for lazy card load 2021-08-04 15:59:57 +01:00
leriomaggio
a9c1c01a20 FIXED bug in CardStorageReader to support numbers in card names w/ lazy card loading
Borrowing 100,000 Arrows was the driver test case
2021-08-04 15:59:31 +01:00
leriomaggio
58b2a070ed Added test for corner cases with different case in card name and set code (also compared to legacy implementation)
Also, now LoadCard also uses the provided setCode (if any).
If null or empty string is provided in request, all editions will be used!
2021-08-04 15:58:41 +01:00
Michael Kamensky
54569bffeb Merge branch 'j21_3' into 'master'
J21 – Most of the rest

See merge request core-developers/forge!5175
2021-08-04 14:14:51 +00:00
Michael Kamensky
97fa6f1312 Merge branch 'j21_teyo' into 'master'
J21 - Teyo, Freyalise, and conjure improvements

See merge request core-developers/forge!5169
2021-08-04 14:14:15 +00:00
Northmoc
4201fa63db MakeCardEffect - put made card in None zone before moving to destination 2021-08-04 07:48:22 -04:00
Northmoc
caf067ec68 freyalise_skyshroud_partisan.txt 2021-08-04 07:38:22 -04:00
Northmoc
606ded6fc2 fix typo 2021-08-04 07:38:21 -04:00
Northmoc
18b3e14f2e teyo_aegis_adept.txt 2021-08-04 07:38:21 -04:00
Northmoc
80a24a1f93 fix desc typo 2021-08-04 07:37:47 -04:00
Northmoc
53653d5cc6 finish common "perpetually boost creature in hand" cycle 2021-08-04 07:37:46 -04:00
Northmoc
e718903957 bounty_of_the_deep.txt 2021-08-04 07:37:46 -04:00
Northmoc
ca27221188 update Editions file 2021-08-04 07:37:45 -04:00
Northmoc
21e9dd3976 add "Perpetually" to Effect names for fun 2021-08-04 07:37:45 -04:00
Northmoc
dcdf064e43 scion_of_shiv.txt 2021-08-04 07:37:44 -04:00
Northmoc
3103e4d575 baffling_defenses.txt 2021-08-04 07:37:44 -04:00
Northmoc
ea3353ee2c ethereal_grasp.txt 2021-08-04 07:37:44 -04:00
Northmoc
4360cc7fd5 add AI hint 2021-08-04 07:37:43 -04:00
Northmoc
babd2deb71 davriels_withering.txt 2021-08-04 07:37:43 -04:00
Northmoc
7c657dadf1 skyshroud_lookout.txt 2021-08-04 07:37:42 -04:00
leriomaggio
09822bdda2 Overloading PaperCard constructor without artIndex with default constant 2021-08-04 10:59:34 +01:00
leriomaggio
ce589ca6e8 removed previously introduced workaround for lowercase comparison 2021-08-04 10:58:23 +01:00
leriomaggio
8fba92acde Fixing remaining AEther to Aether to rename 2021-08-04 09:03:14 +01:00
leriomaggio
ead4d134ea Merge remote-tracking branch 'upstream/master' into collector-number-in-card-list-and-card-db-refactoring 2021-08-04 08:51:56 +01:00
leriomaggio
eb9646a0c9 Faster method to load card w/ lazy card load 2021-08-04 08:24:11 +01:00