Commit 7e282007 authored by Chunchi Che's avatar Chunchi Che

Merge branch 'feat/select_place' into 'main'

Feat/select place

See merge request !12
parents 1ba7de35 7657597c
Pipeline #18829 passed with stage
in 11 seconds
......@@ -3,6 +3,32 @@ package ygopro;
option go_package = "DarkNeos/ygopropb";
// ----- Basic -----
// 卡牌的区域类型
enum CardZone {
DECK = 0; // 卡组
HAND = 1; // 手牌
MZONE = 2; // 怪兽区
SZONE = 3; // 魔法陷阱区
GRAVE = 4; // 墓地
REMOVED = 5; // 除外
EXTRA = 6; // 额外卡组
OVERLAY = 7; // 超量叠加
ONFIELD = 8; // 场地
FZONE = 9; // TODO
PZONE = 10; // 灵摆区
}
message CardInfo {
int32 code = 1;
int32 controler = 2;
int32 location = 3;
int32 sequence = 4;
}
// ----- Service -----
// reference: https://github.com/mycard/srvpro/blob/master/data/structs.json
message YgoCtosMsg {
......@@ -88,8 +114,16 @@ message CtosTimeConfirm {}
// 决斗对局内协议
message CtosGameMsgResponse {
message SelectIdleCmdResponse { int32 code = 1; }
message SelectPlaceResponse {
int32 player = 1;
CardZone zone = 2;
int32 sequence = 3;
}
oneof gameMsgResponse { SelectIdleCmdResponse select_idle_cmd = 1; }
oneof gameMsgResponse {
SelectIdleCmdResponse select_idle_cmd = 1;
SelectPlaceResponse select_place = 2;
}
}
// ----- STOC -----
......@@ -193,13 +227,6 @@ message StocTimeLimit {
// 决斗对局内协议
message StocGameMessage {
// 一些对局内共用的结构
message CardInfo {
int32 code = 1;
int32 controler = 2;
int32 location = 3;
int32 sequence = 4;
}
// 对局开始
message MsgStart {
......@@ -307,6 +334,17 @@ message StocGameMessage {
bool enable_shuffle = 5;
}
// 位置选择操作提示
message MsgSelectPlace {
message SelectAblePlace {
int32 player = 1;
CardZone zone = 2;
int32 sequence = 3;
}
repeated SelectAblePlace places = 1;
}
oneof gameMsg {
MsgStart start = 1;
MsgDraw draw = 2;
......@@ -314,6 +352,7 @@ message StocGameMessage {
MsgNewPhase new_phase = 4;
MsgHint hint = 5;
MsgSelectIdleCmd select_idle_cmd = 6;
MsgSelectPlace select_place = 7;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment