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
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
2
Merge Requests
2
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
Commits
3fac2e51
Commit
3fac2e51
authored
Jun 20, 2023
by
chechunchi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix shuffle set card
parent
f35bc744
Pipeline
#22324
passed with stages
in 14 minutes and 20 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
4 deletions
+27
-4
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/shuffleSetCard.ts
...api/ocgcore/ocgAdapter/stoc/stocGameMsg/shuffleSetCard.ts
+1
-1
src/service/duel/shuffleSetCard.ts
src/service/duel/shuffleSetCard.ts
+26
-3
No files found.
src/api/ocgcore/ocgAdapter/stoc/stocGameMsg/shuffleSetCard.ts
View file @
3fac2e51
...
...
@@ -27,6 +27,6 @@ export default (data: Uint8Array) => {
return
new
MsgShuffleSetCard
({
zone
,
from_locations
,
overlay_locations
overlay_locations
,
});
};
src/service/duel/shuffleSetCard.ts
View file @
3fac2e51
...
...
@@ -6,12 +6,20 @@ import MsgShuffleSetCard = ygopro.StocGameMessage.MsgShuffleSetCard;
// 后端传过来的`from_locations`的列表是切洗前场上卡的location,它们在列表里面按照切洗后的顺序排列
export
default
async
(
shuffleSetCard
:
MsgShuffleSetCard
)
=>
{
const
from_locations
=
shuffleSetCard
.
from_locations
;
const
overlay_locations
=
shuffleSetCard
.
overlay_locations
;
if
(
from_locations
.
length
==
0
)
{
console
.
error
(
"
<ShuffleSetCard>from_locations is empty
"
);
return
;
}
if
(
from_locations
.
length
!=
overlay_locations
.
length
)
{
console
.
error
(
"
<ShuffleSetCard>length of from_locations and overlay_locations not matched
"
);
}
for
(
const
from
of
from_locations
)
{
const
count
=
from_locations
.
length
;
for
(
let
i
=
0
;
i
<
count
;
i
++
)
{
const
from
=
from_locations
[
i
];
const
target
=
cardStore
.
at
(
from
.
zone
,
from
.
controller
,
from
.
sequence
);
if
(
target
)
{
// 设置code为0,洗切后的code会由`UpdateData`指定
...
...
@@ -21,7 +29,22 @@ export default async (shuffleSetCard: MsgShuffleSetCard) => {
}
else
{
console
.
warn
(
`<ShuffleSetCard>target from
${
from
}
is null`
);
}
}
// TODO: 处理超量
// 处理超量
const
overlay_location
=
overlay_locations
[
i
];
if
(
overlay_location
.
zone
>
0
)
{
// 如果没有超量素材,后端会全传0
for
(
const
overlay
of
cardStore
.
findOverlay
(
from
.
zone
,
from
.
controller
,
from
.
sequence
))
{
// 更新sequence
overlay
.
location
.
sequence
=
overlay_location
.
sequence
;
// 渲染动画
await
eventbus
.
call
(
Task
.
Move
,
overlay
.
uuid
);
// 这里其实有个疑惑,如果超量素材也跟着洗切的话,洗切的意义好像就没有了,感觉算是个k社没想好的设计?
}
}
}
};
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