From b8bc7e6b0f14459a3a4d3be9a44a6ab4e7b2dc58 Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Sun, 7 Apr 2024 21:51:15 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BD=E6=88=98=E6=9D=8E=E4=B8=B0bugfix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mode/guozhan.js | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/mode/guozhan.js b/mode/guozhan.js index 4f376fe57..9ae298bf2 100644 --- a/mode/guozhan.js +++ b/mode/guozhan.js @@ -2056,20 +2056,22 @@ game.import('mode',function(lib,game,ui,get,ai,_status){ fakeshuliang:{ audio:'shuliang', trigger:{global:'phaseJieshuBegin'}, - direct:true, filter(event,player){ - if(!event.player.isFriendOf(player)) return false; - return event.player.isIn()&&get.distance(player,event.player)<=player.getExpansions('faketunchu').length; + const num=player.getExpansions('faketunchu').length; + if(!num||!event.player.isFriendOf(player)) return false; + return event.player.isIn()&&get.distance(player,event.player)<=num; }, async cost(event,trigger,player){ const {result:{bool,links}}=await player.chooseButton([get.prompt2('fakeshuliang',trigger.player),player.getExpansions('faketunchu')]).set('ai',button=>{ if(get.attitude(get.event('player'),get.event().getTrigger().player)<=0) return 0; return 1+Math.random(); - }); - event.result={bool:bool,cards:links,targets:[trigger.player]}; + }).set('hiddenSkill','fakeshuliang'); + event.result={bool:bool,cost_data:links}; }, + preHidden:true, + logTarget:'player', content(){ - player.loseToDiscardpile(event.cards); + player.loseToDiscardpile(event.cost_data); trigger.player.draw(2); }, ai:{combo:'faketunchu'},