* Refactor OnLeaveReturnExiledAbility
to accommodate hand zone as well as battlefield
* Cleanup Brain Maggot and Kitesail Freebooter
* Refactor to include delayed trigger with main effect
* minor cleanup
* merge fix
* further adjustments
* Cleanup Valki, God of Lies
* fix test choices
Did not test the final code for Stone of Erech, when a filter was added to the ReplacementEffect :(
Added an unit test, just to be safer this time around.
* First try at Squad Mechanic
* Fully functional now, removed cards from unfinished list in 40k
* Improved implementation, removing the generic conditional
and replacing it with a separated ETB trigger and effect.
* Add tests from Susucre (using Strionic Resonator for now, two others currently failing)
* Update comments on tests
Closes#9774
------
Co-authored by: Susucre <34709007+susucre@users.noreply.github.com>
* Hide reminder text on Zhulodok
* Use logic from GainAbilitySpellsEffect, fix so that CastFromZonePredicate works
* Text adjustments
* Show cascade ability in hand for Abaddon the Despoiler
* Remove redundant class
* Simplify Cast Through Time
* Don't add additional instances of redundant abilities
* Remove redundant check
* Add option to ignore mana validation when checking playable objects
* Fix null errors
* Fix GainAbilityControlledSpellsEffect to apply ability to playable cards rather than owned cards
* Add unit test
* Revert bad workaround code
This reverts commit 17f5be6a79.
This reverts commit 7ebd2f1815.
This reverts commit 00969d1fe7.
* Remove ownership check on exiled cards
* Another test (currently failing)
* ignore test
* fix test: strict choose mode
* added Tests for Tadeas
* Fix and cleanup Tadeas Juniper Ascendant
* Fix same power test to attack with creature with same power
* Test: added test for tadeas elusive not applying for creatures without reach
* Fix: creatures without reach can be blocked by higher power blockers
* Fix: use TargetPointer instead of MageObjectReference
---------
Co-authored-by: gravitybone <gravitybone@protonmail.com>
* Added unit test for magefree/mage#10435
* Added test for potential breakage of prosper functionality
* Copies of cards are now created in the right zone
* Added PlayCardTriggeredAbility
This triggered ability checks to make sure a card was actually played (as opposed to a copy of a card).
Common abilities have been refactored to use this new ability
* Added mizzix's mastery overload test
* Fixed Mizzix's mastery overload
* Added new ability to Juju Bubble
---------
Co-authored-by: xenohedron <xenohedron@users.noreply.github.com>
* Added Saruman of Many Colors
Borrowed functionality in CastSecondSpellTriggeredAbility from magefree/mage#10433
Added new helper class ExileTargetCardCopyAndCastEffect for common effect
* Updated FlawlessForgery to use new ExileTargetCardCopyAndCastEffect
* Fixed overriden Effect copy functions
* Expanded ExileTargetCardCopyAndCastEffect
Added ability for non-free spells
* Removed filter lock
* De-duplicated exile and cast effects
* Fixed demilich
* Added Storm of Saruman card
Some classes have been added/adjusted for code reusability:
- CastSecondSpellTriggeredAbility has been modified to set a target pointer to either the caster or the spell (used here to set a target pointer to the spell for the copy effect)
- CopyTargetSpellEffect has been modified to allow specifying a copy applier (used here to apply the legenedary-stripping effect)
- RemoveTypeCopyApplier has been added as a generic copy applier for any cards which read "except it isn't <type>"
* Fixed verify failure - Remove ward hint on Storm of Saruman
* Fixed a typo - ammount -> amount
* Modified Double Major to use new CopyTargetSpellEffect
* Re-added ability text for Double Major
* Limited-style sideboarding with unlimited basics enabled for Freeform Unlimited Commander
* FreeformUnlimitedCommander does not depend on FreeformCommanderFreeForAll anymore.
FreeformUnlimitedCommander has sideboarding.
In two-player matches of FreeformUnlimitedCommander, the player who goes first doesn't draw a card on their first turn anymore.
* FreeformUnlimitedCommanderTypeTest takes into account that sideboarding is allowed
* Fix to startingPlayerSkipsDraw condition
---------
Co-authored-by: sprangg <a@b.c>
* Fixed maddening hex
Fixesmagefree/mage#10104 and magefree/mage#10302
Added a test, and fixed a bug in printPermanents for permanents which are attached to something other than a permanent
* Formatting fix
* refactor check supertype methods
* change supertype to list to match card type
* refactor various subtype methods
* implement mageobjectattribute for supertype
* a few fixes
* [BRC] Implement Rootpath Purifier
* a few extra fixes
* more fixes
* add test for purifier
* replace addSuperType with supertype.add in card constructors
* more supertype replacements
* update MDFC supertype implementation
* remove unnecessary class
* update test
* Fix error in draft pick logger that was failing on chaos drafts with fewer than 3 sets
* Implement Remixed Booster Draft
* Add debug test
* minor cleanup
* Cleanup unnecessary checks
* Fix elimination tournament type
* Add note for future improvement
* Added some tests for Vessel of the All-Consuming
* Fixed Vessel of the All-consuming
Fixesmagefree/mage#10283
Added more commentsto the test.
The bug was for a few reasons. The map was keeping track of how many times a player was dealt damage, not how much damage was being dealt. As well, creating a MageObjectReference from an ability doesn't seem like it works properly, so retrieving from the map never worked.
---------
Co-authored-by: Oleg Agafonov <jaydi85@gmail.com>
- fixed that copy effect doesn't restore original image after effect's end;
- removed outdated availableImageSetCodes (all images auto-selected from tokens database now, related to #10139);
- refactor command objects to use CommandObjectImpl;
- refactor planes/emblems/etc objects to use MageObjectImpl, added copyable support;
- refactor another game objects to remove some duplicated fields;
* remove skip
* initial implementation of the ring mechanic
* some changes
* rework ring-bearer choosing
* [LTR] Implement Call of the Ring
* update ring-bearer condition
- added auto-generated token names for CreatureToken;
- added verify tests for token names;
- removed outdated ElementalCreatureToken;
- fixed wrong indefinite article in some tokens;
- fixed miss Token in some token names (related to #10139);
- tests: added support of set code in custom ability (see addCustomCardWithAbility);
- tests: added additional tests for token images (related to #10139, #10222);
- fixed wrong token images for copied cards/tokens (#10222);