Commit 3e13bed8 authored by timel's avatar timel

fix: fmt

parent e597a650
import { fetchCard, ygopro } from "@/api";
import { cardStore, CardType } from "@/stores";
import { callCardMove } from "@/ui/Duel/PlayMat/Card";
import { REASON_MATERIAL, TYPE_TOKEN } from "../../common";
import { callCardMove } from "@/ui/Duel/PlayMat/Card";
type MsgMove = ygopro.StocGameMessage.MsgMove;
const { HAND, GRAVE, REMOVED, DECK, EXTRA, MZONE, TZONE } = ygopro.CardZone;
......
import { ygopro } from "@/api";
import MsgPosChange = ygopro.StocGameMessage.MsgPosChange;
import { cardStore, fetchEsHintMeta } from "@/stores";
import { callCardMove } from "@/ui/Duel/PlayMat/Card";
export default async (posChange: MsgPosChange) => {
......
import { ygopro } from "@/api";
import { eventbus, Task } from "@/infra";
import { cardStore } from "@/stores";
import { callCardMove } from "@/ui/Duel/PlayMat/Card";
import MsgSwapGraveDeck = ygopro.StocGameMessage.MsgSwapGraveDeck;
......
import { fetchCard, ygopro } from "@/api";
import { callCardMove } from "@/ui/Duel/PlayMat/Card";
import { eventbus, Task } from "@/infra";
import { cardStore } from "@/stores";
import { callCardMove } from "@/ui/Duel/PlayMat/Card";
import MsgUpdateData = ygopro.StocGameMessage.MsgUpdateData;
export default async (updateData: MsgUpdateData) => {
......
......@@ -26,16 +26,15 @@ import {
import { interactTypeToString } from "../../utils";
import {
attack,
type AttackOptions,
focus,
move,
type MoveOptions,
type AttackOptions,
} from "./springs";
import type { SpringApiProps } from "./springs/types";
import { preloadCardImage } from "./springs/utils";
const { HAND, GRAVE, REMOVED, DECK, EXTRA, MZONE, SZONE, TZONE } =
ygopro.CardZone;
const { HAND, GRAVE, REMOVED, EXTRA, MZONE, SZONE, TZONE } = ygopro.CardZone;
export const Card: React.FC<{ idx: number }> = React.memo(({ idx }) => {
const card = cardStore.inner[idx];
......
// 暂时先简单实现攻击动画,后面有时间再慢慢优化
import { easings } from "@react-spring/web";
import { ygopro } from "@/api";
import { CardType, isMe } from "@/stores";
import { isMe } from "@/stores";
import { matConfig } from "@/ui/Shared";
import type { SpringApi, AttackFunc } from "./types";
import type { AttackFunc } from "./types";
import { asyncStart } from "./utils";
const { BLOCK_WIDTH, BLOCK_HEIGHT_M, BLOCK_HEIGHT_S, COL_GAP, ROW_GAP } =
......
export * from "./attack";
export * from "./focus";
export * from "./move";
export * from "./utils";
export * from "./types";
export * from "./utils";
import { ygopro } from "@/api";
import type { MoveFunc } from "./types";
import { moveToDeck } from "./moveToDeck";
import { moveToGround } from "./moveToGround";
import { moveToHand } from "./moveToHand";
import { moveToDeck } from "./moveToDeck";
import { moveToOutside } from "./moveToOutside";
import { moveToToken } from "./moveToToken";
import type { MoveFunc } from "./types";
const { HAND, GRAVE, REMOVED, DECK, EXTRA, MZONE, SZONE, TZONE } =
ygopro.CardZone;
......
......@@ -2,8 +2,8 @@ import { ygopro } from "@/api";
import { isMe } from "@/stores";
import { matConfig } from "@/ui/Shared";
import { asyncStart } from "./utils";
import type { MoveFunc } from "./types";
import { asyncStart } from "./utils";
const {
BLOCK_WIDTH,
......
......@@ -4,8 +4,8 @@ import { ygopro } from "@/api";
import { isMe } from "@/stores";
import { matConfig } from "@/ui/Shared";
import { asyncStart } from "./utils";
import type { MoveFunc } from "./types";
import { asyncStart } from "./utils";
const {
BLOCK_WIDTH,
......
......@@ -2,8 +2,8 @@ import { ygopro } from "@/api";
import { cardStore, isMe } from "@/stores";
import { matConfig } from "@/ui/Shared";
import { asyncStart } from "./utils";
import type { MoveFunc } from "./types";
import { asyncStart } from "./utils";
const {
BLOCK_HEIGHT_M,
......
......@@ -2,8 +2,8 @@ import { ygopro } from "@/api";
import { isMe } from "@/stores";
import { matConfig } from "@/ui/Shared";
import { asyncStart } from "./utils";
import type { MoveFunc } from "./types";
import { asyncStart } from "./utils";
const {
BLOCK_WIDTH,
......
import { asyncStart } from "./utils";
import type { MoveFunc } from "./types";
import { asyncStart } from "./utils";
export const moveToToken: MoveFunc = async (props) => {
const { api } = props;
......
import type { SpringRef } from "@react-spring/web";
import type { ygopro } from "@/api";
import type { CardType } from "@/stores";
import type { SpringRef } from "@react-spring/web";
export interface SpringApiProps {
x: number;
......@@ -29,7 +30,9 @@ type OptionsToFunc<Options> = (props: {
options?: Options;
}) => Promise<void>;
export type MoveOptions = { fromZone?: ygopro.CardZone };
export interface MoveOptions {
fromZone?: ygopro.CardZone;
}
export type MoveFunc = OptionsToFunc<MoveOptions>;
export type AttackOptions =
......
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