修复filterCard传参错误

This commit is contained in:
157 2024-04-19 22:05:51 +08:00
parent 2543faf4e7
commit cd6e6faead
1 changed files with 2 additions and 2 deletions

View File

@ -4524,7 +4524,7 @@ export class Player extends HTMLDivElement {
if (typeof this.selectCard == "function") return false;
if (this.complexCard || this.complexSelect || this.filterOk) return false;
var cards = this.player.getCards(this.position);
if (cards.some(card => !this.filterCard(card, this))) return false;
if (cards.some(card => !this.filterCard(card, this.player))) return false;
var num = cards.length;
for (var i = 0; i < cards.length; i++) {
if (!lib.filter.cardDiscardable(cards[i], this.player, this)) num--;
@ -4783,7 +4783,7 @@ export class Player extends HTMLDivElement {
if (typeof this.selectCard == "function") return false;
if (this.complexCard || this.complexSelect || this.filterOk) return false;
var cards = this.player.getCards(this.position);
if (cards.some(card => !this.filterCard(card, this))) return false;
if (cards.some(card => !this.filterCard(card, this.player))) return false;
return get.select(this.selectCard)[0] >= this.player.countCards(this.position);
};
next.setContent("chooseCard");