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
287d4894
Commit
287d4894
authored
Feb 11, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update move service
parent
69b4f458
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
0 deletions
+41
-0
src/reducers/duel/mod.ts
src/reducers/duel/mod.ts
+3
-0
src/reducers/duel/monstersSlice.ts
src/reducers/duel/monstersSlice.ts
+26
-0
src/service/duel/move.ts
src/service/duel/move.ts
+12
-0
No files found.
src/reducers/duel/mod.ts
View file @
287d4894
...
@@ -63,6 +63,7 @@ import {
...
@@ -63,6 +63,7 @@ import {
clearMonsterIdleInteractivitiesImpl
,
clearMonsterIdleInteractivitiesImpl
,
removeMonsterImpl
,
removeMonsterImpl
,
setMonsterPositionImpl
,
setMonsterPositionImpl
,
removeOverlayImpl
,
monsterCase
,
monsterCase
,
}
from
"
./monstersSlice
"
;
}
from
"
./monstersSlice
"
;
import
{
import
{
...
@@ -185,6 +186,7 @@ const duelSlice = createSlice({
...
@@ -185,6 +186,7 @@ const duelSlice = createSlice({
clearMonsterIdleInteractivities
:
clearMonsterIdleInteractivitiesImpl
,
clearMonsterIdleInteractivities
:
clearMonsterIdleInteractivitiesImpl
,
setMonsterPosition
:
setMonsterPositionImpl
,
setMonsterPosition
:
setMonsterPositionImpl
,
removeMonster
:
removeMonsterImpl
,
removeMonster
:
removeMonsterImpl
,
removeOverlay
:
removeOverlayImpl
,
// 魔法陷阱区相关`Reducer`
// 魔法陷阱区相关`Reducer`
initMagics
:
initMagicsImpl
,
initMagics
:
initMagicsImpl
,
...
@@ -285,6 +287,7 @@ export const {
...
@@ -285,6 +287,7 @@ export const {
clearMonsterIdleInteractivities
,
clearMonsterIdleInteractivities
,
setMonsterPosition
,
setMonsterPosition
,
removeMonster
,
removeMonster
,
removeOverlay
,
initMagics
,
initMagics
,
addMagicPlaceInteractivities
,
addMagicPlaceInteractivities
,
clearMagicPlaceInteractivities
,
clearMagicPlaceInteractivities
,
...
...
src/reducers/duel/monstersSlice.ts
View file @
287d4894
...
@@ -267,6 +267,32 @@ export const removeMonsterImpl: CaseReducer<
...
@@ -267,6 +267,32 @@ export const removeMonsterImpl: CaseReducer<
removeOverlay
(
monsters
,
action
.
payload
.
sequence
);
removeOverlay
(
monsters
,
action
.
payload
.
sequence
);
};
};
// 删除超量素材
export
const
removeOverlayImpl
:
CaseReducer
<
DuelState
,
PayloadAction
<
{
controler
:
number
;
sequence
:
number
;
overlaySequence
:
number
;
}
>
>
=
(
state
,
action
)
=>
{
const
controler
=
action
.
payload
.
controler
;
const
sequence
=
action
.
payload
.
sequence
;
const
overlaySequence
=
action
.
payload
.
overlaySequence
;
const
monsters
=
judgeSelf
(
controler
,
state
)
?
state
.
meMonsters
:
state
.
opMonsters
;
if
(
monsters
)
{
const
target
=
monsters
.
inner
.
find
((
_
,
idx
)
=>
idx
==
sequence
);
if
(
target
&&
target
.
overlay_materials
)
{
target
.
overlay_materials
=
target
.
overlay_materials
.
filter
(
(
_
,
idx
)
=>
idx
!=
overlaySequence
);
}
}
};
// 改变怪兽表示形式
// 改变怪兽表示形式
export
const
setMonsterPositionImpl
:
CaseReducer
<
export
const
setMonsterPositionImpl
:
CaseReducer
<
DuelState
,
DuelState
,
...
...
src/service/duel/move.ts
View file @
287d4894
...
@@ -12,6 +12,7 @@ import {
...
@@ -12,6 +12,7 @@ import {
removeHand
,
removeHand
,
removeMagic
,
removeMagic
,
removeMonster
,
removeMonster
,
removeOverlay
,
}
from
"
../../reducers/duel/mod
"
;
}
from
"
../../reducers/duel/mod
"
;
import
{
fetchMagicMeta
}
from
"
../../reducers/duel/magicSlice
"
;
import
{
fetchMagicMeta
}
from
"
../../reducers/duel/magicSlice
"
;
import
{
fetchCemeteryMeta
}
from
"
../../reducers/duel/cemeretySlice
"
;
import
{
fetchCemeteryMeta
}
from
"
../../reducers/duel/cemeretySlice
"
;
...
@@ -68,6 +69,17 @@ export default (move: MsgMove, dispatch: AppDispatch) => {
...
@@ -68,6 +69,17 @@ export default (move: MsgMove, dispatch: AppDispatch) => {
break
;
break
;
}
}
case
ygopro
.
CardZone
.
OVERLAY
:
{
dispatch
(
removeOverlay
({
controler
:
from
.
controler
,
sequence
:
from
.
sequence
,
overlaySequence
:
from
.
overlay_sequence
,
})
);
break
;
}
default
:
{
default
:
{
console
.
log
(
`Unhandled zone type
${
from
.
location
}
`
);
console
.
log
(
`Unhandled zone type
${
from
.
location
}
`
);
break
;
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