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
baichixing
Neos
Commits
96dd1775
Commit
96dd1775
authored
Jan 11, 2023
by
chechunchi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix redux warning
parent
7ef855ab
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
31 additions
and
25 deletions
+31
-25
src/reducers/duel/cemeretySlice.ts
src/reducers/duel/cemeretySlice.ts
+2
-2
src/reducers/duel/generic.ts
src/reducers/duel/generic.ts
+7
-1
src/reducers/duel/handsSlice.ts
src/reducers/duel/handsSlice.ts
+2
-2
src/reducers/duel/magicSlice.ts
src/reducers/duel/magicSlice.ts
+10
-10
src/reducers/duel/monstersSlice.ts
src/reducers/duel/monstersSlice.ts
+10
-10
No files found.
src/reducers/duel/cemeretySlice.ts
View file @
96dd1775
...
@@ -54,11 +54,11 @@ export const cemeteryCase = (builder: ActionReducerMapBuilder<DuelState>) => {
...
@@ -54,11 +54,11 @@ export const cemeteryCase = (builder: ActionReducerMapBuilder<DuelState>) => {
const
newCemetery
=
{
const
newCemetery
=
{
occupant
:
{
id
:
code
,
data
:
{},
text
:
{}
},
occupant
:
{
id
:
code
,
data
:
{},
text
:
{}
},
location
:
new
ygopro
.
CardLocation
(
{
location
:
{
controler
,
controler
,
location
:
ygopro
.
CardZone
.
GRAVE
,
location
:
ygopro
.
CardZone
.
GRAVE
,
sequence
,
sequence
,
}
)
,
},
idleInteractivities
:
[],
idleInteractivities
:
[],
};
};
if
(
judgeSelf
(
controler
,
state
))
{
if
(
judgeSelf
(
controler
,
state
))
{
...
...
src/reducers/duel/generic.ts
View file @
96dd1775
...
@@ -3,7 +3,13 @@ import { ygopro } from "../../api/ocgcore/idl/ocgcore";
...
@@ -3,7 +3,13 @@ import { ygopro } from "../../api/ocgcore/idl/ocgcore";
export
interface
CardState
{
export
interface
CardState
{
occupant
?:
CardMeta
;
// 占据此位置的卡牌元信息
occupant
?:
CardMeta
;
// 占据此位置的卡牌元信息
location
:
ygopro
.
CardLocation
;
// 位置信息
location
:
{
controler
:
number
;
location
?:
number
;
sequence
:
number
;
position
?:
ygopro
.
CardPosition
;
overlay_sequence
?:
number
;
};
// 位置信息
idleInteractivities
:
Interactivity
<
number
>
[];
// IDLE状态下的互动信息
idleInteractivities
:
Interactivity
<
number
>
[];
// IDLE状态下的互动信息
placeInteractivities
?:
Interactivity
<
{
placeInteractivities
?:
Interactivity
<
{
controler
:
number
;
controler
:
number
;
...
...
src/reducers/duel/handsSlice.ts
View file @
96dd1775
...
@@ -47,11 +47,11 @@ export const handsCase = (builder: ActionReducerMapBuilder<DuelState>) => {
...
@@ -47,11 +47,11 @@ export const handsCase = (builder: ActionReducerMapBuilder<DuelState>) => {
const
cards
=
ids
.
map
((
id
,
idx
)
=>
{
const
cards
=
ids
.
map
((
id
,
idx
)
=>
{
return
{
return
{
occupant
:
{
id
,
data
:
{},
text
:
{}
},
occupant
:
{
id
,
data
:
{},
text
:
{}
},
location
:
new
ygopro
.
CardLocation
(
{
location
:
{
controler
:
player
,
controler
:
player
,
location
:
ygopro
.
CardZone
.
HAND
,
location
:
ygopro
.
CardZone
.
HAND
,
sequence
:
idx
,
sequence
:
idx
,
}
)
,
},
idleInteractivities
:
[],
idleInteractivities
:
[],
};
};
});
});
...
...
src/reducers/duel/magicSlice.ts
View file @
96dd1775
...
@@ -24,43 +24,43 @@ export const initMagicsImpl: CaseReducer<DuelState, PayloadAction<number>> = (
...
@@ -24,43 +24,43 @@ export const initMagicsImpl: CaseReducer<DuelState, PayloadAction<number>> = (
const
magics
=
{
const
magics
=
{
magics
:
[
magics
:
[
{
{
location
:
new
ygopro
.
CardLocation
(
{
location
:
{
controler
:
player
,
controler
:
player
,
location
:
ygopro
.
CardZone
.
SZONE
,
location
:
ygopro
.
CardZone
.
SZONE
,
sequence
:
0
,
sequence
:
0
,
}
)
,
},
idleInteractivities
:
[],
idleInteractivities
:
[],
},
},
{
{
location
:
new
ygopro
.
CardLocation
(
{
location
:
{
controler
:
player
,
controler
:
player
,
location
:
ygopro
.
CardZone
.
SZONE
,
location
:
ygopro
.
CardZone
.
SZONE
,
sequence
:
1
,
sequence
:
1
,
}
)
,
},
idleInteractivities
:
[],
idleInteractivities
:
[],
},
},
{
{
location
:
new
ygopro
.
CardLocation
(
{
location
:
{
controler
:
player
,
controler
:
player
,
location
:
ygopro
.
CardZone
.
SZONE
,
location
:
ygopro
.
CardZone
.
SZONE
,
sequence
:
2
,
sequence
:
2
,
}
)
,
},
idleInteractivities
:
[],
idleInteractivities
:
[],
},
},
{
{
location
:
new
ygopro
.
CardLocation
(
{
location
:
{
controler
:
player
,
controler
:
player
,
location
:
ygopro
.
CardZone
.
SZONE
,
location
:
ygopro
.
CardZone
.
SZONE
,
sequence
:
3
,
sequence
:
3
,
}
)
,
},
idleInteractivities
:
[],
idleInteractivities
:
[],
},
},
{
{
location
:
new
ygopro
.
CardLocation
(
{
location
:
{
controler
:
player
,
controler
:
player
,
location
:
ygopro
.
CardZone
.
SZONE
,
location
:
ygopro
.
CardZone
.
SZONE
,
sequence
:
4
,
sequence
:
4
,
}
)
,
},
idleInteractivities
:
[],
idleInteractivities
:
[],
},
},
],
],
...
...
src/reducers/duel/monstersSlice.ts
View file @
96dd1775
...
@@ -24,43 +24,43 @@ export const initMonstersImpl: CaseReducer<DuelState, PayloadAction<number>> = (
...
@@ -24,43 +24,43 @@ export const initMonstersImpl: CaseReducer<DuelState, PayloadAction<number>> = (
const
monsters
=
{
const
monsters
=
{
monsters
:
[
monsters
:
[
{
{
location
:
new
ygopro
.
CardLocation
(
{
location
:
{
controler
:
player
,
controler
:
player
,
location
:
ygopro
.
CardZone
.
MZONE
,
location
:
ygopro
.
CardZone
.
MZONE
,
sequence
:
0
,
sequence
:
0
,
}
)
,
},
idleInteractivities
:
[],
idleInteractivities
:
[],
},
},
{
{
location
:
new
ygopro
.
CardLocation
(
{
location
:
{
controler
:
player
,
controler
:
player
,
location
:
ygopro
.
CardZone
.
MZONE
,
location
:
ygopro
.
CardZone
.
MZONE
,
sequence
:
1
,
sequence
:
1
,
}
)
,
},
idleInteractivities
:
[],
idleInteractivities
:
[],
},
},
{
{
location
:
new
ygopro
.
CardLocation
(
{
location
:
{
controler
:
player
,
controler
:
player
,
location
:
ygopro
.
CardZone
.
MZONE
,
location
:
ygopro
.
CardZone
.
MZONE
,
sequence
:
2
,
sequence
:
2
,
}
)
,
},
idleInteractivities
:
[],
idleInteractivities
:
[],
},
},
{
{
location
:
new
ygopro
.
CardLocation
(
{
location
:
{
controler
:
player
,
controler
:
player
,
location
:
ygopro
.
CardZone
.
MZONE
,
location
:
ygopro
.
CardZone
.
MZONE
,
sequence
:
3
,
sequence
:
3
,
}
)
,
},
idleInteractivities
:
[],
idleInteractivities
:
[],
},
},
{
{
location
:
new
ygopro
.
CardLocation
(
{
location
:
{
controler
:
player
,
controler
:
player
,
location
:
ygopro
.
CardZone
.
MZONE
,
location
:
ygopro
.
CardZone
.
MZONE
,
sequence
:
4
,
sequence
:
4
,
}
)
,
},
idleInteractivities
:
[],
idleInteractivities
:
[],
},
},
],
],
...
...
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