Commit Graph

1261 Commits

Author SHA1 Message Date
Lyu Zong-Hong
26adc5ca7b Get Paper Card for unknown edition 2021-07-27 22:17:10 +09:00
leriomaggio
286533cf90 Aligned CardDb calls after API revision for getCardFromEditionsReleasedBefore(date). 2021-07-27 07:40:13 +01:00
leriomaggio
8de07821e0 Refactoring and Second Update to the new ICardDatabase APIs
This new revision of the APi brings a more consistent distribution of the different parameters and settings in DB API calls.
In particular, the changes affect the getCardFromEditions which are now separated into three sets of methods:

- methods to retrieve a card based on CardArtPreference
- methods to also include a Release Date restriction,
that can be now considered in both directions
(as in "releasedBefore" and "releasedAfter" a specified date).

These changes will be functional for new additions in future changes to Deck Importer, as well as will be used
to refine the implementation of the new Smart Card Art Selection in Decks.

From an implementation perspective, it is important to emphasise that all those methods are just syntactic sugar
for parameter passing to the **same** core (private) retrieval method (centralised single point of failure)
which incorporates all the required parameters, that would also be cumbersome to use in a public API.
2021-07-27 07:40:12 +01:00
Michael Kamensky
c9036f90ef Merge branch 'mdfc' into 'master'
Correctly evaluate modal faces

See merge request core-developers/forge!5112
2021-07-27 04:53:19 +00:00
Lyu Zong-Hong
5f39b98cc5 Also render tokens and emblems when not using images 2021-07-27 12:10:26 +09:00
tool4EvEr
91e8c24769 Clean up 2021-07-26 21:55:48 +02: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
tool4EvEr
c3d276f3a9 SealedProduct: fix crash 2021-07-25 18:27:30 +02:00
leriomaggio
e803899d6a Renamed param in constructor for artPreference and BUG FIX in load unknown Card
Even if UNKNOWN card load is enabled, we should check whether the card was not found because of originally filtered.

Therefore, the actual UNKNOWN card will be added now ONLY IF it is not contained in the filtered Blacklist.
2021-07-25 11:17:37 +01:00
leriomaggio
1fecdd255a Simplified attemptToLoadCard by removing extra unused setCode param 2021-07-25 08:45:48 +01:00
leriomaggio
e28f6cf16f Removed useless param from attemptLoadCard 2021-07-25 08:44: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
leriomaggio
d9620a5556 TEMP implementation of Smart Card Art Selection method 2021-07-24 11:33:37 +01: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
6277bc0c0f Added note on behaviour for candidate w/ no edition
Left note only for (internal) documentation purposes!
2021-07-24 11:02:05 +01:00
leriomaggio
ec89ff755b more robust and reliable method to check for card images
The getImagefile will be invoked since this method will also account for any difference in `full` and `fullborder` naming for card images.
In particular, it will try everything possible before giving up and assume the card has no image.
This is **crucial** for cardDB card retrieval, as well as determines the boolean value returned by PaperCard.hasImage method/property
2021-07-24 10:51:26 +01:00
leriomaggio
4c001b9462 Nothing serious - explicit null initialisation 2021-07-24 10:48:08 +01:00
tool4EvEr
ac6219f4bd Clean up 2021-07-24 11:27:37 +02:00
leriomaggio
513eed297d removed annoying blank line in code formatting :D 2021-07-24 10:09:41 +01:00
Michael Kamensky
004ea04a0e Merge branch 'move-fatpacks-to-editions' into 'master'
Move fatpacks to editions

See merge request core-developers/forge!5102
2021-07-24 05:18:05 +00:00
Michael Kamensky
2b342d7118 Merge branch 'dungeon' into 'master'
Add Dungeon to EditionSectionWithCollectorNumbers

See merge request core-developers/forge!5099
2021-07-24 05:17:57 +00:00
friarsol
6210fdd9fc Move FatPacks to editions file 2021-07-23 22:47:48 -04: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
Lyu Zong-Hong
b28e32460d Fix translation issues for Class and dice rolling cards 2021-07-23 23:40:04 +09:00
leriomaggio
5c27c57f74 New and Refined methods to get and set cart art preferences for all instances of CardDb 2021-07-23 07:57:30 +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
Meerkov
b4928378c9 Fix CARDNAME on 6 cards
Some spell descriptions were not properly using CARDNAME. This is relevant because Mutate, etc.
2021-07-22 09:45:01 +00:00
leriomaggio
086b86b9c7 Removed default constructor with no cardArt preference, and so removed the default pref attribute 2021-07-21 17:35:08 +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
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
Meerkov
6c89f2053e Fix: Multiple RemoveDeck hints now properly stack
Before: The *last* RemoveDeck hint overwrites all previous flags.

After: Every RemoveDeck hint is stored properly.
2021-07-18 15:35:52 -07:00
Hans Mackowiak
e753d45b42 Update getDefinedCards for how it get Valid* cards so the syntax is consistent with other Valid script. Also remove the hacky way to set Effect as mutable for Raging River and Plague of Vermin 2021-07-18 09:06:47 +00:00
leriomaggio
f1fbb0ff80 Restored removal of preferredArt attr in StaticData 2021-07-14 08:20:04 +01:00
leriomaggio
573901ce51 Merge remote-tracking branch 'upstream/master' into collector-number-in-card-list-and-card-db-refactoring 2021-07-13 08:22:58 +01:00
leriomaggio
7528b2b4b8 Improved implementantion for add w/ cardRequest and custom cards and fromCardlist 2021-07-13 08:09:06 +01:00
leriomaggio
6b60e478ee Patch showing custom card warning properly 2021-07-12 09:22:15 +01:00
leriomaggio
e67402d5ae Change of policy for custom cards load
I've decided to use the option in settings only for gameplay, and so always allowing the load of custom cards.

This is because otherwise the option should be much more pervasive, so inhibiting card catalog, sets filters, ...
So the option will just control the use of custom cards in decks for gameplay (still false by default!)
2021-07-11 19:48:23 +01:00
leriomaggio
72e40504d7 Deck conformance check now includes custom cards to be (eventually) used in games. 2021-07-11 19:07:23 +01:00
leriomaggio
811d6479f5 CardPool now includes the option to load custom cards and check preferences.
If Custom Card setting is disabled, an error message in logs will be printed accordingly.
Custom Cards will be loaded as such in Card Pool only if the option in settings is enabled.
2021-07-11 19:06:39 +01:00
leriomaggio
e6958305b5 StaticData now includes an extra option to control the use of Custom Cards
This option is read from ForgePreferences and passed to StaticData by FModel
2021-07-11 19:04:56 +01:00
leriomaggio
7664937c93 Updated CardArtPreference Constants value
Also, the CardArtPreference Enum now includes a new methods that allows seamless recognition (and instantiation) of corresponding enum value from Forge Preference - also with backward compatibility.
2021-07-09 20:20:52 +01:00
leriomaggio
d184856d16 Renamed Card Art Preference 2021-07-08 07:47:15 +01:00
leriomaggio
b0c1f1cb0b Merge remote-tracking branch 'upstream/master' into collector-number-in-card-list-and-card-db-refactoring 2021-07-06 08:36:40 +01:00
leriomaggio
574d967cd4 New method to get Art Preference from CardDb, and refined load card method passing on edition from requestInfo
The revised implementation of `attemptToLoadCard` method now also takes into consideration any setcode that may be present into request info.

This is to reduce db lookup operation and returning a card from a very specific set.
2021-07-06 08:21:41 +01:00
leriomaggio
6adfa8b7a7 A few changes to all CardArtPreferences names and set value
Setting the value of card art preference from string now is more reliable, and it falls back automatically to the default
(Latest Art All editions).
This is to allow setting the enum value from Forge Preference Labels.
2021-07-06 08:19:31 +01:00
leriomaggio
91913879e9 Renamed SetPolicy for old art no promo
The new name, i.e. OldArtExcludedPromoAndOnlineEditions is more self-explanatory - a bit long though.

Won't exclude that I will come back at namings after having now worked on CardEdition.Type revision
2021-07-06 08:09:46 +01:00
leriomaggio
42223f109e Merge remote-tracking branch 'upstream/master' into editions-type-review 2021-07-05 09:40:34 +01:00