Commit graph

322 commits

Author SHA1 Message Date
9a2382cd2c Merge pull request 'master' (#26) from External/mage:master into master
All checks were successful
/ build_release (push) Successful in 14m41s
Reviewed-on: #26
2025-05-19 22:03:43 -07:00
Oleg Agafonov
133e4fe425
other: reworked target selection: (#13638)
- WIP: AI and multi targets, human and X=0 use cases, human and impossible targets use cases;
- improved stability and shared logic (related to #13606, #11134, #11666, continue from a53eb66b58, close #13617, close #13613);
- improved test logs and debug info to show more target info on errors;
- improved test framework to support multiple addTarget calls;
- improved test framework to find bad commands order for targets (related to #11666);
- fixed game freezes on auto-choice usages with disconnected or under control players (related to #11285);
- gui, game: fixed that player doesn't mark avatar as selected/green in "up to" targeting;
- gui, game: fixed small font in some popup messages on big screens (related to #969);
- gui, game: added min targets info for target selection dialog;
- for devs: added new cheat option to call and test any game dialog (define own dialogs, targets, etc in HumanDialogsTester);
- for devs: now tests require complete an any or up to target selection by addTarget + TestPlayer.TARGET_SKIP or setChoice + TestPlayer.CHOICE_SKIP (if not all max/possible targets used);
- for devs: added detail targets info for activate/trigger/cast, can be useful to debug unit tests, auto-choose or AI (see DebugUtil.GAME_SHOW_CHOOSE_TARGET_LOGS)
2025-05-16 13:55:54 +04:00
ee75192f0a vertical layout
All checks were successful
/ example-docker-compose (push) Successful in 15m31s
2025-02-15 20:59:50 -08:00
Oleg Agafonov
c076f4925f Turn under control reworked:
- game: added support for human games (cards like Emrakul, the Promised End, #12878);
 - game: added support of 720.1. to reset control in the turn beginning instead cleanup step (related to #12115);
 - game: added game logs for priorities in cleanup step;
 - game: fixed game freezes and wrong skip settings usages (related to #12878);
 - gui: added playable and choose-able marks for controlling player's cards and permanents, including switched hands;
 - gui: added controlling player name in all choice dialogs;
 - info: control of computer players is it not yet supported;
2025-01-07 12:38:01 +04:00
Oleg Agafonov
1ec277631f GUI, game: added card popup support in choose target amount dialogs (example: damage distribution, related to #9827) 2024-10-24 16:30:17 +04:00
Oleg Agafonov
b40e7222b3 Dungeon improves:
* Dungeons: added dungeon name hint to room's game log and choices (part of #12274);
* GUI, game: added card popup hints support in feedback panel (yes/no choices);
* Images: fixed miss images for dungeons in command zone, game logs and choice dialogs;
2024-09-19 13:42:23 +04:00
Oleg Agafonov
6625db1be1 GUI: reworked GUI to support non-blocking UI:
- GUI: added non-blocking UI to almost all app and game dialogs;
- GUI: it allows to switch between UI dialogs and use any UI elements at any moment;
- GUI: it allows to use chat, card popup, battlefield, concede and other features while choosing (related to #12670);
- GUI: it allows to download images while playing (related to #4160, not fully tested);
- GUI: enabled by default, can be disabled by java option: -Dxmage.guiModalMode=true
- connection: auto-connect will be visible in main menu on startup;
- connection: removed some unused features (auto-connect by command line);
- connection: added <ESC> button to close connection dialog;
- download: added background images download (see non-blocking UI);
- download: improved cancel stability and fixes that it can't stop preparing/downloading process in some use cases;
- app: fixed freezes on macOS systems in some use cases (related to #12431, #11292, #9300, #4920);
2024-09-08 00:40:13 +04:00
Oleg Agafonov
58400833bc GUI, game: improved battlefield sizing (part of #6887 and #969):
- fixed wrong restore of card hint and chat panels;
- now it keep hidden state too (e.g. hidden card hint);
- reworked and share splitters code;
- removed some useless hotkeys to show/hide card hint panel;
2024-08-13 23:49:39 +04:00
Oleg Agafonov
9321c694ca GUI, game: introduced sizeable hand/stack zones (part of #6887 and #969):
- added splitter/divider between hand and stack zone;
- users can resize it by mouse drag;
- users can hide/minimize hand or stack zones by mouse clicks on splitter arrows;
- splitter settings shared between games and stored between app runs;
2024-08-13 16:07:05 +04:00
Oleg Agafonov
bc64ebca14 refactor, preferences: min/max permanents size settings replaced by single size, removed un-used code, fixed starting tab on game preferences use; 2024-08-13 00:08:13 +04:00
Oleg Agafonov
4d89fcd72d GUI, game: fixed wrong player panels size on reconnect 2024-08-12 20:58:41 +04:00
Oleg Agafonov
7916af0e52 server, refactor: added client side info about current table and parent table (tourney's sub-tables with matches); 2024-08-11 19:29:42 +04:00
Oleg Agafonov
f105828e1c GUI: reworked battlefield panels to use layouts and dynamic settings (no needs in NetBeans to modify it, no needs in size calculations, improved positions and sizes, deleted outdated code); 2024-08-05 19:00:42 +04:00
Oleg Agafonov
1d701df0e8 GUI: added gui scale support for skip and phase button on game panel (part of #969, #6887):
- reworked skip and phase buttons to use layouts instead IDE designer;
- added GUI scale support skip and phase buttons (depend on dialogs font size from preferences settings);
2024-07-28 18:01:15 +04:00
Oleg Agafonov
8186b35dfb GUI: improved gui scale support (part of #969, #6887):
- added GUI scale support for dialog titles;
- added GUI scale support for hints tool;
- fixed broken font in chat and game logs on settings change;
- fixed wrong size of pick choice dialog in some use cases;
2024-07-28 11:47:12 +04:00
Oleg Agafonov
53a072b759 GUI, preferences: removed 4 useless size settings, fixed wrong fonts in few places like miss image path (part of #969, #6887) 2024-07-27 21:35:33 +04:00
Oleg Agafonov
ba929d5692 GUI: improved GUI scale support (fixed font sizes in card icons popup, ability picker dialog, part of #969) 2024-07-27 17:05:54 +04:00
Oleg Agafonov
21ad11dbdc GUI: added GUI scale support for ability choice dialog (related to #12155, #969) 2024-07-27 11:58:35 +04:00
Oleg Agafonov
521a0f6e32 GUI: introduced default card hints:
* refactor: added helper emblems instead rad counter's inherent emblems (use initGameDefaultHelperEmblems to define new card hints or other fake objects);
* refactor: added card hints support for emblems, planes and other command objects;
* GUI: added storm counter as default card hint (use hints tool to see it, closes #12360);
2024-07-27 09:40:41 +04:00
Oleg Agafonov
1f3fad6594 GUI, preferences: reworked size settings:
- added size settings for player's panel size (closes #12455, closes #12451, closes #5605);
- size settings can be edit by slider or by text edit;
- size settings for fonts has preview button with real text sample;
- improved some tabs and hints for better UX;
- improved GUI rendering performance;
2024-07-26 03:27:10 +04:00
Oleg Agafonov
9864cdd46c GUI, preferences: improved theme switch at runtime (fixed skip and step buttons update); 2024-07-05 18:11:09 +04:00
Oleg Agafonov
93221f8452 GUI: improved small mode detection on some desktop resolutions (mode without avatars); 2024-06-10 00:00:46 +04:00
Oleg Agafonov
d3437c9b1e GUI: fixed that size settings changes do not work in-game sometimes (broken fonts in feedback panel); 2024-05-07 15:25:15 +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
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
b695f8906c GUI: improved game logs, added mouse cursor and hover style over active card names like browsers 2023-11-29 03:10:53 +04:00
Oleg Agafonov
491c9cbe04 GUI: fixed empty battlefield/players after reconnection, if it still empties then press any skip button (closes #11201) 2023-11-29 03:02:47 +04:00
Oleg Agafonov
16d82e9049 gui: fixed wrong hands message with AI games (regression) 2023-11-28 22:18:08 +04:00
Oleg Agafonov
2eac541b80 gui: fixed broken watcher view mode (closes #11481) 2023-11-28 08:04:14 +04:00
Oleg Agafonov
d016e4c4c3 GUI: added starting chat hints about popup hotkeys (hold <ALT+E> to force image, press <ALT+D> to show/hide right card panel) 2023-11-26 22:48:24 +04:00
Oleg Agafonov
939ff7b441 GUI: added real objects in card popup for game logs and hints toolbox (workable hints, actual abilities, etc - closes #9529) 2023-11-26 14:42:49 +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
c5bd8663d4 tests: render dialog - added player panel render (PoC, without any options) 2023-11-22 00:29:42 +04:00
Oleg Agafonov
6e99a3653a Initiative abilities - added card hint with initiative info to all related cards (closes #11424);
tests: added verify test for miss initiative card hint;
gui: fixed wrong max amount of card hint windows;
2023-11-19 23:00:42 +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
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
xenohedron
ac4dae5061 adjust message wording 2023-10-09 23:52:57 -04:00
xenohedron
2ec532b157 add tray message on match start if window inactive 2023-09-30 16:28:44 -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
598aaa7632 GUI: fixed cards disappear in stack area on some use cases like GUI resize (closes #8158) 2023-09-22 10:24:52 +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
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
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
Alexander Novotny
a36a7d9b7f
[LTR] Add Goldberry, River-Daughter (#10524)
* Added Goldberry

* Slight optimizaztion

* Happy Path Test

* More unhappy tests

* Sanity check for Goldberry's counter choices

* Updated player.getMultiAmount to support individual constraints

* Some cleanup

Also modified ResourcefulDefense to use new multi amount api

* Updated logging

* Added hint for number of counters

* Fixed issue with Resourceful Defense

* Improvements to defaults

Default list will properly make sure to stay within individual maximums
If a player is asked for a choice that isn't actually a choice because each choice's min and max are equal, instead the default response is immediately returned. This helps with situations like moving a counter off of Goldberry when she only has one counter on her.

* -1/-1 Counter test

* Fixed issue with -1/-1 counters

* Adjusted dialog to properly enforce constraints
2023-07-28 21:29:40 -04:00
Alex Vasile
96f6fbefc8
GUI: Autochoose targets if choice can be made (#9206) 2022-07-08 21:58:42 -04:00
DeepCrimson
9084180937
Fix 'chosen' spelling (#9021) 2022-05-27 21:45:07 -06:00
Oleg Agafonov
6bc5a00e8a * Alternative costs - fixed that it can be activated on free cast (example: cascade with overload, #6925, #7410, #7741, #6342); 2021-09-21 14:22:46 +04:00
Oleg Agafonov
46081d9185 GUI related improves:
* GUI: fixed that choose triggers/piles dialog doesn't close correctly before cast mode choose (#8225);
* GUI: fixed that some choose dialogs doesn't update battlefield state (example: choose amount, choose mana);
* Game: fixed duplicated json logs at the game's end;
2021-09-20 02:17:22 +04:00
Oleg Agafonov
fe4d4c0834 * GUI: fixed that choose from list dialog can fizzle some effects like Haunting Voyage (#8223); 2021-09-05 12:14:58 +04:00
Oleg Agafonov
c328c71ef9 GUI: chats code upgraded to use new popup hint code; 2021-08-15 10:47:19 +04:00