From 1a735bca6da20c8fba2e34b35fcebd3dca49d895 Mon Sep 17 00:00:00 2001 From: zhl Date: Tue, 8 Dec 2020 16:40:20 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E9=99=A4=E4=B8=80=E4=BA=9B=E7=BC=96?= =?UTF-8?q?=E8=AF=91=E6=97=B6=E7=9A=84=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/global.d.ts | 2 +- src/rooms/commands/NextTurnCommand.ts | 2 +- src/rooms/commands/PartResultCommand.ts | 2 +- src/rooms/commands/TurnEndCommand.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/global.d.ts b/src/global.d.ts index f26cbe2..fda3e45 100644 --- a/src/global.d.ts +++ b/src/global.d.ts @@ -169,7 +169,7 @@ declare module "colyseus" { * @param source 0: 正常抽卡, 1: 技能 * @param fromplayer */ - addCard(dstplayer: string, count: number, max_count: number, source: number = 0, fromplayer?: string): boolean; + addCard(dstplayer: string, count: number, max_count: number, source?: number, fromplayer?: string): boolean; /** * 更新玩家血量 diff --git a/src/rooms/commands/NextTurnCommand.ts b/src/rooms/commands/NextTurnCommand.ts index 1ea9bd3..8634964 100644 --- a/src/rooms/commands/NextTurnCommand.ts +++ b/src/rooms/commands/NextTurnCommand.ts @@ -13,7 +13,7 @@ import {GameEnv} from "../../cfg/GameEnv"; */ export class NextTurnCommand extends Command { - async execute() { + async execute(){ this.state.gameState = GameStateConst.STATE_BEGIN_DRAW; const sessionIds = [...this.state.players.keys()]; if (!this.state.currentTurn) { diff --git a/src/rooms/commands/PartResultCommand.ts b/src/rooms/commands/PartResultCommand.ts index 5afc015..c47de9c 100644 --- a/src/rooms/commands/PartResultCommand.ts +++ b/src/rooms/commands/PartResultCommand.ts @@ -91,7 +91,7 @@ const comparePlayer = function (room: Room, p0: Player, p1: Player): CompareResu } export class PartResultCommand extends Command { - execute() { + execute() : Array | void { this.state.gameState = GameStateConst.STATE_ROUND_RESULT; const time = singleton(GameEnv).resultShowTime || 1; diff --git a/src/rooms/commands/TurnEndCommand.ts b/src/rooms/commands/TurnEndCommand.ts index 26638d4..cea183e 100644 --- a/src/rooms/commands/TurnEndCommand.ts +++ b/src/rooms/commands/TurnEndCommand.ts @@ -11,7 +11,7 @@ import {GameResultCommand} from "./GameResultCommand"; */ export class TurnEndCommand extends Command { - execute() { + execute() : Array | void{ // @ts-ignore const sessionIds = [...this.state.players.keys()]; if (this.state.currentTurn) {