Commit Graph

52558 Commits

Author SHA1 Message Date
Michael Kamensky
f6b8a41775 Merge branch 'small_fixes' into 'master'
Small edition fixes

See merge request core-developers/forge!5219
2021-08-14 04:27:39 +00:00
Michael Kamensky
01da67676d Merge branch 'lost' into 'master'
Fix life lost triggers

See merge request core-developers/forge!5218
2021-08-14 04:27:08 +00:00
Michael Kamensky
f919f90974 Merge branch 'TRT-master-patch-72745' into 'master'
Fixes for Grist

See merge request core-developers/forge!5217
2021-08-14 04:26:31 +00:00
Bug Hunter
c9d88ae384 Fixes for Grist 2021-08-14 04:26:30 +00:00
leriomaggio
d72d48a11f FIXED bug for unique filter with missing break statement and reverse for correct iteration 2021-08-14 01:10:02 +01:00
leriomaggio
017a4c579e Merge remote-tracking branch 'upstream/master' into collector-number-in-card-list-and-card-db-refactoring 2021-08-14 00:12:27 +01:00
paul_snoops
d9411ae2a2 Small edition fixes 2021-08-13 23:27:07 +01:00
tool4EvEr
be81ba5e15 Fix life lost triggers 2021-08-13 21:25:24 +02:00
Michael Kamensky
33959fc087 Merge branch 'conspiracy' into 'master'
Fix Conspiracy Theorist

See merge request core-developers/forge!5216
2021-08-13 11:46:55 +00:00
Bug Hunter
1084a972c1 Fix Conspiracy Theorist 2021-08-13 11:46:55 +00:00
leriomaggio
9e3d97b452 Finally added option in settings for smart card art selection in Mobile Settings pane too. 2021-08-13 11:37:17 +01:00
leriomaggio
258f57e080 Merge remote-tracking branch 'upstream/master' into collector-number-in-card-list-and-card-db-refactoring 2021-08-13 11:25:38 +01:00
leriomaggio
6d8e935203 FIX a but that avoided Brawl card catalog to properly distribute art indices of cards
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)
2021-08-13 11:16:02 +01:00
leriomaggio
afaed6fea5 RENEWED and Refined implementation of getUnique for cards, also taking into account current Card Art Preference
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.
2021-08-13 11:14:31 +01:00
leriomaggio
b870d519c9 Updating Deck to use the new method in StaticData to get Card Art Preference Name
(Forgot to include this in prev. commit)
2021-08-13 10:19:37 +01:00
leriomaggio
b09b5972ab FORCING all Deck Editors to not have a Unique Cards Only filter 2021-08-13 10:17:51 +01:00
leriomaggio
d171170c45 FIX bug allowing WantUnique filter possible even if alwaysNonUnique is set to true 2021-08-13 10:17:14 +01:00
leriomaggio
50be83ee9d Disabling Unique Cards Only filter for Deck Editors (completely useless and misleading) 2021-08-13 10:16:32 +01:00
leriomaggio
beaf98793b Renamed method to retrieve card art preference name and new method to return actual card art preference instance. 2021-08-13 10:15:08 +01:00
Michael Kamensky
678bd9a9e1 Merge branch 'osgir' into 'master'
Fix Osgir looping too much

See merge request core-developers/forge!5214
2021-08-12 19:48:19 +00:00
leriomaggio
bd2971d6e9 Smart Card Art Selection Options and Preferred Art Updated for all Languages 2021-08-12 17:41:25 +01:00
leriomaggio
4b1e9b6c0c Improved Implementation for Card Art Optimisation
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.
2021-08-12 16:35:08 +01:00
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
Michael Kamensky
39722f9e26 Merge branch 'TRT-master-patch-54796' into 'master'
Update forge-gui/res/cardsfolder/h/hellrider.txt

See merge request core-developers/forge!5215
2021-08-12 11:57:02 +00:00
Hans Mackowiak
f935b30632 Mercurial Transformation: remove Card and Sub Types 2021-08-12 11:03:25 +00:00
Bug Hunter
3522220938 Update forge-gui/res/cardsfolder/h/hellrider.txt 2021-08-12 06:19:17 +00:00
tool4EvEr
aaa195ca38 Fix Osgir looping too much 2021-08-11 23:54:40 +02:00
Michael Kamensky
dc03ff599c Merge branch 'editions_update' into 'master'
Update J21 and SLD

See merge request core-developers/forge!5211
2021-08-11 18:21:55 +00:00
Michael Kamensky
dad9811bad Merge branch 'Williams-master-patch-56974' into 'master'
Update Judge Gift Cards 2021.txt

See merge request core-developers/forge!5212
2021-08-11 13:23:48 +00: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
John
491826004c Update Judge Gift Cards 2021.txt 2021-08-11 06:27:58 +00:00
Michael Kamensky
3681a0ac43 Merge branch 'combat' into 'master'
Small combat fixes for Planeswalkers

See merge request core-developers/forge!5210
2021-08-11 03:56:58 +00:00
Michael Kamensky
2fde82502b Merge branch 'egon' into 'master'
Fix Egon exiling single card

See merge request core-developers/forge!5209
2021-08-11 03:56:31 +00:00
Michael Kamensky
69358cd77f Merge branch 'fix' into 'master'
various fixes

See merge request core-developers/forge!5208
2021-08-11 03:56:01 +00:00
Sol
a3049e1d3e Fix missing booster definition crash 2021-08-11 00:55:21 +00: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
paul_snoops
a0332dda19 Update J21 and SLD 2021-08-10 23:42:03 +01:00
tool4EvEr
805e65d30c Small combat fixes for Planeswalkers 2021-08-10 21:10:45 +02:00
tool4EvEr
41ce9920ae Fix Egon exiling single card 2021-08-10 19:28:38 +02:00
Northmoc
f25e51d8f2 koma_cosmos_serpent.txt fix stackdesc 2021-08-10 12:49:52 -04:00
Northmoc
931ed2b4ef rals_dispersal.txt fix typo 2021-08-10 12:44:06 -04:00
Northmoc
baf7c84bf9 runeforge_champion.txt - add OriginAlternative$ Graveyard 2021-08-10 12:43:48 -04:00
Michael Kamensky
b049c8c09b Merge branch 'narfi' into 'master'
Narfi round 2

See merge request core-developers/forge!5206
2021-08-10 16:09:07 +00:00