mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 00:54:53 -07:00
protobuf client->server communication almost working
This commit is contained in:
parent
4eb9dfc5bf
commit
314f17091d
96 changed files with 1633 additions and 860 deletions
|
|
@ -1,237 +0,0 @@
|
|||
import "color.proto";
|
||||
import "move_card_to_zone.proto";
|
||||
|
||||
message Command_KickFromGame {
|
||||
optional sint32 player_id = 1;
|
||||
}
|
||||
|
||||
message Command_LeaveGame {
|
||||
}
|
||||
|
||||
message Command_GameSay {
|
||||
optional string message = 1;
|
||||
}
|
||||
|
||||
message Command_Shuffle {
|
||||
}
|
||||
|
||||
message Command_Mulligan {
|
||||
}
|
||||
|
||||
message Command_RollDie {
|
||||
optional uint32 sides = 1;
|
||||
}
|
||||
|
||||
message Command_DrawCards {
|
||||
optional uint32 number = 1;
|
||||
}
|
||||
|
||||
message Command_UndoDraw {
|
||||
}
|
||||
|
||||
message Command_FlipCard {
|
||||
optional string zone = 1;
|
||||
optional sint32 card_id = 2;
|
||||
optional bool face_down = 3;
|
||||
}
|
||||
|
||||
message Command_AttachCard {
|
||||
optional string start_zone = 1;
|
||||
optional sint32 card_id = 2;
|
||||
optional sint32 target_player_id = 3;
|
||||
optional string target_zone = 4;
|
||||
optional sint32 target_card_id = 5;
|
||||
}
|
||||
|
||||
message Command_CreateToken {
|
||||
optional string zone = 1;
|
||||
optional string card_name = 2;
|
||||
optional string color = 3;
|
||||
optional string pt = 4;
|
||||
optional string annotation = 5;
|
||||
optional bool destroy_on_zone_change = 6;
|
||||
optional sint32 x = 7;
|
||||
optional sint32 y = 8;
|
||||
}
|
||||
|
||||
message Command_CreateArrow {
|
||||
optional sint32 start_player_id = 1;
|
||||
optional string start_zone = 2;
|
||||
optional sint32 start_card_id = 3;
|
||||
optional sint32 target_player_id = 4;
|
||||
optional string target_zone = 5;
|
||||
optional sint32 target_card_id = 6;
|
||||
optional color arrow_color = 7;
|
||||
}
|
||||
|
||||
message Command_DeleteArrow {
|
||||
optional sint32 arrow_id = 1;
|
||||
}
|
||||
|
||||
message Command_SetCardAttr {
|
||||
optional string zone = 1;
|
||||
optional sint32 card_id = 2;
|
||||
optional string attr_name = 3;
|
||||
optional string attr_value = 4;
|
||||
}
|
||||
|
||||
message Command_SetCardCounter {
|
||||
optional string zone = 1;
|
||||
optional sint32 card_id = 2;
|
||||
optional sint32 counter_id = 3;
|
||||
optional sint32 counter_value = 4;
|
||||
}
|
||||
|
||||
message Command_IncCardCounter {
|
||||
optional string zone = 1;
|
||||
optional sint32 card_id = 2;
|
||||
optional sint32 counter_id = 3;
|
||||
optional sint32 counter_delta = 4;
|
||||
}
|
||||
|
||||
message Command_ReadyStart {
|
||||
optional bool ready = 1;
|
||||
}
|
||||
|
||||
message Command_Concede {
|
||||
}
|
||||
|
||||
message Command_IncCounter {
|
||||
optional sint32 counter_id = 1;
|
||||
optional sint32 delta = 2;
|
||||
}
|
||||
|
||||
message Command_CreateCounter {
|
||||
optional string counter_name = 1;
|
||||
optional color counter_color = 2;
|
||||
optional uint32 radius = 3;
|
||||
optional sint32 value = 4;
|
||||
}
|
||||
|
||||
message Command_SetCounter {
|
||||
optional sint32 counter_id = 1;
|
||||
optional sint32 value = 2;
|
||||
}
|
||||
|
||||
message Command_DelCounter {
|
||||
optional sint32 counter_id = 1;
|
||||
}
|
||||
|
||||
message Command_NextTurn {
|
||||
}
|
||||
|
||||
message Command_SetActivePhase {
|
||||
optional uint32 phase = 1;
|
||||
}
|
||||
|
||||
message Command_DumpZone {
|
||||
optional sint32 player_id = 1;
|
||||
optional string zone_name = 2;
|
||||
optional sint32 number_cards = 3;
|
||||
}
|
||||
|
||||
message Command_StopDumpZone {
|
||||
optional sint32 player_id = 1;
|
||||
optional string zone_name = 2;
|
||||
}
|
||||
|
||||
message Command_RevealCards {
|
||||
optional string zone_name = 1;
|
||||
optional sint32 card_id = 2;
|
||||
optional sint32 player_id = 3;
|
||||
}
|
||||
|
||||
message CardToMove {
|
||||
optional sint32 card_id = 1;
|
||||
optional bool face_down = 2;
|
||||
optional string pt = 3;
|
||||
optional bool tapped = 4;
|
||||
}
|
||||
|
||||
message Command_MoveCard {
|
||||
optional string start_zone = 1;
|
||||
repeated CardToMove cards_to_move = 2;
|
||||
optional sint32 target_player_id = 3;
|
||||
optional string target_zone = 4;
|
||||
optional sint32 x = 5;
|
||||
optional sint32 y = 6;
|
||||
}
|
||||
|
||||
message Command_SetSideboardPlan {
|
||||
repeated MoveCard_ToZone move_list = 1;
|
||||
}
|
||||
|
||||
message Command_DeckSelect {
|
||||
optional string deck = 1;
|
||||
optional sint32 deck_id = 2;
|
||||
}
|
||||
|
||||
message GameCommand {
|
||||
enum GameCommandType {
|
||||
KICK_FROM_GAME = 1000;
|
||||
LEAVE_GAME = 1001;
|
||||
GAME_SAY = 1002;
|
||||
SHUFFLE = 1003;
|
||||
MULLIGAN = 1004;
|
||||
ROLL_DIE = 1005;
|
||||
DRAW_CARDS = 1006;
|
||||
UNDO_DRAW = 1007;
|
||||
FLIP_CARD = 1008;
|
||||
ATTACH_CARD = 1009;
|
||||
CREATE_TOKEN = 1010;
|
||||
CREATE_ARROW = 1011;
|
||||
DELETE_ARROW = 1012;
|
||||
SET_CARD_ATTR = 1013;
|
||||
SET_CARD_COUNTER = 1014;
|
||||
INC_CARD_COUNTER = 1015;
|
||||
READY_START = 1016;
|
||||
CONCEDE = 1017;
|
||||
INC_COUNTER = 1018;
|
||||
CREATE_COUNTER = 1019;
|
||||
SET_COUNTER = 1020;
|
||||
DEL_COUNTER = 1021;
|
||||
NEXT_TURN = 1022;
|
||||
SET_ACTIVE_PHASE = 1023;
|
||||
DUMP_ZONE = 1024;
|
||||
STOP_DUMP_ZONE = 1025;
|
||||
REVEAL_CARDS = 1026;
|
||||
MOVE_CARD = 1027;
|
||||
SET_SIDEBOARD_PLAN = 1028;
|
||||
DECK_SELECT = 1029;
|
||||
}
|
||||
extensions 100 to max;
|
||||
}
|
||||
|
||||
extend GameCommand {
|
||||
optional Command_KickFromGame command_kick_from_game = 1000;
|
||||
optional Command_LeaveGame command_leave_game = 1001;
|
||||
optional Command_GameSay command_game_say = 1002;
|
||||
optional Command_Shuffle command_shuffle = 1003;
|
||||
optional Command_Mulligan command_mulligan = 1004;
|
||||
optional Command_RollDie command_roll_die = 1005;
|
||||
optional Command_DrawCards command_draw_cards = 1006;
|
||||
optional Command_UndoDraw command_undo_draw = 1007;
|
||||
optional Command_FlipCard command_flip_card = 1008;
|
||||
optional Command_AttachCard command_attach_card = 1009;
|
||||
optional Command_CreateToken command_create_token = 1010;
|
||||
optional Command_CreateArrow command_create_arrow = 1011;
|
||||
optional Command_DeleteArrow command_delete_arrow = 1012;
|
||||
optional Command_SetCardAttr command_set_card_attr = 1013;
|
||||
optional Command_SetCardCounter command_set_card_counter = 1014;
|
||||
optional Command_IncCardCounter command_inc_card_counter = 1015;
|
||||
optional Command_ReadyStart command_ready_start = 1016;
|
||||
optional Command_Concede command_concede = 1017;
|
||||
optional Command_IncCounter command_inc_counter = 1018;
|
||||
optional Command_CreateCounter command_create_counter = 1019;
|
||||
optional Command_SetCounter command_set_counter = 1020;
|
||||
optional Command_DelCounter command_del_counter = 1021;
|
||||
optional Command_NextTurn command_next_turn = 1022;
|
||||
optional Command_SetActivePhase command_set_active_phase = 1023;
|
||||
optional Command_DumpZone command_dump_zone = 1024;
|
||||
optional Command_StopDumpZone command_stop_dump_zone = 1025;
|
||||
optional Command_RevealCards command_reveal_cards = 1026;
|
||||
optional Command_MoveCard command_move_card = 1027;
|
||||
optional Command_SetSideboardPlan command_set_sideboard_plan = 1028;
|
||||
optional Command_DeckSelect command_deck_select = 1029;
|
||||
}
|
||||
|
||||
5
common/pb/proto/.directory
Normal file
5
common/pb/proto/.directory
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
[Dolphin]
|
||||
AdditionalInfoV2=Details_Size,Details_Date,CustomizedDetails
|
||||
Timestamp=2011,12,18,12,16,39
|
||||
Version=2
|
||||
ViewMode=1
|
||||
|
|
@ -1,11 +1,3 @@
|
|||
message Command_UpdateServerMessage {
|
||||
}
|
||||
|
||||
message Command_ShutdownServer {
|
||||
optional string reason = 1;
|
||||
optional uint32 minutes = 2;
|
||||
}
|
||||
|
||||
message AdminCommand {
|
||||
enum AdminCommandType {
|
||||
UPDATE_SERVER_MESSAGE = 1000;
|
||||
|
|
@ -14,8 +6,16 @@ message AdminCommand {
|
|||
extensions 100 to max;
|
||||
}
|
||||
|
||||
extend AdminCommand {
|
||||
optional Command_UpdateServerMessage command_update_server_message = 1000;
|
||||
optional Command_ShutdownServer command_shutdown_server = 1001;
|
||||
message Command_UpdateServerMessage {
|
||||
extend AdminCommand {
|
||||
optional Command_UpdateServerMessage ext = 1000;
|
||||
}
|
||||
}
|
||||
|
||||
message Command_ShutdownServer {
|
||||
extend AdminCommand {
|
||||
optional Command_ShutdownServer ext = 1001;
|
||||
}
|
||||
optional string reason = 1;
|
||||
optional uint32 minutes = 2;
|
||||
}
|
||||
|
||||
13
common/pb/proto/command_attach_card.proto
Normal file
13
common/pb/proto/command_attach_card.proto
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import "game_commands.proto";
|
||||
message Command_AttachCard {
|
||||
extend GameCommand {
|
||||
optional Command_AttachCard ext = 1009;
|
||||
}
|
||||
optional string start_zone = 1;
|
||||
optional sint32 card_id = 2;
|
||||
optional sint32 target_player_id = 3;
|
||||
optional string target_zone = 4;
|
||||
optional sint32 target_card_id = 5;
|
||||
}
|
||||
|
||||
|
||||
6
common/pb/proto/command_concede.proto
Normal file
6
common/pb/proto/command_concede.proto
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
import "game_commands.proto";
|
||||
message Command_Concede {
|
||||
extend GameCommand {
|
||||
optional Command_Concede ext = 1017;
|
||||
}
|
||||
}
|
||||
17
common/pb/proto/command_create_arrow.proto
Normal file
17
common/pb/proto/command_create_arrow.proto
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import "game_commands.proto";
|
||||
import "color.proto";
|
||||
|
||||
message Command_CreateArrow {
|
||||
extend GameCommand {
|
||||
optional Command_CreateArrow ext = 1011;
|
||||
}
|
||||
optional sint32 start_player_id = 1;
|
||||
optional string start_zone = 2;
|
||||
optional sint32 start_card_id = 3;
|
||||
optional sint32 target_player_id = 4;
|
||||
optional string target_zone = 5;
|
||||
optional sint32 target_card_id = 6;
|
||||
optional color arrow_color = 7;
|
||||
}
|
||||
|
||||
|
||||
12
common/pb/proto/command_create_counter.proto
Normal file
12
common/pb/proto/command_create_counter.proto
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import "game_commands.proto";
|
||||
import "color.proto";
|
||||
|
||||
message Command_CreateCounter {
|
||||
extend GameCommand {
|
||||
optional Command_CreateCounter ext = 1019;
|
||||
}
|
||||
optional string counter_name = 1;
|
||||
optional color counter_color = 2;
|
||||
optional uint32 radius = 3;
|
||||
optional sint32 value = 4;
|
||||
}
|
||||
16
common/pb/proto/command_create_token.proto
Normal file
16
common/pb/proto/command_create_token.proto
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import "game_commands.proto";
|
||||
message Command_CreateToken {
|
||||
extend GameCommand {
|
||||
optional Command_CreateToken ext = 1010;
|
||||
}
|
||||
optional string zone = 1;
|
||||
optional string card_name = 2;
|
||||
optional string color = 3;
|
||||
optional string pt = 4;
|
||||
optional string annotation = 5;
|
||||
optional bool destroy_on_zone_change = 6;
|
||||
optional sint32 x = 7;
|
||||
optional sint32 y = 8;
|
||||
}
|
||||
|
||||
|
||||
8
common/pb/proto/command_deck_del.proto
Normal file
8
common/pb/proto/command_deck_del.proto
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import "session_commands.proto";
|
||||
|
||||
message Command_DeckDel {
|
||||
extend SessionCommand {
|
||||
optional Command_DeckDel ext = 1011;
|
||||
}
|
||||
optional uint32 deck_id = 1;
|
||||
}
|
||||
9
common/pb/proto/command_deck_del_dir.proto
Normal file
9
common/pb/proto/command_deck_del_dir.proto
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import "session_commands.proto";
|
||||
|
||||
message Command_DeckDelDir {
|
||||
extend SessionCommand {
|
||||
optional Command_DeckDelDir ext = 1010;
|
||||
}
|
||||
optional string path = 1;
|
||||
}
|
||||
|
||||
9
common/pb/proto/command_deck_download.proto
Normal file
9
common/pb/proto/command_deck_download.proto
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import "session_commands.proto";
|
||||
|
||||
message Command_DeckDownload {
|
||||
extend SessionCommand {
|
||||
optional Command_DeckDownload ext = 1012;
|
||||
}
|
||||
optional uint32 deck_id = 1;
|
||||
}
|
||||
|
||||
10
common/pb/proto/command_deck_new_dir.proto
Normal file
10
common/pb/proto/command_deck_new_dir.proto
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import "session_commands.proto";
|
||||
|
||||
message Command_DeckNewDir {
|
||||
extend SessionCommand {
|
||||
optional Command_DeckNewDir ext = 1009;
|
||||
}
|
||||
optional string path = 1;
|
||||
optional string dir_name = 2;
|
||||
}
|
||||
|
||||
8
common/pb/proto/command_deck_select.proto
Normal file
8
common/pb/proto/command_deck_select.proto
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import "game_commands.proto";
|
||||
message Command_DeckSelect {
|
||||
extend GameCommand {
|
||||
optional Command_DeckSelect ext = 1029;
|
||||
}
|
||||
optional string deck = 1;
|
||||
optional sint32 deck_id = 2;
|
||||
}
|
||||
10
common/pb/proto/command_deck_upload.proto
Normal file
10
common/pb/proto/command_deck_upload.proto
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import "session_commands.proto";
|
||||
|
||||
message Command_DeckUpload {
|
||||
extend SessionCommand {
|
||||
optional Command_DeckUpload ext = 1013;
|
||||
}
|
||||
optional string path = 1;
|
||||
optional string deck_list = 2;
|
||||
}
|
||||
|
||||
7
common/pb/proto/command_del_counter.proto
Normal file
7
common/pb/proto/command_del_counter.proto
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import "game_commands.proto";
|
||||
message Command_DelCounter {
|
||||
extend GameCommand {
|
||||
optional Command_DelCounter ext = 1021;
|
||||
}
|
||||
optional sint32 counter_id = 1;
|
||||
}
|
||||
7
common/pb/proto/command_delete_arrow.proto
Normal file
7
common/pb/proto/command_delete_arrow.proto
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import "game_commands.proto";
|
||||
message Command_DeleteArrow {
|
||||
extend GameCommand {
|
||||
optional Command_DeleteArrow ext = 1012;
|
||||
}
|
||||
optional sint32 arrow_id = 1;
|
||||
}
|
||||
8
common/pb/proto/command_draw_cards.proto
Normal file
8
common/pb/proto/command_draw_cards.proto
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import "game_commands.proto";
|
||||
message Command_DrawCards {
|
||||
extend GameCommand {
|
||||
optional Command_DrawCards ext = 1006;
|
||||
}
|
||||
optional uint32 number = 1;
|
||||
}
|
||||
|
||||
9
common/pb/proto/command_dump_zone.proto
Normal file
9
common/pb/proto/command_dump_zone.proto
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import "game_commands.proto";
|
||||
message Command_DumpZone {
|
||||
extend GameCommand {
|
||||
optional Command_DumpZone ext = 1024;
|
||||
}
|
||||
optional sint32 player_id = 1;
|
||||
optional string zone_name = 2;
|
||||
optional sint32 number_cards = 3;
|
||||
}
|
||||
11
common/pb/proto/command_flip_card.proto
Normal file
11
common/pb/proto/command_flip_card.proto
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import "game_commands.proto";
|
||||
message Command_FlipCard {
|
||||
extend GameCommand {
|
||||
optional Command_FlipCard ext = 1008;
|
||||
}
|
||||
optional string zone = 1;
|
||||
optional sint32 card_id = 2;
|
||||
optional bool face_down = 3;
|
||||
}
|
||||
|
||||
|
||||
9
common/pb/proto/command_game_say.proto
Normal file
9
common/pb/proto/command_game_say.proto
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import "game_commands.proto";
|
||||
message Command_GameSay {
|
||||
extend GameCommand {
|
||||
optional Command_GameSay ext = 1002;
|
||||
}
|
||||
optional string message = 1;
|
||||
}
|
||||
|
||||
|
||||
10
common/pb/proto/command_inc_card_counter.proto
Normal file
10
common/pb/proto/command_inc_card_counter.proto
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import "game_commands.proto";
|
||||
message Command_IncCardCounter {
|
||||
extend GameCommand {
|
||||
optional Command_IncCardCounter ext = 1015;
|
||||
}
|
||||
optional string zone = 1;
|
||||
optional sint32 card_id = 2;
|
||||
optional sint32 counter_id = 3;
|
||||
optional sint32 counter_delta = 4;
|
||||
}
|
||||
8
common/pb/proto/command_inc_counter.proto
Normal file
8
common/pb/proto/command_inc_counter.proto
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import "game_commands.proto";
|
||||
message Command_IncCounter {
|
||||
extend GameCommand {
|
||||
optional Command_IncCounter ext = 1018;
|
||||
}
|
||||
optional sint32 counter_id = 1;
|
||||
optional sint32 delta = 2;
|
||||
}
|
||||
8
common/pb/proto/command_kick_from_game.proto
Normal file
8
common/pb/proto/command_kick_from_game.proto
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import "game_commands.proto";
|
||||
message Command_KickFromGame {
|
||||
extend GameCommand {
|
||||
optional Command_KickFromGame ext = 1000;
|
||||
}
|
||||
optional sint32 player_id = 1;
|
||||
}
|
||||
|
||||
7
common/pb/proto/command_leave_game.proto
Normal file
7
common/pb/proto/command_leave_game.proto
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import "game_commands.proto";
|
||||
message Command_LeaveGame {
|
||||
extend GameCommand {
|
||||
optional Command_LeaveGame ext = 1001;
|
||||
}
|
||||
}
|
||||
|
||||
24
common/pb/proto/command_move_card.proto
Normal file
24
common/pb/proto/command_move_card.proto
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
import "game_commands.proto";
|
||||
message CardToMove {
|
||||
optional sint32 card_id = 1;
|
||||
optional bool face_down = 2;
|
||||
optional string pt = 3;
|
||||
optional bool tapped = 4;
|
||||
}
|
||||
|
||||
message ListOfCardsToMove {
|
||||
repeated CardToMove card = 1;
|
||||
}
|
||||
|
||||
message Command_MoveCard {
|
||||
extend GameCommand {
|
||||
optional Command_MoveCard ext = 1027;
|
||||
}
|
||||
optional string start_zone = 1;
|
||||
optional ListOfCardsToMove cards_to_move = 2;
|
||||
optional sint32 target_player_id = 3;
|
||||
optional string target_zone = 4;
|
||||
optional sint32 x = 5;
|
||||
optional sint32 y = 6;
|
||||
}
|
||||
|
||||
8
common/pb/proto/command_mulligan.proto
Normal file
8
common/pb/proto/command_mulligan.proto
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import "game_commands.proto";
|
||||
message Command_Mulligan {
|
||||
extend GameCommand {
|
||||
optional Command_Mulligan ext = 1004;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
6
common/pb/proto/command_next_turn.proto
Normal file
6
common/pb/proto/command_next_turn.proto
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
import "game_commands.proto";
|
||||
message Command_NextTurn {
|
||||
extend GameCommand {
|
||||
optional Command_NextTurn ext = 1022;
|
||||
}
|
||||
}
|
||||
7
common/pb/proto/command_ready_start.proto
Normal file
7
common/pb/proto/command_ready_start.proto
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import "game_commands.proto";
|
||||
message Command_ReadyStart {
|
||||
extend GameCommand {
|
||||
optional Command_ReadyStart ext = 1016;
|
||||
}
|
||||
optional bool ready = 1;
|
||||
}
|
||||
9
common/pb/proto/command_reveal_cards.proto
Normal file
9
common/pb/proto/command_reveal_cards.proto
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
import "game_commands.proto";
|
||||
message Command_RevealCards {
|
||||
extend GameCommand {
|
||||
optional Command_RevealCards ext = 1026;
|
||||
}
|
||||
optional string zone_name = 1;
|
||||
optional sint32 card_id = 2;
|
||||
optional sint32 player_id = 3;
|
||||
}
|
||||
8
common/pb/proto/command_roll_die.proto
Normal file
8
common/pb/proto/command_roll_die.proto
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import "game_commands.proto";
|
||||
message Command_RollDie {
|
||||
extend GameCommand {
|
||||
optional Command_RollDie ext = 1005;
|
||||
}
|
||||
optional uint32 sides = 1;
|
||||
}
|
||||
|
||||
7
common/pb/proto/command_set_active_phase.proto
Normal file
7
common/pb/proto/command_set_active_phase.proto
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import "game_commands.proto";
|
||||
message Command_SetActivePhase {
|
||||
extend GameCommand {
|
||||
optional Command_SetActivePhase ext = 1023;
|
||||
}
|
||||
optional uint32 phase = 1;
|
||||
}
|
||||
10
common/pb/proto/command_set_card_attr.proto
Normal file
10
common/pb/proto/command_set_card_attr.proto
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import "game_commands.proto";
|
||||
message Command_SetCardAttr {
|
||||
extend GameCommand {
|
||||
optional Command_SetCardAttr ext = 1013;
|
||||
}
|
||||
optional string zone = 1;
|
||||
optional sint32 card_id = 2;
|
||||
optional string attr_name = 3;
|
||||
optional string attr_value = 4;
|
||||
}
|
||||
10
common/pb/proto/command_set_card_counter.proto
Normal file
10
common/pb/proto/command_set_card_counter.proto
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import "game_commands.proto";
|
||||
message Command_SetCardCounter {
|
||||
extend GameCommand {
|
||||
optional Command_SetCardCounter ext = 1014;
|
||||
}
|
||||
optional string zone = 1;
|
||||
optional sint32 card_id = 2;
|
||||
optional sint32 counter_id = 3;
|
||||
optional sint32 counter_value = 4;
|
||||
}
|
||||
8
common/pb/proto/command_set_counter.proto
Normal file
8
common/pb/proto/command_set_counter.proto
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import "game_commands.proto";
|
||||
message Command_SetCounter {
|
||||
extend GameCommand {
|
||||
optional Command_SetCounter ext = 1020;
|
||||
}
|
||||
optional sint32 counter_id = 1;
|
||||
optional sint32 value = 2;
|
||||
}
|
||||
10
common/pb/proto/command_set_sideboard_plan.proto
Normal file
10
common/pb/proto/command_set_sideboard_plan.proto
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import "game_commands.proto";
|
||||
import "move_card_to_zone.proto";
|
||||
|
||||
message Command_SetSideboardPlan {
|
||||
extend GameCommand {
|
||||
optional Command_SetSideboardPlan ext = 1028;
|
||||
}
|
||||
repeated MoveCard_ToZone move_list = 1;
|
||||
}
|
||||
|
||||
7
common/pb/proto/command_shuffle.proto
Normal file
7
common/pb/proto/command_shuffle.proto
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
import "game_commands.proto";
|
||||
message Command_Shuffle {
|
||||
extend GameCommand {
|
||||
optional Command_Shuffle ext = 1003;
|
||||
}
|
||||
}
|
||||
|
||||
8
common/pb/proto/command_stop_dump_zone.proto
Normal file
8
common/pb/proto/command_stop_dump_zone.proto
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
import "game_commands.proto";
|
||||
message Command_StopDumpZone {
|
||||
extend GameCommand {
|
||||
optional Command_StopDumpZone ext = 1025;
|
||||
}
|
||||
optional sint32 player_id = 1;
|
||||
optional string zone_name = 2;
|
||||
}
|
||||
6
common/pb/proto/command_undo_draw.proto
Normal file
6
common/pb/proto/command_undo_draw.proto
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
import "game_commands.proto";
|
||||
message Command_UndoDraw {
|
||||
extend GameCommand {
|
||||
optional Command_UndoDraw ext = 1007;
|
||||
}
|
||||
}
|
||||
|
|
@ -5,13 +5,6 @@ import "moderator_commands.proto";
|
|||
import "admin_commands.proto";
|
||||
|
||||
message CommandContainer {
|
||||
enum CommandType {
|
||||
SESSION = 0;
|
||||
GAME = 1;
|
||||
ROOM = 2;
|
||||
MODERATOR = 3;
|
||||
ADMIN = 4;
|
||||
}
|
||||
required uint64 cmd_id = 1;
|
||||
|
||||
optional uint32 game_id = 10;
|
||||
35
common/pb/proto/game_commands.proto
Normal file
35
common/pb/proto/game_commands.proto
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
message GameCommand {
|
||||
enum GameCommandType {
|
||||
KICK_FROM_GAME = 1000;
|
||||
LEAVE_GAME = 1001;
|
||||
GAME_SAY = 1002;
|
||||
SHUFFLE = 1003;
|
||||
MULLIGAN = 1004;
|
||||
ROLL_DIE = 1005;
|
||||
DRAW_CARDS = 1006;
|
||||
UNDO_DRAW = 1007;
|
||||
FLIP_CARD = 1008;
|
||||
ATTACH_CARD = 1009;
|
||||
CREATE_TOKEN = 1010;
|
||||
CREATE_ARROW = 1011;
|
||||
DELETE_ARROW = 1012;
|
||||
SET_CARD_ATTR = 1013;
|
||||
SET_CARD_COUNTER = 1014;
|
||||
INC_CARD_COUNTER = 1015;
|
||||
READY_START = 1016;
|
||||
CONCEDE = 1017;
|
||||
INC_COUNTER = 1018;
|
||||
CREATE_COUNTER = 1019;
|
||||
SET_COUNTER = 1020;
|
||||
DEL_COUNTER = 1021;
|
||||
NEXT_TURN = 1022;
|
||||
SET_ACTIVE_PHASE = 1023;
|
||||
DUMP_ZONE = 1024;
|
||||
STOP_DUMP_ZONE = 1025;
|
||||
REVEAL_CARDS = 1026;
|
||||
MOVE_CARD = 1027;
|
||||
SET_SIDEBOARD_PLAN = 1028;
|
||||
DECK_SELECT = 1029;
|
||||
}
|
||||
extensions 100 to max;
|
||||
}
|
||||
|
|
@ -1,12 +1,3 @@
|
|||
|
||||
|
||||
message Command_BanFromServer {
|
||||
optional string user_name = 1;
|
||||
optional string address = 2;
|
||||
optional uint32 minutes = 3;
|
||||
optional string reason = 4;
|
||||
}
|
||||
|
||||
message ModeratorCommand {
|
||||
enum ModeratorCommandType {
|
||||
BAN_FROM_SERVER = 1000;
|
||||
|
|
@ -14,7 +5,12 @@ message ModeratorCommand {
|
|||
extensions 100 to max;
|
||||
}
|
||||
|
||||
extend ModeratorCommand {
|
||||
optional Command_BanFromServer command_ban_from_server = 1000;
|
||||
message Command_BanFromServer {
|
||||
extend ModeratorCommand {
|
||||
optional Command_BanFromServer ext = 1000;
|
||||
}
|
||||
optional string user_name = 1;
|
||||
optional string address = 2;
|
||||
optional uint32 minutes = 3;
|
||||
optional string reason = 4;
|
||||
}
|
||||
|
||||
|
|
@ -1,12 +1,30 @@
|
|||
message RoomCommand {
|
||||
enum RoomCommandType {
|
||||
LEAVE_ROOM = 1000;
|
||||
ROOM_SAY = 1001;
|
||||
CREATE_GAME = 1002;
|
||||
JOIN_GAME = 1003;
|
||||
}
|
||||
extensions 100 to max;
|
||||
}
|
||||
|
||||
message Command_LeaveRoom {
|
||||
extend RoomCommand {
|
||||
optional Command_LeaveRoom ext = 1000;
|
||||
}
|
||||
}
|
||||
|
||||
message Command_RoomSay {
|
||||
extend RoomCommand {
|
||||
optional Command_RoomSay ext = 1001;
|
||||
}
|
||||
optional string message = 1;
|
||||
}
|
||||
|
||||
message Command_CreateGame {
|
||||
extend RoomCommand {
|
||||
optional Command_CreateGame ext = 1002;
|
||||
}
|
||||
optional string description = 1;
|
||||
optional string password = 2;
|
||||
optional uint32 max_players = 3;
|
||||
|
|
@ -20,27 +38,11 @@ message Command_CreateGame {
|
|||
}
|
||||
|
||||
message Command_JoinGame {
|
||||
extend RoomCommand {
|
||||
optional Command_JoinGame ext = 1003;
|
||||
}
|
||||
optional uint32 game_id = 1;
|
||||
optional string password = 2;
|
||||
optional bool spectator = 3;
|
||||
optional bool override_restrictions = 4;
|
||||
}
|
||||
|
||||
message RoomCommand {
|
||||
enum RoomCommandType {
|
||||
LEAVE_ROOM = 1000;
|
||||
ROOM_SAY = 1001;
|
||||
CREATE_GAME = 1002;
|
||||
JOIN_GAME = 1003;
|
||||
}
|
||||
extensions 100 to max;
|
||||
}
|
||||
|
||||
extend RoomCommand {
|
||||
optional Command_LeaveRoom command_leave_room = 1000;
|
||||
optional Command_RoomSay command_room_say = 1001;
|
||||
optional Command_CreateGame command_create_game = 1002;
|
||||
optional Command_JoinGame command_join_game = 1003;
|
||||
}
|
||||
|
||||
|
||||
98
common/pb/proto/session_commands.proto
Normal file
98
common/pb/proto/session_commands.proto
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
message SessionCommand {
|
||||
enum SessionCommandType {
|
||||
PING = 1000;
|
||||
LOGIN = 1001;
|
||||
MESSAGE = 1002;
|
||||
LIST_USERS = 1003;
|
||||
GET_GAMES_OF_USER = 1004;
|
||||
GET_USER_INFO = 1005;
|
||||
ADD_TO_LIST = 1006;
|
||||
REMOVE_FROM_LIST = 1007;
|
||||
DECK_LIST = 1008;
|
||||
DECK_NEW_DIR = 1009;
|
||||
DECK_DEL_DIR = 1010;
|
||||
DECK_DEL = 1011;
|
||||
DECK_DOWNLOAD = 1012;
|
||||
DECK_UPLOAD = 1013;
|
||||
LIST_ROOMS = 1014;
|
||||
JOIN_ROOM = 1015;
|
||||
}
|
||||
extensions 100 to max;
|
||||
}
|
||||
|
||||
message Command_Ping {
|
||||
extend SessionCommand {
|
||||
optional Command_Ping ext = 1000;
|
||||
}
|
||||
}
|
||||
|
||||
message Command_Login {
|
||||
extend SessionCommand {
|
||||
optional Command_Login ext = 1001;
|
||||
}
|
||||
optional string user_name = 1;
|
||||
optional string password = 2;
|
||||
}
|
||||
|
||||
message Command_Message {
|
||||
extend SessionCommand {
|
||||
optional Command_Message ext = 1002;
|
||||
}
|
||||
optional string user_name = 1;
|
||||
optional string message = 2;
|
||||
}
|
||||
|
||||
message Command_ListUsers {
|
||||
extend SessionCommand {
|
||||
optional Command_ListUsers ext = 1003;
|
||||
}
|
||||
}
|
||||
|
||||
message Command_GetGamesOfUser {
|
||||
extend SessionCommand {
|
||||
optional Command_GetGamesOfUser ext = 1004;
|
||||
}
|
||||
optional string user_name = 1;
|
||||
}
|
||||
|
||||
message Command_GetUserInfo {
|
||||
extend SessionCommand {
|
||||
optional Command_GetUserInfo ext = 1005;
|
||||
}
|
||||
optional string user_name = 1;
|
||||
}
|
||||
|
||||
message Command_AddToList {
|
||||
extend SessionCommand {
|
||||
optional Command_AddToList ext = 1006;
|
||||
}
|
||||
optional string list = 1;
|
||||
optional string user_name = 2;
|
||||
}
|
||||
|
||||
message Command_RemoveFromList {
|
||||
extend SessionCommand {
|
||||
optional Command_RemoveFromList ext = 1007;
|
||||
}
|
||||
optional string list = 1;
|
||||
optional string user_name = 2;
|
||||
}
|
||||
|
||||
message Command_DeckList {
|
||||
extend SessionCommand {
|
||||
optional Command_DeckList ext = 1008;
|
||||
}
|
||||
}
|
||||
|
||||
message Command_ListRooms {
|
||||
extend SessionCommand {
|
||||
optional Command_ListRooms ext = 1014;
|
||||
}
|
||||
}
|
||||
|
||||
message Command_JoinRoom {
|
||||
extend SessionCommand {
|
||||
optional Command_JoinRoom ext = 1015;
|
||||
}
|
||||
optional uint32 room_id = 1;
|
||||
}
|
||||
|
|
@ -1,107 +0,0 @@
|
|||
message Command_Ping {
|
||||
}
|
||||
|
||||
message Command_Login {
|
||||
optional string user_name = 1;
|
||||
optional string password = 2;
|
||||
}
|
||||
|
||||
message Command_Message {
|
||||
optional string user_name = 1;
|
||||
optional string message = 2;
|
||||
}
|
||||
|
||||
message Command_ListUsers {
|
||||
}
|
||||
|
||||
message Command_GetGamesOfUser {
|
||||
optional string user_name = 1;
|
||||
}
|
||||
|
||||
message Command_GetUserInfo {
|
||||
optional string user_name = 1;
|
||||
}
|
||||
|
||||
message Command_AddToList {
|
||||
optional string list = 1;
|
||||
optional string user_name = 2;
|
||||
}
|
||||
|
||||
message Command_RemoveFromList {
|
||||
optional string list = 1;
|
||||
optional string user_name = 2;
|
||||
}
|
||||
|
||||
message Command_DeckList {
|
||||
}
|
||||
|
||||
message Command_DeckNewDir {
|
||||
optional string path = 1;
|
||||
optional string dir_name = 2;
|
||||
}
|
||||
|
||||
message Command_DeckDelDir {
|
||||
optional string path = 1;
|
||||
}
|
||||
|
||||
message Command_DeckDel {
|
||||
optional uint32 deck_id = 1;
|
||||
}
|
||||
|
||||
message Command_DeckDownload {
|
||||
optional uint32 deck_id = 1;
|
||||
}
|
||||
|
||||
message Command_DeckUpload {
|
||||
optional string path = 1;
|
||||
optional string deck_list = 2;
|
||||
}
|
||||
|
||||
message Command_ListRooms {
|
||||
}
|
||||
|
||||
message Command_JoinRoom {
|
||||
optional uint32 room_id = 1;
|
||||
}
|
||||
|
||||
message SessionCommand {
|
||||
enum SessionCommandType {
|
||||
PING = 1000;
|
||||
LOGIN = 1001;
|
||||
MESSAGE = 1002;
|
||||
LIST_USERS = 1003;
|
||||
GET_GAMES_OF_USER = 1004;
|
||||
GET_USER_INFO = 1005;
|
||||
ADD_TO_LIST = 1006;
|
||||
REMOVE_FROM_LIST = 1007;
|
||||
DECK_LIST = 1008;
|
||||
DECK_NEW_DIR = 1009;
|
||||
DECK_DEL_DIR = 1010;
|
||||
DECK_DEL = 1011;
|
||||
DECK_DOWNLOAD = 1012;
|
||||
DECK_UPLOAD = 1013;
|
||||
LIST_ROOMS = 1014;
|
||||
JOIN_ROOM = 1015;
|
||||
}
|
||||
extensions 100 to max;
|
||||
}
|
||||
|
||||
extend SessionCommand {
|
||||
optional Command_Ping command_ping = 1000;
|
||||
optional Command_Login command_login = 1001;
|
||||
optional Command_Message command_message = 1002;
|
||||
optional Command_ListUsers command_list_users = 1003;
|
||||
optional Command_GetGamesOfUser command_get_games_of_user = 1004;
|
||||
optional Command_GetUserInfo command_get_user_info = 1005;
|
||||
optional Command_AddToList command_add_to_list = 1006;
|
||||
optional Command_RemoveFromList command_remove_from_list = 1007;
|
||||
optional Command_DeckList command_deck_list = 1008;
|
||||
optional Command_DeckNewDir command_deck_new_dir = 1009;
|
||||
optional Command_DeckDelDir command_deck_del_dir = 1010;
|
||||
optional Command_DeckDel command_deck_del = 1011;
|
||||
optional Command_DeckDownload command_deck_download = 1012;
|
||||
optional Command_DeckUpload command_deck_upload = 1013;
|
||||
optional Command_ListRooms command_list_rooms = 1014;
|
||||
optional Command_JoinRoom command_join_room = 1015;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue