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;
This commit is contained in:
Oleg Agafonov 2025-01-07 12:26:30 +04:00
parent 75d241d541
commit c076f4925f
17 changed files with 177 additions and 140 deletions

View file

@ -104,18 +104,17 @@ public class LoadCallbackClient implements CallbackClient {
GameClientMessage message = (GameClientMessage) callback.getData();
this.gameView = message.getGameView();
log.info(getLogStartInfo() + " target: " + message.getMessage());
switch (message.getMessage()) {
case "Select a starting player":
session.sendPlayerUUID(gameId, playerId);
return;
case "Select a card to discard":
log.info(getLogStartInfo() + "hand size: " + gameView.getMyHand().size());
SimpleCardView card = gameView.getMyHand().values().iterator().next();
session.sendPlayerUUID(gameId, card.getId());
return;
default:
log.error(getLogStartInfo() + "unknown GAME_TARGET message: " + message.toString());
return;
if (message.getMessage().startsWith("Select a starting player")) {
session.sendPlayerUUID(gameId, playerId);
return;
} else if (message.getMessage().startsWith("Select a card to discard")) {
log.info(getLogStartInfo() + "hand size: " + gameView.getMyHand().size());
SimpleCardView card = gameView.getMyHand().values().iterator().next();
session.sendPlayerUUID(gameId, card.getId());
return;
} else {
log.error(getLogStartInfo() + "unknown GAME_TARGET message: " + message.toString());
return;
}
}