Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
Neos Protobuf
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Neos Protobuf
Commits
ddb6ef6e
Commit
ddb6ef6e
authored
Nov 05, 2022
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update proto
parent
e99641a1
Pipeline
#17756
passed with stage
in 14 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
17 deletions
+57
-17
idl/ocgcore.proto
idl/ocgcore.proto
+57
-17
No files found.
idl/ocgcore.proto
View file @
ddb6ef6e
...
...
@@ -31,38 +31,50 @@ message YgoStocMsg {
StocSelectHand
stoc_select_hand
=
7
;
StocHandResult
stoc_hand_result
=
8
;
StocSelectTp
stoc_select_tp
=
9
;
StocDeckCount
stoc_deck_count
=
10
;
StocDuelStart
stoc_duel_start
=
11
;
}
}
// ----- CTOS -----
message
CtosPlayerInfo
{
string
name
=
1
;
}
// 玩家信息
message
CtosPlayerInfo
{
string
name
=
1
;
// 玩家昵称
}
// 加入房间
message
CtosJoinGame
{
int32
version
=
1
;
int32
gameid
=
2
;
string
passwd
=
3
;
int32
version
=
1
;
// 客户端/前端版本号
int32
gameid
=
2
;
// 0
string
passwd
=
3
;
// 房间密码
}
// 更新卡组
message
CtosUpdateDeck
{
repeated
int32
main
=
1
;
repeated
int32
extra
=
2
;
repeated
int32
side
=
3
;
repeated
int32
main
=
1
;
// 主卡组
repeated
int32
extra
=
2
;
// 额外卡组
repeated
int32
side
=
3
;
// 副卡组
}
// 准备完毕
message
CtosHsReady
{}
// 取消准备
message
CtosHsNotReady
{}
// 选择开始游戏
message
CtosHsStart
{}
// 猜拳选择
message
CtosHandResult
{
HandType
hand
=
1
;
}
// 先后攻选择
message
CtosTpResult
{
enum
TpType
{
UNKNOWN
=
0
;
FIRST
=
1
;
SECOND
=
2
;
FIRST
=
1
;
// 先攻
SECOND
=
2
;
// 后攻
}
TpType
tp
=
1
;
...
...
@@ -70,6 +82,8 @@ message CtosTpResult {
// ----- STOC -----
// 服务端告诉前端/客户端已成功加入房间,
// 附带上对局的信息
message
StocJoinGame
{
int32
lflist
=
1
;
int32
rule
=
2
;
...
...
@@ -83,16 +97,19 @@ message StocJoinGame {
int32
time_limit
=
10
;
}
// 聊天信息
message
StocChat
{
int32
player
=
1
;
string
msg
=
2
;
}
// 有玩家进入房间
message
StocHsPlayerEnter
{
string
name
=
1
;
int32
pos
=
2
;
}
// 房间状态更新
message
StocTypeChange
{
enum
SelfType
{
UNKNOWN
=
0
;
...
...
@@ -109,14 +126,15 @@ message StocTypeChange {
bool
is_host
=
2
;
}
// 玩家状态更新
message
StocHsPlayerChange
{
enum
State
{
UNKNOWN
=
0
;
MOVE
=
1
;
READY
=
2
;
NO_READY
=
3
;
LEAVE
=
4
;
TO_OBSERVER
=
5
;
MOVE
=
1
;
// 位置移动
READY
=
2
;
// 准备完毕
NO_READY
=
3
;
// 取消准备
LEAVE
=
4
;
// 离开房间
TO_OBSERVER
=
5
;
// 到观战席
}
State
state
=
1
;
...
...
@@ -124,18 +142,40 @@ message StocHsPlayerChange {
int32
moved_pos
=
3
;
}
message
StocHsWatchChange
{
int32
count
=
1
;
}
// 观战者更新
message
StocHsWatchChange
{
int32
count
=
1
;
// 观战者数量
}
// 提示玩家进行猜拳选择
message
StocSelectHand
{}
// 双方的猜拳选择
message
StocHandResult
{
HandType
meResult
=
1
;
HandType
opResult
=
2
;
HandType
meResult
=
1
;
// 当前玩家的猜拳选择
HandType
opResult
=
2
;
// 对手的猜拳选择
}
// 提示猜拳胜利的玩家进行先后攻选择
message
StocSelectTp
{}
// 双方的卡组数量
message
StocDeckCount
{
int32
meMain
=
1
;
// 当前玩家的主卡组数量
int32
meExtra
=
2
;
// 当前玩家的额外卡组数量
int32
meSide
=
3
;
// 当前玩家的副卡组数量
int32
opMain
=
4
;
// 对手的主卡组数量
int32
opExtra
=
5
;
// 对手的额外卡组数量
int32
opSide
=
6
;
// 对手的副卡组数量
}
// 决斗开始!
message
StocDuelStart
{}
// ----- common structs ------
// 猜拳类型
enum
HandType
{
UNKNOWN
=
0
;
SCISSORS
=
1
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment