Cockatrice/libcockatrice_protocol/libcockatrice/protocol/pb/event_game_state_changed.proto
Lukas Brübach e82b311c8b
[Protocol] Add tournament state event and tournament game commands
Adds the protocol layer for the tournament game mode:
- Event_TournamentState (2027) carrying phase, round counters, player
  standings, pairings, and settings (games_per_match)
- Command_ReportMatchResult / Command_AdvanceTournament /
  Command_TournamentSettingsSelect game command extensions (1037-1039)
- is_tournament flag on Command_CreateGame and ServerInfo_Game;
  is_tournament and parent_game_id on Event_GameStateChanged


Took 13 minutes
2026-09-06 16:15:45 +02:00

33 lines
1.1 KiB
Protocol Buffer

syntax = "proto2";
import "game_event.proto";
import "serverinfo_player.proto";
// Signals that the game state has changed.
// If a field is present in this message, it will overwrite the client's game state.
// Also used to provide the entire game state when joining a game.
message Event_GameStateChanged {
extend GameEvent {
optional Event_GameStateChanged ext = 1005;
}
// the list of players. Players contain their zones which contain all cards in the game
repeated ServerInfo_Player player_list = 1;
// if the game has started
optional bool game_started = 2;
// the player who is currently holding the turn
optional sint32 active_player_id = 3;
// the current phase
optional sint32 active_phase = 4;
// the amount of seconds since the game started
optional uint32 seconds_elapsed = 5;
// whether this game is a tournament game
optional bool is_tournament = 9;
// for tournament sub-games: the ID of the parent tournament game (-1 if not a sub-game)
optional sint32 parent_game_id = 10 [default = -1];
}