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
4056b3c8
Commit
4056b3c8
authored
Jun 21, 2023
by
chechunchi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
handle shuffle_deck
parent
2faa9c94
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
0 deletions
+27
-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/shuffleDeck.ts
src/service/duel/shuffleDeck.ts
+11
-0
No files found.
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/penetrate.json
View file @
4056b3c8
...
...
@@ -235,5 +235,14 @@
"repeatedType"
:
"CardLocation"
}
]
},
"32"
:{
"protoType"
:
"shuffle_deck"
,
"fields"
:[
{
"fieldName"
:
"player"
,
"fieldType"
:
"uint8"
}
]
}
}
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/penetrate.ts
View file @
4056b3c8
...
...
@@ -35,6 +35,7 @@ const MsgConstructorMap: Map<string, Constructor> = new Map([
[
"
lp_update
"
,
ygopro
.
StocGameMessage
.
MsgLpUpdate
],
[
"
confirm_cards
"
,
ygopro
.
StocGameMessage
.
MsgConfirmCards
],
[
"
become_target
"
,
ygopro
.
StocGameMessage
.
MsgBecomeTarget
],
[
"
shuffle_deck
"
,
ygopro
.
StocGameMessage
.
MsgShuffleDeck
],
]);
export
interface
penetrateType
{
...
...
src/service/duel/gameMsg.ts
View file @
4056b3c8
...
...
@@ -35,6 +35,7 @@ import onMsgSelectTribute from "./selectTribute";
import
onMsgSelectUnselectCard
from
"
./selectUnselectCard
"
;
import
onMsgSelectYesNo
from
"
./selectYesNo
"
;
import
onMsgSet
from
"
./set
"
;
import
onMsgShuffleDeck
from
"
./shuffleDeck
"
;
import
onMsgShuffleHand
from
"
./shuffleHand
"
;
import
onMsgShuffleSetCard
from
"
./shuffleSetCard
"
;
import
onMsgSortCard
from
"
./sortCard
"
;
...
...
@@ -321,6 +322,11 @@ async function _handleGameMsg(pb: ygopro.YgoStocMsg) {
break
;
}
case
"
shuffle_deck
"
:
{
onMsgShuffleDeck
(
msg
.
shuffle_deck
);
break
;
}
case
"
unimplemented
"
:
{
onUnimplemented
(
msg
.
unimplemented
);
...
...
src/service/duel/shuffleDeck.ts
0 → 100644
View file @
4056b3c8
import
{
ygopro
}
from
"
@/api
"
;
import
{
cardStore
}
from
"
@/stores
"
;
export
default
(
shuffleDeck
:
ygopro
.
StocGameMessage
.
MsgShuffleDeck
)
=>
{
const
player
=
shuffleDeck
.
player
;
for
(
const
card
of
cardStore
.
at
(
ygopro
.
CardZone
.
DECK
,
player
))
{
// 把数据抹掉就好了
card
.
code
=
0
;
card
.
meta
=
{
id
:
0
,
data
:
{},
text
:
{}
};
}
};
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