Commit 6fcb34c8 authored by Chunchi Che's avatar Chunchi Che

update store

parent abd98302
Pipeline #26997 passed with stages
in 10 minutes and 33 seconds
......@@ -36,6 +36,10 @@ export default (field: MsgReloadField) => {
meta: { id: 0, data: {}, text: {} },
isToken: false,
targeted: false,
selectInfo: {
selectable: false,
selected: false,
},
}),
),
)
......
......@@ -76,6 +76,10 @@ export default async (start: ygopro.StocGameMessage.MsgStart) => {
},
isToken: !((i + 1) % 3),
targeted: false,
selectInfo: {
selectable: false,
selected: false,
},
}),
),
),
......
......@@ -17,6 +17,11 @@ export interface CardType {
counters: { [type: number]: number }; // 指示器
isToken: boolean; // 是否是token
targeted: boolean; // 当前卡是否被选择成为效果的对象
selectInfo: {
selectable: boolean; // 是否可以被选择
selected: boolean; // 是否已经被选择
response?: number; // 被选择时发送给服务器的值
};
}
class CardStore implements NeosStore {
......
......@@ -87,6 +87,8 @@ const initialState: Omit<MatState, "reset"> = {
processing: false,
finishable: false,
cancelable: false,
selectableList: [],
selectedList: [],
},
chainSetting: ChainSetting.CHAIN_SMART,
duelEnd: false,
......@@ -133,6 +135,8 @@ class MatStore implements MatState, NeosStore {
processing: false,
finishable: false,
cancelable: false,
selectableList: [],
selectedList: [],
};
this.duelEnd = false;
}
......
......@@ -35,9 +35,11 @@ export interface MatState {
tossResult?: string; // 骰子/硬币结果
selectUnselectInfo: {
processing: boolean;
finishable: boolean;
cancelable: boolean;
processing: boolean; // 是否在进行SelectUnselect流程
finishable: boolean; // 是否可以完成选择
cancelable: boolean; // 是否可以取消当前选择
selectableList: ygopro.CardLocation[]; // 记录当前可以选择的卡列表
selectedList: ygopro.CardLocation[]; // 记录当前已经选择的卡列表
};
handResults: BothSide<HandResult> & {
......
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