Commit graph

4077 commits

Author SHA1 Message Date
xenohedron
842fa90e7e fix #12867 (Devouring Hellion)
by refactoring to use DevourEffect

test added
2024-09-15 20:58:43 -04:00
jimga150
5db01266d2
Fix Party Thrasher play from exile effect (#12836)
* Fix Party Thrasher

* Add test for playable duration
2024-09-13 21:39:07 -04:00
Evan Kranzler
d923f2941d
Implement Impending mechanic (#12865)
* implement Impending mechanic

* add initial test

* add more tests

* small fix
2024-09-13 20:44:38 -04:00
Oleg Agafonov
45ded61d6f server: improved compatibility to run server under java 9+ (related to #12768, #6197) 2024-09-13 14:53:05 +04:00
xenohedron
0bba44b54f fix #10607 (Maskwood Nexus)
closes #12554
2024-09-07 00:53:30 -04:00
xenohedron
4c55efb48e implement [ACR] Bleeding Effect
closes #12495

add test
2024-09-07 00:50:31 -04:00
xenohedron
54874a59b0
refactor: rename "remixed" to "reshuffled" (#12755) 2024-09-01 01:08:26 -04:00
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
676b099590 fix #12743 (Nearby Planet), add test
closes #12746
2024-08-30 01:18:52 -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
2cd1a27120
tests: fix some missing choices (#12728)
* explicit strict mode false where applicable
2024-08-24 20:39:53 -04:00
jimga150
4259b7fa39
[40K] Implement Seeker of Slaanesh; added new must attack option (#12712)
* Add player-based "must attack" requirement check

* Implement Seeker of Slaanesh and add (ignored) test

* Fix check for ability of any controlled creatures to attack

* rename misleading variable
2024-08-24 18:37:17 -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
jimga150
9c6c532bdf
Implement [BLB] Season of Loss (#12685) 2024-08-22 23:35:17 -04: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
jimga150
4cef508c86
Verdant Succession - improved combo support with multiple triggers (#12695) 2024-08-21 09:09:26 +04:00
xenohedron
77b8030642 fix #11766 (Corrosive Ooze), add test 2024-08-18 23:22:31 -04:00
Oleg Agafonov
3c8d11e2c2 code clean 2024-08-18 14:31:46 +04:00
Oleg Agafonov
141a4e5437 Keen-Eyed Curator - fixed game error on usage in deck (also fixed Gustha's Scepter, Eater of Virtue, Death-Mask Duplicant); 2024-08-18 14:30:17 +04:00
xenohedron
4c069754a6 fix #12657 with common class, add test 2024-08-16 23:12:15 -04:00
xenohedron
fea0c586a9 fix Dracoplasm, add test 2024-08-16 20:12:11 -04:00
xenohedron
f1bf8a7ebd fix intermittent test failure 2024-08-14 22:21:58 -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
jimga150
9a872b4446
Implement [BLB] Alania, Divergent Storm (#12601) 2024-08-14 21:12:28 -04:00
jimga150
5d9efd8bac
[BLC] Implement Rapid Augmenter (#12654) 2024-08-14 21:09:24 -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
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
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
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
fa24f8f53b fix tests after 'enters the battlefield' -> 'enters' change 2024-07-30 16:21:23 +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
jimga150
c73cfebcd9
Fix EntersBattlefieldOneOrMoreTriggeredAbility (#12592)
* Apply fix for ZONE_CHANGE_GROUP events making tokens controlled by different players

* Add test

* Remove unused import

* Fix implementation

* Rewrite to use ZONE_CHANGE_BATCH

* Fix OPPONENT case

* Add default case

* refactor to avoid using stream as local variable and use ZoneChangeEvents in filters

* Fix typo
2024-07-30 00:39:01 -04:00
Oleg Agafonov
393dbc4047 Can't be activated effects - fixed that some restricted effects show abilities as playable (example: Sharkey, Tyrant of the Shire and Karakas, fixed #10642) 2024-07-27 15:38:13 +04:00
Oleg Agafonov
521a0f6e32 GUI: introduced default card hints:
* refactor: added helper emblems instead rad counter's inherent emblems (use initGameDefaultHelperEmblems to define new card hints or other fake objects);
* refactor: added card hints support for emblems, planes and other command objects;
* GUI: added storm counter as default card hint (use hints tool to see it, closes #12360);
2024-07-27 09:40:41 +04:00
xenohedron
5cc4901580 fix #12575
add test for AddManaInAnyCombinationEffect

cleanup Grand Warlord Radha, add test

simplify some abilities to common class

remove unused constructors
2024-07-25 01:35:51 -04:00
ssk97
e8808c3ae3
Remove duplicate code for X costs (#12551)
* Replace "([a-zA-Z]+).getManaCostsToPay().getX()" with CardUtil.getSourceCostsTag(game, $1, "X", 0)
Fix Disrupting Shoal

* Change final card .getX() calls

* Condense all ManacostVariableValue enum values into "instance"

* Further removal of getX, Display X symbol for non-mana X cards

* Fix test

* Fully remove ManaCosts.getX

* Replace all different X dynamic values with GetXValue

* Remove individual cards checking getAmount for X values (leaving cost reduction that does not use X)

* Add null check for game object inside getSourceCostsTagsMap

* fix build errors

* fix Vicious Betrayal

* text fix
2024-07-23 01:57:47 -04:00
ssk97
78649c1a62
Remove KickerAbility.getSpellKickedCount (#12553)
* Remove KickerAbility.getSpellKickedCount

* Check spell LKI instead of only current spell object

* Remove bad LKI storage under wrong ID
2024-07-22 23:13:48 -04:00
theelk801
05170d0227 [BLB] add test for Jolly Gerbils 2024-07-20 09:44:16 -04:00
Oleg Agafonov
7b2e9b390c GUI: added card hints in choose replacement effect dialog 2024-07-19 00:06:18 +04:00
Oleg Agafonov
bf3f26ccc1 server: database improves:
- fixed broken database in some use cases (example: AI and choose name dialog, related to #11285);
- added docs and debug tools for sql queries, caches and memory analyse (see DebugUtil);
- refactor code to use shared settings;
- deleted outdated and un-used code (db logs, stats, etc);
2024-07-18 21:22:10 +04:00
Evan Kranzler
7fe6ba9c57
Implement "Promise a gift" mechanic (#12578)
* [BLB] Implement Wear Down

* [BLB] Implement Valley Rally

* [BLB] Implement Dawn's Truce

* add initial test

* [BLB] Implement Kitnap

* [BLB] Implement Long River's Pull

* [BLB] Implement Peerless Recycling

* [BLB] Implement Into the Flood Maw

* add more tests

* add verify skip

* remove skip

* a few requested changes

* [BLB] Implement Nocturnal Hunger

* add test for gifting a food token

* [BLB] Implement Starforged Sword

* add comment to activation ket

* add test for adding extra cards
2024-07-18 09:15:45 -04:00
ssk97
96b08ee6bf
Fix effects where the source's controller sacrifices it (#12583)
* Fix effects where the source's controller sacrifices it. Added test. Fixes #12582

* Update Evoke rules text
2024-07-18 00:28:50 -04:00
Evan Kranzler
204f67c5f0
Implement offspring mechanic (#12572)
* implement offspring mechanic

* create offspring test
2024-07-12 23:38:29 -04:00
Susucre
3fdeb8c2fc implement [BLB] Starseer Mentor 2024-07-12 18:18:02 +02:00
Susucre
71fd73cf5d implement [BLB] Muerra, Trash Tactician 2024-07-11 18:22:38 +02:00