Commit graph

3952 commits

Author SHA1 Message Date
xenohedron
5b0eba7068
refactor: end step triggered abilities (#13047)
* simplify BeginningOfEndStepTriggeredAbility

* more simplifications

* move to common class

* find and replace to common class

* simplify again

* align parameter order

* package reorg

* simplify BeginningOfCombatTriggeredAbility constructors

* simplify BeginningOfFirstMainTriggeredAbility constructors

* text fixes

* update docs
2024-10-28 01:49:11 -04:00
xenohedron
eee0fee79e
refactor: common logic for "at..." triggered abilities (#13045)
* add new common framework for at step triggered abilities

* move postcombat main and second main triggers to it

* update draw step triggers

* refactor BeginningOfCombatTriggeredAbility

* refactor BeginningOfFirstMainTriggeredAbility

* move Pronoun to constants package

* cleanup some cards to use simpler constructors

* package reorganization
2024-10-27 21:03:40 -04:00
Oleg Agafonov
c0e027f4f4 Verrak, Warped Sengir - improved combo support with phyrexian style effects like K'rrik, Son of Yawgmoth (closes #10119) 2024-10-27 14:57:53 +04:00
xenohedron
8a8773971d
refactor: add new simpler technique for intervening if conditions on triggered abilities (#13037)
too many usages to fix all at once, plus condition text needs updating, but this will give a cleaner option for new implementations
2024-10-27 00:19:57 -04:00
xenohedron
001f9e866f
refactor: PlayFromGraveyardControllerEffect (#13032)
* refactor PlayFromGraveyardControllerEffect for broader usage

* AbandonedSarcophagus to common class

* refactor Player::canPlayCardsFromGraveyard to AsThough common class

* a few more refactors
2024-10-26 16:20:16 -04:00
Oleg Agafonov
e35911ad85 tests: fixed random fails 2024-10-26 12:19:47 +04:00
Oleg Agafonov
a9bdf2eb18 test framework: improved aiXXX commands support:
- added more options for priority control (play single priority, play multiple priorities until stack resolved);
- added more options for step control (play single step, play multiple steps);
- improved compatibility with AI and real time commands (now check commands can be called inside AI controlled steps);
- added tests for assign non-blocked damage;
2024-10-26 11:55:19 +04:00
Oleg Agafonov
2d9ac4e732 refactor: removed outdated Player::assignDamage by multi amount dialog, fixed getMultiAmount to work with min values, added additional checks 2024-10-24 15:31:04 +04:00
ssk97
f2ff4828b3
Alternative solution to problem of unplayable cards from target adjustment (#12842)
* Alternative solution to problem of unplayable cards from target adjustment

* Review fixes
2024-10-19 19:13:39 -07:00
Grath
57deccae61
Fix HideawayPlayEffect to allow you to attempt to play everything (#13009)
* Fix HideawayPlayEffect to allow you to attempt to play everything, in cases of multiple Hideaway triggers.

* Allow users to choose order of cards to be potentially played.

* Update HideawayPlay and Arcane Bombardment to not ask if you want to play the cards you chose.

Update tests, add tests for
- Select the order in which to play cards
- Attempt to play two lands with only one land drop available, only the first land enters play
- Play two lands with extra land drops available.

* Fix no-parameter constructor.
2024-10-18 23:05:06 -04:00
paasar
3265b9a060
Fix Marchesa, Resolute Monarch's upkeep trigger (#12994)
* Fix Marchesa, Resolute Monarch's upkeep trigger

Before fix it was triggering wrongly when player had been dealt damage
since last turn.

* Improve Marchesa test by explicitly checking +1/+1 counters
2024-10-18 23:04:00 -04:00
Evan Kranzler
1484e3b575
Rework "second main phase" abilities (#12970)
* replace all instances of "postcombat main phase" with "second main phase" minus exceptions

* second main trigger now works correctly

* add survival test

* additional text fixes
2024-10-18 23:03:43 -04:00
Oleg Agafonov
a16215caed tests: removed and restricted empty commands for choices and targets, improved empty name usages in tests (use EmptyNames.xxx.getTestCommand and EmptyNames.xxx.getObjectName for face down objects) 2024-10-16 15:19:46 +04:00
Oleg Agafonov
17c43f3a44 tests: added more use cases for Connive ability (related to #9101, #9100) 2024-10-13 11:56:05 +04:00
Oleg Agafonov
ccb1a0aeed tests: added additional use cases for Connive ability (related to #9101, #9100) 2024-10-13 11:35:32 +04:00
ssk97
be745cb096
implement [BLB] Dragonhawk, Festival of Embers, Jackdaw Savior, Infamous Cruelclaw (#12906)
* [BLB] Dragonhawk, Fate's Tempest

* [BLB] Festival of Embers

* [BLB] Jackdaw Savior + test

* [BLB] The Infamous Cruelclaw

* Dragonhawk changes

* Create generic GraveyardFromAnywhereExileReplacementEffect

* Hide Cruelclaw Menace reminder text

* fix style errors
2024-10-12 14:07:52 -04:00
xenohedron
c50147b09c tests: add more info to booster generation test output 2024-10-03 20:30:54 -04:00
xenohedron
8bcac56550 tests: improve booster generation summary output 2024-09-29 19:01:12 -04:00
xenohedron
554ba8739e fix #12928 (The Mindskinner) 2024-09-28 22:25:27 -04:00
Oleg Agafonov
701bd68d97 tests: added test for LKI from copied spell (related to Swan Song fix from #12883) 2024-09-25 09:55:19 +04:00
Oleg Agafonov
e1ab0be505 images: fixed wrong miss image message in card hints for dungeons and other command objects (part of #12274); 2024-09-20 17:23:14 +04:00
Oleg Agafonov
f55bc2c4fc [TMP] Implement Phyrexian Splicer (part of #5379) 2024-09-20 15:29:06 +04:00
jimga150
e1f76c2b6c
Fix SacrificeTargetCost and SacrificeAllCost activator checks (#12809)
* Fix Tergrid's Lantern and add test

* Remove custom effect, fix SacrificeTargetCost to avoid checking for activated abilities and sidestepping the controllerID

* Add test to verify change to SacrificeTargetCost

* Add special action test

* Fix canPay check for SacrificeTargetCost

* Remove activated ability check in SacrificeAllCost

* Remove cost-specific activator checks for special actions, as they are redundant

* add null check for game.getPlayer
2024-09-18 19:09:39 -04:00
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
Oleg Agafonov
278bda4c36 version bump 2024-09-08 22:13:45 +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
Oleg Agafonov
de5de0e103 version bump 2024-08-16 19:35:42 +04:00