Commit graph

2482 commits

Author SHA1 Message Date
Thomas Hess
7219d51572
Removed 6th Edition cards from Starter 2000 set.
These are indistinguishable from regular 6ED cards and not listed on Scryfall.
2020-03-24 17:32:08 +01:00
Thomas Hess
da98ac82ed
Aligned Guru Set code with Scryfall (GUR → PGRU). 2020-03-24 17:32:06 +01:00
Thomas Hess
2e08c1a9c4
Test for NULL values in test_CreateRandomDeck().
Sometimes, building a random deck fails and returns NULL.
Properly handle this case by adding some assert statements that
verify that a Deck instance is actually returned, before checking the cards.
Prevents NPEs during test runs.
2020-03-24 17:32:06 +01:00
Thomas Hess
529552dd2c
Fixed set codes for the Duel Deck Anthology deck sets.
The decks now use the set codes from Scryfall.
2020-03-24 17:32:06 +01:00
Thomas Hess
6297650c3b
Split the Judge Gift Cards set (JP) into the individual sets as listed on Scryfall.
- Removed the JP set.
- Added G02-G11, J12-J20
- Fixed all usages in the test code
- Updated the sample decks that used these cards.
  The deck lists now contain the updated references.
- Added all Judge Gift sets to the "bling" sets list
2020-03-24 17:31:54 +01:00
Thomas Hess
12d1bd4bb4
Split the cummulative Friday Night Magic set into the individual sets.
- Removed set FNMP
- Added sets F00 - F17 (F18 does not contain cards, only tokens)
2020-03-19 11:09:48 +01:00
Thomas Hess
e39a9706bc
Fix booster generation issues with Mystery Booster set.
- Split the foil sheet into a separate set as listed on Scryfall.
- Added unit test cases that verify booster generation.
2020-03-19 11:09:45 +01:00
Oleg Agafonov
2b78ec745c * Mind's Desire - fixed that it doesn't work with split cards (#6337); 2020-03-12 04:07:17 +04:00
Oleg Agafonov
a20bca1b21 Test framework: fixed ai play commands, added more tests 2020-03-12 02:05:06 +04:00
Oleg Agafonov
14ddb6eb28 * AI: fixed wrong targeting for gain control abilities (#6340); 2020-03-11 18:22:58 +04:00
Oleg Agafonov
86f6d39f5a * AI: fixed rollback errors on play cards with target stack (Diplomatic Escort, Not of This World, etc); 2020-03-09 13:49:07 +04:00
Oleg Agafonov
a6ab40dc57 Test framework: added strict mode support for full simulation commands (aiXXX); 2020-03-09 12:34:05 +04:00
Oleg Agafonov
70bf13359a Test framework: improved alias support:
* added alias support in castSpell command;
* added alias support in activateAbility command (example: `@ref ability text from ref card`);
* added alias support in activateMana command;
* added alias support in some assertXXX commands;
2020-03-09 05:49:03 +04:00
Oleg Agafonov
cb8d4dc340 * Non creature tokens - fixed rollback errors in AI games (example: Food token, see #6331);
Fixed other potentially NPE errors with rarity;
2020-03-06 03:27:46 +04:00
Oleg Agafonov
2e73f9d1c5 * UI: added turn number and step info in game logs 2020-02-28 20:27:07 +04:00
Oleg Agafonov
169d9bf761 * Non basic mana abilities - fixed rollback errors in AI games (#6300); 2020-02-25 12:41:45 +04:00
Oleg Agafonov
b5acf64772 * Monohybrid mana cost improves:
* fixed wrong manually pay by mana pool (it pays generic cost instead colored part of monohybrid);
 * fixed not working cost reduction effects (now monohybrid cost will be reduced correctly with some limitation, see #6130);
2020-02-11 22:33:32 +04:00
Oleg Agafonov
13ad86cb21 Test framework improves:
* added aliases support to many assertXXX commands (check objects by alias/GUID instead card name);
 * added mode to test/simulate human's mana pool usage without auto-payment (enable it by command disableManaAutoPayment, fill mana pool by activateManaAbility and simulate clicks on mana icon by setChoice);
 * improves activateManaAbility command (you can activate it multiple times by one command);
 * improves setChoice command (you can activate it multiple times by one command);
2020-02-11 20:04:19 +04:00
Samuel Sandeen
d56f6b991b
Fix Sevinne's Reclamation. (#6275)
This also handles the rather unique case caused by Sevinne's Reclamation where the original spell resolves before the copy of it.
Also fixes a couple typos.
2020-02-10 08:18:12 -05:00
Ingmar Goudt
ae7919cd07 program towards Interface rather than implementations 2020-02-10 10:40:06 +01:00
Oleg Agafonov
b04c436801 Merge pull request #6274 from Dilnu/Rider
Check zone change counters in PutOnLibrarySourceEffect
2020-02-09 19:49:29 +01:00
dilnu
847df3eeb8 Check zone change counters in PutOnLibrarySourceEffect 2020-02-09 11:56:13 -05:00
Oleg Agafonov
db2a556fca Additional comments and tests for #6268 2020-02-09 07:52:24 +04:00
Samuel Sandeen
29ce4b1ad4
Fix Lifelink so it triggers per source instead of per recipient in combat. (#6272)
* Fix Lifelink so it triggers once per source instead of once per recipient in combat.

* Undo an import collapse.

* Add more tests for lifelink.
2020-02-08 20:31:50 -06:00
Samuel Sandeen
51424b1460 Fix Irencrag Feat's spell casting effect. (#6268)
* Create a test for Irencrag Feat to ensure it functions correctly.

* Fix Irencrag Feat so it works correctly.
2020-02-08 18:28:10 -06:00
Oleg Agafonov
6674ca5d20
Merge pull request #6251 from Dilnu/Bonecrusher
Only fire one TARGETTED event per target selected while changing targets.
2020-02-08 16:31:04 +01:00
jeffwadsworth
7cbf999e9b - Fixed Starfield of Nyx test. 2020-02-07 10:22:15 -06:00
dilnu
6d005bae1d Add tests by JayDi85 and fix TestPlayer's Targetting code so it triggers Targetted Events. 2020-02-06 18:55:33 -05:00
jeffwadsworth
d6c2f031d0 - Fixed #6236 2020-02-06 17:47:08 -06:00
dilnu
fc46c0b288 Turn on strict mode for the test and Add documentation for the cards in the test. 2020-02-03 18:01:36 -05:00
Oleg Agafonov
78a9279438 Improved test for #6244 2020-02-04 02:22:26 +04:00
Oleg Agafonov
4c5ea62cea
Merge pull request #6244 from Dilnu/Chaos
Fix Chaos Wand
2020-02-03 23:19:34 +01:00
Oleg Agafonov
ee9abe4699 Fixed test 2020-02-04 01:37:21 +04:00
Oleg Agafonov
88f23bc0ee
Merge pull request #6245 from Dilnu/Despark
Allow players to block creatures attacking destroyed planeswalkers.
2020-02-03 22:34:45 +01:00
dilnu
b6af571779 Only fire one Targetted event per target
This specifically addresses changing the target of a spell or ability on the stack.
Fixes https://github.com/magefree/mage/issues/6158
2020-02-02 19:40:25 -05:00
dilnu
a8d8f4e621 Add tests to debug issues with Bonecrusher Giant
https://github.com/magefree/mage/issues/6158
2020-02-02 18:51:05 -05:00
dilnu
9a80b07d2a Fix Skyfire Phoenix's triggered ability. 2020-02-01 19:05:46 -05:00
dilnu
06e77bd7d6 Allow players to block creatures attacking destroyed planeswalkers.
See Comprehensive rules: 506.4c
Fixes https://github.com/magefree/mage/issues/6240
2020-02-01 17:30:30 -05:00
dilnu
e3e68c4607 Fix Chaos Wand
Fixes https://github.com/magefree/mage/issues/6241
2020-02-01 16:51:19 -05:00
Oleg Agafonov
c767d19534 Test framework: added AI support in basic card tests:
* added new command to play one best action on priority by AI (aiPlayPriority);
* added new command to play all best actions on step by AI (aiPlayStep);
* now you can setup battlefield by standard commands and run AI simulations for single priority/step;
* CardTestPlayerBase - old default class for card tests, it uses simple AI for choosing, but do not play/simulate it;
* CardTestPlayerBaseAI - old default class for AI game tests, auto-playable playerA, you can control only playerB;
* CardTestPlayerBaseWithAIHelps - new improved class for card tests, it uses controllable and real AI with game simulations;
2020-01-29 07:42:20 +04:00
Oleg Agafonov
89394ffe0a Improved ability outcome processing; 2020-01-29 07:33:33 +04:00
Oleg Agafonov
eb93c08a6f Fixed tests 2020-01-28 16:42:44 +04:00
Oleg Agafonov
5c058d8f85 Cleanup code (added logs rotation to tests) 2020-01-28 12:02:56 +04:00
Oleg Agafonov
0525463faf Test framework: added more aliases support, improved logs output for show commands; 2020-01-27 17:31:18 +04:00
Oleg Agafonov
ccdad1f5ca Test framework: added alias support in chooseTarget; 2020-01-27 14:02:21 +04:00
Oleg Agafonov
ffdc884949 Logs cleanup (removed database logs) 2020-01-27 06:01:56 +04:00
Oleg Agafonov
ec6b0b94c6 Test framework: improved aliases support:
* added check commands support;
* added on of the choose method support;
* added todo and checks for wrong test commands setup;
2020-01-27 06:00:46 +04:00
Oleg Agafonov
016f5fa9f5 Merge fix 2020-01-26 20:39:19 +04:00
Oleg Agafonov
b86438b80d Tests for #6222 2020-01-26 20:37:32 +04:00
Oleg Agafonov
9ec6aa83c4 * Infected counters - fixed rollback error on usage; 2020-01-26 18:41:01 +04:00