* 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;
* [THB] added initial common/uncommon collation mechanism
* [THB] added rare/mythic and lands to pack generation
* fixed some card names
* broke out collation into its own separate classes
* built collation into ExpansionSet
* added note about collation information
* [KHM] added collation info
* updated collation to use collector number rather than name
* added shuffle to set constructor
* added some notes on collation methods
* [KHM] fixed that some effects can't find mdf commanders on battlefield (example: Fierce Guardianship, #7504);
* Oathbreaker: fixed that some cards that refer to commander can affects signature spells too;
* [KHM] Dream Devourer - Fixed being unable to cast foretold MDFCs, split cards, and adventure cards
* [KHM] Dream Devourer - Fixed mana costs and added check for MDFC lands
* [KHM] ForetellAbility - Add text when selecting which half of split card to cast
* Updated test for Dream Devourer
* Now token's zcc uses same logic as card's zcc: enters to battlefield with +1 zcc instead +0 zcc
* It can improve support of copied spells that store zcc related data (bug example: lost kicked status for copied spell/token);
* Kicker abilities - improved support with copied creature spells (example: Verazol, the Split Current, #7431, #7433);
* Refactor: simplified kicker code;
* [KHM] fixed legendary status of mdf cards (closes#7370, #7404, #7465, #7481);
* Game: added support of split cards as commander (signature spell);
* Game: added support of adventure cards as commander;
* Game: added support of modal double faces cards as commander;
* AsThough: added documentation about code usage and restrictions;
* AsThough: added additional checks for correct usage;
* AsThough: simplified some code;
* PlayFromNotOwnHandZoneTargetEffect - added permanents support as targets;
* Release to the Wind - fixed that it can't cast exiled cards (#7415, #7416);
* Test framework: fixed that checkExileCount checking card's owner;
* GUI: fixed typo in Trample card icons;
* added parameter for player adding counters to players
* added parameter for player adding counters to cards/permanents
* updated methods to use new parameter
* fixed a few initial errors
* refactored instances of cards that add counters by a player other than the controller
* fixed some instances of incorrect arguments
* refactored abilities that trigger off of a particular player adding counters
* a few more cards that were missed
* [KHM] Implemented Vorinclex, Monstrous Raider
* added test for Vorinclex, Monstrous Raider
* fixed a test failure
* removed and renamed SubTypeList
* updated subtype test
* refactored Changeling to be an ability that actually does something
* moved isAllCreatureTypes into SubTypes class
* renamed copyTo method to copyFrom
* added removeAllCreatureTypes where usable
* replaced some subtype methods
* replaced some more subtype methods
* replaced subtype mass add/remove methods
* updated more subtype methods
* fixed some errors
* made common shared creature type predicate
* refactored another card involving subtypes
* Added usage of object attribute in subTypes's write operations;
* Refactor: use same param styles in subtype methods
* Refactor: simplified usage of copy appliers;
* Refactor: fixed code usage in CopyApplier
Co-authored-by: Oleg Agafonov <jaydi85@gmail.com>
* refactored mana methods to WUBRG order
* more WUBRG refactoring
* added new mana tracking object
* fixed code error
* fixed missing mana count
* fixed null pointer exception in tests
* fixed issue with equality
* more equality fixes
* some cosmetic changes to ManaTest
* added copy method to setToMana
* fixed some initialization issues
* fixed serialization issue
* [KHM] Implemented Search for Glory
* updated mana handling to track snow
* added tests for snow mana tracking
* updated implementation of setter methods
* updated paramater to use copy methods
* fixed snow mana test to ensure proper mana tapping
* replaced instances of getPayment with getUsedManaToPay
* updated tracking of snow mana
* reverted snow mana tracking removal
* finished reverting change
* GainAbilityTargetEffect - reworked to support static/dynamic targets, added support of spells (card + related permanent);
* SpellCastControllerTriggeredAbility - now it can setup the target to a card instead a spell;
* Added checks/errors on wrong ability adding code (example: if you add permanent's ability by game state instead permanent's method);
* Tyvar Kell Emblem now use a standard code;
* Test framework: added additional logs for some errors;
* Now ZCC of copied spells syncs with source card or coping spell (allows to keep ability settings that depends on ZCC);
* Fixed bug that allows to lost kicked status in copied spells after counter the original spell or moves the original card (see #7192);
* Test framework: improved support of targeting copy or non copy spells on stack;
* You may play cards and you may spend mana of any color - refactored cards to use same code;
* Library search event allows to change searching controller (gives full game control for another player);
* Library searched event allows to remove founded cards from result;
* Improved library searching effects with Panglacial Wurm's effects;
* Little changes to test framework;