修正出牌时吃牌无法正确处理的bug

This commit is contained in:
zhl 2021-02-20 11:56:30 +08:00
parent b048727ac3
commit 58f5e92e6c

View File

@ -53,7 +53,7 @@ export class DiscardCommand extends Command<CardGameState, { client: Client, car
this.room.send(client,'discard_card_s2c', {errcode: 6, errmsg: '不符合吃牌规则'});
return;
}
if (!this.state.cards.has(target)) {
if (!this.state.cards.has(target + '')) {
this.room.send(client,'discard_card_s2c', {errcode: 5, errmsg: '找不到要吃的牌'});
return;
}