Commit Graph

52558 Commits

Author SHA1 Message Date
tool4EvEr
d853ca6615 Fix CostTapType NPE 2021-06-11 12:33:37 +02:00
Michael Kamensky
418d2bf012 Merge branch 'update_card_translations' into 'master'
Update card translations

See merge request core-developers/forge!4862
2021-06-11 10:07:29 +00:00
Lyu Zong-Hong
030f1f4056 Update Japanese translations 2021-06-11 16:56:17 +09:00
Churrufli
45f598e0b9 Oathbreaker Net Decks implementation 2021-06-11 09:07:41 +02:00
Hans Mackowiak
fc82dbb9aa Zabaz: add Cause to ReplaceAddCounter 2021-06-11 08:31:30 +02:00
Lyu Zong-Hong
6feb18c11c Update card translations 2021-06-11 15:10:49 +09:00
Michael Kamensky
c07f3ea34d Merge branch 'master' of git.cardforge.org:core-developers/forge into agetian-master 2021-06-11 07:50:33 +03:00
Michael Kamensky
8948210e0a Merge branch 'fixland' into 'master'
Fix playLand ETB check failing if lands changed by another effect

See merge request core-developers/forge!4860
2021-06-11 03:47:55 +00:00
paul_snoops
df0b5362c2 Net decks updates 2021-06-10 20:09:40 +01:00
tool4EvEr
a9b60a87e0 Fix playLand ETB check failing if lands changed by another effect 2021-06-10 18:10:42 +02:00
Sol
694317a50f Merge branch 'fixes' into 'master'
More small fixes

See merge request core-developers/forge!4855
2021-06-10 15:36:25 +00:00
tool4EvEr
a856834693 Refactor guard 2021-06-10 17:29:26 +02:00
Michael Kamensky
35b71da140 Merge branch 'master' into 'master'
Gauntlet Updates

See merge request core-developers/forge!4859
2021-06-10 11:49:55 +00:00
leriomaggio
5bc4122a31 Merge remote-tracking branch 'upstream/master' into collector-number-in-card-list-and-card-db-refactoring 2021-06-10 10:53:02 +01:00
Churrufli
3b2e39808e Gauntlet Updates 2021-06-10 10:41:45 +02:00
Churrufli
697a2ace20 Gauntlet Updates 2021-06-10 10:37:24 +02:00
Sol
c38c53d513 Merge branch 'fix-play-effect' into 'master'
isBlank() is from Java 11

See merge request core-developers/forge!4858
2021-06-10 01:58:13 +00:00
friarsol
31745fe31e isBlank() is from Java 11 2021-06-09 21:57:47 -04:00
Sol
f8e3f4dd31 Merge branch 'migrate-mh2' into 'master'
Migrate Modern Horizons 2

See merge request core-developers/forge!4857
2021-06-10 01:47:40 +00:00
friarsol
965ec4bc47 Migrate Modern Horizons 2 2021-06-09 21:46:33 -04:00
Sol
9cf28e7041 Update u_0_3_crab.txt 2021-06-10 01:28:52 +00:00
Sol
71f639d45e Merge branch 'garth_one_eye' into 'master'
Add Garth One-Eye and necessary support

See merge request core-developers/forge!4856
2021-06-10 00:43:30 +00: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
7bcc4b46e1 Removed useless artIndex parameter 2021-06-09 19:04:38 +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
0c813024d2 First improvement to API in convertXitaxMethod simplifying implementation thanks to new CardDb API 2021-06-09 18:51:08 +01:00
leriomaggio
319cb5515c Updated PaperCard constructor to safely set Art index when negative values are passed in. 2021-06-09 17:53:05 +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
58b2a96168 Updates for New CardDb API [getAllCards(edition)] 2021-06-09 17:47:09 +01:00
leriomaggio
c53899d8c9 Updates with new API relying on default cardArt option 2021-06-09 17:46:42 +01:00
leriomaggio
b17ea15935 Updates with new renamed CardArtPreference options in CardDb 2021-06-09 17:44:55 +01:00
leriomaggio
87257f0413 Using IPaperCard constants for ArtIndex instead of hard coded values when adding cards to pool 2021-06-09 17:44:07 +01:00
tool4EvEr
084476b8b0 Clean up 2021-06-09 18:43:34 +02:00
leriomaggio
22b1abece5 Updated API call to CardDB with getCardFromEditions w/ LatestPrint
Probably the specs of the policy hard coded could be removed, but requires more investigation before doing it.
2021-06-09 17:43:11 +01:00
leriomaggio
2c2f6f6f31 Updated API call to CardDB with getCardFromEditions w/ OldPrint 2021-06-09 17:40:29 +01:00
leriomaggio
5ad05f94ad Updated API call to CardDB with getArtCount and getMaxArtIndex 2021-06-09 17:35:18 +01:00
leriomaggio
58cfbf4c0d Updated API call to CardDB with PreferredCardArt
Note: the `convertByXitaxMethod` will be soon discontinued thanks to the new upcoming option and API.
Same will apply to those methods in StaticData
2021-06-09 17:33:37 +01:00
leriomaggio
eb9899e405 Updates to ITokenAPI aligned with Cards' Interface. 2021-06-09 17:26:12 +01:00
leriomaggio
8ea2f18fda Updates to StaticData to pass on preferredArt to CardDb constructor and new CardArtPreference enum. 2021-06-09 17:24:57 +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
48859a32a3 ITokenDatabase API have been aligned in names with those for cards. 2021-06-09 16:59:14 +01:00
leriomaggio
dad3cafd7a IPaperCard now includes a constant placeholder for NO Art Index.
This is an attempt to start removing all the hard-coded values
used throughout the code base whenever art index should be
invoked, by relying on a more stable approach based on
constants.
2021-06-09 16:58:48 +01:00
leriomaggio
d4c19a0a1f Complete Refactoring of the CardDb API
The API for Magic Card Database has been refactored so to include card look up methods as organised in three main categories:
- single card lookup based on details (name, ed code, collector number)
- card lookup from a given edition (i.e. CardEdition instance)
- card lookup based on Art Preference

Methods to retrieve collection of cards have been renamed to allow
for overloading, within a more consistent API.
Same for utility methods to retrieve cards' art index and count.

Last but not least, the old "getFoiled" method has been removed to leave space to the new method in PaperCard API.
2021-06-09 16:57:09 +01:00
Lyu Zong-Hong
f9abb8ca75 Add Garth One-Eye and necessary support 2021-06-09 23:07:55 +09:00
tool4EvEr
4b0c748eaf Fix Myr Battlesphere allowing you to tap for X = 0 2021-06-09 11:40:11 +02:00
tool4EvEr
083674071b Reset xPaid after ability resolved 2021-06-09 11:40:01 +02:00
tool4EvEr
96ccf0afc6 More small fixes 2021-06-09 09:43:02 +02:00