Commit Graph

2254 Commits

Author SHA1 Message Date
leriomaggio
0feee4c67b Merge remote-tracking branch 'upstream/master' into collector-number-in-card-list-and-card-db-refactoring 2021-07-08 07:57:52 +01:00
leriomaggio
b42a59a1db Switch Back to "Preferred Art" option name 2021-07-08 07:57:34 +01:00
leriomaggio
4be1891a3f FIX: Better handle the case for deck cover image for empty decks 2021-07-08 07:55:12 +01:00
leriomaggio
d184856d16 Renamed Card Art Preference 2021-07-08 07:47:15 +01:00
leriomaggio
9e67d5fb48 Renamed Set Preference 2021-07-08 07:45:45 +01:00
tool4EvEr
c70b3ba4ae Fix import 2021-07-06 18:15:49 +02:00
Alumi
fcdb9b25bd Add Ante and Sideboard label to PlayerDetailsPanel to allow view cards in them 2021-07-06 16:07:31 +00: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
dab893c24f Changed options not showing node counts on disabled nodes. 2021-07-05 09:35:02 +01:00
leriomaggio
6e2d5c13b4 NDeckManager now includes the new DeckBlockFilter if preferences in menu
say to load HIstoric formats
2021-07-05 01:18:24 +01:00
leriomaggio
1252b25b0a NEW DeckBlockFilter for Deck Catalog.
This new filter mirrors (and extends) the one on Sets, which also relies on the renewed buildPredicate implementatio which looks at the edition of
a DeckProxy.
2021-07-05 01:15:00 +01:00
leriomaggio
4372311297 buildPredicate specialised for DeckSet filters
Now this new implementation brings the deck set filter to finally work as expected.
In particular, instead of checking that all cards in Deck Pools belong to a unique edition, the predicate now leverages on the getEdition() method of DeckProxy instances, which returns the latest of the earliest
sets of cards. This function will be subject to change into a future Merge Request state.
2021-07-05 01:11:59 +01:00
leriomaggio
5b67c08ae7 buildPredicate not final anymore to allow for override in subclasses
This is the first step to finally make the DeckSetFilter working properly!
So far, the filter applies if **all** the cards in a deck matches selected specific set(s).
We will allow for customisation to simplify and correct this filter - more in the next commit.
2021-07-05 01:06:25 +01:00
leriomaggio
146f44f062 Made sets attr protected to allow subclassing 2021-07-04 21:12:11 +01:00
leriomaggio
8977303c00 Improved getCount summing up the number of allowed sets in all selected blocks. 2021-07-04 21:09:38 +01:00
leriomaggio
96fa129285 FIX typo cardBlock attribute was never set in constructor. 2021-07-04 21:04:43 +01:00
leriomaggio
1aa7825c52 New Block CardManager filter (if Load Historic format is enabled)
The new CardBlockFilter extends the generic CardSetFilter by specialising the selection to set codes allowed in the corresponding Block GameFormat.

A new Label `lblBlock` has been added to language file (so far, English only)
2021-07-04 21:01:39 +01:00
leriomaggio
8a7848f411 Changed sets to protected to allow SubClassing 2021-07-04 20:44:04 +01:00
leriomaggio
9c72cf2eb4 Updating all enum FormatType to UPPERCASE as constants 2021-07-04 17:44:53 +01:00
leriomaggio
81b214f6ed CardManager updated to instantiate quest filters without reprints
CardManager now instantiate Quest World filters forcing a NO-REPRINT policy. The `allowReprints` option was set to true by default for card and deck catalog, resulting in just a weird and unexpected side-effect IMHO. Whenever a block is selected, no other reprints should be taken into account. That's the point of choosing a block.
2021-07-04 17:40:33 +01:00
leriomaggio
eed49554b5 The CardQuestWorldFilter constructors overload to include option to disable reprints.
The CardQuestWorldFilter has been updated with two extra constructors overload that also control the option to include or not the `allowReprints` attribute.
By default, the allowReprints attribute is true for backward compatibility.

The new constructor will be used (next commit) by CardManager when creating filters in Card Catalog.
2021-07-04 17:27:56 +01:00
leriomaggio
ef18dac22c CardSetFilter and DeckSetFilter now includes the allowReprints option when instantiating (for edit) the DialogChooseSets so UI updates accordingly. 2021-07-04 17:23:46 +01:00
leriomaggio
8f01f56a1e Updates to DialogChooseSets for UI sizes and status restore
First off, the status of the "allowReprints" checkbox is updated accordingly, when a filter is edited.
This fixes a previous bug that did not take this into account
(more on this, in the next commit msg).

Other improvements to the DialogChooseSets includes a better management of spaces, as well as dimension (width) of main windows that is now dynamically adapted to current resolution.

Also, this update fixes a bug having some panels dynamically adjusting height to fit components.
Now all the components should be correctly aligned, and spread across the panel.
2021-07-04 17:21:26 +01:00
leriomaggio
d8cb67a5f6 A few minor adjustments to allow the UI to restore status after an edit op. 2021-07-04 17:17:41 +01:00
leriomaggio
3906c1f3a5 Merge remote-tracking branch 'upstream/master' into editions-type-review 2021-07-04 00:22:10 +01:00
leriomaggio
a5b256f2fb Completely redesigned DialogChooseSets to use FCheckboxTree component.
This new version of the panel is completely interactive, and dynamically populated with card editions, types, and formats.

The selection of formats leads to selections of subsets of editions (and so type), updating other components accordingly.
2021-07-03 21:32:32 +01:00
leriomaggio
0393c8d4d9 Updated JDocs to workaround IDE errors 2021-07-03 21:30:25 +01:00
leriomaggio
37d7ef3ee9 Brand new desktop UI Component representing a JTree of FCheckboxes
Differently from standard JTree, this component leverages on a custom TreeCellRenderer that renders each node with a checkbox, therefore rewriting completely the selection mechanism of the JTree.

This component is currently used in the DialogChooseSets to represent card editions grouped per edition type.
In general, this component can be used elsewhere, whenever nested objects for selection should be used.

The class exposes a public API for easy interaction, as well as customised classes for nodes and nodes data, and specialised events and listeners.
2021-07-03 21:29:46 +01:00
leriomaggio
c3db51b5f8 Updated Javadoc param 2021-07-03 20:14:37 +01:00
Lyu Zong-Hong
ed0c5aac5e Add localization strings, draw markers, and updated Oubliette room 2021-06-27 15:22:33 +09:00
leriomaggio
79f4595292 Merge remote-tracking branch 'upstream/master' into editions-type-review 2021-06-21 11:45:15 +01:00
leriomaggio
fe0441c667 TEMPORARY new Dialog for Sets filtering (still very WIP) 2021-06-21 11:44:20 +01:00
Lyu Zong-Hong
afa6c9986a Use VAssignGenericAmount dialog to assign mana combo 2021-06-18 17:58:52 +09:00
Lyu Zong-Hong
dfecf5d40a Use VAssignGenericAmount dialog to assign DividedAsYouChoose values 2021-06-18 11:21:23 +09:00
Lyu Zong-Hong
21d5aeca09 Add MiscCardPanel to render player avatar when assigning trample damage or divide shields 2021-06-16 18:14:10 +09:00
Hans Mackowiak
9bdd4b9351 StaticAbilityPanharmonicon: add LastStateBattlefield to Trigger RunParams for stuff that destroys in sequence 2021-06-12 12:57:51 +00:00
tool4EvEr
828d4e17c9 Add Ask AI button 2021-06-11 23:25:57 +02:00
Hans Mackowiak
fc82dbb9aa Zabaz: add Cause to ReplaceAddCounter 2021-06-11 08:31:30 +02:00
leriomaggio
18febc5af0 Merge remote-tracking branch 'upstream/master' into collector-number-in-card-list-and-card-db-refactoring 2021-06-09 19:33:01 +01:00
leriomaggio
6ba081f1a0 getReplacementCard got a more significant name to also be used in DeckController 2021-06-09 19:06:28 +01:00
leriomaggio
2a8f80195d Removed ambiguities in test cases due to new CardDb methods with default cardart option 2021-06-09 19:04:21 +01:00
leriomaggio
b18c1f7cec Updated test imports 2021-06-09 17:52:13 +01:00
leriomaggio
448263d9de Comment (and test!) to demonstrate that current implementation of getEarliestEditionWithAllCards not only has a misleading name, but also doesn't work the way it should! 2021-06-09 17:48:07 +01:00
leriomaggio
f21612c2c4 Major Update to CardDb (along with tests).
This commit includes major updates to the CardDb aligned with the new ICardDatabase (refactored) API.

The implementation of the API now includes a more standardised and linear approach in (single) card retrieval which leverages on the refactored methods.

All these methods rely on the **new** and revised CardRequest object that now support a new method to compose request strings, as well as extending support to requests including the collector numbers.
This is a major update going towards the direction of integrating the collector number in Deck Importer when analysing cards lists.

All these new implementations have been thoroughly tested considering all possible conditions, foil cards, cards with multiple arts, and date filtering, and results compared with **previous** card DB implementation to be sure no behaviour was left uncovered from previous implementation.
(Please see `LegacyDb` class in `forge.card` tests for more details).

Cards in CardPool are now added also including the collector number directly. This should avoid PaperCard instances to rely on the retrieveCollectorNumber methods in PaperCard. [THIS needs to be tested yet].

Another major change to class structure regards the new renamed SetPreference to a more intuitive CardArtPreference.
This will be used to set up card art preference in the UI, as well as to guide card retrieval default behaviour.
(This option will be later included in the Desktop GUI as well).
Tests to compare the behaviour of these new options, and the old ones have been conducted, and all passed.
Also, this attribute has been moved from StaticData to CardDb as it seems more appropriate encapsulation, without any circular dependency.
A new method (not included in ICardDatabase) has been added to CardDb API (i.e. getCardFromEditions(name) ) which relies on the default Card Art preference.

Last but not least, Anthologies edition file receives an update on the TYPE (from other to reprint) to also deal with expected testings - case "Hymn To Tourach" when `LatestPrintNoPromoNoOnline` is selected.
2021-06-09 17:22:42 +01:00
leriomaggio
20386462ce Base PowerMock Test case for CardDb testing
This base class will be used throughout the tests whenever Card Database (Mocks) will be required for testing.

This will be the case (for example) of tests for CardRequest, CardEdition, CardDb.
2021-06-09 17:01:04 +01:00
leriomaggio
0bddf261ca Disabled outdated tests 2021-06-06 14:54:28 +01:00
leriomaggio
ad15925f67 Optimised imports with new TestNG version 2021-06-06 13:22:02 +01:00
leriomaggio
ec72b728ba Forced Lazy cards loads to false to load DB 2021-06-06 13:21:09 +01:00
leriomaggio
a281379830 Updated imports with new deps 2021-06-06 13:18:47 +01:00
leriomaggio
072ad06164 Disabled Tests = outdated 2021-06-06 13:18:00 +01:00