Commit Graph

52834 Commits

Author SHA1 Message Date
Anthony Calosa
17f60dbfd8 Merge branch 'master' into 'master'
Update Venture Effect

See merge request core-developers/forge!5270
2021-08-29 13:21:48 +00:00
Anthony Calosa
eb0a6d47b1 updateTest 2021-08-29 21:19:30 +08:00
Anthony Calosa
d19f30e9ab Update Venture Effect 2021-08-29 21:11:42 +08:00
leriomaggio
24c31e9de9 Restored sort in CardPool using Collections to allow for Android comp. 2021-08-29 11:02:26 +01:00
leriomaggio
b1ed8565d3 FIXED typo in using iterator rather than keyset directly 2021-08-29 08:06:43 +01:00
leriomaggio
831b40e753 Removed unused imports! 2021-08-28 21:13:59 +01:00
leriomaggio
924c57be70 FIX typo, and renamed vars! 2021-08-28 20:58:06 +01:00
leriomaggio
eea2b754ec Added new Lookup table for sortable collector number to avoid repeated computations for the same coll numbers!
FIX typo and made map final!
2021-08-28 20:55:33 +01:00
leriomaggio
e2034ebd51 Added new Lookup table for sortable collector number to avoid repeated computations for the same coll numbers! 2021-08-28 20:48:27 +01:00
leriomaggio
8d35f747c0 Restored original implementation (but still using iterator) 2021-08-28 20:47:03 +01:00
leriomaggio
a8acbf0491 Improved CountAll method implementation using Maps 2021-08-28 20:46:44 +01:00
leriomaggio
8768900cf8 FIX cardDb bug for lazy card loading when issuing a request with a non-existing set code.
Code FIX + Test
Now the implementation in CardDb will automatically try to get the card with that name from an existing edition
2021-08-28 18:29:07 +01:00
leriomaggio
a7d1e7398a FIX cardDb bug for lazy card loading when issuing a request with a non-existing set code.
Code FIX + Test
2021-08-28 17:54:53 +01:00
leriomaggio
b1c50599e9 Improvements to getFilteredPool method.
Previous implementation did not consider the amount per card included in the pool already - so the filtered pool always got 1 amount for each card passing the filter.

This should be no problem considering where this method is used. However, to make it portable to other cases, I made the implementation to report the same amount of cards in the new filtered pool.
2021-08-28 16:59:26 +01:00
leriomaggio
c72d8c87b7 Merge remote-tracking branch 'upstream/master' into patch-carddb-performance 2021-08-28 16:49:46 +01:00
leriomaggio
7613b27e6e Still scratching a little of performance impros by avoiding checking class instance.
When StatTypeFilter is used withing Deck Editor (with all PaperCard instance in ItemPool), avoiding checking instance class improves performance a bit (saving a couple of hundreds of milliseconds).

However, when this filter with also other inventory items (pack or deck), the same code as before is executed.
2021-08-28 16:47:10 +01:00
leriomaggio
42e91b60ea Code to cover cases for Randomly generated Deck (from Archetypes) not having collectorNumbers and Artist Set 2021-08-28 16:39:59 +01:00
Bug Hunter
ad88a0223f Merge branch 'keys' into 'master'
Fix checkForManaSacrificeCost check

See merge request core-developers/forge!5267
2021-08-28 05:54:58 +00:00
TRT
fc802e3395 Fix checkForManaSacrificeCost check 2021-08-28 07:54:11 +02:00
Bug Hunter
f8c35d7d9b Merge branch 'keys' into 'master'
Fix ImageKeys again

See merge request core-developers/forge!5266
2021-08-28 05:39:13 +00:00
TRT
1529ffe630 Fix ImageKeys again 2021-08-28 07:38:32 +02:00
Michael Kamensky
efb8ff00c4 Merge branch 'companion' into 'master'
Correctly setup ChooseCompanionAi

See merge request core-developers/forge!5264
2021-08-28 05:05:46 +00:00
Michael Kamensky
18ab34e3d5 Merge branch 'patch-carddb-performance' into 'master'
Card Hover FIX in Catalog + extra optimisation in performance and refactoring

See merge request core-developers/forge!5263
2021-08-28 05:05:21 +00:00
Anthony Calosa
6b16b7a18b Merge branch 'kevlahnota-master-patch-46581' into 'master'
fix ImageKeys.java

See merge request core-developers/forge!5265
2021-08-27 22:14:20 +00:00
Anthony Calosa
f6341a2bc9 fix ImageKeys.java 2021-08-27 22:13:46 +00:00
TRT
13695a5d49 Correctly setup ChooseCompanionAi 2021-08-27 22:38:36 +02:00
leriomaggio
cb82fc2f4b Removed unused imports 2021-08-27 20:56:43 +01:00
leriomaggio
27399440dd Merge remote-tracking branch 'upstream/master' into patch-carddb-performance 2021-08-27 20:05:49 +01:00
leriomaggio
b413b777bf Few impros for performance in itempool countAll
This implementation leverages on iterables.filter to filter all keys matching the input condition, which will be iterated for counting.
2021-08-27 20:05:12 +01:00
leriomaggio
7a7b23e593 Replacing with Lists.sort for better performance 2021-08-27 20:02:47 +01:00
leriomaggio
8f9dfea099 FIX card hover switch for Split and Modal cards in Card Catalog (and removed unused preference settings)
This commit FIXES a bug in card catalog which did not allow to switch the view (on hover) on cards with backface that have more than one instance!

The implementation has been simplified, also removing an unused attr!
The corresponding related Preference in settings has been also simplified to two values (being the other not even used anywhere in the game).
Therefore, now in game settings it will be possible to choose between "NEVER" switch card states, and "SWITCH on HOVER".
The default value in Constant has been updated accordingly!
2021-08-27 17:38:20 +01:00
leriomaggio
e92871a3c7 Replacing all calls to ImageUtil.hasBackFacePicture to corresponding new methods in PaperCard class (hasBackFace)
The ImageUtil.hasBackFacePicture has been removed completely as not being in use anymore after the refactoring.
2021-08-27 17:30:32 +01:00
leriomaggio
68fc6b0fd6 Replacing all calls to ImageUtil.getImageKey to corresponding new methods in PaperCard class 2021-08-27 17:24:11 +01:00
leriomaggio
ad7cad9a56 Added to iPaperCard new methods to get card art (alternate) keys, and whether there is a BackFace
These new methods will be used to cache the values of Image keys, as well as to determine whether a card has an alternate image (and so key).

Methods on CardImageKeys have been distinguished in names to not confuse them with similar names (but completely different use and output) from InventoryItems interface.
CardImageKeys for PaperCard are also cached in private attribute to reduce OPS in Card Catalogs that are consistently the same.
As for Tokens, the output of these two new methods is the same as getImageKey.

These methods have been also moved to interface (and so class) as this would result in better encapsulation (esp. hasBackFace - using CardRules within the card - similar to `Card` class).

ImageUtil.getImageKey calls will be replaced with these methods, limiting their use only to downloaders (when set attribute can be added or not). PaperCard will always add the set info).
2021-08-27 17:22:10 +01:00
Michael Kamensky
3ded936e03 Merge branch 'johnwilliams7-master-patch-21835' into 'master'
Update Promos

See merge request core-developers/forge!5261
2021-08-27 14:16:08 +00:00
Anthony Calosa
7e02aebb86 Merge branch 'patch-carddb-performance' into 'master'
FIX in ImageKeys.hasImage removing Pattern.quote for //

See merge request core-developers/forge!5262
2021-08-27 11:37:32 +00:00
leriomaggio
172c170b2d Merge remote-tracking branch 'upstream/master' into patch-carddb-performance 2021-08-27 12:13:23 +01:00
leriomaggio
dbe0e15674 FIX in ImageKeys.hasImage removing Pattern.quote for //
Pattern.quote has some corner cases on MAC not working (`ME/` ended up in three splits).
Resorted back to `//` as the key will never be a true file path anyway!
2021-08-27 12:12:57 +01:00
John Williams
6a9441b211 Add new file 2021-08-27 08:43:46 +00:00
John Williams
100bd57f24 Update Wizards Play Network 2021.txt 2021-08-27 08:37:26 +00:00
John Williams
3d2cf97b7f Update Magazine Inserts.txt 2021-08-27 08:34:26 +00:00
Michael Kamensky
33850f45ce Merge branch 'statics' into 'master'
Fixes for triggers depending on payment

See merge request core-developers/forge!5257
2021-08-27 08:23:49 +00:00
Anthony Calosa
905a855321 Merge branch 'patch-carddb-performance' into 'master'
FIX in ImageKeys.hasImage for Windows users

See merge request core-developers/forge!5260
2021-08-27 08:15:01 +00:00
leriomaggio
50dded5169 FIX in ImageKeys.hasImage using Pattern.quote to allow for Windows compatibility 2021-08-27 09:04:32 +01:00
Michael Kamensky
be34d5ee6c Merge branch 'patch-carddb-performance' into 'master'
CardDb Optimisations

See merge request core-developers/forge!5258
2021-08-27 04:20:40 +00:00
Michael Kamensky
6c41f6ad0d Merge branch 'random_lands_from_block_Momir' into 'master'
Random lands from block set code for Momir, MoJhoSto

See merge request core-developers/forge!5259
2021-08-26 08:50:54 +00:00
Anthony Calosa
290140bca3 Update GameType.java 2021-08-26 07:31:39 +00:00
leriomaggio
fb3db3d83a removed unused import 2021-08-26 08:05:53 +01:00
leriomaggio
970d9b4b8d removed unused import 2021-08-26 08:04:26 +01:00
leriomaggio
26ec34e019 Updated tests and capped artIndex to be two digits! 2021-08-26 07:23:09 +01:00