Commit f2e3014c authored by Chunchi Che's avatar Chunchi Che

add select place service

parent 1ba7de35
Pipeline #18827 failed with stage
in 12 seconds
......@@ -3,6 +3,33 @@ package ygopro;
option go_package = "DarkNeos/ygopropb";
// ----- Basic -----
// 卡牌的区域类型
enum CardZone {
UNKNOWN = 0;
DECK = 1; // 卡组
HAND = 2; // 手牌
MZONE = 3; // 怪兽区
SZONE = 4; // 魔法陷阱区
GRAVE = 5; // 墓地
REMOVED = 6; // 除外
EXTRA = 7; // 额外卡组
OVERLAY = 8; // 超量叠加
ONFIELD = 9; // 场地
FZONE = 10; // TODO
PZONE = 11; // 灵摆区
}
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 +115,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 +228,6 @@ message StocTimeLimit {
// 决斗对局内协议
message StocGameMessage {
// 一些对局内共用的结构
message CardInfo {
int32 code = 1;
int32 controler = 2;
int32 location = 3;
int32 sequence = 4;
}
// 对局开始
message MsgStart {
......@@ -307,6 +335,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 +353,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