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
10a2248d
Commit
10a2248d
authored
Jan 22, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add clearAllPlaceInteractivitiesImpl
parent
62dc2ba3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
2 deletions
+29
-2
src/reducers/duel/commonSlice.ts
src/reducers/duel/commonSlice.ts
+26
-1
src/reducers/duel/mod.ts
src/reducers/duel/mod.ts
+3
-1
No files found.
src/reducers/duel/commonSlice.ts
View file @
10a2248d
import
{
clearIdleInteractivities
,
DuelReducer
}
from
"
./generic
"
;
import
{
clearIdleInteractivities
,
clearPlaceInteractivities
,
DuelReducer
}
from
"
./generic
"
;
import
{
judgeSelf
}
from
"
./util
"
;
import
{
judgeSelf
}
from
"
./util
"
;
export
const
clearAllIdleInteractivitiesImpl
:
DuelReducer
<
number
>
=
(
export
const
clearAllIdleInteractivitiesImpl
:
DuelReducer
<
number
>
=
(
...
@@ -25,3 +25,28 @@ export const clearAllIdleInteractivitiesImpl: DuelReducer<number> = (
...
@@ -25,3 +25,28 @@ export const clearAllIdleInteractivitiesImpl: DuelReducer<number> = (
states
.
forEach
((
item
)
=>
clearIdleInteractivities
(
item
));
states
.
forEach
((
item
)
=>
clearIdleInteractivities
(
item
));
};
};
export
const
clearAllPlaceInteractivitiesImpl
:
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
)
=>
clearPlaceInteractivities
(
item
));
};
src/reducers/duel/mod.ts
View file @
10a2248d
...
@@ -90,7 +90,7 @@ import {
...
@@ -90,7 +90,7 @@ import {
exclusionCase
,
exclusionCase
,
}
from
"
./exclusionSlice
"
;
}
from
"
./exclusionSlice
"
;
import
{
DeckState
,
initDeckImpl
}
from
"
./deckSlice
"
;
import
{
DeckState
,
initDeckImpl
}
from
"
./deckSlice
"
;
import
{
clearAllIdleInteractivitiesImpl
}
from
"
./commonSlice
"
;
import
{
clearAllIdleInteractivitiesImpl
,
clearAllPlaceInteractivitiesImpl
}
from
"
./commonSlice
"
;
export
interface
DuelState
{
export
interface
DuelState
{
selfType
?:
number
;
selfType
?:
number
;
...
@@ -228,6 +228,7 @@ const duelSlice = createSlice({
...
@@ -228,6 +228,7 @@ const duelSlice = createSlice({
// 通用的`Reducer`
// 通用的`Reducer`
clearAllIdleInteractivities
:
clearAllIdleInteractivitiesImpl
,
clearAllIdleInteractivities
:
clearAllIdleInteractivitiesImpl
,
clearAllPlaceInteractivities
:
clearAllPlaceInteractivitiesImpl
,
},
},
extraReducers
(
builder
)
{
extraReducers
(
builder
)
{
handsCase
(
builder
);
handsCase
(
builder
);
...
@@ -300,6 +301,7 @@ export const {
...
@@ -300,6 +301,7 @@ export const {
resetCheckCardModalV2
,
resetCheckCardModalV2
,
setCheckCardModalV2ResponseAble
,
setCheckCardModalV2ResponseAble
,
clearAllIdleInteractivities
,
clearAllIdleInteractivities
,
clearAllPlaceInteractivities
}
=
duelSlice
.
actions
;
}
=
duelSlice
.
actions
;
export
const
selectDuelHsStart
=
(
state
:
RootState
)
=>
{
export
const
selectDuelHsStart
=
(
state
:
RootState
)
=>
{
return
state
.
duel
.
meInitInfo
!=
null
;
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