Commit Graph

2461 Commits

Author SHA1 Message Date
leriomaggio
fb3db3d83a removed unused import 2021-08-26 08:05:53 +01:00
leriomaggio
26ec34e019 Updated tests and capped artIndex to be two digits! 2021-08-26 07:23:09 +01:00
leriomaggio
18a537bb5e Merge remote-tracking branch 'upstream/master' into patch-carddb-performance 2021-08-26 03:03:25 +01:00
leriomaggio
c2ff9cf3c9 Re-using default ImageKeyFromSet from PaperCard instance
(This sort of things should be looked for, and optimised!)
2021-08-26 02:50:11 +01:00
leriomaggio
3acf7384e3 FIXED Sneaky bug that capped art index in DB requests to one digit!
(Added tests in cardDb and CardRequest to cover the case!)
2021-08-26 02:47:35 +01:00
leriomaggio
fed48e01c2 Pushed even further on improvements, making it run even faster than legacy
The huge improvement is due to a re-use of a getAllCards(Name, Predicate) method I started implementing into another branch for DeckImporter - re-using this method internally resolves a **lot** of duplicated iterations, and checks, which made the whole method to run even faster than the original legacy implementation!

An extra test method has been added to verify the corner case of querying for a card from editions with a very high (and weird) artIndex (like a land) - making sure that exact card is finally returned!
2021-08-25 21:03:15 +01:00
leriomaggio
bccf6e0a27 new method with tests to get all cards with a filter predicate.
New method in Interface API to get all cards in a given setCode.
This has changed the implementation of getArtCount avoiding to iterate over all the possible card prints.
2021-08-25 19:39:54 +01:00
leriomaggio
02a241de12 worst case benchmark forcing all candidates with no image! 2021-08-25 19:03:38 +01:00
leriomaggio
7b70a34da0 further optimisation by using iterator rather than forloop with if-clauses 2021-08-25 18:44:59 +01:00
leriomaggio
eff9bc4d89 typo - has to return true not false! 2021-08-25 18:31:26 +01:00
leriomaggio
841c98dc12 First round of optimisation to CardDb
This optimisation removes redundant queries when looking for cards by specificed Art Preference.

getCardsFromSet has been worked-around, avoiding querying for potential candidates already in memory.
A preliminary benchmark/tests is implemented too.
2021-08-25 18:15:28 +01:00
leriomaggio
637aadc188 Forcing ImageKeys.hasImage to true in Mock objects!
The alternative case is covered by another specific testcase
2021-08-25 18:13:39 +01:00
Bug Hunter
dddacd5215 Fix Cascade from opponents zone 2021-08-25 17:07:11 +00:00
leriomaggio
f45f9f6c04 Updated Foil of PaperCard - re-using getFoiled method instead of useless removed constructor. 2021-08-25 12:23:00 +01:00
leriomaggio
0db01499b3 Returning correct foiled card (no code reps) 2021-08-25 12:19:19 +01:00
leriomaggio
5608b110f8 Merge remote-tracking branch 'upstream/master' into deck-importer-decks-file-format 2021-08-25 08:44:50 +01:00
leriomaggio
697cbcca18 Updated constructor invocation for DeckImport 2021-08-22 23:59:29 +01:00
leriomaggio
e220d2157a Extended loadDeck method to support the non-complete replacement of underline model
The loadDeck overloading support passing in a boolean flag to check whether current deck (if any) should be erased or not.
This will be useful when importing cards with deck importer without clearing current deck.
2021-08-22 23:56:02 +01:00
leriomaggio
a6b590df61 New version of the Deck Import with support for new tokens, and more
First round of improvements to deck import now including the current game type in the title - and so keep track of current deck format.
This will be particularly relevant for the improved DeckRecognizer which incorporates a new validation mechanism for on-the-fly card validation.

Now Deck Importer also include a very thorough set of instructions as welcome message (still WIP - to be updated and refined!)

Last but not least, there is automatic option to Import cards, or to Replace current deck (if any)
2021-08-22 23:53:41 +01:00
leriomaggio
0b9a0f41cd Added method to make current game type accessible 2021-08-22 23:49:47 +01:00
leriomaggio
f541199cca New test cases for new methods + a few tests to check predicates and get cards by name 2021-08-22 23:25:19 +01:00
TRT
bc1a91186f Card Renderer: do not display hidden cards 2021-08-22 21:14:21 +02:00
Anthony Calosa
b9205b4b1e update textbox tint 2021-08-21 14:20:47 +08:00
Anthony Calosa
d62a6333a3 Update land watermarks 2021-08-20 19:11:18 +08:00
Anthony Calosa
b355d7fc84 Add Forge SetLogo for Desktop and Mobile
Common, Uncommon, Rare, Mythic and Special Forge logos
2021-08-20 13:22:09 +08:00
Anthony Calosa
6a99ee00f1 Simulation test don't need setlookup 2021-08-16 13:42:05 +08:00
Anthony Calosa
3d322e47ee Support Set lookup for J21 and other future sets.
Forge loads all files found on the setlookup folder.
Example J21.txt (J21 set code) contains a list of set codes (sorted from Newest to Oldest beforehand) to lookup for images on other sets.
2021-08-16 12:06:20 +08: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
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
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
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
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
leriomaggio
13429991ee Updated method call reflecting the API change in StaticData 2021-08-12 16:18:01 +01:00
leriomaggio
21da278eec Aligned to latest constructor including Artist Name for foiled version. 2021-08-12 15:52:11 +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
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
Michael Kamensky
1a7845117b [maven-release-plugin] prepare for next development iteration 2021-08-07 06:30:54 +03:00
Michael Kamensky
5c768baf64 [maven-release-plugin] prepare release forge-1.6.44 2021-08-07 06:30:45 +03:00
Lyu Zong-Hong
763d509638 Add pure Phyrexian mana symbol for Rage Extractor 2021-08-06 09:46:59 +09: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
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
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
Lyu Zong-Hong
f824c33a85 Minor fix of size calculation for rendering split cards 2021-08-02 18:51:27 +09:00
Alumi
2c9b3f648d Support art crop in Card Image Renderer 2021-08-02 08:21:23 +00:00
leriomaggio
0e5611cfea Merge remote-tracking branch 'upstream/master' into collector-number-in-card-list-and-card-db-refactoring 2021-08-02 07:49:18 +01:00
Lyu Zong-Hong
1cd8255ab6 Fix token related crash 2021-08-02 14:29:53 +09:00
tool4EvEr
0114d8c9db Fix NPE 2021-08-01 08:53:07 +02:00
tool4EvEr
168cc31955 Fix crash with The Monarch 2021-07-31 19:21:45 +02:00
Lyu Zong-Hong
3b690d8c2a Move label position 2021-07-29 22:19:38 +09:00