From 164628ff735a85ae1bec81e427885c4448811218 Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Fri, 19 Apr 2024 00:34:41 +0800 Subject: [PATCH] =?UTF-8?q?chooseToDiscard=E5=92=8CchooseCard=E7=9A=84auto?= =?UTF-8?q?choose=E6=9C=BA=E5=88=B6=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- noname/library/element/player.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/noname/library/element/player.js b/noname/library/element/player.js index a8a1a244c..421247310 100644 --- a/noname/library/element/player.js +++ b/noname/library/element/player.js @@ -4522,7 +4522,9 @@ export class Player extends HTMLDivElement { next.autochoose = function () { if (!this.forced) return false; 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; var num = cards.length; for (var i = 0; i < cards.length; i++) { if (!lib.filter.cardDiscardable(cards[i], this.player, this)) num--; @@ -4779,6 +4781,9 @@ export class Player extends HTMLDivElement { next.autochoose = function () { if (!this.forced) return false; 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; return get.select(this.selectCard)[0] >= this.player.countCards(this.position); }; next.setContent("chooseCard");