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
2
Merge Requests
2
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
3fdb3d4e
Commit
3fdb3d4e
authored
Mar 25, 2023
by
Chunchi Che
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add counters in CardState
parent
f586fbb6
Pipeline
#20925
passed with stages
in 16 minutes and 37 seconds
Changes
8
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
23 additions
and
0 deletions
+23
-0
src/reducers/duel/cemeretySlice.ts
src/reducers/duel/cemeretySlice.ts
+1
-0
src/reducers/duel/deckSlice.ts
src/reducers/duel/deckSlice.ts
+1
-0
src/reducers/duel/exclusionSlice.ts
src/reducers/duel/exclusionSlice.ts
+1
-0
src/reducers/duel/extraDeckSlice.ts
src/reducers/duel/extraDeckSlice.ts
+2
-0
src/reducers/duel/generic.ts
src/reducers/duel/generic.ts
+2
-0
src/reducers/duel/handsSlice.ts
src/reducers/duel/handsSlice.ts
+3
-0
src/reducers/duel/magicSlice.ts
src/reducers/duel/magicSlice.ts
+6
-0
src/reducers/duel/monstersSlice.ts
src/reducers/duel/monstersSlice.ts
+7
-0
No files found.
src/reducers/duel/cemeretySlice.ts
View file @
3fdb3d4e
...
@@ -51,6 +51,7 @@ export const cemeteryCase = (builder: ActionReducerMapBuilder<DuelState>) => {
...
@@ -51,6 +51,7 @@ export const cemeteryCase = (builder: ActionReducerMapBuilder<DuelState>) => {
sequence
,
sequence
,
},
},
idleInteractivities
:
[],
idleInteractivities
:
[],
counters
:
{},
};
};
if
(
judgeSelf
(
controler
,
state
))
{
if
(
judgeSelf
(
controler
,
state
))
{
extendState
(
state
.
meCemetery
,
newCemetery
);
extendState
(
state
.
meCemetery
,
newCemetery
);
...
...
src/reducers/duel/deckSlice.ts
View file @
3fdb3d4e
...
@@ -24,6 +24,7 @@ export const initDeckImpl: CaseReducer<
...
@@ -24,6 +24,7 @@ export const initDeckImpl: CaseReducer<
location
:
ygopro
.
CardZone
.
DECK
,
location
:
ygopro
.
CardZone
.
DECK
,
},
},
idleInteractivities
:
[],
idleInteractivities
:
[],
counters
:
{},
});
});
}
}
...
...
src/reducers/duel/exclusionSlice.ts
View file @
3fdb3d4e
...
@@ -53,6 +53,7 @@ export const exclusionCase = (builder: ActionReducerMapBuilder<DuelState>) => {
...
@@ -53,6 +53,7 @@ export const exclusionCase = (builder: ActionReducerMapBuilder<DuelState>) => {
sequence
,
sequence
,
},
},
idleInteractivities
:
[],
idleInteractivities
:
[],
counters
:
{},
};
};
if
(
judgeSelf
(
controler
,
state
))
{
if
(
judgeSelf
(
controler
,
state
))
{
extendState
(
state
.
meExclusion
,
newExclusion
);
extendState
(
state
.
meExclusion
,
newExclusion
);
...
...
src/reducers/duel/extraDeckSlice.ts
View file @
3fdb3d4e
...
@@ -40,6 +40,7 @@ export const extraDeckCase = (builder: ActionReducerMapBuilder<DuelState>) => {
...
@@ -40,6 +40,7 @@ export const extraDeckCase = (builder: ActionReducerMapBuilder<DuelState>) => {
location
:
ygopro
.
CardZone
.
EXTRA
,
location
:
ygopro
.
CardZone
.
EXTRA
,
},
},
idleInteractivities
:
[],
idleInteractivities
:
[],
counters
:
{},
};
};
});
});
state
.
meExtraDeck
=
{
inner
:
cards
};
state
.
meExtraDeck
=
{
inner
:
cards
};
...
@@ -64,6 +65,7 @@ export const extraDeckCase = (builder: ActionReducerMapBuilder<DuelState>) => {
...
@@ -64,6 +65,7 @@ export const extraDeckCase = (builder: ActionReducerMapBuilder<DuelState>) => {
sequence
,
sequence
,
},
},
idleInteractivities
:
[],
idleInteractivities
:
[],
counters
:
{},
};
};
const
extraDeck
=
judgeSelf
(
controler
,
state
)
const
extraDeck
=
judgeSelf
(
controler
,
state
)
?
state
.
meExtraDeck
?
state
.
meExtraDeck
...
...
src/reducers/duel/generic.ts
View file @
3fdb3d4e
...
@@ -34,6 +34,7 @@ export interface CardState {
...
@@ -34,6 +34,7 @@ export interface CardState {
sequence
:
number
;
sequence
:
number
;
}
>
;
// 选择位置状态下的互动信息
}
>
;
// 选择位置状态下的互动信息
overlay_materials
?:
CardMeta
[];
// 超量素材
overlay_materials
?:
CardMeta
[];
// 超量素材
counters
:
{
[
type
:
number
]:
number
};
// 指示器
reload
?:
boolean
;
// 这个字段会在收到MSG_RELOAD_FIELD的时候设置成true,在收到MSG_UPDATE_DATE的时候设置成false
reload
?:
boolean
;
// 这个字段会在收到MSG_RELOAD_FIELD的时候设置成true,在收到MSG_UPDATE_DATE的时候设置成false
}
}
...
@@ -351,6 +352,7 @@ export function reloadFieldMeta<T extends DuelFieldState>(
...
@@ -351,6 +352,7 @@ export function reloadFieldMeta<T extends DuelFieldState>(
position
:
action
.
position
,
position
:
action
.
position
,
},
},
idleInteractivities
:
[],
idleInteractivities
:
[],
counters
:
{},
reload
:
true
,
reload
:
true
,
};
};
});
});
...
...
src/reducers/duel/handsSlice.ts
View file @
3fdb3d4e
...
@@ -93,6 +93,7 @@ export const handsCase = (builder: ActionReducerMapBuilder<DuelState>) => {
...
@@ -93,6 +93,7 @@ export const handsCase = (builder: ActionReducerMapBuilder<DuelState>) => {
controler
:
player
,
controler
:
player
,
location
:
ygopro
.
CardZone
.
HAND
,
location
:
ygopro
.
CardZone
.
HAND
,
},
},
counters
:
{},
idleInteractivities
:
[],
idleInteractivities
:
[],
};
};
});
});
...
@@ -130,6 +131,7 @@ export const handsCase = (builder: ActionReducerMapBuilder<DuelState>) => {
...
@@ -130,6 +131,7 @@ export const handsCase = (builder: ActionReducerMapBuilder<DuelState>) => {
occupant
:
{
id
:
code
,
data
:
{},
text
:
{}
},
occupant
:
{
id
:
code
,
data
:
{},
text
:
{}
},
location
:
{
controler
},
location
:
{
controler
},
idleInteractivities
:
[],
idleInteractivities
:
[],
counters
:
{},
});
});
});
});
builder
.
addCase
(
insertHandMeta
.
fulfilled
,
(
state
,
action
)
=>
{
builder
.
addCase
(
insertHandMeta
.
fulfilled
,
(
state
,
action
)
=>
{
...
@@ -154,6 +156,7 @@ export const handsCase = (builder: ActionReducerMapBuilder<DuelState>) => {
...
@@ -154,6 +156,7 @@ export const handsCase = (builder: ActionReducerMapBuilder<DuelState>) => {
location
:
ygopro
.
CardZone
.
HAND
,
location
:
ygopro
.
CardZone
.
HAND
,
},
},
idleInteractivities
:
[],
idleInteractivities
:
[],
counters
:
{},
};
};
});
});
...
...
src/reducers/duel/magicSlice.ts
View file @
3fdb3d4e
...
@@ -37,6 +37,7 @@ export const initMagicsImpl: CaseReducer<DuelState, PayloadAction<number>> = (
...
@@ -37,6 +37,7 @@ export const initMagicsImpl: CaseReducer<DuelState, PayloadAction<number>> = (
sequence
:
0
,
sequence
:
0
,
},
},
idleInteractivities
:
[],
idleInteractivities
:
[],
counters
:
{},
},
},
{
{
location
:
{
location
:
{
...
@@ -45,6 +46,7 @@ export const initMagicsImpl: CaseReducer<DuelState, PayloadAction<number>> = (
...
@@ -45,6 +46,7 @@ export const initMagicsImpl: CaseReducer<DuelState, PayloadAction<number>> = (
sequence
:
1
,
sequence
:
1
,
},
},
idleInteractivities
:
[],
idleInteractivities
:
[],
counters
:
{},
},
},
{
{
location
:
{
location
:
{
...
@@ -53,6 +55,7 @@ export const initMagicsImpl: CaseReducer<DuelState, PayloadAction<number>> = (
...
@@ -53,6 +55,7 @@ export const initMagicsImpl: CaseReducer<DuelState, PayloadAction<number>> = (
sequence
:
2
,
sequence
:
2
,
},
},
idleInteractivities
:
[],
idleInteractivities
:
[],
counters
:
{},
},
},
{
{
location
:
{
location
:
{
...
@@ -61,6 +64,7 @@ export const initMagicsImpl: CaseReducer<DuelState, PayloadAction<number>> = (
...
@@ -61,6 +64,7 @@ export const initMagicsImpl: CaseReducer<DuelState, PayloadAction<number>> = (
sequence
:
3
,
sequence
:
3
,
},
},
idleInteractivities
:
[],
idleInteractivities
:
[],
counters
:
{},
},
},
{
{
location
:
{
location
:
{
...
@@ -69,6 +73,7 @@ export const initMagicsImpl: CaseReducer<DuelState, PayloadAction<number>> = (
...
@@ -69,6 +73,7 @@ export const initMagicsImpl: CaseReducer<DuelState, PayloadAction<number>> = (
sequence
:
4
,
sequence
:
4
,
},
},
idleInteractivities
:
[],
idleInteractivities
:
[],
counters
:
{},
},
},
{
{
// 场地区
// 场地区
...
@@ -78,6 +83,7 @@ export const initMagicsImpl: CaseReducer<DuelState, PayloadAction<number>> = (
...
@@ -78,6 +83,7 @@ export const initMagicsImpl: CaseReducer<DuelState, PayloadAction<number>> = (
sequence
:
5
,
sequence
:
5
,
},
},
idleInteractivities
:
[],
idleInteractivities
:
[],
counters
:
{},
},
},
],
],
};
};
...
...
src/reducers/duel/monstersSlice.ts
View file @
3fdb3d4e
...
@@ -40,6 +40,7 @@ export const initMonstersImpl: CaseReducer<DuelState, PayloadAction<number>> = (
...
@@ -40,6 +40,7 @@ export const initMonstersImpl: CaseReducer<DuelState, PayloadAction<number>> = (
sequence
:
0
,
sequence
:
0
,
},
},
idleInteractivities
:
[],
idleInteractivities
:
[],
counters
:
{},
},
},
{
{
location
:
{
location
:
{
...
@@ -48,6 +49,7 @@ export const initMonstersImpl: CaseReducer<DuelState, PayloadAction<number>> = (
...
@@ -48,6 +49,7 @@ export const initMonstersImpl: CaseReducer<DuelState, PayloadAction<number>> = (
sequence
:
1
,
sequence
:
1
,
},
},
idleInteractivities
:
[],
idleInteractivities
:
[],
counters
:
{},
},
},
{
{
location
:
{
location
:
{
...
@@ -56,6 +58,7 @@ export const initMonstersImpl: CaseReducer<DuelState, PayloadAction<number>> = (
...
@@ -56,6 +58,7 @@ export const initMonstersImpl: CaseReducer<DuelState, PayloadAction<number>> = (
sequence
:
2
,
sequence
:
2
,
},
},
idleInteractivities
:
[],
idleInteractivities
:
[],
counters
:
{},
},
},
{
{
location
:
{
location
:
{
...
@@ -64,6 +67,7 @@ export const initMonstersImpl: CaseReducer<DuelState, PayloadAction<number>> = (
...
@@ -64,6 +67,7 @@ export const initMonstersImpl: CaseReducer<DuelState, PayloadAction<number>> = (
sequence
:
3
,
sequence
:
3
,
},
},
idleInteractivities
:
[],
idleInteractivities
:
[],
counters
:
{},
},
},
{
{
location
:
{
location
:
{
...
@@ -72,6 +76,7 @@ export const initMonstersImpl: CaseReducer<DuelState, PayloadAction<number>> = (
...
@@ -72,6 +76,7 @@ export const initMonstersImpl: CaseReducer<DuelState, PayloadAction<number>> = (
sequence
:
4
,
sequence
:
4
,
},
},
idleInteractivities
:
[],
idleInteractivities
:
[],
counters
:
{},
},
},
{
{
location
:
{
location
:
{
...
@@ -80,6 +85,7 @@ export const initMonstersImpl: CaseReducer<DuelState, PayloadAction<number>> = (
...
@@ -80,6 +85,7 @@ export const initMonstersImpl: CaseReducer<DuelState, PayloadAction<number>> = (
sequence
:
5
,
sequence
:
5
,
},
},
idleInteractivities
:
[],
idleInteractivities
:
[],
counters
:
{},
},
},
{
{
location
:
{
location
:
{
...
@@ -88,6 +94,7 @@ export const initMonstersImpl: CaseReducer<DuelState, PayloadAction<number>> = (
...
@@ -88,6 +94,7 @@ export const initMonstersImpl: CaseReducer<DuelState, PayloadAction<number>> = (
sequence
:
6
,
sequence
:
6
,
},
},
idleInteractivities
:
[],
idleInteractivities
:
[],
counters
:
{},
},
},
],
],
};
};
...
...
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