Commit 96dd1775 authored by chechunchi's avatar chechunchi

fix redux warning

parent 7ef855ab
...@@ -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)) {
......
...@@ -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;
......
...@@ -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: [],
}; };
}); });
......
...@@ -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: [],
}, },
], ],
......
...@@ -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: [],
}, },
], ],
......
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