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
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
Changes
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 {
...
@@ -16,7 +16,7 @@ import {
}
from
"
./generic
"
;
}
from
"
./generic
"
;
export
interface
FieldState
{
export
interface
FieldState
{
inner
?
:
CardState
;
inner
:
CardState
;
}
}
// 初始化场地区状态
// 初始化场地区状态
...
@@ -74,7 +74,7 @@ export const clearFieldPlaceInteractivitiesImpl: CaseReducer<
...
@@ -74,7 +74,7 @@ export const clearFieldPlaceInteractivitiesImpl: CaseReducer<
const
player
=
action
.
payload
;
const
player
=
action
.
payload
;
const
field
=
judgeSelf
(
player
,
state
)
?
state
.
meField
:
state
.
opField
;
const
field
=
judgeSelf
(
player
,
state
)
?
state
.
meField
:
state
.
opField
;
if
(
field
&&
field
.
inner
)
{
if
(
field
)
{
field
.
inner
.
placeInteractivities
=
undefined
;
field
.
inner
.
placeInteractivities
=
undefined
;
}
}
};
};
...
@@ -91,7 +91,7 @@ export const addFieldIdleInteractivitiesImpl: CaseReducer<
...
@@ -91,7 +91,7 @@ export const addFieldIdleInteractivitiesImpl: CaseReducer<
?
state
.
meField
?
state
.
meField
:
state
.
opField
;
:
state
.
opField
;
if
(
field
&&
field
.
inner
)
{
if
(
field
)
{
field
.
inner
.
idleInteractivities
.
push
(
action
.
payload
.
interactivity
);
field
.
inner
.
idleInteractivities
.
push
(
action
.
payload
.
interactivity
);
}
}
};
};
...
@@ -104,7 +104,7 @@ export const clearFieldIdleInteractivitiesImpl: CaseReducer<
...
@@ -104,7 +104,7 @@ export const clearFieldIdleInteractivitiesImpl: CaseReducer<
?
state
.
meField
?
state
.
meField
:
state
.
opField
;
:
state
.
opField
;
if
(
field
&&
field
.
inner
)
{
if
(
field
)
{
field
.
inner
.
idleInteractivities
=
[];
field
.
inner
.
idleInteractivities
=
[];
}
}
};
};
...
@@ -121,7 +121,7 @@ export const fieldCase = (builder: ActionReducerMapBuilder<DuelState>) => {
...
@@ -121,7 +121,7 @@ export const fieldCase = (builder: ActionReducerMapBuilder<DuelState>) => {
if
(
sequence
==
0
)
{
if
(
sequence
==
0
)
{
const
meta
=
{
id
:
code
,
data
:
{},
text
:
{}
};
const
meta
=
{
id
:
code
,
data
:
{},
text
:
{}
};
const
field
=
judgeSelf
(
controler
,
state
)
?
state
.
meField
:
state
.
opField
;
const
field
=
judgeSelf
(
controler
,
state
)
?
state
.
meField
:
state
.
opField
;
if
(
field
&&
field
.
inner
)
{
if
(
field
)
{
field
.
inner
.
occupant
=
meta
;
field
.
inner
.
occupant
=
meta
;
}
}
}
}
...
@@ -132,7 +132,7 @@ export const fieldCase = (builder: ActionReducerMapBuilder<DuelState>) => {
...
@@ -132,7 +132,7 @@ export const fieldCase = (builder: ActionReducerMapBuilder<DuelState>) => {
const
meta
=
action
.
payload
.
meta
;
const
meta
=
action
.
payload
.
meta
;
const
field
=
judgeSelf
(
controler
,
state
)
?
state
.
meField
:
state
.
opField
;
const
field
=
judgeSelf
(
controler
,
state
)
?
state
.
meField
:
state
.
opField
;
if
(
field
&&
field
.
inner
)
{
if
(
field
)
{
field
.
inner
.
occupant
=
meta
;
field
.
inner
.
occupant
=
meta
;
}
}
});
});
...
@@ -146,7 +146,7 @@ export const removeFieldImpl: DuelReducer<{ controler: number }> = (
...
@@ -146,7 +146,7 @@ export const removeFieldImpl: DuelReducer<{ controler: number }> = (
const
controler
=
action
.
payload
.
controler
;
const
controler
=
action
.
payload
.
controler
;
const
field
=
judgeSelf
(
controler
,
state
)
?
state
.
meField
:
state
.
opField
;
const
field
=
judgeSelf
(
controler
,
state
)
?
state
.
meField
:
state
.
opField
;
if
(
field
&&
field
.
inner
)
{
if
(
field
)
{
field
.
inner
.
occupant
=
undefined
;
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