Commit graph

1114 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
Susucre
c0c05579ba fix client NPE if Radiation trigger in trigger order panel
The frameStyle was unexpectedly null when displaying the trigger in the view to choose trigger panels.
It was good on the stack so I missed that in initial implementation.

Bug showed up once there was another trigger on Beginning of Main Phase, for instance Coalition Relic.
The lack of frameStyle lead to a rendering NPE.
2024-04-21 18:52:46 +02:00
Matthew Wilson
b76a3ba889
gui: fix Saga DFC rendering (#12134) 2024-04-17 20:25:15 -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
fef37cdc73 admin tools improves (#5388):
* added game ids and created time to tables list;
* added popup hints support to tables list;
* fixed wrong sorting and columns resizing in tables list;
* refactored some modules to share table related code between client and admin console;
2024-03-22 16:56:29 +04:00
Oleg Agafonov
55f1d36695 game: improved visible rules of face down cards, removed visible face up cost (part of #10653, #11884) 2024-03-01 16:47:59 +04:00
Oleg Agafonov
9ea3356b77 [WHO] implemented Disguise ability (new face down type, ability and token image, #10653) 2024-03-01 16:47:59 +04:00
Oleg Agafonov
7696839724 gui: fixed that faced-down permanents don't show acquired characteristics like color from Painter's Servant (part of #11873) 2024-02-29 09:50:18 +04:00
Oleg Agafonov
734e2fae0f refactor: removed outdated or un-used code (part of #11873) 2024-02-29 07:50:13 +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
Matthew Wilson
41dbec4dbd
GUI: Improved rendering of Class cards (#11767) 2024-02-09 11:58:16 +04:00
Matthew Wilson
506e94d519
GUI: improved rendering of Adventure cards (#11764)
* GUI: Improved rendering of Adventure cards

---------

Co-authored-by: Matthew Wilson <matthew_w@vaadin.com>
2024-02-09 11:55:34 +04:00
Matthew Wilson
e1968a6b5f
GUI: improved rendering of Saga and Case cards (#11762)
Co-authored-by: Matthew Wilson <matthew_w@vaadin.com>
2024-02-06 12:33:11 +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
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
d97b034711 cheats: fixed broken emblem commands (example: emblem:Human:ElspethSunsChampionEmblem:1) 2023-12-16 02:25:03 +04:00
ssk97
6cd8649857
GUI: lobby - improved details info about match (#11438) 2023-12-09 16:35:09 +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
57a556105c Merge fix 2023-12-03 00:32:25 +04:00
Oleg Agafonov
1641698584 GUI: fixed mana symbols in add lands cheat command 2023-12-03 00:24:22 +04: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
0b0e947741 connection: improved error processing and stability in connect dialog 2023-11-30 21:52:47 +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
c5632f6868 refactor: removed client side threads from a server, improved test log files rotation; 2023-11-27 18:13:05 +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
63290d3ed6 GUI: fixed not working card popup near screen border, improved card popup for chat and choose dialogs; 2023-11-25 17:27:59 +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
Oleg Agafonov
a4073a83c6 GUI: added custom tooltip support on mouse move over table's cell (related to #11438); 2023-11-22 07:37:04 +04:00
Oleg Agafonov
cb53ca4382 tests: render dialog - fixed not working tap/untap on double clicks 2023-11-22 00:25:41 +04:00
Oleg Agafonov
2bbe2b3c43 GUI - new card hints window features:
* new help window can be opened from a player panel;
* it collect and show all visible game hints from all players and all zones;
* it updates in real time on game update;
* allows to customize visible data;
* allows to open multiple windows (current limit is 5 windows, can be slow to render);
* allows to minimize opened windows;
* workable card popup on mouse move over card name or card id;
* filter modes:
  * all - show hints from all players;
  * player - show hints from single player;
* group mode:
  * by hints - show same hints as one with all used cards;
  * by cards - show full cards list with own hints;
* search mode:
  * allows to filter card hints by player name, card name, card id or card hint;
  * allows to search multiple words (equals to "or")
* current limitation:
  * card popup shows a card instead a real object, e.g. miss card hints in it (relelated to game logs problem);
  * unsupport of emblems, dungeons and other non card objects from a command zone;
  * unsupport of revealed and library's top cards;

GUI - player's panel improves:
* added hints helper button;
* added player hithlight as possible target in choose dialogs;
* improved player name button in small mode;
* fixed wrong height in small mode;

Other fixes:
* game logs: added card popup support for logs with custom object name;
2023-11-18 14:48:25 +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
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
Oleg Agafonov
fe8b8e1def server: fixed npe error on load tests (miss buffer timer), code refactor 2023-10-11 14:15:15 +04:00
Susucre
b8ba2da23e
fix infoText of tournament causing NPE (#11290) 2023-10-09 15:25:30 -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
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
a3e5754d10 GUI: improved preferences dialog and battlefield:
* removed outdated storm counter button and settings (related cards must have same card hint);
* clean preferences dialog from empty events/actions;
* fixed logs folder names to release names in the labels;
2023-09-23 21:13:59 +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
9b634d44c6 server: fixed broken work on network's non-compress mode (-Dxmage.network.nocompress) 2023-09-18 12:05:55 +04:00