* 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);
Fixesmagefree/mage#10045.
Lynde wasn't keeping track which zone cards were in before bring them back, let alone zone change counters.
Many similar effects are only looking at the current zone rather than zone change counters.
- added reminder / helper tokens support (example: Copy, Morph, Day // Night, related to #10139);
- added verify checks for reminder tokens;
- added images download for reminder tokens;
* remove incubate skip
* initial implementation of DFC tokens
* separate incubator back face to separate class
* small refactor to token copy function
* token copies now have back faces as well
* effects which modify token copies now correctly apply to both faces
* add skip for exception
* tokens now enter transformed correctly
* [MOC] remove skip for incubate
* fix verify failure
- now token images chosen by tokens database instead availableImageSetCodes (related to #10139);
- added additional verify checks for tokens database;
- fixed some tokens;
* Alandra Sky Dreamer
DrawSecondCardTriggeredAbility refactored into DrawCardTriggeredAbility
DynamicValue support for DrawCardTriggeredAbility
DynamicValue support for BoostAllOfChosenSubtypeEffect
* cardNumber as int
static use of cardwatcher
* removing spaces
* FaerieMastermind and ZimoneAndDina using the new generic DrawCardTriggeredAbility
* AlandraSkyDreamer and DrawCardTriggeredAbility test
* renaming DrawCardTriggeredAbility to DrawNthCardTriggeredAbility
* merging the boost effects into a single ability
* merging two effects to the same ability
* text added to effects
---------
Co-authored-by: drago <drago@192.168.1.72>
* add types and subtypes
* add startingDefense attribute
* [MOM] Implement Invasion of Ravnica / Guildpact Paragon
* fix two small errors
* refactor various instances of "any target"
* fully implement defense counters
* battles can now be attacked
* [MOM] Implement Invasion of Dominaria / Serra Faithkeeper
* [MOM] Implement Invasion of Innistrad / Deluge of the Dead
* [MOM] Implement Invasion of Kaladesh / Aetherwing, Golden-Scale Flagship
* [MOM] Implement Invasion of Kamigawa / Rooftop Saboteurs
* [MOM] Implement Invasion of Karsus / Refraction Elemental
* [MOM] Implement Invasion of Tolvada / The Broken Sky
* simplify battle info ability
* fix verify failure
* some more fixes for attacking battles
* [MOM] Implement Invasion of Kaldheim / Pyre of the World Tree
* [MOM] Implement Invasion of Lorwyn / Winnowing Forces
* [MOM] Implement Invasion of Moag / Bloomwielder Dryads
* [MOM] Implement Invasion of Shandalar / Leyline Surge
* [MOM] Implement Invasion of Belenon / Belenon War Anthem
* [MOM] Implement Invasion of Pyrulea / Gargantuan Slabhorn
* [MOM] Implement Invasion of Vryn / Overloaded Mage-Ring
* [MOM] Implement Marshal of Zhalfir
* [MOM] Implement Sunfall
* implement protectors for sieges
* partially implement siege defeated trigger
* fix verify failure
* some updates to blocking
* [MOM] Implement Invasion of Mercadia / Kyren Flamewright
* [MOM] Implement Invasion of Theros / Ephara, Ever-Sheltering
* [MOM] Implement Invasion of Ulgrotha / Grandmother Ravi Sengir
* [MOM] Implement Invasion of Xerex / Vertex Paladin
* add initial battle test
* fix verify failure
* [MOM] Implement Invasion of Amonkhet / Lazotep Convert
* [MOM] update spoiler
* update how protectors are chosen
* update text
* battles can't block
* add control change test
* rename battle test for duel
* add multiplayer test
* [MOM] Implement Invasion of Alara / Awaken the Maelstrom
* [MOM] Implement Invasion of Eldraine
* [MOM] Implement Invasion of Ergamon / Truga Cliffhanger
* [MOM] Implement Invasion of Ixalan / Belligerent Regisaur
* battles now cast transformed (this is super hacky but we need to refactor TDFCs anyway)
* add TODO
* add ignore for randomly failing test
* a few small fixes
* add defense to MtgJsonCard (unused like loyalty)
* implement ProtectorIdPredicate
* small fixes
- removed outdated code;
- updated logic to choose a set code for a tokens in different use cases (related to #10150);
- added many tests for client and server token's data (related to #10139);
- prepare for tokens database (related #6955);