Commit graph

3594 commits

Author SHA1 Message Date
Oleg Agafonov
2186a49a0f tests: added todo and PoC test for multi target definition (see test_JadeSeedstonesAndMultiTargets) 2024-01-16 17:52:17 +04:00
Oleg Agafonov
7838e2b7cf tests: enabled and fixed randomly failed test with battle cards, fixed wrong blocker declare in multiplayer game; 2024-01-16 01:33:07 +04:00
Oleg Agafonov
482a56f3ea Karn Liberated - improved game restart support in commander games (#11628, #11081); 2024-01-15 05:03:21 +04:00
Oleg Agafonov
08b99fcbf7 AI: removed outdated AIMinimax project (#7075), removed some useless player classes, code and config files, improved docs; 2024-01-15 05:03:21 +04:00
Oleg Agafonov
6ac2f44cc1 game, refactor: improved player related code, fixed miss reset fields between games like commanderIds (#11081, #11628) 2024-01-15 05:03:21 +04:00
Matthew Wilson
1da9b03810
[LCC] Implement Ripples of Potential (#11650)
---------

Co-authored-by: Matthew Wilson <matthew_w@vaadin.com>
2024-01-14 19:56:18 -05:00
xenohedron
f0043ee9d9
cleanup The Tomb of Aclazotz without breaking it (#11648)
* add test for Tarrian's Journal // The Tomb of Aclazotz

* re-apply cleanup without breaking this time
2024-01-14 19:55:55 -05:00
xenohedron
341d8b9add fix #11643 (choice for add mana of any type produced) 2024-01-13 16:26:54 -05:00
Matthew Wilson
2a59c22cb5
fix #11581 (copies of hydras must ETB with counters) (#11639)
* fix: Issue 11581

* Add `setStrictChooseMode(true)` to unit tests

---------

Co-authored-by: Matthew Wilson <matthew_w@vaadin.com>
2024-01-13 15:42:36 -05:00
Oleg Agafonov
95481cd736 Mana Maze - fixed game error on usage (closes #11572, closes #11575); 2024-01-13 11:42:22 +04:00
xenohedron
7d821ef922 fix #11626 (Runadi, Behemoth Caller) 2024-01-11 00:34:02 -05:00
Oleg Agafonov
b6042f7b22 tests: improved load tests with AI games, added parallel option (play multiple AI games at the same time and show final result table, auto-generated decks can be repeatable by random seed - see test_TwoAIPlayGame_Multiple); 2024-01-10 18:53:44 +04:00
Oleg Agafonov
eedb9e6054 server, tests: improved game error and AI logs, added docs, added error stats in load test's result table (related to #11572); 2024-01-08 23:21:44 +04:00
Oleg Agafonov
b3c55555a1 tests: fixed error on load tests end (related to #11572), improved logs, improved session lifecycle on load tests;
tests: added additional test for Mana Maze and deep copy (related to #11572);
docs: added more info to network related code;
2024-01-08 04:14:27 +04:00
xenohedron
98a3d8b947
fix that Manamorphose can't be used to cast Imperiosaur (#11620) 2024-01-07 14:22:20 -05:00
xenohedron
3712d2319d add test for Fight 2024-01-06 16:21:10 -05:00
xenohedron
784a0f564b fix #11606 (PreventDamageToSourceEffect zcc check) 2024-01-06 14:57:56 -05:00
xenohedron
518407be73 fix regression: Michiko Konda, Truth Seeker
missing a check in SourceDealsDamageToYouTriggeredAbility::checkTrigger

added test
2024-01-03 01:14:46 -05:00
xenohedron
e6bd35eb77
refactor selecting cards from multiple zones (#11584)
* refactor selecting cards from multiple zones

fix MV <= controlled lands predicate

fix filter checks without source parameter

* fix test choice
2023-12-31 14:25:25 -05:00
xenohedron
9b3ff32a33
Rework sacrifice effects to support "can't be sacrificed" (#11587)
* add TargetSacrifice and canBeSacrificed

* SacrificeTargetCost refactor, now uses TargetSacrifice, constructors simplified, subclasses aligned

* fix text errors introduced by refactor

* refactor SacrificeEffect, SacrificeAllEffect, SacrificeOpponentsEffect

* cleanup keyword abilities involving sacrifice

* fix a bunch of custom effect classes involving sacrifice

* fix test choices

* update Assault Suit implementation

* fix filter check arguments

* add documentation to refactored common classes

* [CLB] Implement Jon Irenicus, Shattered One

* implement "{this} can't be sacrificed"

* add tests for Assault Suit and Jon Irenicus

* refactor out PlayerToRightGainsControlOfSourceEffect

* implement [LTC] Hithlain Rope

* add choose hint to all TargetSacrifice

---------

Co-authored-by: Evan Kranzler <theelk801@gmail.com>
Co-authored-by: PurpleCrowbar <26198472+PurpleCrowbar@users.noreply.github.com>
2023-12-31 14:10:37 -05:00
Oleg Agafonov
7d860378f7 tests: added Mana Maze test to reproduce stack overflow error (#11572, #11575) 2023-12-24 01:30:26 +04:00
xenohedron
7ff2570024 fix #11520 (Elite Spellbinder)
and similar card InvasionOfGobakhan
2023-12-21 22:32:33 -05:00
Oleg Agafonov
0dbd86fb58 Merge fix 2023-12-14 22:25:45 +04:00
Oleg Agafonov
10641f8d63 GUI: hand - added default card sorting on mulligan (lands > other > creatures; mana value, name); 2023-12-14 22:13:07 +04:00
Oleg Agafonov
525ca9a1a2 tests: fixed random fails due wrong mana usage 2023-12-13 20:30:39 +04:00
Oleg Agafonov
d5b582c1b3 images: fixed miss images for double faced tokens like Incubator/Phyrexian (closes #11535); 2023-12-10 15:59:27 +04:00
Oleg Agafonov
725a27d6ad Double faced tokens - fixed wrong abilities on the back side (example: Incubator/Phyrexian tokens with transform, fixes #10351); 2023-12-10 15:01:00 +04:00
Oleg Agafonov
00a7cc645d Copy abilities - fixed wrong copy of transformed tokens like Incubator/Phyrexian (related to #11535, #11307, #10801, #10263); 2023-12-10 14:49:47 +04:00
Oleg Agafonov
50fd029c3b tests: improved show playable abilities to print playable list instead unique (see showAvailableAbilities), added custom effect for transform tests (see addCustomEffect_TransformTarget); 2023-12-10 14:31:55 +04:00
Oleg Agafonov
f5c47686ac server: fixed broken games with banned players (regression) 2023-12-09 18:28:21 +04:00
Oleg Agafonov
960e896903
Network upgrade and new reconnection mode (#11527)
Network upgrade and new reconnection mode:
* users can disconnect or close app without game progress loose now;
* disconnect dialog will show active tables stats and additional options;
* all active tables will be restored on reconnect (tables, tourneys, games, drafts, sideboarding, constructing);
* user must use same server and username on next connection;
* there are few minutes for reconnect until server kick off a disconnected player from all player's tables (concede/loose);
* now you can safety reconnect after IP change (after proxy/vpn/wifi/router restart);

Other improvements and fixes:
* gui: main menu - improved switch panel button, added stats about current tables/panels;
* gui: improved data sync and updates (fixes many use cases with empty battlefield, not started games/drafts/tourneys, not updatable drafts, etc);
* gui: improved stability on game updates (fixes some random errors related to wrong threads);
* server: fixed miss messages about player's disconnection problems for other players in the chat;
* refactor: simplified and improved connection and network related code, deleted outdated code, added docs;
* tests: improved load test to support lands only set for more stable performance/network testing (set TEST_AI_RANDOM_DECK_SETS = PELP and run test_TwoAIPlayGame_Multiple);
2023-12-07 20:56:52 +04:00
ssk97
898952515e
[LCI] Implement Intrepid Paleontologist (#11508)
* Improve some "mana spent -> give effect to permanent spell" cards
make effect source be the SpellAbility itself

* Implement Intrepid Paleontologist and tests

* Use a common class for the "specific MOR ETBs with counter" effect

* Prevent casting non-owned dinosuars

* Rename AddCounterEnteringMOR to AddCounterEnteringCreature

* fixes from review
2023-12-05 20:27:49 -05:00
Grath
5c83818cba
[LCC] Implement Topography Tracker (#11504)
* Refactor replacement effects on ExploreEvent by using a queue of events
2023-12-04 00:46:21 -05:00
Oleg Agafonov
eaa510b265 GUI: added restriction card icon to permanent (contains all applied restrictions and requirements, #7471) 2023-12-03 00:01:47 +04:00
Oleg Agafonov
11a19f9a43
tests: added test to check jboss serialization and java 17 compatibility (related to #5862, part of #6197) (#11499) 2023-12-01 14:24:34 +04:00
xenohedron
c164d70135 remove PlayersAttackedThisTurnWatcher from default watchers 2023-11-30 00:56:32 -05:00
Oleg Agafonov
2eac541b80 gui: fixed broken watcher view mode (closes #11481) 2023-11-28 08:04:14 +04:00
Oleg Agafonov
c5632f6868 refactor: removed client side threads from a server, improved test log files rotation; 2023-11-27 18:13:05 +04:00
Oleg Agafonov
99cbddb8b8
Merge pull request #11431 from Susucre/lci-mana-tracking
[LCI] Implement Thousand Moons Smithy // Barracks of the Thousand and Brass's Tunnel-Grinder // Tecutlan, the Searing Rift
2023-11-25 17:13:54 +03:00
xenohedron
867a8f54b0 fix #11456 (Become Brutes)
CreateRoleAttachedTargetEffect changed to use all targets, not just first
2023-11-25 02:20:11 -05:00
Oleg Agafonov
53add71826 Improved network stability and other related fixes:
* server: fixed that a critical errors ignored in user commands threads (now it will be added to the logs);
* network: fixed frozen user responses in some use cases;
* network: fixed accidental and incorrect user responses (only latest response will be used now);
* network: improved freeze logs, added problem method name and code's line number;
* cheats: removed outdated deck and card load logic (only init.txt commands supports now);
* cheats: fixed wrong priority after add card dialog (closes #11437);
* cheats: improved stability and random errors on cheat executes (related to #11437);
* docs: added details on network and thread logic, human feedback life cycle, etc (see HumanPlayer, ThreadExecutorImpl);
2023-11-24 21:22:16 +04:00
Oleg Agafonov
75958e3710 refactor: improved and reorganized client-server api, added additional logs, fixed miss admin checks for some commands 2023-11-23 09:12:02 +04:00
ssk97
e43e918c67
Conditional mana - fixed that some mana cant be used for paying “counter unless” cost and other things (#11447)
* Add tests for conditional mana usage with soft counterspells

* Fix "to cast" conditions on common ManaCondition classes

* Add fix to all remaining ManaCondition classes

* SimpleActivatedAbilityConditionalMana is tested to pay for a soft counterspell activated ability

* Remove now-unused imports
2023-11-23 01:37:45 +04:00
ssk97
2cc9957753
Costs Tag Tracking part 4: Convoke (#11446)
* Switch Convoke to using costs tag system

* Add Convoke copy/clone tests

* update author name on sufficiently changed files

* Remove now-unused CONVOKED event
2023-11-23 01:31:56 +04:00
xenohedron
4977fea307
Merge pull request #11417 from ssk97/TagTracking3_KeywordAbilities
Costs Tag Tracking part 3: Most keyword abilities
2023-11-20 21:28:40 -05:00
xenohedron
d328a30d9d add another saga test 2023-11-20 21:26:20 -05:00
xenohedron
8ad53750ee fix ability text in test 2023-11-19 21:48:45 -05:00
Susucre
f45c9e8ee9 [LCI] Implement Thousand Moons Smithy // Barracks of the Thousand 2023-11-19 17:54:57 +01:00
Oleg Agafonov
571711e67d tests: added multiple tests for ring emblem and ring-bearer effects (related to #11425) 2023-11-19 19:12:07 +04:00
ssk97
38adbb4ae5
[UNF] "Name Sticker" Goblin, [WHO] Coward // Killer, [WHO] Thijarian Witness (#11392)
* Add [WHO] Coward // Killer

* Add MTGO version of [UNF] "Name Sticker" Goblin

* Implement [WHO] Thijarian Witness

* Add NameStickerGoblinTest

* Fix Thijarian Witness, add tests (may need additional tests). Also adds a simple toString for MageObjectReference

* Don't spam the java garbage collector, add another test

* Replace non-ASCII characters in card text

* improve MOR toString

* Thijarian Witness fixed better, add AttackingBlockingWatcher in common

* cleanup from xenohedron's review

* Fix test, add warning not to use AttackingBlockingWatcher for static effects

* rename AttackingBlockingWatcher to AttackingBlockingDelayedWatcher to make it more obvious how it should be used, minor documentation changes
Simplify and rename Thijarian Witness Predicate

* add null checks
2023-11-19 00:38:21 -05:00