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
96f67f7c
Commit
96f67f7c
authored
Feb 11, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update move service
parent
287d4894
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
4 deletions
+31
-4
src/reducers/duel/monstersSlice.ts
src/reducers/duel/monstersSlice.ts
+16
-3
src/service/duel/move.ts
src/service/duel/move.ts
+15
-1
No files found.
src/reducers/duel/monstersSlice.ts
View file @
96f67f7c
...
...
@@ -169,6 +169,7 @@ export const fetchOverlayMeta = createAsyncThunk(
controler
:
number
;
sequence
:
number
;
overlayCodes
:
number
[];
append
?:
boolean
;
})
=>
{
const
controler
=
param
.
controler
;
const
sequence
=
param
.
sequence
;
...
...
@@ -221,6 +222,7 @@ export const monsterCase = (builder: ActionReducerMapBuilder<DuelState>) => {
const
controler
=
action
.
meta
.
arg
.
controler
;
const
sequence
=
action
.
meta
.
arg
.
sequence
;
const
overlayCodes
=
action
.
meta
.
arg
.
overlayCodes
;
const
append
=
action
.
meta
.
arg
.
append
;
const
metas
=
overlayCodes
.
map
((
id
)
=>
{
return
{
id
,
data
:
{},
text
:
{}
};
...
...
@@ -231,7 +233,13 @@ export const monsterCase = (builder: ActionReducerMapBuilder<DuelState>) => {
if
(
monsters
)
{
const
target
=
monsters
.
inner
.
find
((
_
,
idx
)
=>
idx
==
sequence
);
if
(
target
&&
target
.
occupant
)
{
target
.
overlay_materials
=
metas
;
if
(
append
)
{
target
.
overlay_materials
=
(
target
.
overlay_materials
||
[]).
concat
(
metas
);
}
else
{
target
.
overlay_materials
=
metas
;
}
}
}
});
...
...
@@ -245,8 +253,13 @@ export const monsterCase = (builder: ActionReducerMapBuilder<DuelState>) => {
:
state
.
opMonsters
;
if
(
monsters
)
{
const
target
=
monsters
.
inner
.
find
((
_
,
idx
)
=>
idx
==
sequence
);
if
(
target
&&
target
.
occupant
)
{
target
.
overlay_materials
=
overlayMetas
;
for
(
const
meta
of
overlayMetas
)
{
for
(
const
overlay
of
target
?.
overlay_materials
||
[])
{
if
(
meta
.
id
==
overlay
.
id
)
{
overlay
.
data
=
meta
.
data
;
overlay
.
text
=
meta
.
text
;
}
}
}
}
});
...
...
src/service/duel/move.ts
View file @
96f67f7c
...
...
@@ -165,7 +165,21 @@ export default (move: MsgMove, dispatch: AppDispatch) => {
break
;
}
case
ygopro
.
CardZone
.
OVERLAY
:
{
OVERLAY_STACK
.
push
({
code
,
sequence
:
to
.
overlay_sequence
});
if
(
to
.
sequence
>
6
)
{
// 超量素材在进行超量召唤时,若玩家未选择超量怪兽的位置,会“沉到决斗盘下面”,这时候素材们的sequence会暂时大于6
// 这时候将它们放到一个栈中,待超量怪兽的Move消息到来时从栈中获取超量素材补充到状态中
OVERLAY_STACK
.
push
({
code
,
sequence
:
to
.
overlay_sequence
});
}
else
{
// 其他情况下,比如“宵星的机神 丁吉尔苏”的“补充超量素材”效果,直接更新状态中
dispatch
(
fetchOverlayMeta
({
controler
:
to
.
controler
,
sequence
:
to
.
sequence
,
overlayCodes
:
[
code
],
append
:
true
,
})
);
}
break
;
}
...
...
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