Commit 96dd1775 authored by chechunchi's avatar chechunchi

fix redux warning

parent 7ef855ab
......@@ -54,11 +54,11 @@ export const cemeteryCase = (builder: ActionReducerMapBuilder<DuelState>) => {
const newCemetery = {
occupant: { id: code, data: {}, text: {} },
location: new ygopro.CardLocation({
location: {
controler,
location: ygopro.CardZone.GRAVE,
sequence,
}),
},
idleInteractivities: [],
};
if (judgeSelf(controler, state)) {
......
......@@ -3,7 +3,13 @@ import { ygopro } from "../../api/ocgcore/idl/ocgcore";
export interface CardState {
occupant?: CardMeta; // 占据此位置的卡牌元信息
location: ygopro.CardLocation; // 位置信息
location: {
controler: number;
location?: number;
sequence: number;
position?: ygopro.CardPosition;
overlay_sequence?: number;
}; // 位置信息
idleInteractivities: Interactivity<number>[]; // IDLE状态下的互动信息
placeInteractivities?: Interactivity<{
controler: number;
......
......@@ -47,11 +47,11 @@ export const handsCase = (builder: ActionReducerMapBuilder<DuelState>) => {
const cards = ids.map((id, idx) => {
return {
occupant: { id, data: {}, text: {} },
location: new ygopro.CardLocation({
location: {
controler: player,
location: ygopro.CardZone.HAND,
sequence: idx,
}),
},
idleInteractivities: [],
};
});
......
......@@ -24,43 +24,43 @@ export const initMagicsImpl: CaseReducer<DuelState, PayloadAction<number>> = (
const magics = {
magics: [
{
location: new ygopro.CardLocation({
location: {
controler: player,
location: ygopro.CardZone.SZONE,
sequence: 0,
}),
},
idleInteractivities: [],
},
{
location: new ygopro.CardLocation({
location: {
controler: player,
location: ygopro.CardZone.SZONE,
sequence: 1,
}),
},
idleInteractivities: [],
},
{
location: new ygopro.CardLocation({
location: {
controler: player,
location: ygopro.CardZone.SZONE,
sequence: 2,
}),
},
idleInteractivities: [],
},
{
location: new ygopro.CardLocation({
location: {
controler: player,
location: ygopro.CardZone.SZONE,
sequence: 3,
}),
},
idleInteractivities: [],
},
{
location: new ygopro.CardLocation({
location: {
controler: player,
location: ygopro.CardZone.SZONE,
sequence: 4,
}),
},
idleInteractivities: [],
},
],
......
......@@ -24,43 +24,43 @@ export const initMonstersImpl: CaseReducer<DuelState, PayloadAction<number>> = (
const monsters = {
monsters: [
{
location: new ygopro.CardLocation({
location: {
controler: player,
location: ygopro.CardZone.MZONE,
sequence: 0,
}),
},
idleInteractivities: [],
},
{
location: new ygopro.CardLocation({
location: {
controler: player,
location: ygopro.CardZone.MZONE,
sequence: 1,
}),
},
idleInteractivities: [],
},
{
location: new ygopro.CardLocation({
location: {
controler: player,
location: ygopro.CardZone.MZONE,
sequence: 2,
}),
},
idleInteractivities: [],
},
{
location: new ygopro.CardLocation({
location: {
controler: player,
location: ygopro.CardZone.MZONE,
sequence: 3,
}),
},
idleInteractivities: [],
},
{
location: new ygopro.CardLocation({
location: {
controler: player,
location: ygopro.CardZone.MZONE,
sequence: 4,
}),
},
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