Commit 3fdb3d4e authored by Chunchi Che's avatar Chunchi Che

add counters in CardState

parent f586fbb6
Pipeline #20925 passed with stages
in 16 minutes and 37 seconds
......@@ -51,6 +51,7 @@ export const cemeteryCase = (builder: ActionReducerMapBuilder<DuelState>) => {
sequence,
},
idleInteractivities: [],
counters: {},
};
if (judgeSelf(controler, state)) {
extendState(state.meCemetery, newCemetery);
......
......@@ -24,6 +24,7 @@ export const initDeckImpl: CaseReducer<
location: ygopro.CardZone.DECK,
},
idleInteractivities: [],
counters: {},
});
}
......
......@@ -53,6 +53,7 @@ export const exclusionCase = (builder: ActionReducerMapBuilder<DuelState>) => {
sequence,
},
idleInteractivities: [],
counters: {},
};
if (judgeSelf(controler, state)) {
extendState(state.meExclusion, newExclusion);
......
......@@ -40,6 +40,7 @@ export const extraDeckCase = (builder: ActionReducerMapBuilder<DuelState>) => {
location: ygopro.CardZone.EXTRA,
},
idleInteractivities: [],
counters: {},
};
});
state.meExtraDeck = { inner: cards };
......@@ -64,6 +65,7 @@ export const extraDeckCase = (builder: ActionReducerMapBuilder<DuelState>) => {
sequence,
},
idleInteractivities: [],
counters: {},
};
const extraDeck = judgeSelf(controler, state)
? state.meExtraDeck
......
......@@ -34,6 +34,7 @@ export interface CardState {
sequence: number;
}>; // 选择位置状态下的互动信息
overlay_materials?: CardMeta[]; // 超量素材
counters: { [type: number]: number }; // 指示器
reload?: boolean; // 这个字段会在收到MSG_RELOAD_FIELD的时候设置成true,在收到MSG_UPDATE_DATE的时候设置成false
}
......@@ -351,6 +352,7 @@ export function reloadFieldMeta<T extends DuelFieldState>(
position: action.position,
},
idleInteractivities: [],
counters: {},
reload: true,
};
});
......
......@@ -93,6 +93,7 @@ export const handsCase = (builder: ActionReducerMapBuilder<DuelState>) => {
controler: player,
location: ygopro.CardZone.HAND,
},
counters: {},
idleInteractivities: [],
};
});
......@@ -130,6 +131,7 @@ export const handsCase = (builder: ActionReducerMapBuilder<DuelState>) => {
occupant: { id: code, data: {}, text: {} },
location: { controler },
idleInteractivities: [],
counters: {},
});
});
builder.addCase(insertHandMeta.fulfilled, (state, action) => {
......@@ -154,6 +156,7 @@ export const handsCase = (builder: ActionReducerMapBuilder<DuelState>) => {
location: ygopro.CardZone.HAND,
},
idleInteractivities: [],
counters: {},
};
});
......
......@@ -37,6 +37,7 @@ export const initMagicsImpl: CaseReducer<DuelState, PayloadAction<number>> = (
sequence: 0,
},
idleInteractivities: [],
counters: {},
},
{
location: {
......@@ -45,6 +46,7 @@ export const initMagicsImpl: CaseReducer<DuelState, PayloadAction<number>> = (
sequence: 1,
},
idleInteractivities: [],
counters: {},
},
{
location: {
......@@ -53,6 +55,7 @@ export const initMagicsImpl: CaseReducer<DuelState, PayloadAction<number>> = (
sequence: 2,
},
idleInteractivities: [],
counters: {},
},
{
location: {
......@@ -61,6 +64,7 @@ export const initMagicsImpl: CaseReducer<DuelState, PayloadAction<number>> = (
sequence: 3,
},
idleInteractivities: [],
counters: {},
},
{
location: {
......@@ -69,6 +73,7 @@ export const initMagicsImpl: CaseReducer<DuelState, PayloadAction<number>> = (
sequence: 4,
},
idleInteractivities: [],
counters: {},
},
{
// 场地区
......@@ -78,6 +83,7 @@ export const initMagicsImpl: CaseReducer<DuelState, PayloadAction<number>> = (
sequence: 5,
},
idleInteractivities: [],
counters: {},
},
],
};
......
......@@ -40,6 +40,7 @@ export const initMonstersImpl: CaseReducer<DuelState, PayloadAction<number>> = (
sequence: 0,
},
idleInteractivities: [],
counters: {},
},
{
location: {
......@@ -48,6 +49,7 @@ export const initMonstersImpl: CaseReducer<DuelState, PayloadAction<number>> = (
sequence: 1,
},
idleInteractivities: [],
counters: {},
},
{
location: {
......@@ -56,6 +58,7 @@ export const initMonstersImpl: CaseReducer<DuelState, PayloadAction<number>> = (
sequence: 2,
},
idleInteractivities: [],
counters: {},
},
{
location: {
......@@ -64,6 +67,7 @@ export const initMonstersImpl: CaseReducer<DuelState, PayloadAction<number>> = (
sequence: 3,
},
idleInteractivities: [],
counters: {},
},
{
location: {
......@@ -72,6 +76,7 @@ export const initMonstersImpl: CaseReducer<DuelState, PayloadAction<number>> = (
sequence: 4,
},
idleInteractivities: [],
counters: {},
},
{
location: {
......@@ -80,6 +85,7 @@ export const initMonstersImpl: CaseReducer<DuelState, PayloadAction<number>> = (
sequence: 5,
},
idleInteractivities: [],
counters: {},
},
{
location: {
......@@ -88,6 +94,7 @@ export const initMonstersImpl: CaseReducer<DuelState, PayloadAction<number>> = (
sequence: 6,
},
idleInteractivities: [],
counters: {},
},
],
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment