diff --git a/src/rooms/commands/DiscardCommand.ts b/src/rooms/commands/DiscardCommand.ts index afd3ad6..a02e25c 100644 --- a/src/rooms/commands/DiscardCommand.ts +++ b/src/rooms/commands/DiscardCommand.ts @@ -48,6 +48,7 @@ export class DiscardCommand extends Command 1) { this.room.send(client,'discard_card_s2c', {errcode: 6, errmsg: '不符合吃牌规则'}); @@ -57,7 +58,7 @@ export class DiscardCommand extends Command o.id) let self = this; - this.room.send(client,'eat_card_s2c', {player: player.id, errcode: 0, errmsg: '', cards: cards}); + let cardMsg: any = {player: player.id, errcode: 0, errmsg: ''} + if (targetCard) { + cardMsg.target = targetCard.owner + } + this.room.broadcast('eat_card_s2c', cardMsg, {except: client}); + cardMsg.cards = cards; + this.room.send(client,'eat_card_s2c', cardMsg); let delay = this.room.battleMan.onCardLinkOver(player, cardArr); player.statData.inc(StateTypeEnum.EATCOUNT, 1); await this.delay(delay);