Commit graph

1504 commits

Author SHA1 Message Date
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
Jeff Wadsworth
c7007a3de3 Fixed #11426 2023-11-22 10:22:34 -06:00
Jeff Wadsworth
4f0ff05069 Small refactor to the fix for #6844. 2023-11-05 19:59:54 -06:00
Jeff Wadsworth
5a356e1388 Fixed 6844
Prevent the AI from attaching bad auras to its permanents.
2023-11-05 17:37:02 -06:00
Oleg Agafonov
5b49fa4cc2 choose mode improves:
- fixed broken cards with once per turn choose (example: Galadriel, Light of Valinor, closes #11362);
- fixed cheat to skip required mode by cancel button (example: Black Market Connections, closes #11149, closes #10611);
- fixed empty modes list if nothing available to choose;
- improved compatibility with max modes and other modification effects;
- fixed that non-valid modes can be selected in some use cases;
2023-11-02 17:57:55 +04:00
Oleg Agafonov
81d44e615f gui: improved multi amount dialog (added cancel option, added mana symbols support in messages, improved form structure) 2023-11-02 12:30:40 +04:00
Jeff Wadsworth
0820761c3a Fixed #8771 2023-11-01 21:26:28 -05:00
Alexander Novotny
87921494b8
Improve trigger auto ordering and aura attachment (Lynde QOL fixes) (#10648)
* Lynde trigger references objects

* Changed triggered ability auto-order to care about targets

* Copy card test

* When a copy effect comes in as a copy of an aura,
it checks if it's already attached before asking player to attach

* add comments and null check per review

---------

Co-authored-by: xenohedron <xenohedron@users.noreply.github.com>
2023-11-01 21:40:04 -04:00
Oleg Agafonov
3abdb72910
dev: improved code coverage (jacoco) and static analyser (sonar) support (#11367):
* fixed code coverage data lost on failed tests;
* fixed code coverage report duplication and improved performance;
* fixed that sonar analyser can't see code coverage for some modules;
* added new aggregation module: Mage.Reports (used for code coverage report generation);
* reorganized pom and added additional instructions for jacoco and sonar usage;
2023-10-30 09:19:12 +04:00
Oleg Agafonov
b7ce9c80f0 refactor: improved ability's modes code (related to #11333) 2023-10-28 15:46:03 +04:00
Susucre
1cb484e03e unban Chaos Orb from OId School formats (#11344) 2023-10-26 18:29:59 +02:00
xenohedron
18c6596cc0
Improvements to player selection of TargetAmount (#11341) 2023-10-26 02:12:15 -04:00
Oleg Agafonov
f42f28344c Merge fix 2023-10-14 16:09:48 +04:00
Oleg Agafonov
06138ab3d3 AI: refactor PassAbility usage, added additional runtime checks 2023-10-14 15:57:19 +04:00
Jipsu
ce311fd691
added MTGO Vintage Cube October 2023 (#11305) 2023-10-13 23:29:03 -04:00
Oleg Agafonov
0d9121bf10 AI: fixed that computer can stop to use some equip and level up abilities, fixed small memory leaks (related to #11285, #4520) 2023-10-12 07:56:41 +04:00
Susucre
f14479c53c
Add custom options for starting life total and starting hand size (#11259)
* add startHandSize / startLife to the custom option panel

* use the custom startLife/startHandsize in all Game Modes
2023-10-06 23:22:48 -04:00
Susucre
7c454fb24c
Rework AsThough handling to allow choosing/affecting a specific alternate cast (#11114)
* Rework AsThoughEffect

* some cleanup of MageIdentifer

* refactor ActivationStatus

* fix bolas's citadel

* fix a couple of the Alternative Cost being applied too broadly.

* fix Risen Executioneer

* allow cancellation of AsThough choice.

* fix One with the Multiverse

* cleanup cards needing their own MageIdentifier

* last couple of fixes

* apply reviews for cleaner code.

* some more cleanup
2023-10-02 18:42:54 -04:00
Susucre
1acb1d6c9a
Tweak the Pillar of the Paruns format (#11197) 2023-09-24 22:09:38 -04:00
xenohedron
5d39d1bb38 fix Modern banned list (Yorion, Sky Nomad) 2023-09-23 20:21:23 -04:00
Oleg Agafonov
8ebbeef8f4 Choose triggers order dialog - fixed game error on remember of multiple instances of the trigger (fixes #11194) 2023-09-23 20:16:55 +04:00
Oleg Agafonov
103f75975c Choose triggers order dialog - fixed that it can't remember ability name with card name in it 2023-09-22 09:44:39 +04:00
Oleg Agafonov
921015e6f1 Choose triggers order dialog - fixed that it can't remember ability for last usage 2023-09-22 09:09:52 +04:00