Commit 1802f14a authored by timel's avatar timel

style: fmt

parent b85b3cab
import { ygopro } from "@/api/ocgcore/idl/ocgcore";
import { setWaiting } from "@/reducers/duel/mod";
import { store } from "@/store";
import { matStore } from "@/valtioStores";
import onMsgAttack from "./attack";
import onMsgAttackDisable from "./attackDisable";
......@@ -43,8 +44,6 @@ import onMsgUpdateHp from "./updateHp";
import onMsgWait from "./wait";
import onMsgWin from "./win";
import { matStore } from "@/valtioStores";
const ActiveList = [
"select_idle_cmd",
"select_place",
......
......@@ -5,7 +5,6 @@ import {
fetchSelectHintMeta,
} from "@/reducers/duel/hintSlice";
import { AppDispatch } from "@/store";
import { matStore } from "@/valtioStores";
import MsgHint = ygopro.StocGameMessage.MsgHint;
......
import { ygopro } from "@/api/ocgcore/idl/ocgcore";
import { updatePhase } from "@/reducers/duel/mod";
import { AppDispatch } from "@/store";
import { matStore, type PhaseName } from "@/valtioStores";
export default (
......
import { ygopro } from "@/api/ocgcore/idl/ocgcore";
import { updateTurn } from "@/reducers/duel/mod";
import { AppDispatch } from "@/store";
import { matStore } from "@/valtioStores";
export default (
......
......@@ -7,6 +7,8 @@ import {
import { fetchCheckCardMeta } from "@/reducers/duel/modal/mod";
import { AppDispatch } from "@/store";
import MsgSelectCard = ygopro.StocGameMessage.MsgSelectCard;
import { messageStore } from "@/valtioStores";
import { CardZoneToChinese } from "./util";
export default (selectCard: MsgSelectCard, dispatch: AppDispatch) => {
......@@ -21,6 +23,10 @@ export default (selectCard: MsgSelectCard, dispatch: AppDispatch) => {
dispatch(setCheckCardModalMinMax({ min, max }));
dispatch(setCheckCardModalOnSubmit("sendSelectCardResponse"));
messageStore.checkCardModal.selectMin = min;
messageStore.checkCardModal.selectMax = max;
messageStore.checkCardModal.onSubmit = "sendSelectCardResponse";
for (const card of cards) {
const tagName = CardZoneToChinese(card.location.location);
dispatch(
......
......@@ -5,7 +5,6 @@ import {
addMagicPlaceInteractivities,
addMonsterPlaceInteractivities,
} from "@/reducers/duel/mod";
import { InteractType, valtioStore } from "@/valtioStores";
const { matStore } = valtioStore;
......
......@@ -4,7 +4,6 @@ import {
setPositionModalPositions,
} from "@/reducers/duel/mod";
import { AppDispatch } from "@/store";
import { matStore } from "@/valtioStores";
type MsgSelectPosition = ygopro.StocGameMessage.MsgSelectPosition;
......
export * from "./chatStore";
export * from "./joinStore";
export * from "./moraStore";
export * from "./playerStore";
export * from "./matStore";
export * from "./messageStore";
export * from "./moraStore";
export * from "./playerStore";
import { createContext, type ReactNode, useRef } from "react";
import { proxy } from "valtio";
......@@ -11,10 +11,10 @@ import { devtools } from "valtio/utils";
import { chatStore } from "./chatStore";
import { joinStore } from "./joinStore";
import { moraStore } from "./moraStore";
import { playerStore } from "./playerStore";
import { matStore } from "./matStore";
import { messageStore } from "./messageStore";
import { moraStore } from "./moraStore";
import { playerStore } from "./playerStore";
export const valtioStore = proxy({
playerStore,
......
......@@ -2,19 +2,19 @@ export * from "./types";
import { proxy } from "valtio";
import { fetchCard, type CardMeta } from "@/api/cards";
import { type CardMeta, fetchCard } from "@/api/cards";
import { ygopro } from "@/api/ocgcore/idl/ocgcore";
import { DESCRIPTION_LIMIT, fetchStrings, getStrings } from "@/api/strings";
import type {
BothSide,
CardState,
CardsBothSide,
CardState,
DuelFieldState,
InitInfo,
MatState,
} from "./types";
import { InteractType } from "./types";
import { DESCRIPTION_LIMIT, fetchStrings, getStrings } from "@/api/strings";
/**
* 生成一个指定长度的卡片数组
......
import { proxy } from "valtio";
import type { CardMeta } from "@/api/cards";
import { ygopro } from "@/api/ocgcore/idl/ocgcore";
import { proxy } from "valtio";
export const messageStore = proxy<ModalState>({
cardModal: { isOpen: false, interactivies: [], 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