* [refactor/bugfix] use rule 802.2a where appropriate.
Many effects which relied on getDefendingPlayerId would fail if the attacking creature had been removed from combat before they resolved, in which case the defending player ID would be null. This fixes these issues.
* Add test for removing attacking creature with Defending Player triggered ability.
Change allowFormer to be true by default, reduce falses to only necessary cases.
* Add minimum and maximum target counts as parameters for TargetAmount and its subclasses; update/add several rules comments (and one actual text) for clarity; remove unused imports
* Get amount+description from target instead of parameters for DistributeCountersEffect and DamageMultiEffect; additions to TargetImpl.getDescription to accommodate
* Create separate method to check if "any number" phrasing should be used, override it in TargetAmount
* Check instanceof TargetAmount before casting
* Add new constructors to chain off of for TargetCreaturePermanentAmount & TargetCreatureOrPlaneswalkerAmount
* Fix text for Storm the Seedcore
* Use Integer.MAX_VALUE instead of 0 to represent no maximum targets
* Add comment about getUseAnyNumber()
* Use amount-only constructors in some TargetAmount subclasses, add clarifying documentation
* Fix a few calls
* Require more specific filters
* tests: added additional tests and verify/runtime checks for wrong die trigger settings;
* refactor: removed some usage of short LKI ;
* fixed dies events support in "or trigger" and "conditional trigger" (use cases like sacrifice cost);
* fixed dies events support in shared triggered abilities (use cases like sacrifice cost);
* add new framework for batch triggers
apply for tapped, untapped, sacrificed, milled
simplify Ob Nixilis, Captive Kingpin
* add a verify check
* fix mistakes
* add simple tests
* another test
* zone change - enters battlefield
* zone change: not battlefield
* zone change - leaves battlefield
* fix Kaya Spirit's Justice
* rename OneOrMoreCombatDamagePlayerTriggeredAbility
* refactor OneOrMoreDamagePlayerTriggeredAbility
* new YoureDealtDamageTriggeredAbility
* new OpponentDealtNoncombatDamageTriggeredAbility
* rework Risona, Asari Commander
* simplify War Elemental
* Add damage batch by source
rework some delayed triggered abilities
* fix Mindblade Render
* rework Initiative and a few others
* [temp] initiative test
* refactor: common style for DealsDamageSourceTriggeredAbility
* refactor cards to use common DealsDamageSourceTriggeredAbility
* update damage players batch triggers
* fix mistake in initiative
* new DealtDamageAnyTriggeredAbility
* new DealtCombatDamageToSourceTriggeredAbility
* update dealt damage to permanent batch triggered abilities
* refactor Hot Soup and param in DealtDamageAttachedTriggeredAbility
* a few more permanent batch triggered abilities
* fix mistake
* update some more damage batch triggers
* add test for Phyrexian Negator
* update Felix Five-Boots and enable test
update Wayta, Trainer Prodigy to align
* update damage batch by source triggers
* undo mistaken change
* fix verify
* cleanup unused methods
* Revert "[temp] initiative test"
This reverts commit 11ed19295f.
* Revert "add a verify check"
This reverts commit e7de47a656.
* fixes from checking text discrepancies
* fix Shriekwood Devourer
* merge fix
---------
Co-authored-by: Susucre <34709007+Susucre@users.noreply.github.com>
* 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
* 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
* refactor PlayFromGraveyardControllerEffect for broader usage
* AbandonedSarcophagus to common class
* refactor Player::canPlayCardsFromGraveyard to AsThough common class
* a few more refactors
- 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;
* 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.
* 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
* 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
* 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