Commit graph

12920 commits

Author SHA1 Message Date
Grath
6a19ec48df
Add tests for Camellia, refactor SacrificedPermanentBatchEvent. (#12769)
Added SacrificedPermanentEvent, to be used in SacrificedPermanentBatchEvent to prevent adding incorrect GameEvents.
2024-08-31 16:42:24 -04:00
xenohedron
40bbf5f127 fix Feather token (Everquill Phoenix) missing target 2024-08-31 07:20:48 -04:00
Grath
3c419a857f
[BLB] Implement Camellia, the Seedmiser. (#12751)
* [BLB] Implement Camellia, the Seedmiser.

Also implemented SacrificedPermanentBatchEvent, SacrificeOneOrMorePermanentsTriggeredAbility, and refactored existing Whenever you sacrifice one or more [filter] abilities to use the new SacrificeOneOrMorePermanentsTriggeredAbility (even though as they all only trigger once per turn and technically function correctly with the old SacrificePermanentTriggeredAbility.

* Fix accidental newline.
2024-08-29 10:35:13 -04:00
Momo2907
d5cf8c27b2
Implement [BLB] Rottenmouth Viper (#12718) 2024-08-25 23:13:28 -04:00
Grath
543f9f074e
Refactor CreateTokenEffect to allow multiple tokens at once. (#12704)
* Refactor CreateTokenEffect to allow multiple tokens at once.

Partial solution to #10811 - Token copy effects still need to be redone so that mass token copy effects (Ocelot Pride, Mirror Match, other similar effects) can be created in a single batch.
2024-08-25 10:34:42 -04:00
xenohedron
85d612d10f
refactor: remove unused custom event type code (#12729)
* also make ApprovingObject Serializable
2024-08-24 20:39:36 -04:00
jimga150
060551ab48
[40K] Implement The Ruinous Powers; fix Fires of Mount Doom (#12722)
* Add starting point: have exile top w/ any color cast, right duration

* Use random opponent

* Add delayed triggered ability

* rename MageIdentifier to AlternateCast

* Fix FiresOfMountDoomDelayedTriggeredAbility

* Add test for Fires of Mount Doom

* Add test for The Ruinous Powers

* Null checks
2024-08-24 18:37:00 -04:00
xenohedron
9fe5d6bd1b
fix River Song (#12727) 2024-08-24 18:36:42 -04:00
PurpleCrowbar
8d249aa691
Improve attachment to permanent logic; implement [PIP] Codsworth, Handy Helper (#12098)
* [PIP] Implement Codsworth, Handy Helper

* Fix Codsworth and Halvar

* Write tests for attachments

* Fix auras going to graveyard when attaching to illegal targets

* Fix Captured by the Consulate interaction

* Fix failing tests, add additional test

* Add source name to log message

* Implement requested changes

* Revert removed null check

* Remove filter check, clean up code

* Add additional test

* Fix failing roles test

* Account for all current attachment edge cases

* Implement rule 303.4g

* Apply requested changes
2024-08-24 01:03:33 -04:00
xenohedron
9fcbfdeac6
Rework drawing cards and associated replacement effects; implement [WHO] River Song (#12700)
* remove unused scoring system code

* add test for Alms Collector replacement effect

* flatten draw cards into single method in PlayerImpl

* remove outdated MageAction framework

* clarify game event for drawing two or more cards

* clarify methods for getting cards from library

* implement [WHO] River Song

* fix error

* adjust library methods

* add lots of test cases for draw replacement effects

* fix #12616

* track cards drawn this way through multi draw replacement as well

* add test for River Song

* remove redundant comment
2024-08-24 01:02:55 -04:00
xenohedron
34ae226130
refactor: simpler method for mana that lasts until end of turn (#12667) 2024-08-24 01:02:25 -04:00
Steven Knipe
2fbe5bd68c Fix missing null check in AbilitySourceAttachedPredicate 2024-08-22 14:29:01 -07:00
ssk97
00770646f8
Create generic "Gains your choice of ability" effect, add [ACR] Assassin Initiate (#12619)
Create generic GainsChoiceOfAbilitiesEffect, covers both Target and Source cases.

Adds Assassin Initiate
2024-08-22 13:34:40 -07:00
ssk97
b70638acc9
Unbound Flourishing's X doubling should be a triggered ability (and related refactors) (#12597)
Complete rework of Unbound Flourishing, removing the multiplier code for casting X spells.
Adds ActivateAbilityTriggeredAbility, NotManaAbilityPredicate, AbilitySourceAttachedPredicate
CopyStackObjectEffect now uses a MOR.
OrTriggeredAbility now works with target pointer setting abilities.
2024-08-22 13:33:39 -07:00
Sidorovich77
9d83381326
[UNF] Implement Atomwheel Acrobats & Six-Sided Die (#12651)
* Implemented cards: Atomwheel Acrobats, Six-Sided Die.

* Implemented cards: Atomwheel Acrobats, Six-Sided Die.

* Implemented cards: Atomwheel Acrobats, Six-Sided Die.

* Changes from review.

* Changes from review.

* Changes from review.
2024-08-22 14:25:37 -04:00
xenohedron
4c069754a6 fix #12657 with common class, add test 2024-08-16 23:12:15 -04:00
Oleg Agafonov
de5de0e103 version bump 2024-08-16 19:35:42 +04:00
jimga150
d75068a426
fixed text generation for cards with pawprints symbols (closes #12662, #12664) 2024-08-15 09:28:15 +04:00
Oleg Agafonov
e7585e8d95 refactor: fixed miss copy effect (related to #12605) 2024-08-15 09:00:27 +04:00
xenohedron
7969ffb548 refactor: cleanup unneeded method (closes #12547) 2024-08-14 22:46:52 -04:00
jimga150
e976920e2d
[BLB] Implement Season of Gathering and Pawprints mechanic (#12617)
* Add skeleton

* Implement Pawprints modal functionality

* Implement Seasons of Gathering

* remove unused imports

* Add Pawprints test

* use withPawPRintValue() instead of setter

* use 0 for non-pawprint mode and modes classes and move mode validation to addMode

* Use GreatestPowerAmongControlledCreaturesValue

* Fix pawprints check

* calcualte sleected pawprint count based on selected modes

* move max pawprints check to getAvailableModes

* fix max pawprints checks
2024-08-14 21:13:09 -04:00
jimga150
d5c76489ac
Implement Splash Portal (#12605)
* Implement Splash Portal

* Add test

* Add an afterEffect to ExileThenReturnTargetEffect for use in Splash Portal

* Modify Essence Flux to use new ExileThenReturnTargetEffect and write test

* use withAfterEffect for ExileThenReturnTargetEffect

* use ConditionalOneShotEffect

* Restrict effects to one shot
2024-08-14 21:12:55 -04:00
karapuzz14
3321cd03bc
[YDMU] Implement Marwyn's Kindred & Wandering Treefolk (#12625) 2024-08-14 21:11:45 -04:00
Sidorovich77
37bf7a68cd
[WHO] Implement Vrestin, Menoptra Leader (#12643)
Added Alien Insect token.
2024-08-14 21:09:39 -04:00
theelk801
be84dbaa0f [YMID] Implement Toralf's Disciple 2024-08-13 11:45:27 -04:00
theelk801
f5e0d94cac [MB2] add set 2024-08-13 11:16:28 -04:00
Oleg Agafonov
754e5fc41a GUI, preferences: removed rare/useless settings:
* Show ability picker forced - removed and keep enabled for all;
* Show turn info in logs - removed and keep enabled for all;
2024-08-12 21:25:16 +04:00
Oleg Agafonov
7916af0e52 server, refactor: added client side info about current table and parent table (tourney's sub-tables with matches); 2024-08-11 19:29:42 +04:00
Grath
ebca45987a
[MKC] Implement Marvo, Deep Operative (plus refactor ClashEffect to allow for designated Clashes) 2024-08-08 21:37:35 -04:00
ssk97
570a2e9661
[BLB] Beza the Bounding Spring, Bandit's Talent, Persistent Marshstalker, fix some existing BLB cards (#12629)
* Beza, the Bounding Spring

* Bandit's Talent, minor change to DrawCardSourceControllerEffect text generation

* Persistent Marshstalker

* Patchwork Banner fix controller requirement

* Fix FeatherOfFlight, LupinflowerVillage, HivespineWolverine, HazardrootHerbalist

* Fix missing Zone on Persistent Marshstalker ability
2024-08-07 23:46:49 -07:00
theelk801
8d6c5f6795 [BLC] Implement Rolling Hamsphere 2024-08-06 12:53:51 -04:00
theelk801
1cf91b0b2d [BLC] Implement Pyreswipe Hawk 2024-08-06 12:48:40 -04:00
PurpleCrowbar
23d0420c95 Remove some unused imports 2024-08-05 21:43:52 +01:00
Oleg Agafonov
f105828e1c GUI: reworked battlefield panels to use layouts and dynamic settings (no needs in NetBeans to modify it, no needs in size calculations, improved positions and sizes, deleted outdated code); 2024-08-05 19:00:42 +04:00
Oleg Agafonov
c31763a2d8 db: fixed wrong commands 2024-08-05 00:03:58 +04:00
Oleg Agafonov
0a6f0b7a9d code clean 2024-08-03 21:24:46 +04:00
Oleg Agafonov
0a55e37c8c download: reworked scryfall images support:
- download: fixed unmount zip errors on cancel download in some use cases (closes #12536);
- download: significant download speed improvements (now it depends on user's network speed, not api limitations);
- download: added additional error dialogs on bad use cases;
- scryfall: added cards and bulk data api support;
- scryfall: added bulk data download (updates once per week, contains all scryfall cards and store in images\downloading folder, 2 GB size);
- scryfall: added optimized images download without api usage (use direct images links from bulk data, closes #11576);
- scryfall: improved image source searching for some use cases (miss or wrong images problems, closes #12511);
- scryfall: tokens don't use bulk data;
- scryfall: 75k small images downloads 40 minutes and takes 1 GB and 2100 api calls (most of it from tokens);
- scryfall: how-to disable bulk data, e.g. for api testing: -Dxmage.scryfallEnableBulkData=false
2024-08-03 19:41:14 +04:00
xenohedron
b78956d286
text errata updates: various "enters the battlefield" -> "enters" (#12626)
* enters the battlefield, -> enters,

* {this} enters the battlefield -> {this} enters

* EntersBattlefieldAbility

* , it enters

* enters the battlefield under your control -> you control enters

* rework some trigger phrase logic

* fix tests
2024-08-02 18:43:59 -04:00
ssk97
ab803079b9
Minor fixes (#12632)
* Fix Nefarious Imp, Bewitching Leechcraft

* Include zone of cast in game log
2024-08-02 18:43:49 -04:00
Oleg Agafonov
bfa7c4c9a8 download: improved images download from scryfall source:
- fixed wrong timeouts for api (fixed 429 Too Many Requests);
- added any/10 parallel threads support;
- current api limit is 1 request per 300 ms;
2024-08-01 11:46:37 +04:00
Oleg Agafonov
b5527a28db download: added debug logs/stats for http requests (DebugUtil.NETWORK_PROFILE_REQUESTS) 2024-08-01 11:23:54 +04:00
jimga150
f2d3850250
refactor: simplify DrawCardSourceControllerEffect text generation (#12621) 2024-07-31 22:46:22 -04:00
jimga150
ee3cab84ef
[BLC] Implement Fortune Teller's Talent (#12608)
* Implement Fortune Teller's Talent

* Remove outdated assert from PlayFromTopOfLibraryEffect and update comment
2024-07-31 22:45:59 -04:00
Evan Kranzler
8ed3c0c12d
Reworking standard legality (#12624)
* rework standard rotation

* add comment

* add flag to previous sets
2024-07-31 14:55:48 -04:00
Oleg Agafonov
1914313d6e images: fixed miss phyrexian mana symbol for Rage Extractor 2024-07-31 22:05:52 +04:00
Oleg Agafonov
e1cffbde40 download: reworked connection:
- added shareable code with default proxy, headers and other settings for download tasks like images, symbols, mtgjson, etc;
- use XmageURLConnection.downloadText for text resources
- use XmageURLConnection.downloadBinary for any file resources
- added user agent with app version for all requests;
- added http logs and improved error messages;
2024-07-31 21:25:56 +04:00
Susucre
a76ef60820 align to new enters wording changed upstream 2024-07-30 15:54:26 +02:00
Susucre
c0eab28626
implement [MH3] Primal Prayers ; use choice panel for cast mode choice ; allow some restricted "as thought as it had flash" to work only on matching alternative cast. (#12420) 2024-07-30 15:47:39 +02:00
ssk97
4c8f60e3a2
[PIP] Rampaging Yao Guai, Wild Wasteland, Synth Infiltrator, Paladin Elizabeth Taggerdy (#12613)
* Rampaging Yao Guai

* Wild Wasteland

* Synth Infiltrator

* Paladin Elizabeth Taggerdy

* Fix not including target count if name contains X value

* Fix missing {this}
2024-07-30 00:40:38 -04:00
ssk97
b6b7dd3ce6
Rework Extort (#12609) 2024-07-30 00:39:19 -04:00