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
4
Merge Requests
4
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
7e1e9952
Commit
7e1e9952
authored
Jan 22, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update field slice
parent
8eb301bd
Pipeline
#19754
passed with stages
in 5 minutes and 16 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
src/reducers/duel/fieldSlice.ts
src/reducers/duel/fieldSlice.ts
+7
-7
No files found.
src/reducers/duel/fieldSlice.ts
View file @
7e1e9952
...
...
@@ -16,7 +16,7 @@ import {
}
from
"
./generic
"
;
export
interface
FieldState
{
inner
?
:
CardState
;
inner
:
CardState
;
}
// 初始化场地区状态
...
...
@@ -74,7 +74,7 @@ export const clearFieldPlaceInteractivitiesImpl: CaseReducer<
const
player
=
action
.
payload
;
const
field
=
judgeSelf
(
player
,
state
)
?
state
.
meField
:
state
.
opField
;
if
(
field
&&
field
.
inner
)
{
if
(
field
)
{
field
.
inner
.
placeInteractivities
=
undefined
;
}
};
...
...
@@ -91,7 +91,7 @@ export const addFieldIdleInteractivitiesImpl: CaseReducer<
?
state
.
meField
:
state
.
opField
;
if
(
field
&&
field
.
inner
)
{
if
(
field
)
{
field
.
inner
.
idleInteractivities
.
push
(
action
.
payload
.
interactivity
);
}
};
...
...
@@ -104,7 +104,7 @@ export const clearFieldIdleInteractivitiesImpl: CaseReducer<
?
state
.
meField
:
state
.
opField
;
if
(
field
&&
field
.
inner
)
{
if
(
field
)
{
field
.
inner
.
idleInteractivities
=
[];
}
};
...
...
@@ -121,7 +121,7 @@ export const fieldCase = (builder: ActionReducerMapBuilder<DuelState>) => {
if
(
sequence
==
0
)
{
const
meta
=
{
id
:
code
,
data
:
{},
text
:
{}
};
const
field
=
judgeSelf
(
controler
,
state
)
?
state
.
meField
:
state
.
opField
;
if
(
field
&&
field
.
inner
)
{
if
(
field
)
{
field
.
inner
.
occupant
=
meta
;
}
}
...
...
@@ -132,7 +132,7 @@ export const fieldCase = (builder: ActionReducerMapBuilder<DuelState>) => {
const
meta
=
action
.
payload
.
meta
;
const
field
=
judgeSelf
(
controler
,
state
)
?
state
.
meField
:
state
.
opField
;
if
(
field
&&
field
.
inner
)
{
if
(
field
)
{
field
.
inner
.
occupant
=
meta
;
}
});
...
...
@@ -146,7 +146,7 @@ export const removeFieldImpl: DuelReducer<{ controler: number }> = (
const
controler
=
action
.
payload
.
controler
;
const
field
=
judgeSelf
(
controler
,
state
)
?
state
.
meField
:
state
.
opField
;
if
(
field
&&
field
.
inner
)
{
if
(
field
)
{
field
.
inner
.
occupant
=
undefined
;
}
};
...
...
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