Commit graph

3170 commits

Author SHA1 Message Date
Oleg Agafonov
6ed702a7b3 Tokens improved:
- added auto-generated token names for CreatureToken;
 - added verify tests for token names;
 - removed outdated ElementalCreatureToken;
 - fixed wrong indefinite article in some tokens;
 - fixed miss Token in some token names (related to #10139);
2023-05-04 17:38:54 +04:00
Oleg Agafonov
94819ff91c Tokens rework:
- tests: added support of set code in custom ability (see addCustomCardWithAbility);
 - tests: added additional tests for token images (related to #10139, #10222);
 - fixed wrong token images for copied cards/tokens (#10222);
2023-05-01 17:27:26 +04:00
Alexander Novotny
5c6de9815f
Fixed Lynde's triggered ability (#10301)
Fixes magefree/mage#10045.

Lynde wasn't keeping track which zone cards were in before bring them back, let alone zone change counters.

Many similar effects are only looking at the current zone rather than zone change counters.
2023-04-30 18:59:22 -04:00
Oleg Agafonov
f86cf176d7 Tokens rework:
- added reminder / helper tokens support (example: Copy, Morph, Day // Night, related to #10139);
 - added verify checks for reminder tokens;
 - added images download for reminder tokens;
2023-04-27 19:05:31 +04:00
Evan Kranzler
726e289646
Implement DFC tokens for Incubate (#10231)
* remove incubate skip

* initial implementation of DFC tokens

* separate incubator back face to separate class

* small refactor to token copy function

* token copies now have back faces as well

* effects which modify token copies now correctly apply to both faces

* add skip for exception

* tokens now enter transformed correctly

* [MOC] remove skip for incubate

* fix verify failure
2023-04-27 19:03:25 +04:00
Daniel Bomar
92b6d7a531
[BRO] Implemented Gix, Yawgmoth Praetor (#9765)
* [BRO] Implemented Gix, Yawgmoth Praetor

* Add missing TestPlayer, PlayerStub implementations
2023-04-23 11:49:52 -04:00
Oleg Agafonov
7d44057f93 Tokens rework:
- now token images chosen by tokens database instead availableImageSetCodes (related to #10139);
 - added additional verify checks for tokens database;
 - fixed some tokens;
2023-04-22 15:50:46 +04:00
Oleg Agafonov
5474787641 Refactor: added miss Ability source in some choose methods 2023-04-21 10:08:33 +04:00
amoscatelli
6059422afc
[J22] Implement Alandra, Sky Dreamer (#10219)
* Alandra Sky Dreamer
DrawSecondCardTriggeredAbility refactored into DrawCardTriggeredAbility
DynamicValue support for DrawCardTriggeredAbility
DynamicValue support for BoostAllOfChosenSubtypeEffect

* cardNumber as int
static use of cardwatcher

* removing spaces

* FaerieMastermind and ZimoneAndDina using the new generic DrawCardTriggeredAbility

* AlandraSkyDreamer and DrawCardTriggeredAbility test

* renaming DrawCardTriggeredAbility to DrawNthCardTriggeredAbility

* merging the boost effects into a single ability

* merging two effects to the same ability

* text added to effects

---------

Co-authored-by: drago <drago@192.168.1.72>
2023-04-17 09:12:18 -04:00
Evan Kranzler
947351932b
Ready for Review: Implementing Battles (#10156)
* add types and subtypes

* add startingDefense attribute

* [MOM] Implement Invasion of Ravnica / Guildpact Paragon

* fix two small errors

* refactor various instances of "any target"

* fully implement defense counters

* battles can now be attacked

* [MOM] Implement Invasion of Dominaria / Serra Faithkeeper

* [MOM] Implement Invasion of Innistrad / Deluge of the Dead

* [MOM] Implement Invasion of Kaladesh / Aetherwing, Golden-Scale Flagship

* [MOM] Implement Invasion of Kamigawa / Rooftop Saboteurs

* [MOM] Implement Invasion of Karsus / Refraction Elemental

* [MOM] Implement Invasion of Tolvada / The Broken Sky

* simplify battle info ability

* fix verify failure

* some more fixes for attacking battles

* [MOM] Implement Invasion of Kaldheim / Pyre of the World Tree

* [MOM] Implement Invasion of Lorwyn / Winnowing Forces

* [MOM] Implement Invasion of Moag / Bloomwielder Dryads

* [MOM] Implement Invasion of Shandalar / Leyline Surge

* [MOM] Implement Invasion of Belenon / Belenon War Anthem

* [MOM] Implement Invasion of Pyrulea / Gargantuan Slabhorn

* [MOM] Implement Invasion of Vryn / Overloaded Mage-Ring

* [MOM] Implement Marshal of Zhalfir

* [MOM] Implement Sunfall

* implement protectors for sieges

* partially implement siege defeated trigger

* fix verify failure

* some updates to blocking

* [MOM] Implement Invasion of Mercadia / Kyren Flamewright

* [MOM] Implement Invasion of Theros / Ephara, Ever-Sheltering

* [MOM] Implement Invasion of Ulgrotha / Grandmother Ravi Sengir

* [MOM] Implement Invasion of Xerex / Vertex Paladin

* add initial battle test

* fix verify failure

* [MOM] Implement Invasion of Amonkhet / Lazotep Convert

* [MOM] update spoiler

* update how protectors are chosen

* update text

* battles can't block

* add control change test

* rename battle test for duel

* add multiplayer test

* [MOM] Implement Invasion of Alara / Awaken the Maelstrom

* [MOM] Implement Invasion of Eldraine

* [MOM] Implement Invasion of Ergamon / Truga Cliffhanger

* [MOM] Implement Invasion of Ixalan / Belligerent Regisaur

* battles now cast transformed (this is super hacky but we need to refactor TDFCs anyway)

* add TODO

* add ignore for randomly failing test

* a few small fixes

* add defense to MtgJsonCard (unused like loyalty)

* implement ProtectorIdPredicate

* small fixes
2023-04-13 20:03:16 -04:00
Oleg Agafonov
d17df585c5 Tokens reworked:
- removed outdated code;
 - updated logic to choose a set code for a tokens in different use cases (related to #10150);
 - added many tests for client and server token's data (related to #10139);
 - prepare for tokens database (related #6955);
2023-04-13 16:18:53 +04:00
Oleg Agafonov
914cfc1d3a Refactor: fixed getRules usage, clean SplitCard code 2023-04-08 19:27:47 +04:00
Oleg Agafonov
81d9c099fb Tests: improved load tests (fixed AI names, improved logs, improved custom decks support, related to #10154); 2023-04-05 20:48:14 +04:00
Oleg Agafonov
a9f1e15168 Tests: improved load test (added connection errors processing, fixed too long generated usernames, related to #10154); 2023-04-05 18:43:44 +04:00
Oleg Agafonov
a6337fd28a Cheats: improved cheat and test commands to use same set_code-card_name notation, added additional tests (related to #10139, cheat command example: battlefield:Human:XLN-Island:1) 2023-04-04 22:05:22 +04:00
Oleg Agafonov
4bf3e43da6 * GUI: face down cards improved:
* now it show face up cards in game logs on game end;
 * now it show face up cards in battlefield on game end (#4635);
 * fixed that real card face was visible in network data;
2023-04-01 18:40:06 +04:00
Oleg Agafonov
a15a0daa04 Fixed potential NPE errors in getPhase usage (fixed Berserker's Frenzy, etc) 2023-03-25 16:01:27 +04:00
Oleg Agafonov
1d17895caa Tests: fixed travis-ci on too much logs 2023-03-25 15:20:51 +04:00
Oleg Agafonov
c96805a307 Tests: added logs on wrong usage of choice commands in non-strict mode 2023-03-25 14:45:50 +04:00
Oleg Agafonov
66d0ef4b35 Refactor cards and token images code (#10139):
- removed outdated token store format (example: BIRD.W.BIRD.CREATURE.1.1.full.jpg)
 - removed duplicated cache images code;
 - removed duplicated set code fields;
 - removed outdated auto-generated thumb files (also all *.thumb.zip files will be deleted on startup);
2023-03-24 06:44:11 +04:00
Oleg Agafonov
8f742081b6 Tests: improved logs on wrong ability command usage 2023-03-23 23:38:43 +04:00
Oleg Agafonov
d019acbd55 Tests: improved addCard command, now it can add card from specific set (use 40K:Plains as card name param, #10139) 2023-03-23 23:17:34 +04:00
Oleg Agafonov
a7480aeab1 * Game: fixed random sort order of choices in choose dialogs 2023-03-21 03:11:55 +04:00
Oleg Agafonov
6b05562336 * Choose an ability - fixed not working cards like Argivian Avenger, Atraxas Skitterfang, Steel Seraph (#10115) 2023-03-21 01:59:12 +04:00
Oleg Agafonov
ca993eae39 * GUI: added visual progress bar in download images dialog (#8566) 2023-03-19 21:53:53 +04:00
Oleg Agafonov
e48f024909 * Game: fixed wrong booster's cards ratio in sets with various arts (#7333) 2023-03-19 19:55:21 +04:00
PurpleCrowbar
03b82ff7ee Fix multiple cards not saying which revealed cards were chosen to put into hand. Closes #9949 2023-03-12 22:01:11 +00:00
Oleg Agafonov
4e9ffdfaf9 * GUI: double faced cards improves:
* fixed images download for alternative prints (#9826, #9701);
 * fixed wrong pair of main and second side arts for alternative prints;
2023-03-11 17:35:18 +04:00
Oleg Agafonov
18a3ec5247 DB: fixed wrong result for night cards search (fixed double faced cards in test render dialog) 2023-03-11 12:28:58 +04:00
Oleg Agafonov
558eafce38 [SWS] added test Images Of the Past for (see #9797) 2023-03-04 18:29:17 +04:00
Oleg Agafonov
e8ffe90d41 Fixed test, fixed some code warnings 2023-02-25 15:21:48 +04:00
Alexander Novotny
32002101ad
Prevent backgrounds from being used as commanders no matter what (#10007) 2023-02-20 02:01:16 +00:00
Grath
3044bf2e23
Fix Twinning Staff to only happen when one or more copies would be made, and not zero. (#9843)
* Fix Twinning Staff to only apply when you're copying the spell at least one time.

* Fix test so it works
2023-01-27 21:10:03 -06:00
Evan Kranzler
d06fabf9bd fix test failures 2022-11-11 08:24:25 -05:00
Daniel Bomar
0405b8b401
Fix test failures 2022-11-09 17:14:03 -06:00
Przemyslaw Hugh Kaznowski
dc3d867584
Test fixes and improvements (#9733)
* Test fixes and improvements (for debugging)

* Remove set log level

* Remove info log from CardRepository

Co-authored-by: Hugh Kaznowski <raat_streetcam@simplelogin.com>
2022-11-06 08:47:27 -05:00
Alex Vasile
6f0cdc6032 [NCC] Fixed Phabine, Boss's Confidant not working properly (and added hint to ParleyCount). Closes #9603. 2022-11-04 22:28:49 -04:00
Alex Vasile
98580b08ff Clean up tests by removing deprecated calls to assertThat and unnecessary use of hamcrest 2022-10-30 16:20:23 -04:00
Alex Vasile
9ea62a1862 [ZNR] Added tests for YasharnImplacableEarth 2022-10-29 22:32:50 -04:00
Evan Kranzler
3ed26a2b1f
Refactor effects which disable the "legend rule" (#9662) 2022-10-28 18:04:23 -04:00
Alex W. Jackson
3ad9663c39 Fix test and verify failures 2022-10-22 20:46:52 -04:00
Alex W. Jackson
7c1e823deb [ELD] Fix Once and Future. Remove unused Player.putInHand method 2022-10-20 00:51:54 -04:00
Evan Kranzler
569f0dcd1f add extra fail condition to test 2022-10-17 20:55:53 -04:00
Evan Kranzler
ce8a191f56 [DMU] fix #9655 2022-10-17 20:45:51 -04:00
Evan Kranzler
fb11a59099 fix test failure 2022-10-15 10:56:39 -04:00
Alex W. Jackson
332db3aecb Fix #9649 and clean up counter effect text generation 2022-10-14 00:41:02 -04:00
Alex Vasile
b0df785653 [C17] Added test for Curse of Opulence and EnchantedPlayerAttackedTriggeredAbility, and fixed range of influence bug. 2022-10-13 15:52:02 -03:00
Alex W. Jackson
4bf01249a4 Add new common effect class for Armored Transport, etc and fix #9614 2022-10-11 22:48:02 -04:00
Evan Kranzler
09797d4cf6 rework effects which increase loyalty abilities (closes #9626) 2022-10-10 18:01:58 -04:00
Alex Vasile
10ac777a28 Added tests for previously untested effects/values 2022-10-09 21:51:51 -03:00