Commit graph

2947 commits

Author SHA1 Message Date
Evan Kranzler
e4c7b5da53 [STX] Implemented Radiant Scrollwielder 2021-04-13 17:58:47 -04:00
htrajan
10cd439955
[STX] add more cards (#7720)
* implement AcademicProbation
* implement AugmenterPugilist // EchoingEquation
* Implement BalefulMastery
* implement BasicConjuration
* implement ClosingStatement
* Test framework: added custom effect to return card from any zone to hand;

Co-authored-by: Oleg Agafonov <jaydi85@gmail.com>
2021-04-09 17:56:34 +04:00
Evan Kranzler
734bd6f118 fixed Blatant Thievery test failure 2021-04-04 13:19:15 -04:00
Evan Kranzler
8f37428518 [ELD] fixed issues with Robber of the Rich 2021-03-30 17:48:46 -04:00
Evan Kranzler
97af948932 simplified and condensed various effects which discard variable amounts of cards 2021-03-29 21:35:27 -04:00
Evan Kranzler
d54e1c6eac [DTK] updated implementation of spells which reveal dragon cards as a cost 2021-03-23 19:44:45 -04:00
Oleg Agafonov
8a06be7e28 Merge fix 2021-03-20 18:40:22 +04:00
Evan Kranzler
1cbbcddcc6
Improving implementation of cards which use voting (WIP) (#7566)
* 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>
2021-03-20 18:32:54 +04:00
Evan Kranzler
991f154cd7 [IKO] small nonfunctional change to Zirda, the Dawnwaker test 2021-03-15 10:17:04 -04:00
Evan Kranzler
5e2738aab9 [IKO] fixed issue with Zirda, the Dawnwaker static ability not working when reanimated 2021-03-14 18:49:32 -04:00
Evan Kranzler
d4792e3665 reworked/simplified/consolidated effects which exchange life totals, added test (fixes #7668) 2021-03-14 15:56:48 -04:00
Evan Kranzler
13ac8f2c01 [IKO] added test for Zirda, the Dawnwaker 2021-03-14 11:40:08 -04:00
Evan Kranzler
9c56a98dc9
Refactor implementation of spell copies for cards like Twinning Staff as well as refactor handling of target changing (WIP) (#7662)
* 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
2021-03-12 12:47:49 -05:00
Oleg Agafonov
53a2021a12 * Caller of the Hunt - fixed rollback error on usage, added AI support for the card; 2021-03-07 23:41:52 +04:00
Oleg Agafonov
2906f86324 Test framework: simplified AI logic and tests, added usage comments. Devs recommendations:
* 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;
2021-03-07 23:38:10 +04:00
Oleg Agafonov
0e916b6e29 Dev: added additional info to some classes for easy debug; 2021-03-07 17:16:54 +04:00
Oleg Agafonov
b36f915d74 * Copy spell - improved support, now all copied spells are independent (bug example: Seasons Past fizzled after copy resolve, see #7634, 10f8022043); 2021-03-06 19:32:17 +04:00
Evan Kranzler
425c1eda26 [TSR] added set 2021-03-05 18:17:01 -05:00
Oleg Agafonov
712cf4576d * Gain abilities - fixed that objects can get only one instance of triggered ability instead multiple (example: 2+ cascades from copies of Imoti, Celebrant of Bounty, f52753ad61); 2021-03-05 16:22:46 +04:00
Oleg Agafonov
4e79c83784 Test framework: fixed missing range info for added cards (some ETB effects were broken on "put to battlefield" command usage); 2021-03-05 15:12:47 +04:00
Evan Kranzler
28c0bd55e8 added test for Muraganda Petroglyphs/Tarmogoyf/Muraganda Petroglyphs 2021-03-03 09:06:39 -05:00
Evan Kranzler
3b5147f6ee updated some methods to support collections of card subclasses 2021-03-02 09:41:39 -05:00
Oleg Agafonov
098796f86e * Commander: fixed that non hand abilities are castable from command zone (example: Escape, Jumpstart, see #7632); 2021-03-01 01:14:00 +04:00
Evan Kranzler
6091c7eae3 fixed trample and deathtouch not working when deathtouch is gained by an outside source (fixes #7633) 2021-02-28 09:34:09 -05:00
Evan Kranzler
2daf1945e7 [RTR] reworked Nivmagus Elemental and added test 2021-02-27 15:35:04 -05:00
Oleg Agafonov
9d72dad674 [ZNE] added images download 2021-02-27 22:16:19 +04:00
Oleg Agafonov
0d885af05e Tests: fixed random fails; 2021-02-27 20:36:06 +04:00
Oleg Agafonov
dda69cd009 * AI: improved support of "as though mana" abilities (now computer can choose correct mana ability to pay, example: Draugr Necromancer);
* 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);
2021-02-27 20:14:12 +04:00
Daniel Bomar
73f594583f
[KHM] Fixed Draugr Necromancer being unable to cast Adventures 2021-02-26 16:10:46 -06:00
Daniel Bomar
27c0f75302
Fixed Archfiend's Vessel not moving to exile (fixes #7622) 2021-02-25 16:39:20 -06:00
Evan Kranzler
c01e1cd133 [LEA] added test for Forcefield 2021-02-24 20:55:22 -05:00
Evan Kranzler
f5f7638216 [KHM] updated Draugr Necromancer, added test (#7620) 2021-02-23 19:11:21 -05:00
Evan Kranzler
bac2585d83 [KHM] fixed Draugr Necromancer not allowing snow mana to be used for exiled cards 2021-02-23 13:47:23 -05:00
Evan Kranzler
683d5e7c25 [KHM] added new test for Maskwood Nexus 2021-02-23 12:25:08 -05:00
Evan Kranzler
0a68507ef0 reenabled/removed/fixed some ignored tests 2021-02-23 10:37:17 -05:00
Evan Kranzler
2ffa719278 fixed issue with Kruphix, God of Horizons and Horizon Stone causing endless replacement effect loop 2021-02-23 08:41:54 -05:00
Evan Kranzler
5390963d38
Fix handling of damage to permanents (WIP) (#7592)
* 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
2021-02-22 17:11:24 -05:00
Oleg Agafonov
39f6b69391
Merge pull request #7584 from weirddan455/cascade
Implemented updated Cascade ruling 702.84a
2021-02-22 23:03:56 +01:00
Oleg Agafonov
91f4d78992 Changes related to Cascade ability (#7583):
* 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;
2021-02-23 02:00:38 +04:00
Evan Kranzler
bd3777997e
updated various cards to improve how they handle exiling with info (#7615) 2021-02-22 15:26:58 -05:00
Daniel Bomar
bb0a995541
Tibalt, Cosmic Impostor - fixed that emblem can't cast not owned cards (#7598)
* Fixed ability.canChooseTarget not using correct playerId

* Fixed Necrotic Plague

* Revert "Fixed Necrotic Plague"

This reverts commit 7659039670293ce1ea428dad042511d9d75f9da6.

* Set target controller on Necrotic Plague and add check in canChooseTarget

* Add test for Tibalt + Ephemerate interaction

* Tests improved

Co-authored-by: Oleg Agafonov <jaydi85@gmail.com>
2021-02-22 23:06:43 +04:00
Oleg Agafonov
4050577d6b Tests: added tests for Moritte of the Frost (related to #7546); 2021-02-22 21:55:17 +04:00
Oleg Agafonov
2accab79c5 * Spark Double - fixed duplicated counters on copying of another Spark Double (#7553); 2021-02-22 21:22:31 +04:00
Oleg Agafonov
f6c0f4c712 * Geode Golem - fixed duplicated commander tax on damage trigger (#7593); 2021-02-22 16:11:13 +04:00
Oleg Agafonov
650acf9e1e Test framework: fixed support of chooseAbilityForCast for commanders, added destroy target custom effect (#7593); 2021-02-22 16:05:48 +04:00
Oleg Agafonov
a377999f57 * Desertion - fixed rollback error on fizzled counter spell (#7613); 2021-02-22 08:51:07 +04:00
Oleg Agafonov
b6cb5cef9c Refactor: removed default comment headers 2021-02-21 08:15:16 +04:00
Oleg Agafonov
d343511d73 * Elsha of the Infinite - fixed that it gives flash ability to cards in the hand instead library's top card (closes #7605); 2021-02-21 07:43:29 +04:00
Oleg Agafonov
48e9cc3e07 PlayTheTopCard improves: added correct usage check, fixed outdated rule texts, Bolas's Citadel simplified (related to #7605); 2021-02-21 05:48:09 +04:00
Evan Kranzler
a8bda04daf [GTC] updated implementation of Bane Alley Broker 2021-02-19 14:47:47 -05:00