Commit graph

1526 commits

Author SHA1 Message Date
Oleg Agafonov
7d675de876 server: fixed server app freeze on another instance already running, improved threads usage (related to #11285); 2024-06-23 15:58:25 +04:00
xenohedron
1b3ac1fc7f update duel commander banlist (part of #12483) 2024-06-18 22:14:55 -04:00
xenohedron
fdd244786b refactor: improve method name (related to 86fa9278) 2024-06-13 00:43:51 -04:00
Oleg Agafonov
e209ce1c97 server: fixed wrong cheater detection in some tourney sideboardings (closes #11877) 2024-06-11 00:30:00 +04:00
Oleg Agafonov
72cf60085c AI: fixed MCTS (Monte Carlo) errors in some simulations (#10154); 2024-06-10 21:54:53 +04:00
Oleg Agafonov
fe55e67ca3 AI: fixed any MCTS (Monte Carlo) simulations fail, added catch error on MCTS fails (#10154); 2024-06-10 20:37:32 +04:00
Oleg Agafonov
8f70039e3e AI: fixed error on targeting activated ability on stack (closes #12437); 2024-06-08 23:14:26 +04:00
Alexander Novotny
892ccddd35
game: fixed wrong commander colors with large color identity (#12429) 2024-06-07 23:46:32 +04:00
Susucre
0cd2fda764 add comment on why "Name Sticker" Goblin is banned, as it's a mtgo replacement for a banned card 2024-06-07 17:39:53 +02:00
Susucre
be58777f7b update formats banlist
https://magic.wizards.com/en/banned-restricted-list
https://magic.wizards.com/en/news/announcements/may-13-2024-banned-and-restricted-announcement
https://magic.wizards.com/en/news/announcements/pauper-bans-for-june-6-2024
2024-06-07 17:25:50 +02:00
Oleg Agafonov
de323a3577 fixed tests 2024-06-07 13:34:49 +04:00
Oleg Agafonov
c2ae1386ff server: improved conceding logic with more protection from game errors/freeze (related to #11285, #11460) 2024-06-07 12:52:42 +04:00
Oleg Agafonov
d54a549e43 fixed #12417 2024-06-06 23:48:15 +04:00
Evan Kranzler
27bea843a3
[M3C] Implement Ulalek, Fused Atrocity and new colorless hybrid mana (#12273)
* improved by (#12415)
* Added symbol downloads for new colorless hybrid
---------

Co-authored-by: Alexander Novotny <alexander_novo@mail.tmcc.edu>
Co-authored-by: Oleg Agafonov <jaydi85@gmail.com>
2024-06-06 23:43:45 +04:00
Susucre
20b7a115da
prevent direct access of Player->counters ; some cleanup on counter removal effects ; implement [MH3] Izzet Generatorium (#12314) 2024-05-29 22:34:54 +02:00
Oleg Agafonov
add2d0473e dev, AI: improved AI logs:
* added object and targets info for possible actions;
* added detailed score for each action in possible action chains;
* added stack info;
* improved output for easy read and analyse;
2024-05-28 17:17:16 +04:00
Oleg Agafonov
2298ebc5f5 Playable mana calculation improved:
* server: fixed server crashes on usage of multiple permanents with {Any} mana abilities (example: Energy Refractor, related to #11285);
* AI: fixed game freezes and errors on computer's {Any} mana usage (closes #9467, closes #6419);
2024-05-27 22:24:58 +04:00
Susucre
754b382e78
implement [MH3] Nethergoyf, refactor targets usages by game param (#12267) 2024-05-21 13:34:38 +02:00
Oleg Agafonov
ebe04dc3a6 tests: added tests for Chandra Ablaze card and some AI logic; 2024-05-12 14:37:10 +04:00
Oleg Agafonov
d1cca988c4 refactor, ai: removed outdated and unused code (suggest actions for AI simulations); 2024-05-05 20:47:54 +04:00
Susucre
85cad4ff1e
cleanup AbilityType for easier check that an ability is an activated ability (#12153)
* cleanup AbilityType

* further cleanup

* cleanup instanceof

* tweak formatting

* rework Rex

* fix mistake in PlayerImpl

* cleanup 'instanceof' for 'ActivatedManaAbilityImpl'
2024-05-03 22:13:34 -04:00
Alexander Novotny
8771d9b7f5
Fix NPE (#12190) 2024-04-28 04:53:38 +04:00
Alexander Novotny
42906f519b
Fixed remembering self-referential choices (#12167)
* Fixed remembering self-referential choices

* Rename filtered message to auto answer message

* Always use auto answer message
2024-04-22 23:58:26 -04:00
RaelCappra
52530b173d
Update Banned & Restricted List, March 2024 (#12136)
* Modern: ban Violent Outburst

* Vintage: unrestrict Ponder
2024-04-17 20:26:17 -04:00
Oleg Agafonov
e8e2f23284 server: improved server stability (#11285) and reworked triggers/playable logic (#8426):
* game: now all playable calculations done in game simulation, outside real game (no more freeze and ruined games by wrong Nyxbloom Ancient and other cards with wrong replacement dialog);
* game: fixed multiple problems with triggers (wrong order, duplicated calls or "too many mana" bugs, see #8426, #12087);
* tests: added data integrity checks for game's triggers (3 enabled and 3 disabled due current game engine logic);
2024-04-16 23:10:18 +04:00
Oleg Agafonov
7fa4648316 refactor: code clean 2024-04-11 22:46:25 +04:00
Oleg Agafonov
7817a5cac6 deck improves:
* gui: removed public deck hash info;
* gui: improved xmage dck-file - now it correctly load a card's amount (related to files from third party services);
* server: fixed wrong cheating warning on deck construction (closes #11877);
* refactor: removed outdated hash code and calculations;
* other: added docs, added multiple deck hash tests;
2024-04-10 22:18:07 +04:00
Oleg Agafonov
c4a3489107 game: fixed that Premodern format wrongly ban some old cards like Crusade 2024-03-07 14:55:04 +04:00
Oleg Agafonov
e38a79f231
Face down images and cards rework (#11873)
Face down changes:
* GUI: added visible face down type and real card name for controller/owner (opponent can see it after game ends);
* GUI: added day/night button to view real card for controller/owner (opponent can see it after game ends);
* game: fixed that faced-down card can render symbols, abilities and other hidden data from a real card;
* images: added image support for normal faced-down cards;
* images: added image support for morph and megamorph faced-down cards;
* images: added image support for foretell faced-down cards;

Other changes:
* images: fixed missing tokens from DDD set;
* images: no more client restart to apply newly downloaded images or render settings;
* images: improved backface image quality (use main menu -> symbols to download it);
2024-02-29 01:14:54 +04:00
Oleg Agafonov
ad8e7daf97 refactor: improved card info 2024-02-18 22:40:30 +04:00
Oleg Agafonov
229e8d3075 game engine, tests and other fixes:
tests: fixed wrong permanent structure for battlefield cards (addCard command);
tests: added docs and additional runtime checks;
game: Modal double-faced cards - improved support, no more other side effects on battlefield;
game: Copy abilities - improved stability and cards support;
game: Player under control - improved stability and related cards support (possible NPE errors, additional runtime checks);
server: fixed bloated logs with game timer;
AI: fixed wrong timer in computer games;
2024-02-17 19:35:44 +04:00
Oleg Agafonov
e4157fefb8 AI: improved combat support:
* added support to attack battle permanents (#10246);
* fixed that AI was able to attack multiple targets by single creature (#7434);
* added docs;
* added todos with another bugs or possible problems with AI combat;
2024-01-20 00:17:14 +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
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
e79f562f4a server: improved logs for some use cases (related to #11572) 2024-01-05 23:13:20 +04:00
xenohedron
2d94797943 update Canadian Highlander points list (closes #11602) 2024-01-02 20:00:16 -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
xenohedron
eec5c5b2e2
refactor: deduplicate combat damage steps (#11566) 2023-12-21 22:44:01 -05:00
Oleg Agafonov
d4a1e27a44 GUI: improved choose X or number dialog (added source ability and card hint support, added limits info);
game: choose X - added source ability info to game logs;
2023-12-18 01:22:14 +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
Daniel Cowman
2f0a687467
Update banlists for Pioneer, Modern, and Pauper (#11509)
* Update Pioneer banlist

Karn, the Great Creator is banned.
Geological Appraiser is banned.

Smuggler's Copter is unbanned.

* Update Modern banlist

Fury is banned.
Up the Beanstalk is banned.

* Update Pauper banlist

Monastery Swiftspear is banned.
2023-12-04 19:33:54 -05:00
Oleg Agafonov
ebaa92c537 game: fixed that some users was able to run outdated macro feature 2023-12-01 19:54:21 +04:00
xenohedron
35f4a898f9
Small rework for autochoosing color of mana to add (#11495)
fix #11494
2023-12-01 00:49:42 -05:00
Oleg Agafonov
cacf8226aa refactor: fixed wrong random value usage 2023-11-28 21:48:41 +04:00
Tirth Bharatiya
7913c01ec3
refactor: improved usage of NextAction in mcts AI code (#11480)
Replaced conditional of selecting next action with runtime polymorphism, to increase the readability and easier for future changes by following Open/Close principle.
2023-11-28 11:12:59 +04:00
Cameron Merkel
1132cc27ba
[ICE] Implement Snowfall (#11467)
* [ICE] Implement Snowfall

* Change filter text, declare Island subtype in constructor

* Make choice optional

* Inherit outcome from superclass; add check in HumanPlayer.java to prevent auto-selecting non-ChoiceColor choices
2023-11-27 23:41:40 -05:00
Oleg Agafonov
58ce3296b6 AI: little refactor 2023-11-26 21:37:47 +04:00
Oleg Agafonov
d1f9e9cc90 Improved stability and other related fixes:
* server: added limit to max chat message (related to #11285);
* gui: fixed possible error after auto-submit deck;
* gui: fixed possible error after end game dialog;
* refactor: other code improves;
2023-11-25 12:29:54 +04: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
arcox
31f028d41e
game: Australian Highlander point update (#11452) 2023-11-23 01:29:33 +04:00