Commit Graph

2461 Commits

Author SHA1 Message Date
Lyu Zong-Hong
72e734faba Add preferences for card text rendering 2021-07-29 21:47:09 +09:00
Lyu Zong-Hong
c936b9fed9 Fix some issues when rendering Level up cards 2021-07-29 17:36:16 +09:00
leriomaggio
247fbc57f1 Merge remote-tracking branch 'upstream/master' into collector-number-in-card-list-and-card-db-refactoring 2021-07-29 08:00:28 +01:00
Lyu Zong-Hong
35749300ce Fix crash when rendering Phyrexian mana symbols in card text 2021-07-29 15:59:37 +09:00
leriomaggio
cf006d1c16 Updated and Aligned implementation for DeckController whenever a pick for limited catalog is required.
Most of this commit is for code formatting and cleaning. Major changes include the use fo getAlternativeCardPrint from Static Data (using the same policy that was used before) and the use of the `getTheLatestOfAllEditionsForCardsIn` method :D
2021-07-28 16:07:38 +01:00
leriomaggio
1eaf644e5b Renamed and optimised implementation for getTheLatestOfAllTheOriginalEditionsOfCardsIn + tests
`getTheLatestOfAllTheOriginalEditionsOfCardsIn` is the new name for `getEarliestEditionWithAllCards` which better clarifies the intent of the method.
The implementation has been optimised, according to the new CardDb behaviour and APIs.

The tests have been extended to verify that the output of the method is always consistent regardless of the edition of cards in the input CardPool.
2021-07-28 15:56:17 +01:00
Lyu Zong-Hong
e029149893 Use a darker color for bottom column of Level up cards 2021-07-28 20:42:12 +09:00
Lyu Zong-Hong
57acff9bff Handle Level up cards 2021-07-28 20:34:15 +09:00
Lyu Zong-Hong
f5ee502601 Handle Adventure cards 2021-07-28 20:34:15 +09:00
Lyu Zong-Hong
b07f97bf34 Handle flip cards 2021-07-28 20:34:15 +09:00
Lyu Zong-Hong
4bbf397f7a Handle Aftermath cards 2021-07-28 20:34:15 +09:00
Lyu Zong-Hong
98c778b298 Handle split cards 2021-07-28 20:34:15 +09:00
Lyu Zong-Hong
56ed95a94d Handle Saga, Class and Dungeon cards 2021-07-28 20:34:15 +09:00
Lyu Zong-Hong
f171a3be09 Center card text if there is only one line 2021-07-28 20:34:15 +09:00
leriomaggio
1697c1205f Refined implementation (+ test) for getEarliestEditionWithAllCards
This method should still be optimised, and definetly renamed.
2021-07-28 01:19:41 +01:00
leriomaggio
b893283abc Merge remote-tracking branch 'upstream/master' into collector-number-in-card-list-and-card-db-refactoring 2021-07-28 01:14:00 +01:00
tool4EvEr
ef7ff4dd66 Fix DamageDealAi math for untargeted players 2021-07-27 22:57:21 +02:00
leriomaggio
f3eb862737 FIXED typo 2021-07-27 16:19:00 +01:00
leriomaggio
79a4e71968 New test cases (and extended implementation) accounting for cards from UNKNONW sets to be correctly retrieved. 2021-07-27 16:15:25 +01:00
leriomaggio
e5350c83d6 Extended test cases to verify that any CardRequest passed in works with no side effect.
New tests (and fixed updated CardRequest implementation) verify that any method used for Card Retrieval when receiving directly CardRequest formatted strings as cardName won't have any side effect. In particular, the code is reliable to be robust enough to support passing in both card name (only) or a full cardRequest string.

If the latter, any parameter in the request will be updated - accordingly - only when explicit params in function calls are provided.
Also, new tests demonstrate that the current implementation has NO side effect when testing for multiple combinations. Therefore, whatever is requested in requestString won't be overruled, unless really requested too.
2021-07-27 14:31:37 +01:00
leriomaggio
b6bfa2fd16 Renamed Preference for Custom Card in Deck Conformance Check
Previous naming (pref and vars) was very confusing. Updated.
2021-07-27 10:48:03 +01:00
leriomaggio
6320857864 Code formatting cleanup.
Also, it is important to emphasise that previous implementation of the "Strict" Card Art Preference policy were too stringent, and did not account for corner cases when the card could not be retrieved. This has been FIXED in the new API implementation.
2021-07-27 07:40:13 +01:00
leriomaggio
e2aa8874b6 Refactoring and Extension to CardDb Test cases
Huge refactoring in variable names and test case optimisations. Also, new tests for the new API are also included. In particular, additional corner cases tested, as well as verification with Legacy (previous) CardDb implementation.
2021-07-27 07:40:13 +01:00
Lyu Zong-Hong
8f70a6ab96 Pass CardView from scaleImage() too 2021-07-27 13:48:46 +09:00
Lyu Zong-Hong
5f39b98cc5 Also render tokens and emblems when not using images 2021-07-27 12:10:26 +09:00
Lyu Zong-Hong
6e831a262d Don't update image cache if automatically download missing card images is enabled 2021-07-26 22:46:44 +09:00
Lyu Zong-Hong
e6c5c8989c Implement custom text box renderer 2021-07-26 22:15:08 +09:00
leriomaggio
29b9cb3ab0 New Set of Testcases (subclassing for regression and backlog) to force card with no Image and being sure same results apply. 2021-07-26 11:31:54 +01:00
leriomaggio
04ae8fc28a FIX cardDB implementation (and corresponding Tests) for a bug not accounting for too-strict art preference policy for some cards. 2021-07-26 11:31:11 +01:00
Lyu Zong-Hong
27856e65a0 Port Card Image Renderer to Desktop 2021-07-26 11:33:50 +09:00
leriomaggio
cc3cafa964 Added Docstring for test documentation 2021-07-25 11:17:57 +01:00
leriomaggio
1fecdd255a Simplified attemptToLoadCard by removing extra unused setCode param 2021-07-25 08:45:48 +01:00
leriomaggio
c8e3eef7cf Merge remote-tracking branch 'upstream/master' into collector-number-in-card-list-and-card-db-refactoring 2021-07-25 08:09:22 +01:00
leriomaggio
2d189cda9a Merge remote-tracking branch 'upstream/master' into collector-number-in-card-list-and-card-db-refactoring 2021-07-25 08:09:09 +01:00
Northmoc
222448d29c Add extra try for "setless" token image (Desktop) 2021-07-24 13:06:47 -04:00
leriomaggio
56080cdf3f Added support to the new Smart Card Art Preference Option
The new "Smart Card Art Selection" option for card images in deck has been added.
The Ui and forge preferences have been updated (default is False), as well as corresponding support in StaticData.
On this note, the old `getAlternativeCardPrint` has been re-implemented to enforce a "Latest_Art" based preference selection so that editions could be selected accordingly (as the smart method was originally designed)

Actual implementation of the method will be part of future commits as still under dev - and requires better encapsulation
2021-07-24 11:07:20 +01:00
leriomaggio
01d117b07e Merge remote-tracking branch 'upstream/master' into collector-number-in-card-list-and-card-db-refactoring 2021-07-23 22:38:23 +01:00
tool4EvEr
911511d039 Add Dungeon to EditionSectionWithCollectorNumbers 2021-07-23 21:33:25 +02:00
leriomaggio
f0c584f9d0 FIX bug of DeckViewer on window auto-resize
On my laptop, the dimensions of the deck viewer rescaled were ridiculously small, and smaller even than "small deck viewer".
I've removed the scaling factor, which caused the issue.
2021-07-23 10:53:17 +01:00
leriomaggio
32d0e14a35 New Preferred Card Art Preference with two separate controllers
Now menu settings (on Desktop App) includes the preferred art option selection as separated in two settings.
The former is to decide whether Latest or Original Art should be used; the latter specifies whether only core, exp. and reprint sets should be considered.

All translation files have been updated, aligned, and extended accordingly.
The MAJOR update here is that now options for Art are fully localised too!! (so far only for Desktop App)
2021-07-23 10:45:54 +01:00
leriomaggio
89bdb79d03 New methods (w. tests) to setup card art preferences
CardDb now includes a more refined mechanism to set up values for CardArt Preference.

These methods do now support the proper setup for legacy values and string values (as supported previously in mobile version).
Moreover, new methods are now defined to support the new (separated) pair of settings as integrated into the Desktop App.
2021-07-23 07:45:59 +01:00
leriomaggio
6be921c1a2 FIX for CustomCardReader to support instantiation when no custom edition has been found 2021-07-23 07:37:32 +01:00
leriomaggio
5b500bc568 Updated tests with newest cardart preference + new tests for counterspell for the many reprints. 2021-07-21 17:37:06 +01:00
leriomaggio
a5ee901bba Merge remote-tracking branch 'upstream/master' into collector-number-in-card-list-and-card-db-refactoring 2021-07-21 17:32:02 +01:00
paul_snoops
e64655280c Net Deck Archive Pauper (Desktop & Android) 2021-07-21 15:19:46 +01:00
paul_snoops
512bf18381 Net Deck Archive Pauper (Desktop & Android) 2021-07-21 14:46:31 +01:00
paul_snoops
df8de75a28 Net Deck Archive Pauper (Desktop & Android) 2021-07-21 13:32:26 +01:00
tool4EvEr
a1a326adc6 Minor clean up 2021-07-19 23:20:10 +02:00
Michael Kamensky
e46e1af8c5 [maven-release-plugin] prepare for next development iteration 2021-07-19 07:30:01 +03:00
Michael Kamensky
fbb1c906ea [maven-release-plugin] prepare release forge-1.6.43 2021-07-19 07:29:51 +03:00