Commit Graph

1059 Commits

Author SHA1 Message Date
tool4EvEr
069403ab6c Clean up 2021-06-03 14:22:56 +02:00
leriomaggio
560d8ec5c0 Refactored duplicate code in StaticData w/ new getCardEdition method
StaticData now includes a new method, namely `getCardEdition` which looks for a CardEdition instance into editions and customeditions given an input set code.

This new method has been refactored and used throughout the new changes in Advanced Search and Filters.
2021-05-31 19:57:33 +01:00
leriomaggio
32cc860eda Changed getSortedEditions to now also include Custom Sets 2021-05-31 10:18:21 +01:00
leriomaggio
03d6687c64 Merge remote-tracking branch 'upstream/master' into fix-deck-editor-custom-editions-image-view 2021-05-31 09:12:32 +01:00
leriomaggio
9902718082 FIX and Impros to CardEdition, CardInSet and Reader
- Reader has a new updated regexp to deal with non-numerical collectorNumbers
- CardInSet have been now made sortable based on CollectorNumber.
To do so, collectorNumbers are transformed accordingly to allow for natural ordering (as expected) instead of lexicographic order.
- CardEdition now return cards (CardInSet) as sorted, to allow for correct artIndex matching when creating corresponding `PaperCard` instances.
Moreover, `compareTo` of card edition has been improved to also take into account set name (in cases of same release date).
2021-05-30 05:36:09 +00:00
leriomaggio
0217c4b4b2 Support collectorNumber for Cards in Custom sets
retrieveCollectorNumber now also considers customEditions when looking for the matching collectorNumber of a PaperCard instance.
2021-05-30 00:21:05 +01:00
leriomaggio
f5563ccedb New method to return the Collection of Custom Editions 2021-05-29 23:42:34 +01:00
leriomaggio
348365b8fd Merge remote-tracking branch 'upstream/master' into patch-imagefetcher-scryfall 2021-05-28 23:30:06 +01:00
leriomaggio
b076a57811 New utility method to compose Scryfall Download url that is compliant with new API specs 2021-05-28 19:19:08 +01:00
leriomaggio
8b7ae19508 FIX and Impros to CardEdition, CardInSet and Reader
- Reader has a new updated regexp to deal with non-numerical collectorNumbers
- CardInSet have been now made sortable based on CollectorNumber.
To do so, collectorNumbers are transformed accordingly to allow for natural ordering (as expected) instead of lexicographic order.
- CardEdition now return cards (CardInSet) as sorted, to allow for correct artIndex matching when creating corresponding `PaperCard` instances.
Moreover, `compareTo` of card edition has been improved to also take into account set name (in cases of same release date).
2021-05-28 15:37:44 +00:00
Anthony Calosa
cb9a2d7b8b unused import 2021-05-28 10:20:13 +00:00
Anthony Calosa
367170d33b Update FileUtil.java 2021-05-28 10:10:54 +00:00
Lyu Zong-Hong
81d0a71060 Update FileUtil.readFile to use UTF-8 charset to read files. 2021-05-28 17:25:12 +09:00
leriomaggio
8d2d633f6d FIX and Impros to CardEdition, CardInSet and Reader
- Reader has a new updated regexp to deal with non-numerical collectorNumbers
- CardInSet have been now made sortable based on CollectorNumber.
To do so, collectorNumbers are transformed accordingly to allow for natural ordering (as expected) instead of lexicographic order.
- CardEdition now return cards (CardInSet) as sorted, to allow for correct artIndex matching when creating corresponding `PaperCard` instances.
Moreover, `compareTo` of card edition has been improved to also take into account set name (in cases of same release date).
2021-05-27 10:38:51 +00:00
leriomaggio
d448b59dcc Just code formatting 2021-05-24 11:48:22 +01:00
leriomaggio
189b0ea122 Formatting adjustments 2021-05-24 10:13:40 +01:00
leriomaggio
c03da7eb74 Revert to CollectorNumber in PaperCard as String to handle cases of mulitple art (e.g. 21a). 2021-05-23 16:52:12 +01:00
leriomaggio
a0c126f39e Merge remote-tracking branch 'upstream/master' into collector-number-in-card-list-and-card-db-refactoring 2021-05-23 14:50:49 +01:00
leriomaggio
0e49d103b1 Update to the new getFoiledMethod in PaperCard API 2021-05-23 14:34:38 +01:00
leriomaggio
12387f0efb Refactoring of PaperCard API for collectorNumber and GetFoil.
PaperCard instance now includes a new attribute (i.e. `collectorNumber`) that will be used later on to fill in the "CN" Column in List view (see `ColumnDef.java`).
To allow for minor disruption to existing API, the collectorNumber attribute will be handled in a _Property-like_ fashion via the getter method (i.e. `getCollectorNumber`).
In particular, if collectorNumber is marked as `UNSET` (i.e. `PaperCard.UNSET_COLLECTOR_NUMBER`), the corresponding value will be automatically retrieved from the matched `CardEdition`, and updated for later use.
Nevertheless, Constructors including the new parameter have been also set for future API change.
Moreover, the new attribute has been also considered in methods for object comparison, for a more accurate sorting criterion.

The second new addition to PaperCard API regards FOIL cards (i.e. `getFoiled()`).
This method was originally part of `CardDb` API as described in ISSUE #1848.
With this API change, an internal reference to a `PaperCard` (foil) instance will be used to return the foil version of "itself" for each PaperCard Instance. This will avoid proliferation of PaperCard instances in memory, while keeping all information consistent with the original "unfoiled" card.
NOTE: at the moment, every card can be Foiled, with no restriction whatsoever on the _actual_ existence of original (true) PaperCard.
2021-05-23 13:07:39 +01:00
leriomaggio
41be0bb069 PaperToken aligned with the new IPaperCard Interface (collectorNr always to default for tokens) 2021-05-23 12:56:10 +01:00
leriomaggio
6edcb95aab Refactor IPaperCard Interface to include collectorNumber
The IPaperCard interface now includes a method to return the Collector Number of a Card.
Moreover, two new constants have been included for Default Art Index (i.e. 1) and a flag to mark the absence of a Collector Number (i.e. 0).
2021-05-23 12:55:15 +01:00
tool4EvEr
4aafafb5bd Minor cleanup 2021-05-16 12:52:02 +02:00
Bug Hunter
d9340349fa ColorIdentity: Check for CDA text 2021-05-10 19:36:09 +00:00
Anthony Calosa
c5d6214ab2 fix localizer 2021-05-02 19:44:19 +08:00
Anthony Calosa
322ebdf8a6 Update spacing 2021-05-02 09:16:55 +08:00
Anthony Calosa
3d3296d1b7 [Mobile] Fix ExceptionInInitializerError forge.screens.home.NewGameMenu$NewGameScreen
- some mobile issues reported via Sentry is related to Translation errors and it should return the default original value from English locale.
2021-05-02 09:13:49 +08:00
Anthony Calosa
28ec418c76 unused Import 2021-04-30 14:46:49 +00:00
Anthony Calosa
6d3155dff9 prevent NPE 2021-04-30 22:27:07 +08:00
Anthony Calosa
1e1c5fa139 update Filter 2021-04-30 22:20:26 +08:00
Anthony Calosa
d227da0c10 refactor getStartingPlaneswalkerOptions 2021-04-25 11:49:05 +08:00
Anthony Calosa
36c3c43f86 Merge branch 'master' into 'master'
Simplify ManaConversion scripts, remove Flash/Ice Cave technical debt

See merge request core-developers/forge!4479
2021-04-12 10:14:23 +00:00
Hythonia
41d55cf780 Simplify ManaConvertion scripts 2021-04-12 10:03:02 +02:00
Michael Kamensky
0e32dc982e Merge branch 'unset-cards' into 'master'
Just host cards

See merge request core-developers/forge!4460
2021-04-12 04:19:30 +00:00
Michael Kamensky
76a1da2d0f Merge branch 'emblazoned_golem' into 'master'
Add Emblazoned Golem

See merge request core-developers/forge!4467
2021-04-12 04:17:33 +00:00
Adam Pantel
b7ee2c696b Some host cards 2021-04-11 18:35:03 -04:00
Michael Kamensky
fc1c5ca6e9 Merge branch 'fixlang' into 'master'
CardTranslation: Add fallback for english only cards

See merge request core-developers/forge!4456
2021-04-11 12:40:19 +00:00
Lyu Zong-Hong
8ae916ac28 Add Emblazoned Golem 2021-04-11 18:56:49 +09:00
Anthony Calosa
501df02260 update ImageKeys 2021-04-11 10:03:56 +08:00
tool4EvEr
b590c6b55a CardTranslation: Add fallback for english only cards 2021-04-10 20:00:48 +02:00
Adam Pantel
ab287858b3 Improve land handling 2021-04-08 16:05:54 -04:00
Anthony Calosa
1f6ef5f045 Update StaticData.java 2021-04-07 07:59:39 +00:00
Anthony Calosa
92b0aad937 Update support for Custom Cards 2021-04-07 15:50:24 +08:00
Anthony Calosa
d9cf090060 update 2021-04-06 15:49:30 +08:00
Anthony Calosa
9a2eaa7a1d fix filteredCards, fix NPE devmode 2021-04-06 15:27:14 +08:00
tool4EvEr
225790cc4b Fix parsing of new edition sections 2021-04-04 23:52:41 +02:00
Anthony Calosa
79cea28630 Skip loading filtered card 2021-04-02 14:31:21 +08:00
Anthony Calosa
839a91d144 fix check 2021-04-01 15:53:10 +08:00
Anthony Calosa
c0af1fa1eb [Mobile] preload ItemPool and fix Planar Conquest new game 2021-04-01 02:34:14 +08:00
Anthony Calosa
5348cd3f22 refactor enable non legal cards 2021-03-31 14:01:25 +08:00