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
62dc2ba3
Commit
62dc2ba3
authored
Jan 22, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add clearAllIdleInteractivitiesImpl
parent
0706c110
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
0 deletions
+32
-0
src/reducers/duel/commonSlice.ts
src/reducers/duel/commonSlice.ts
+27
-0
src/reducers/duel/mod.ts
src/reducers/duel/mod.ts
+5
-0
No files found.
src/reducers/duel/commonSlice.ts
0 → 100644
View file @
62dc2ba3
import
{
clearIdleInteractivities
,
DuelReducer
}
from
"
./generic
"
;
import
{
judgeSelf
}
from
"
./util
"
;
export
const
clearAllIdleInteractivitiesImpl
:
DuelReducer
<
number
>
=
(
state
,
action
)
=>
{
const
player
=
action
.
payload
;
const
states
=
judgeSelf
(
player
,
state
)
?
[
state
.
meHands
,
state
.
meMonsters
,
state
.
meMagics
,
state
.
meCemetery
,
state
.
meExclusion
,
]
:
[
state
.
opHands
,
state
.
opMonsters
,
state
.
opMagics
,
state
.
opCemetery
,
state
.
opExclusion
,
];
states
.
forEach
((
item
)
=>
clearIdleInteractivities
(
item
));
};
src/reducers/duel/mod.ts
View file @
62dc2ba3
...
...
@@ -90,6 +90,7 @@ import {
exclusionCase
,
}
from
"
./exclusionSlice
"
;
import
{
DeckState
,
initDeckImpl
}
from
"
./deckSlice
"
;
import
{
clearAllIdleInteractivitiesImpl
}
from
"
./commonSlice
"
;
export
interface
DuelState
{
selfType
?:
number
;
...
...
@@ -224,6 +225,9 @@ const duelSlice = createSlice({
setCheckCardModalV2IsOpen
:
setCheckCardModalV2IsOpenImpl
,
resetCheckCardModalV2
:
resetCheckCardModalV2Impl
,
setCheckCardModalV2ResponseAble
:
setCheckCardModalV2ResponseAbleImpl
,
// 通用的`Reducer`
clearAllIdleInteractivities
:
clearAllIdleInteractivitiesImpl
,
},
extraReducers
(
builder
)
{
handsCase
(
builder
);
...
...
@@ -295,6 +299,7 @@ export const {
setCheckCardModalV2FinishAble
,
resetCheckCardModalV2
,
setCheckCardModalV2ResponseAble
,
clearAllIdleInteractivities
,
}
=
duelSlice
.
actions
;
export
const
selectDuelHsStart
=
(
state
:
RootState
)
=>
{
return
state
.
duel
.
meInitInfo
!=
null
;
...
...
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