Commit Graph

52645 Commits

Author SHA1 Message Date
leriomaggio
6726d1f776 New method to retrieve all available databases in a MAP (w/ names)
This method is used in CardPool to add a card, and keep track of the original DB.
2021-07-28 16:50:18 +01: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
3e63a0c54d Renamed attr. and methods related to "allowCustomCardsInDecksConformance" options and improved API for alternativeCardArt
The new `getAlternativeCardArt` method builds on the previous `getCardFromEdition` which generates alternative card art given a PaperCard and a reference date.
Extension to this method is also incorporated to force the options to adopt for card art preference policy.
If None provided, default options set up in Game preferences will be used!
2021-07-28 16:02:34 +01:00
leriomaggio
dc10c6217e Improved code formatting and extensive refactoring of code for smart card art optimisation
Note: deferred section are still kept alive for live testing. Will be restored and fixed next commit.
2021-07-28 15:59:55 +01:00
leriomaggio
93fa6b28b2 All the logic used in Deck for OptimisedCardArt relating to Pivot Edition and Editions Frequency Map has been now moved in CardPool
CardPool now includes the logic to (a) retrieve the edition frequency map of itself, as well as retrieving its corresponding PivotEdition (depending on cards in the pool).

This refactoring optimises the code in Deck class for "smartCardArt" selection
2021-07-28 15:58:39 +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
Northmoc
953430255e - I'm dumb 2021-07-28 10:42:51 -04:00
Michael Kamensky
47ad20523e Merge branch 'refine_card_image_renderer' into 'master'
Refine card image renderer

See merge request core-developers/forge!5128
2021-07-28 14:42:26 +00:00
Northmoc
a14b13164f - clean up line that sets "prompt" 2021-07-28 09:54:07 -04:00
Northmoc
d903cb1a84 add Command to "perpetual" AffectedZone list 2021-07-28 09:52:13 -04:00
Northmoc
baa7855ff5 natures_wrath.txt fix Description 2021-07-28 09:48:59 -04:00
Northmoc
4e02f01bf8 knight_of_the_ebon_legion.txt - Players not Opponents 2021-07-28 09:48:26 -04:00
Northmoc
87faa670e1 davriel_soul_broker.txt - make each Effect name unique 2021-07-28 09:47:30 -04:00
Northmoc
bd7ab26f3e Support "ChoicePrompt" for GenericChoice 2021-07-28 09:36:16 -04:00
Northmoc
d58191283e davriel_soul_broker.txt 2021-07-28 09:35:25 -04:00
Northmoc
8dcf4b7a19 plaguecrafters_familiar.txt 2021-07-28 09:33:16 -04: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
Michael Kamensky
ab85ccaff9 Merge branch 'assign' into 'master'
Fix assigning damage to lost players

See merge request core-developers/forge!5127
2021-07-28 07:18:17 +00:00
Michael Kamensky
ad55566a98 Merge branch 'aifix' into 'master'
Fix DamageDealAi math for untargeted players

See merge request core-developers/forge!5125
2021-07-28 07:18:10 +00:00
tool4EvEr
9a621f2179 Improve Crackling Doom logic 2021-07-28 07:15:10 +02:00
tool4EvEr
a00e408c84 Fix assigning damage to lost players 2021-07-28 06:30:06 +02:00
Michael Kamensky
40ef4de16e Merge branch 'J21' into 'master'
Added Jumpstart: Historic Horizons edition file

See merge request core-developers/forge!5123
2021-07-28 03:49:21 +00:00
Nigol
f5bf7a4581 Fixed Net Decks Archive not working on Mobile when in the Deck Manager
(cherry picked from commit 8585d49e246d4c936f1ddbad2b39f5c1381f64dc)
2021-07-27 21:04:47 -04: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
2cc1ee724d Merged Conflict with CardDB method call 2021-07-28 01:16:20 +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
c8052e00a8 New method processCardList that generates the List of Pair per request.
This method will be also re-used in Decks when inspecting the list of cards to add in a Deck Section.

This refactoring avoids code duplications, and improves modularization.
2021-07-27 17:58:49 +01:00
leriomaggio
f3eb862737 FIXED typo 2021-07-27 16:19:00 +01:00
leriomaggio
f7e85b1f64 Updated with new method call from StaticData to account for conformance of custom cards 2021-07-27 16:16:26 +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
paul_snoops
e645dd3eaf Formats fixed 2021-07-27 14:24:44 +01:00
Alumi
3f30f45972 Merge branch 'fix_unknown_cards' into 'master'
Get PaperCard for unknown edition

See merge request core-developers/forge!5124
2021-07-27 13:19:52 +00:00
Lyu Zong-Hong
26adc5ca7b Get Paper Card for unknown edition 2021-07-27 22:17:10 +09:00
paul_snoops
4e99063750 Added Jumpstart: Historic Horizons 2021-07-27 12:01:25 +01:00
leriomaggio
b1a2af4868 Updated Translations for "Custom Cards in Deck Conformance" Option for remaining languages. 2021-07-27 11:11:38 +01:00
leriomaggio
5a7d0c7b6b Updated Mobile Settings Panel with the upd vars and labels for "Custom Cards in Deck conformance" option. 2021-07-27 10:53:01 +01:00
leriomaggio
9978632c10 Improved ITALIAN translations on Custom Card Check in Deck Conformance and other minors.
Clarified (imho) a ton my own previous wording about this option - also for Italian. Moreover, this update aligns all the "RESTART REQUIRED" labels with the same translation and case.
2021-07-27 10:52:04 +01:00
leriomaggio
59b9ed1c4d Improved wording for Custom Card Check in Deck Conformance
Clarified (imho) a ton my own previous wording about this option.
2021-07-27 10:49:47 +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
Hans Mackowiak
3a1bd57fcb Merge branch 'maven_build_fix' into 'master'
Fix for broken Maven build

See merge request core-developers/forge!5122
2021-07-27 07:05:35 +00:00
leriomaggio
38a63bb4ce FIXED duplicated entries 2021-07-27 08:04:49 +01:00