Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
N
Neos
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
love_飞影
Neos
Commits
6fd15a9a
Commit
6fd15a9a
authored
Jul 03, 2023
by
chechunchi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handle swap_grave_deck
parent
80a60319
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
38 additions
and
0 deletions
+38
-0
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/penetrate.json
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/penetrate.json
+9
-0
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/penetrate.ts
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/penetrate.ts
+1
-0
src/service/duel/gameMsg.ts
src/service/duel/gameMsg.ts
+6
-0
src/service/duel/swapGraveDeck.ts
src/service/duel/swapGraveDeck.ts
+22
-0
No files found.
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/penetrate.json
View file @
6fd15a9a
...
@@ -225,5 +225,14 @@
...
@@ -225,5 +225,14 @@
"fieldType"
:
"uint8"
"fieldType"
:
"uint8"
}
}
]
]
},
"35"
:
{
"protoType"
:
"swap_grave_deck"
,
"fields"
:
[
{
"fieldName"
:
"player"
,
"fieldType"
:
"uint8"
}
]
}
}
}
}
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/penetrate.ts
View file @
6fd15a9a
...
@@ -36,6 +36,7 @@ const MsgConstructorMap: Map<string, Constructor> = new Map([
...
@@ -36,6 +36,7 @@ const MsgConstructorMap: Map<string, Constructor> = new Map([
[
"
become_target
"
,
ygopro
.
StocGameMessage
.
MsgBecomeTarget
],
[
"
become_target
"
,
ygopro
.
StocGameMessage
.
MsgBecomeTarget
],
[
"
shuffle_deck
"
,
ygopro
.
StocGameMessage
.
MsgShuffleDeck
],
[
"
shuffle_deck
"
,
ygopro
.
StocGameMessage
.
MsgShuffleDeck
],
[
"
rock_paper_scissors
"
,
ygopro
.
StocGameMessage
.
MsgRockPaperScissors
],
[
"
rock_paper_scissors
"
,
ygopro
.
StocGameMessage
.
MsgRockPaperScissors
],
[
"
swap_grave_deck
"
,
ygopro
.
StocGameMessage
.
MsgSwapGraveDeck
]
]);
]);
export
interface
penetrateType
{
export
interface
penetrateType
{
...
...
src/service/duel/gameMsg.ts
View file @
6fd15a9a
...
@@ -54,6 +54,7 @@ import onMsgUpdateData from "./updateData";
...
@@ -54,6 +54,7 @@ import onMsgUpdateData from "./updateData";
import
onMsgUpdateHp
from
"
./updateHp
"
;
import
onMsgUpdateHp
from
"
./updateHp
"
;
import
onMsgWait
from
"
./wait
"
;
import
onMsgWait
from
"
./wait
"
;
import
onMsgWin
from
"
./win
"
;
import
onMsgWin
from
"
./win
"
;
import
onMsgSwapGraveDeck
from
"
./swapGraveDeck
"
;
const
ActiveList
=
[
const
ActiveList
=
[
"
select_idle_cmd
"
,
"
select_idle_cmd
"
,
...
@@ -339,6 +340,11 @@ async function _handleGameMsg(pb: ygopro.YgoStocMsg) {
...
@@ -339,6 +340,11 @@ async function _handleGameMsg(pb: ygopro.YgoStocMsg) {
break
;
break
;
}
}
case
"
swap_grave_deck
"
:
{
await
onMsgSwapGraveDeck
(
msg
.
swap_grave_deck
);
break
;
}
case
"
unimplemented
"
:
{
case
"
unimplemented
"
:
{
onUnimplemented
(
msg
.
unimplemented
);
onUnimplemented
(
msg
.
unimplemented
);
...
...
src/service/duel/swapGraveDeck.ts
0 → 100644
View file @
6fd15a9a
import
{
ygopro
}
from
"
@/api
"
;
import
{
eventbus
,
Task
}
from
"
@/infra
"
;
import
{
cardStore
}
from
"
@/stores
"
;
import
MsgSwapGraveDeck
=
ygopro
.
StocGameMessage
.
MsgSwapGraveDeck
;
const
{
DECK
,
GRAVE
}
=
ygopro
.
CardZone
;
export
default
async
(
swapGraveDeck
:
MsgSwapGraveDeck
)
=>
{
const
player
=
swapGraveDeck
.
player
;
const
deck
=
cardStore
.
at
(
DECK
,
player
);
const
grave
=
cardStore
.
at
(
GRAVE
,
player
);
for
(
const
card
of
deck
)
{
card
.
location
.
zone
=
GRAVE
;
await
eventbus
.
call
(
Task
.
Move
,
card
.
uuid
);
}
for
(
const
card
of
grave
)
{
card
.
location
.
zone
=
DECK
;
await
eventbus
.
call
(
Task
.
Move
,
card
.
uuid
);
}
};
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