mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-09-28 08:52:19 -07:00
Refactor tax counters into cast counts with separate ID space and user activated create/delete
This commit is contained in:
parent
4354191918
commit
f5e49a571e
50 changed files with 900 additions and 828 deletions
|
|
@ -10,6 +10,7 @@ set(PROTO_FILES
|
|||
command_change_zone_properties.proto
|
||||
command_concede.proto
|
||||
command_create_arrow.proto
|
||||
command_create_cast_count.proto
|
||||
command_create_counter.proto
|
||||
command_create_token.proto
|
||||
command_deck_del.proto
|
||||
|
|
@ -21,11 +22,13 @@ set(PROTO_FILES
|
|||
command_deck_upload.proto
|
||||
command_del_counter.proto
|
||||
command_delete_arrow.proto
|
||||
command_delete_cast_count.proto
|
||||
command_draw_cards.proto
|
||||
command_dump_zone.proto
|
||||
command_flip_card.proto
|
||||
command_game_say.proto
|
||||
command_inc_card_counter.proto
|
||||
command_inc_cast_count.proto
|
||||
command_inc_counter.proto
|
||||
command_kick_from_game.proto
|
||||
command_leave_game.proto
|
||||
|
|
@ -45,8 +48,8 @@ set(PROTO_FILES
|
|||
command_set_active_phase.proto
|
||||
command_set_card_attr.proto
|
||||
command_set_card_counter.proto
|
||||
command_set_cast_count.proto
|
||||
command_set_counter.proto
|
||||
command_set_counter_active.proto
|
||||
command_set_sideboard_lock.proto
|
||||
command_set_sideboard_plan.proto
|
||||
command_shuffle.proto
|
||||
|
|
@ -66,10 +69,12 @@ set(PROTO_FILES
|
|||
event_change_zone_properties.proto
|
||||
event_connection_closed.proto
|
||||
event_create_arrow.proto
|
||||
event_create_cast_count.proto
|
||||
event_create_counter.proto
|
||||
event_create_token.proto
|
||||
event_del_counter.proto
|
||||
event_delete_arrow.proto
|
||||
event_delete_cast_count.proto
|
||||
event_destroy_card.proto
|
||||
event_draw_cards.proto
|
||||
event_dump_zone.proto
|
||||
|
|
@ -106,8 +111,8 @@ set(PROTO_FILES
|
|||
event_set_active_player.proto
|
||||
event_set_card_attr.proto
|
||||
event_set_card_counter.proto
|
||||
event_set_cast_count.proto
|
||||
event_set_counter.proto
|
||||
event_set_counter_active.proto
|
||||
event_shuffle.proto
|
||||
event_user_joined.proto
|
||||
event_user_left.proto
|
||||
|
|
@ -149,6 +154,7 @@ set(PROTO_FILES
|
|||
server_message.proto
|
||||
serverinfo_arrow.proto
|
||||
serverinfo_ban.proto
|
||||
serverinfo_cast_count.proto
|
||||
serverinfo_card.proto
|
||||
serverinfo_cardcounter.proto
|
||||
serverinfo_chat_message.proto
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
syntax = "proto2";
|
||||
import "game_commands.proto";
|
||||
|
||||
message Command_CreateCastCount {
|
||||
extend GameCommand {
|
||||
optional Command_CreateCastCount ext = 1036;
|
||||
}
|
||||
optional sint32 index = 1 [default = 1];
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
syntax = "proto2";
|
||||
import "game_commands.proto";
|
||||
|
||||
message Command_DeleteCastCount {
|
||||
extend GameCommand {
|
||||
optional Command_DeleteCastCount ext = 1037;
|
||||
}
|
||||
optional sint32 index = 1 [default = 1];
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
syntax = "proto2";
|
||||
import "game_commands.proto";
|
||||
|
||||
message Command_IncCastCount {
|
||||
extend GameCommand {
|
||||
optional Command_IncCastCount ext = 1038;
|
||||
}
|
||||
optional sint32 index = 1 [default = 1];
|
||||
optional sint32 delta = 2 [default = 1];
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
syntax = "proto2";
|
||||
import "game_commands.proto";
|
||||
|
||||
message Command_SetCastCount {
|
||||
extend GameCommand {
|
||||
optional Command_SetCastCount ext = 1039;
|
||||
}
|
||||
optional sint32 index = 1 [default = 1];
|
||||
optional sint32 value = 2 [default = 0];
|
||||
}
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
syntax = "proto2";
|
||||
import "game_commands.proto";
|
||||
message Command_SetCounterActive {
|
||||
extend GameCommand {
|
||||
optional Command_SetCounterActive ext = 1035;
|
||||
}
|
||||
optional sint32 counter_id = 1 [default = -1];
|
||||
optional bool active = 2 [default = true];
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
syntax = "proto2";
|
||||
import "game_event.proto";
|
||||
|
||||
message Event_CreateCastCount {
|
||||
extend GameEvent {
|
||||
optional Event_CreateCastCount ext = 2024;
|
||||
}
|
||||
optional sint32 index = 1 [default = 1];
|
||||
}
|
||||
|
|
@ -0,0 +1,9 @@
|
|||
syntax = "proto2";
|
||||
import "game_event.proto";
|
||||
|
||||
message Event_DeleteCastCount {
|
||||
extend GameEvent {
|
||||
optional Event_DeleteCastCount ext = 2025;
|
||||
}
|
||||
optional sint32 index = 1 [default = 1];
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
syntax = "proto2";
|
||||
import "game_event.proto";
|
||||
|
||||
message Event_SetCastCount {
|
||||
extend GameEvent {
|
||||
optional Event_SetCastCount ext = 2026;
|
||||
}
|
||||
optional sint32 index = 1 [default = 1];
|
||||
optional sint32 value = 2 [default = 0];
|
||||
}
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
syntax = "proto2";
|
||||
import "game_event.proto";
|
||||
|
||||
message Event_SetCounterActive {
|
||||
extend GameEvent {
|
||||
optional Event_SetCounterActive ext = 2023;
|
||||
}
|
||||
optional sint32 counter_id = 1 [default = -1];
|
||||
optional bool active = 2 [default = true];
|
||||
}
|
||||
|
|
@ -176,10 +176,25 @@ message GameCommand {
|
|||
/// Client: reflected via subsequent turn events
|
||||
REVERSE_TURN = 1034;
|
||||
|
||||
/// Show or hide a reserved tax counter without deleting it.
|
||||
/// Server: Server_Player::cmdSetCounterActive
|
||||
/// Client: PlayerEventHandler::eventSetCounterActive
|
||||
SET_COUNTER_ACTIVE = 1035;
|
||||
/// Create a cast count at the specified index.
|
||||
/// Server: Server_Player::cmdCreateCastCount
|
||||
/// Client: PlayerEventHandler::eventCreateCastCount
|
||||
CREATE_CAST_COUNT = 1036;
|
||||
|
||||
/// Delete a cast count at the specified index.
|
||||
/// Server: Server_Player::cmdDeleteCastCount
|
||||
/// Client: PlayerEventHandler::eventDeleteCastCount
|
||||
DELETE_CAST_COUNT = 1037;
|
||||
|
||||
/// Increment or decrement a cast count.
|
||||
/// Server: Server_Player::cmdIncCastCount
|
||||
/// Client: PlayerEventHandler::eventSetCastCount
|
||||
INC_CAST_COUNT = 1038;
|
||||
|
||||
/// Set a cast count to a specific value.
|
||||
/// Server: Server_Player::cmdSetCastCount
|
||||
/// Client: PlayerEventHandler::eventSetCastCount
|
||||
SET_CAST_COUNT = 1039;
|
||||
}
|
||||
|
||||
extensions 100 to max;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,9 @@ message GameEvent {
|
|||
CHANGE_ZONE_PROPERTIES = 2020;
|
||||
REVERSE_TURN = 2021;
|
||||
GAME_LOG_NOTICE = 2022;
|
||||
SET_COUNTER_ACTIVE = 2023;
|
||||
CREATE_CAST_COUNT = 2024;
|
||||
DELETE_CAST_COUNT = 2025;
|
||||
SET_CAST_COUNT = 2026;
|
||||
}
|
||||
optional sint32 player_id = 1 [default = -1];
|
||||
extensions 100 to max;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
syntax = "proto2";
|
||||
|
||||
message ServerInfo_CastCount {
|
||||
optional sint32 index = 1;
|
||||
optional sint32 value = 2;
|
||||
}
|
||||
|
|
@ -3,6 +3,7 @@ import "serverinfo_zone.proto";
|
|||
import "serverinfo_counter.proto";
|
||||
import "serverinfo_arrow.proto";
|
||||
import "serverinfo_playerproperties.proto";
|
||||
import "serverinfo_cast_count.proto";
|
||||
|
||||
message ServerInfo_Player {
|
||||
optional ServerInfo_PlayerProperties properties = 1;
|
||||
|
|
@ -10,4 +11,5 @@ message ServerInfo_Player {
|
|||
repeated ServerInfo_Zone zone_list = 3;
|
||||
repeated ServerInfo_Counter counter_list = 4;
|
||||
repeated ServerInfo_Arrow arrow_list = 5;
|
||||
repeated ServerInfo_CastCount cast_count_list = 6;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue