Commit graph

2860 commits

Author SHA1 Message Date
Evan Kranzler
a535cb5adc
Refactoring methods which add counters to track which player adds the counters (ready for review) (#7448)
* 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
2021-01-26 19:06:13 -05:00
Evan Kranzler
13ce938fd0 [KHM] added test for Giant Ox 2021-01-26 15:51:35 -05:00
Evan Kranzler
dacf30f4b9
Refactoring subtypes to make Maskwood Nexus work (ready for review) (#7432)
* 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>
2021-01-26 08:52:35 -05:00
Jeff
dbf0789238 - Fixed test 2021-01-25 19:13:46 -06:00
Evan Kranzler
83c103f17f [KHM] Implemented Karfell Harbinger 2021-01-24 15:44:03 -05:00
Oleg Agafonov
c3b391b42f Fixed verify tests config 2021-01-23 09:45:25 +04:00
Evan Kranzler
e5344b7a96
Refactoring snow mana to allow tracking how much is spent (Ready for Review) (#7406)
* 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
2021-01-21 18:13:51 -05:00
Oleg Agafonov
286cc63342 Test framework: improves 2021-01-19 08:30:01 +04:00
Oleg Agafonov
639c68cd76 Additional tests and fix for God-Eternal Kefnet (#7397); 2021-01-18 04:23:46 +04:00
Evan Kranzler
5d7fc394fd [KHM] Implemented Rune of Flight 2021-01-14 17:14:07 -05:00
LevelX2
9fc0e2f25a * Added some trace output for continous effects and triggered abilities. Changed duration of AffinityEffect to WhileOnStack to prevent wrong handling for removement of the effect. 2021-01-13 09:14:29 +01:00
Oleg Agafonov
6dcbcbe962 Tyvar Kell and gain ability fixes:
* 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;
2021-01-12 04:41:35 +04:00
LevelX2
c67ce93ec4 * Fixed some problems with color changes of cards and spells - e.g. Painter's Servant (fixes #7325 fixes #6487). 2021-01-08 11:03:39 +01:00
Evan Kranzler
06b0e4f247 fixed a test failure 2021-01-07 19:40:45 -05:00
LevelX2
8098dd690c * Fixed that effects with custom duration are not automatically removed from the game if source permanents leaves the game (fixes #6997). 2020-12-28 18:36:05 +01:00
Oleg Agafonov
aa7226a1af * Archive Trap - fixed that it doesn't apply alternative cost after searched library (#7274); 2020-12-28 07:10:15 +04:00
Oleg Agafonov
767644f1c8 GUI: fixed that user can target/click on second side of mdf card instead the main side (related to #7297); 2020-12-27 01:39:18 +04:00
Ingmar Goudt
34e9c2fdfb Merge branch 'master' of https://github.com/magefree/mage 2020-12-26 15:26:17 +01:00
Oleg Agafonov
81e0cc6403
Merge pull request #7158 from fburato/app-wiring-refactor
Application wiring refactor and externalise configuration path for server
2020-12-26 07:42:46 +01:00
Oleg Agafonov
a307e5934f Improved some source related filters in effects:
* Fixed that some cards ignore range of influence or source related filters;
* Improved ChosenSubtypePredicate to work with gain abilities;
2020-12-25 19:06:36 +04:00
Oleg Agafonov
6f34d514f9 * Archelos, Lagoon Mystic - fixed broken ETB effect (#7283); 2020-12-24 20:24:42 +04:00
Oleg Agafonov
64e948e4b3 * AI: improved game performance by x10 for cards with target amount;
AI: added targeting name and amount info to simulation logs;
AI: removed duplicated target variations from target amount simulations;
2020-12-24 15:02:28 +04:00
Ingmar Goudt
f0dea44773 small Negan fix 2020-12-23 21:38:42 +01:00
LevelX2
2ce90b1e0a * Fixed that the dies trigger of Ashen Rider also triggers if Ashen Rider is copied by other creatures (e.g. Volrath the Shapestealer) (fixes #7107). 2020-12-23 18:02:00 +01:00
Oleg Agafonov
10cf9c4a4e * Genesis Ultimatum - fixed rollback error on usage with modal double faces cards (#7275); 2020-12-23 09:15:04 +04:00
Oleg Agafonov
796c8fb22e Tests: added Inferno Titan AI tests, related to #6330; 2020-12-23 02:51:52 +04:00
Oleg Agafonov
255c292104 * Deals damage divided as you choose - fixed that some cards can't choose planeswalkers (example: Arc Lightning, see #7276);
Refactor: simplified FilterCreaturePlayerOrPlaneswalker to use single permanent filter;
2020-12-23 02:31:41 +04:00
Oleg Agafonov
347a3b1e1a * Jeweled Lotus - fixed that mana can't be used to cast commanders without normal mana (#7272); 2020-12-22 23:22:41 +04:00
LevelX2
29184316f2 * Cumulative Upkeep - Fixed that a permanent with CU was wrongly sacrificed if the control of the permanent has changed since CU begin of upkeep trigger was put on the stack. Added tests for CU. 2020-12-21 14:36:22 +01:00
Oleg Agafonov
cc5fce4256 Prepare new release 2020-12-19 23:59:44 +04:00
Oleg Agafonov
a1ed8e01b3 [CMR] fixed Eligeth, Crossroads Augur - wrong event type for replacement effect (#7234); 2020-12-19 18:45:49 +04:00
Oleg Agafonov
a50f3c5416 Tests: added Hans Eriksson's play tests, related to #7234; 2020-12-19 18:35:02 +04:00
Oleg Agafonov
9f67765e2d [CMR] fixed Armix, Filigree Thrasher - not working card, missing target (#7234); 2020-12-19 18:18:47 +04:00
Oleg Agafonov
1b830032ac * Militant Angel - fixed rollback error on usage (#7239); 2020-12-19 04:48:55 +04:00
Oleg Agafonov
3cccad2138 Test framework: added dynamic code support in unit tests (command: runCode - use it same way as real time checks); 2020-12-19 04:46:19 +04:00
Oleg Agafonov
384ff2e7ac * Gain cost modification abilities - fixed that commanders can't be played without full mana (example: gained Affinity by Mycosynth Golem, gained Convoke by Chief Engineer, see #7249 #7171, #6698); 2020-12-18 18:33:44 +04:00
Oleg Agafonov
53c5abea14 Added additional test for #7251;
Added last error info in too many errors game message;
2020-12-18 16:46:05 +04:00
Oleg Agafonov
c13d07b73d [CMR] fixed Rakshasa Debaser - class cast exception in filter on usage; 2020-12-18 15:54:59 +04:00
LevelX2
d39575c24e * Fixed bug in DamagedBatchEvent (fixes #7241). Fixed some spelling in test classes. 2020-12-17 17:39:17 +01:00
Oleg Agafonov
3f44d9eef3 * Exile card and return it from exile - fixed rollback error on commander creature exile (#7250);
[CMR] fixed PromiseOfTomorrow - not working ability;
2020-12-17 10:07:15 +04:00
Oleg Agafonov
926f5f0621 * Copy spell for each other permanents that it could target - fixed that AI can freeze the game, fixed wrong highlighting; 2020-12-17 06:37:41 +04:00
Oleg Agafonov
f8206df3ba [CMR] fixed Sphinx of the Second Sun - wrong extra phase and server freeze on usage; 2020-12-16 04:17:03 +04:00
Oleg Agafonov
ac7910159e Tests: added game stats table after load testing finished; 2020-12-16 01:32:24 +04:00
Oleg Agafonov
0c2c33e940 * Kicker abilities - fixed that some cards don't see kicked status of multikicker spells (example: Hallar, the Firefletcher, #4895); 2020-12-15 21:23:09 +04:00
Oleg Agafonov
4d362d7edc * Copy spells - improved combo support with other abilities like Kicker or Entwine (#7192):
* 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;
2020-12-15 20:06:53 +04:00
Oleg Agafonov
936be75a66 Tests: added test for Krark, the Thumbless (#7198) 2020-12-14 22:40:12 +04:00
Oleg Agafonov
c1dfbbda63 Test framework: added support for flip coin tests (command: setFlipCoinResult); 2020-12-14 03:00:38 +04:00
Oleg Agafonov
fde24f349f * Modal Double Faces cards - fixed that it can be returned to battlefield as second side instead the main side only (#7212); 2020-12-14 00:57:30 +04:00
Oleg Agafonov
35f5a8257b Refactor: replaced sourceId by source and introduced source param in some methods (part 2); 2020-12-13 02:01:49 +04:00
Oleg Agafonov
db239a1055 Refactor: replaced sourceId by source and introduced source param in some methods; 2020-12-12 20:23:19 +04:00