Commit graph

1484 commits

Author SHA1 Message Date
Oleg Agafonov
9d2f5fbadd cheats: added more examples for init.txt usage 2024-05-14 09:13:18 +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
Oleg Agafonov
92b722d3ca server: fixed bloated logs about table owner's invalid deck 2024-04-17 12:27:41 +04:00
Oleg Agafonov
a9372e93ff server: improved game stability on player's concede (related to #11460) 2024-04-17 12:21:11 +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
6e0ef77f96 server: removed useless info message about disconnect stats, improved games/tourney stats; 2024-04-10 22:20:21 +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
7285f13da2 server: fixed that new users can't connect to long living server (if it works too long without restarts, #11285); 2024-04-07 22:35:19 +04:00
Oleg Agafonov
46b5780e91 server: fixed bloated logs on user disconnections 2024-04-05 21:26:53 +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
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
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
Oleg Agafonov
fac5f8c752 dev: removed magediag file, now game/tourney logs goes to default console/file (related to #11572) 2024-01-05 23:13:20 +04:00
Oleg Agafonov
9ad456239e GUI: stack - added card icon with targets info (announced and triggered targets, target choices); 2023-12-23 16:26:37 +04:00
Oleg Agafonov
414699f7d4 network: improved stability (random errors related to #11285 and ConcurrentModificationException); 2023-12-09 16:22:29 +04:00
Oleg Agafonov
6aaaa8cb46 GUI: improved main and battlefield menus (related to #11533):
- main menu: better naming for deck editor;
- battlefield menu: added deck view for computer players, better naming;
- network: improved experimental connection;
2023-12-09 15:20:29 +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
Oleg Agafonov
0b0e947741 connection: improved error processing and stability in connect dialog 2023-11-30 21:52:47 +04:00
Oleg Agafonov
e534497834 GUI: hand zone - fixed wrong dragging effect while click on card, improved dragging animation, fixed wrong click if user return card to the original place 2023-11-30 09:21:53 +04:00
Oleg Agafonov
01dd8c33ba gui: fixed possible game error with player timer on client side 2023-11-28 21:48:41 +04:00
Oleg Agafonov
1af601bf11 Merge fix 2023-11-28 08:14:01 +04:00
Oleg Agafonov
2eac541b80 gui: fixed broken watcher view mode (closes #11481) 2023-11-28 08:04:14 +04:00
Oleg Agafonov
4500b79008 GUI: added changeable card popup mode for chats/logs by card name clicks (alternative to mouse wheel from game cards);
other: fixed duplicated chat popups in game, added miss error logs from popup related code, added additional checks for good code usage;
2023-11-26 12:48:41 +04:00
Oleg Agafonov
ab515e60fe refactor: removed outdated code with databases sync (cards db downloads from a server); 2023-11-25 18:11:44 +04:00
Oleg Agafonov
7475ee922a GUI: improved chat messages with card names and popup supports (example: [[card name]], closes #4189); 2023-11-25 16:26:12 +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
Oleg Agafonov
5691ffa40e Merge fix 2023-11-23 09:32:07 +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
Tirth Bharatiya
44b8a0faf4
refactor: improved code to increase readability. (#11418)
Moved the cardViewEquals method from CardPanelRenderModeMTGO to CardView
Decomposed conditional to increase readability.
Changed the variable/constant names to increase the readability.
2023-11-17 10:47:53 +04:00
tirth1
83b5511d60 Refactored attemptToFixGame method inside GameController. 2023-11-15 19:52:48 -04:00
Oleg Agafonov
f07c22976e cheats: added init.txt example to release bundle 2023-11-02 13:00:09 +04:00
Oleg Agafonov
46911a82bb cheats: added 2 new special commands (add card to hand, add lands to battlefield), added default special commands (no needs to put it in init.txt) 2023-11-02 12:32:58 +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
36ccfb0a2a Performance: fixed memory leaks on each card viewer or draft open (10 Mb per call, related to #11285, fixes #9548) 2023-10-14 12:39:49 +04:00
Jipsu
ce311fd691
added MTGO Vintage Cube October 2023 (#11305) 2023-10-13 23:29:03 -04:00
Oleg Agafonov
10ccab3caa AI: fixed memory leaks on game's end without humans (4 Mb per game, related to #11285, #5023) 2023-10-12 06:28:01 +04:00
Artemis Kearney
41874b0b4b
new feature: Emblem Cards (#10498)
* new feature: Emblem Cards

Allows match/tournament creator to specify cards to give each player
emblem versions of (or just the starting player for symmetric effects).

Technical details:
- new UI for specifying emblem cards (.dck files)
  - available for all match/tournament types
- new class `EmblemOfCard`
- new method `copyWithZone` on `AbilityImpl` (used to make abilities
  work from command zone)
- new fields on `GameOptions` and `MatchOptions` for emblem cards
- emblems are granted after mulligans, before first turn (technically
  after Planechase starting plane creation)

* fixes

* defaults for emblem cards in match options (fixes quick game buttons)

* minor fixes

* use DeckCardInfo instead of Card for emblem cards options

* restore accessible parent properties

* fix images for card emblems

* look up cards in a way that preserves which art

* fix typos; make Emblem.sourceObject protected

* add descriptions to planechase and emblem cards

* fixes

* add some unit tests for known working cards

* fix author name

* add explanation comment

* fix up tests

* copyWithZone: no longer modifies zone for singleton abilities

* directly check for MageSingleton
2023-09-26 22:47:13 -04:00
Oleg Agafonov
abda1fb53b GUI: fixed wrong feedback panel status in computer games (related to #11189) 2023-09-22 11:00:47 +04:00
Oleg Agafonov
342979a55a
network: reworked client-server events (related to triggers dialog problem from #11173) (#11189)
* added bad connection mode to test client works on slow network, use -Dxmage.badconnection;
* added bad connection protection in events processing due event type;
* split events to different types (can be ignored, must be synced, etc);
* removed some unused server events.
2023-09-21 18:40:52 +04:00
Oleg Agafonov
11528e7d35 server: removed useless fastDbMode, improved db stats logs on updating 2023-09-17 22:16:12 +04:00
Oleg Agafonov
c515ff383c server: added support of property settings (can use launcher to setup params like -Dxmage.testMode=true) 2023-09-17 21:46:17 +04:00
arcox
2f0c1d84c5
Lint: fix 'declarations should use interfaces instead of classes' bugs (#11082) 2023-08-31 21:42:45 +04:00
Ethan Ward
c0bde27d69 Removes unused Gmail dependencies 2023-08-26 19:35:05 -04:00
Susucre
5062c84098
Refactor: removed server side objects from a client side game's data (#10788)
* Clean original values transmitted with CardView.originalObject
* Move RateCard to mage.Common, support cardView as argument.
* Clean PermanentView constructor for TestCardRenderDialog
2023-08-24 12:04:07 +04:00
sprangg
287df7af21
Wait 2 seconds before making the draft pick for a timed out player (#10733)
* The draft session waits for 5 seconds before making the pick for the timed out player

* Formatting

* Renamed constant

* Tweak

* If the draft pick's timeout value would increase the client's pick's timer, don't set it (might happen if the client or server is lagging)

* Lowered BOOSTER_LOADING_INTERVAL and AUTOPICK_BUFFER

---------

Co-authored-by: sprangg <a@b.c>
2023-08-06 20:00:42 -04:00
Alexander Novotny
519b3988be
game timer: Add chess-style buffer time option (#10598)
* UI Changes

* Add new buffer time options

* Main functionality

* Final implementation

Also added player UI for when they are using their buffer time (timer turns green)
2023-07-28 22:05:21 -04:00