From 717bda8acb093cdb86bb5d70f976e9f0f9c08136 Mon Sep 17 00:00:00 2001 From: copcap Date: Sat, 11 Nov 2023 17:25:26 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A9=AC=E4=BC=B6=E4=BF=90=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/xianding.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/character/xianding.js b/character/xianding.js index 6b8132f8e..8a12c92ab 100644 --- a/character/xianding.js +++ b/character/xianding.js @@ -126,6 +126,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ prompt2:function(event,player){ return `亮出牌堆顶的${get.cnNumber(game.countPlayer(current=>get.distance(player,current)<=1))}张牌,获得其中的红色牌,将其中任意张黑色牌置于等量名座次连续的其他角色的武将牌上。`; }, + frequent:true, check:()=>true, content:function*(event,map){ var player=map.player; @@ -145,7 +146,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ else if(player.isOnline2()){ player.send(func,blackOnes,event.videoId); } - var result=yield player.chooseTarget([1,blackOnes.length],true,(card,player,target)=>{ + var targets=game.filterPlayer(current=>current!=player); + if(targets.length==1) var result={bool:true,targets:targets}; + else var result=yield player.chooseTarget([1,blackOnes.length],true,(card,player,target)=>{ if(player==target) return false; var selected=ui.selected.targets; if(!selected.length) return true; @@ -187,7 +190,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var targets=result.targets.slice().sortBySeat(player); var num=targets.length; if(player==game.me) func(num,event.videoId); - else if(player.isOnline2()) player.send(func,event.videoId); + else if(player.isOnline2()) player.send(func,num,event.videoId); if(blackOnes.length==1) var result={bool:true,links:blackOnes}; else var result=yield player.chooseButton(true,num).set('dialog',event.videoId).set('ai',()=>1); game.broadcastAll('closeDialog',event.videoId);