[Game] Add Command Zone support with commander tax tracking

- Add CommandZone and CommandZoneLogic for commander
  - Add CommanderTaxCounter
  - Add counter active state protocol (show/hide tax counters)
  - Add "Enable Command Zone" option in game creation dialogs
  - Add context menu actions for command zone operations

Took 9 minutes

Took 11 minutes
This commit is contained in:
DawnFire42 2026-05-21 21:30:40 -04:00
parent 694adc9e64
commit 9b030a3d6b
No known key found for this signature in database
GPG key ID: 24BB855EE2911B33
73 changed files with 1540 additions and 86 deletions

View file

@ -46,6 +46,7 @@ set(PROTO_FILES
command_set_card_attr.proto
command_set_card_counter.proto
command_set_counter.proto
command_set_counter_active.proto
command_set_sideboard_lock.proto
command_set_sideboard_plan.proto
command_shuffle.proto
@ -106,6 +107,7 @@ set(PROTO_FILES
event_set_card_attr.proto
event_set_card_counter.proto
event_set_counter.proto
event_set_counter_active.proto
event_shuffle.proto
event_user_joined.proto
event_user_left.proto

View file

@ -0,0 +1,9 @@
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];
}

View file

@ -0,0 +1,10 @@
syntax = "proto2";
import "game_event.proto";
message Event_SetCounterActive {
extend GameEvent {
optional Event_SetCounterActive ext = 2023;
}
optional sint32 counter_id = 1;
optional bool active = 2;
}

View file

@ -38,6 +38,7 @@ message GameCommand {
UNCONCEDE = 1032;
JUDGE = 1033;
REVERSE_TURN = 1034;
SET_COUNTER_ACTIVE = 1035;
}
extensions 100 to max;
}

View file

@ -34,6 +34,7 @@ message GameEvent {
CHANGE_ZONE_PROPERTIES = 2020;
REVERSE_TURN = 2021;
GAME_LOG_NOTICE = 2022;
SET_COUNTER_ACTIVE = 2023;
}
optional sint32 player_id = 1 [default = -1];
extensions 100 to max;

View file

@ -69,6 +69,9 @@ message Command_CreateGame {
// share decklists with all players when selected
optional bool share_decklists_on_load = 14;
// enable command zone for Commander format
optional bool enable_command_zone = 15;
}
message Command_JoinGame {

View file

@ -7,4 +7,5 @@ message ServerInfo_Counter {
optional color counter_color = 3;
optional sint32 radius = 4;
optional sint32 count = 5;
optional bool active = 6 [default = true];
}