* [SNC] Implemented shield counter mechanic
* Rework shield counter to be a global replacement effect
* Add unit test for shield counter
Co-authored-by: Evan Kranzler <theelk801@gmail.com>
* replaced blocking/blocked by predicates
* added test for knight of dusk (currently fails)
* added source parameter to filters and everything else that needs it
* some changes to various predicates
* test fix
* small changes to filter code
* merge fix
* fixed a test failure
* small change to Karn, Scion of Urza
* removed sourceId from filter methods and other similar places
* added new getobject method to fix some test failures
* a few more fixes
* fixed merge conflicts
* merge fix
* [CMR] Implemented The Prismatic Piper
* updated commander validation to handle The Prismatic Piper
* created abstract base class for commander variants
* added ability to prismatic piper
* added game init handling
* small revert
* small reorganization of tests
* added some validation tests for piper
* added more tests for piper
* add another test
* added decklist comments to tests
* added some more piper tests
* added another test
* added mana option tests
* added a companion test
* fix conflict
* updated abstract commander to work with Friends forever
* merge fix
* Deck: added details for illegal validation of companion card;
Co-authored-by: Oleg Agafonov <jaydi85@gmail.com>
* Preliminary implementation of Share the Spoils.
* Added tracking of cards in exile to MageTestPlayerBase in order to help with testing of cards such as Share the Spoils which put and take cards out of exile a lot.
* Moved Share the Spoils to the correct set list.
* Fixed bug with using ’ instead of ' for card text.
* Add method to assert number of cards exiled into a specific exile zone.
* Further implementation of ShareTheSpoils and it's tests.
* Fixed a bug in the calcualtiong of exileNUmber. (I misunderstood what the copy() method was for)
* - Added a watcher which should limit player to only cast the spell once per turn.
- Fixed the tests to run properly (using .LOST instead of .LOSES for the GameEvent).
- A bit of cleaning up of the class
* Updated tests and card to capture both conceding and losing the game through other means.
* Further implementation. All parts are working (though not correctly).
* All pieces are now working. But, both the spend any mana and exile a card off the top of library activate when ANY card is played from exile, not just one exiled with Share the Spoils.
* Replaced changed how I move card from top of library to correct exile zone. Instead of using moveCards() and moveToAnotherZone(), I am not using moveCardsToExile().
* A new card is now properly exiled whenever one is played with Share the Spoils
* Moved inner class out and passing exileId as parameter instead
* Updated text based on comments
* Added several more tests
* Made changes to how exileId is handled based on comments
* Made changes based on comments
* Further changes based on comments
* Add a few more tests (will have to fix them once the exile zone issue is fixed)
* Added workaround for #8706
* Get most of the tests working
* Simplified cardId handling
* Reformat file based on comment
* - Added setStrictChooseMode to all tests
- Properly using checkPlayableAbility for all checks where things can't be played/cast.
* Fixed a missing getMainCardId call that made difficult cards unplayable
* - Simplified handling of casting only once per turn. I don't see the point to keeping the MageReference object. using a simple boolean instead
- This also fixes a bug where multiple cards could be played in the same turn.
* Fixed test for difficult cards.
* Reworked spend mana effect based on Dead Man's chest
* Added a check again a null watcher
* Fixed typo in checkManaSpendingForOtherExileSource
* Fixed tests to use proper checkPlayableAbility syntax.
Co-authored-by: Evan Kranzler <theelk801@gmail.com>
* Simplified Azorius Aethermage
* - Flattened the if statements
- Renamed the custom effects and abilities to be more readable
- Changed certain functiosn to be private
* Flatten Thieves Auction
* Flatten Possibility Storm
* Flatten Aminatous Augury
* Minor refactoring
* Flattening and adjusting access modifiers
* Aetherspouts should have been using getPlayersInRange. Current implementation was affecting all players
* Simplified Akoum Hellkite
* Simplified Ali From Cairo
* Flattened An-Havva Constable
* Flattened Aura Finesse and Autum Willow
* Fixed All Hallow's Eve since it didn't work.
* Several small simplifications
* Flattening/Simplification of several classes
* Added test for Azorius Aethermage
* Added test for Abandoned Sarcophagus
* Updated test with docstring instead of comment
* Update AzoriusAethermageTest.java
* Update BattlegateMimic.java
* Update AetherworksMarvel.java
* Update AetherworksMarvel.java
* Update AzoriusAethermageTest.java
* Update AzoriusAethermageTest.java
Co-authored-by: Jeff Wadsworth <jeffwadsworth@users.noreply.github.com>
* updated Riptide Replicator and Volrath's Laboratory
* refactored token names
* some test fixes
* more test fixes
* even more test fixes
* the final test fixes
* fixed a few missed tokens
* merge fix
* fixed a test failure
* fixed test failure
* updated ignored verify test
* fixed token images not appearing
* updated tests
* added function for casting spells with specific attributes from a selection of cards
* updated cascade to use new method
* refactored various cards to use new methods
* added TestPlayer method
* fixed a small error
* text fix
* broke out some repeated code
* added missing notTarget setting
* add additional retain zone check
* some more cards refactored
* more refactoring
* added interface for split/modal cards
* reworked spell casting methods
* reworked multiple cast to prevent unnecessary dialogs
* fixed test failures due to change in functionality
* add AI code
* small nonfunctional change
* reworked Kaya, the Inexorable
* added currently failing test
* added more tests
* updated Geode Golem implementation
* fixed adventure/cascade interaction, added/updated tests
* some nonfunctional refactoring
* added interface for subcards
* [AFC] Implemented Fevered Suspicion
* [AFC] Implemented Extract Brain
* [AFC] updated Arcane Endeavor implementation
* [C17] reworked implementation of Izzet Chemister
* [ZEN] reworked implemented of Chandra Ablaze
* additional merge fix
* [SLD] updated Eleven, the Mage
* [NEO] Implemented Discover the Impossible
* [NEO] Implemented The Dragon-Kami Reborn / Dragon-Kami's Egg
* [NEO] Implemented Invoke Calamity
* [AFR] Implemented Rod of Absorption
* [VOC] Implemented Spectral Arcanist
* [VOC] added additional printings
* [NEO] added all variants
* [SLD] updated implementation of Ken, Burning Brawler
* changing goad to designation, refactored goad effects to be continuous
* [AFC] Implemented Vengeful Ancestor
* reworked effects which goad an attached creature
* updated goading implementation
* updated combat with new goad logic
* some more changes, added a test
* another fix
* update to test, still fails
* added more failing tests
* more failing tests
* added additional goad check
* small fix to two tests (still failing
* added a regular combat test (passes and fails randomly)
* fixed bug in computer player random selection
* some changes to how TargetDefender is handled
* removed unnecessary class
* more combat fixes, tests pass now
* removed tests which no longer work due to combat changes
* small merge fix
* [NEC] Implemented Komainu Battle Armor
* [NEC] Implemented Kaima, the Fractured Calm
* [NEC] added all variants
* [NEO] Implemented Tamiyo, Compleated Sage
* replaced PhyrexianManaCost calls with ManaCostsImpl calls
* updated phyrexian mana implementation
* added phyrexian hybrid symbol support
* updated starting loyalty implementation for planeswalkers
* change compleated to singleton
* implemented Compleated ability
* added some missing loyalty setters
* changed when loyalty is added to a walker to fix bugs
* slight change to some tests to fix them from failing
* fixed token issue
* added WhileControlled duration, removed SourceOnBattlefieldControlUnchangedCondition
* refactored effects which keep things tapped
* a few additional missed cards
* refactored cards which check for being controlled and tapped
* [NEO] Implemented Kyodai, Soul of Kamigawa
* adding initial day/night support in game state
* remove card exclusion for testing
* added functional implementation to abilities from main branch
* functionally implemented NightCondition
* updated DayNightHint
* added support for nightbound entering transformed at night
* [MID] Implemented Unnatural Moonrise
* [MID] Implemented The Celestus
* added some docs
* changed access for state day/night methods
* added transformation to day/night switch
* re-added unfinished filter, removed day/night cards
* fixed some errors with transforming
* added hints to all day/night cards
* added transformation prevention plus a test
* added Immerwolf test
* [MID] Implemented Tovolar, Dire Overlord / Tovolar, The Midnight Scourge
* refactored some cards to not use isTransformable
* removed transformable parameter
* simplified some transform code
* fixed null pointer exception
* removed unnecessary canTransform method
* fixed a small error
* reworked implementation of rule 701.28f
* small change in transform logic
* fixed failiing test
* fixed verify failure
* small merge change
* added support for day/night switching based on spells cast
* [MID] Implemented Curse of Leeches / Leeching Lurkers
* moved day/night handling to untap step
* added tests for cards which set day and trigger from a change
* [MID] Implemented Ludevic, Necrogenius / Olag, Ludevic's Hubris
* added support for creatures transforming to match day/night when necessary
* fixed verify failures
* fixed another verify failure
* remove temporary verify skip
* added transform message
* removed unnecessary transform message
* [MID] Implemented Angelic Enforcer / Enduring Angel
* updated DayNightHint with more information
* fixed verify failure
* merge fix
* fixed Startled Awake / Persistent Nightmare / Moonmist interaction
* added another test for Moonmist
* merge fix
* merge fix
* [MID] Implemented Baneblade Scoundrel / Baneclaw Marauder
* merge fix
* [MID] various text fixes
* [MID] a few more text fixes
* Merge fix
* Improved transform game logs (hints, source), fixed day/night logs, fixed miss game param (due code style);
* fixed a test failure
* Merge fix
Co-authored-by: Oleg Agafonov <jaydi85@gmail.com>
* Don't purge cards-by-rarity cache between tournaments
* Move DOM and WAR specific checks out of base ExpansionSet class
* Move Battlebond specific methods out of base ExpansionSet class
* Refactor ExpansionSet and subclasses
* Zendikar boosters also only have full-art basic lands
* Fix Eldritch Moon (#8171)
* AI: fixed that AI was able to targeting an invalid player targets in some use cases (#5630);
* AI: fixed that AI was able to ignore targeted triggers in some use cases;
* AI: improved player targeting for not own chooses (if it's make a choice for another player);
* ConditionalAsThoughEffect - improved support with target effects (see comments from e6e802033b);
* TargetCardInLibrary - added additional checks on wrong usage (must be used inside effects only, not as ability's target);
* PlayFromNotOwnHandZone - fixed wrong playable mark on battlefield's permanents (AI related too);
* [AFR] Implemented DiceRolledTriggeredAbility
* [AFR] Implemented Brazen Dwarf
* [AFR] Implemented Feywild Trickster
* [AFC] Implemented Reckless Endeavor
* [AFR] Implemented Pixie Guide
* [AFR] Implemented Critical Hit
* [AFR] Implemented Netherese Puzzle Ward
* [AFC] Implemented Neverwinter Hydra
* [AFR] Implemented Farideh, Devil's Chosen
* [AFR] Implemented Barbarian Class
* [AFC] Implemented Vrondiss, Rage of Ancients
* [AFC] Implemented Arcane Endeavor
* Test framework: added planar die rolls support
* Test framework: added random results set up support in AI simulated games;
* AI: improved roll die results chooses in computer games;
* Roll die: improved combo support for planar die and roll die effects;
Co-authored-by: Daniel Bomar <dbdaniel42@gmail.com>
Co-authored-by: Oleg Agafonov <jaydi85@gmail.com>
the sacrifice target cost was optional, but SacrificeCost.canPay first checks if there are valid targets. In this scenario there were none, but the spell should still be playable
* added real time command to check card's counters (example: suspended cards with Time counters, see checkCardCounters);
* added target type support: TargetPermanentOrSuspendedCard;
* improves error logs for miss modes and unsupported target types;
Abilities which use trigger from or replace tapping for mana now save the permanent in case it leaves the battlefield.
fixes#7671, fixes#7770
* Merge fix and additional comments, Winter's Night fixed
Co-authored-by: Oleg Agafonov <jaydi85@gmail.com>
* [AFR] Implemented Druid Class
* [AFR] Implemented Wizard Class
* [AFR] Implemented Cleric Class
* [AFR] Implemented Fighter Class
* reworked class ability implementation
* fixed an error with setting class level
* small reworking of class triggers
* added class level hint
* added tests
* small change
* added common class for reminder text
* Cumulative upkeep cost - fixed that it can lost payed state (cards: Aboroth, Karplusan Minotaur, Psychic Vortex, Sheltering Ancient);
* Effects - fixed that it can lost selected targets or other settings (cards: Citadel of Pain, Crimson Honor Guard, Curfew, Leveler, Mana Cache, Monsoon, Paradigm Shift, Saprazzan Bailiff);
* Exile all cards from graveyard ability - fixed that it can lost targets (example: Agent of Erebos);
* Melee ability - fixed that it can lost targets (example: Adriana, Captain of the Guard).
* add treasure mana support to mana code
* [AFR] Implemented Hired Hexblade
* [AFR] Implemented Jaded Sell-Sword
* [AFR] Implemented Forsword Paladin
* added test
* fixed test failure
* another test fix
* completely reworked tracking mana sources
* added dungeon and dungeon room class
* [AFR] Implemented Tomb of Annihilation
* [AFR] Implemented Shortcut Seeker
* [AFR] Implemented Gloom Stalker
* [AFR] Implemented Nadaar, Selfless Paladin
* added room triggers
* added more venturing code, currently untested
* fixed error
* moved venture into dungeon from player class to game class
* removed unnecessary sourceobject from dungeon
* fixed npe error
* added dungeon completion
* fixed concurrent modification exception
* added logging
* added proper copy methods
* added views
* updated room text generation
* added some missing code
* finished implementing CompletedDungeonCondition
* [AFR] Implemented Ellywick Tumblestrum
* [AFR] Implemented Lost Mine of Phandelver
* added choice dialog for dungeons
* [AFR] Implemented Dungeon of the Mad Mage
* small text fix
* added initial dungeon test
* [AFR] Implemented Cloister Gargoyle
* [AFR] Implemented Dungeon Crawler
* small text change for dungeon rooms
* added more tests
* some simplification to dungeon props
* updated testing helper functions
* added currently failing test for venturing on separate steps and turns
* added tests for dungeon completion
* fixed missing trigger visual and dungeons not persisting through turns
* some text updates
* added rollback test
* added a test for multiple dungeons at once
* added one more condition test
* Implemented chooseTargetAmount and new GUI dialog (distribute damage, distribute mana)
* Added tests and AI support;
* Test framework: added aliases support in TargetAmount dialogs;
Co-authored-by: Oleg Agafonov <jaydi85@gmail.com>
* created interface for handling voting
* created class for two choice votes, refactored a card to use it
* refactored all cards which use two choice votes
* updated VoteHandler to an abstract class to encapsulate more of its functions
* refactored cards which vote for more than two things
* [CNS] Implemented Brago's Representative
* [CN2] Implemented Ballot Broker
* [CN2] Implemented Illusion of Choice
* [CNS] Implemented Grudge Keeper
* added vote outcomes
* updated implementation of Illusion of Choice to work correctly in multiples
* added test for voting
* updated implementation of extra votes
* simplified vote message handling
* Improved names, additional comments
* Votes: fixed not working getMostVoted
* Votes: added final vote results to game logs;
* Votes: added additional info for the vote choices;
* Votes: added vote step info in choose dialogs, added AI support example for Tyrant's Choice;
Co-authored-by: Oleg Agafonov <jaydi85@gmail.com>
* refactored createCopyOnStack to be void
* added new interface for modifying copied spellsspells
* update implementation of Fork to use new applier
* reworked epic effect
* add applier to spell copy code
* updated implementation of Beamsplitter Mage
* updated cards which copy for each possible target
* added support for additional copies having targets changed
* fixed/ignored failing tests
* updated target changing to prevent unnecessary choosing
* added test for Twinning Staff
* updated implementation of spell copy applier
* added new method for choosing order of copies on stack
* fixed test failures
* [TSR] various text fixes
* fixed a test failure
* [SLD] fixed Rick, Steadfast Leader only counting Human creatures
* updated test framework to handle skips without affecting starting player choice
* fixed another test failure
* updated copy messaging for consistency
* added copy messaging to stack abilities
* in card's code use player.isComputer instead player.isHuman (it help to split Human/AI logic and test both by unit tests);
* usage example: AI hint to skip or auto-calculate choices instead call of real choose dialogs;
* unit tests for Human logic: call normal commands;
* unit tests for AI logic: call aiXXX commands;
* Dev: added card's LKI support of multi part cards (mdf/split/adventure);
* Dev: improved support of adding/removing counters from mdf cards;
* Draugr Necromancer - fixed support of mdf/split/adventure cards (#7620);
* initial refactor of damage events
* cleaned up some instances of classes that need to be removed
* removed old damage event classes
* removed outdated imports
* temporarily refactor Everlasting Torment (this will need to be changed more)
* updated damage handling to use new changes
* some reworking of lethal/excess damage plus a test
* updated damage marking to handle planeswalkers
* updated implementation of Phyrexian Unlife
* updated implementation of Everlasting Torment
* added some more excess damage tests
* small change to wither check
* Cascade: added correct spell ability choose for forced cast of mdf and adventure cards (can contains one or both sides);
* Cascade: added tests from latest oracle changes;
* AI: improved spell ability choose for forced cast (example: cast target card without mana cost);
* GUI: improved spell ability choose for forced cast (now you can see only castable spells to choose);
* Other: fixed wrong PlayFromNotOwnHandZone in some cards, fixed NPE;