From cd2b07a48dfe5583adea7d56d83b78fcccb5b6c9 Mon Sep 17 00:00:00 2001 From: Spmario233 Date: Fri, 16 Feb 2024 00:08:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=BB=95=E8=8A=B3=E5=85=B0?= =?UTF-8?q?=E8=90=BD=E5=AE=A0filterButton=E4=B8=8D=E7=94=9F=E6=95=88?= =?UTF-8?q?=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/xianding.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/character/xianding.js b/character/xianding.js index 94b2c7d96..8a7b023bc 100644 --- a/character/xianding.js +++ b/character/xianding.js @@ -5313,11 +5313,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }).set('lose_list',lose_list).forResult(); if (result.bool) { const target = result.targets[0]; - const cards = await player.choosePlayerCard(target, true, 'hej', [1,num], `选择弃置${get.translation(target)}区域内的牌`, (button) => { - const card = button.link, target = _status.event.target; + const cards = await player.choosePlayerCard(target, true, 'hej', [1,num], `选择弃置${get.translation(target)}区域内的牌`).set('filterButton',(button) => { + const card = button.link, target = _status.event.target, player = get.player(); const discarded = _status.event.lose_list.find(item => item[0] == target); if (discarded && discarded[1].includes(card)) return false; - return lib.filter.canBeDiscarded(card,player,target,'dcluochong'); + return lib.filter.canBeDiscarded(card, player, target,'dcluochong'); }).set('lose_list',lose_list).set('ai', button => { if (ui.selected.buttons.length>0) return false; var val = get.buttonValue(button);