From 3398d84f56a911851b59f69c0b3127f3c4e55ad2 Mon Sep 17 00:00:00 2001 From: mengxinzxz <139629761+mengxinzxz@users.noreply.github.com> Date: Thu, 7 Sep 2023 23:37:52 +0800 Subject: [PATCH] =?UTF-8?q?TW=E5=8D=91=E5=BC=A5=E5=91=BC=E3=80=90=E7=A7=89?= =?UTF-8?q?=E8=AF=8F=E3=80=91bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修复TW卑弥呼【秉诏】可以选择自己的势力的bug --- character/sp2.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/character/sp2.js b/character/sp2.js index 560ef128b..df60d95f2 100644 --- a/character/sp2.js +++ b/character/sp2.js @@ -5499,7 +5499,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, mod:{ targetInRange:function(card,player,target){ - if(!card.cards||!card.cards.length) return; + if(!card.cards) return; for(var i of card.cards){ if(!i.hasGaintag('minsi2')||get.color(i)!='black') return; } @@ -8546,16 +8546,23 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, trigger:{global:['phaseBefore','zhuUpdate']}, filter:function(event,player){ + if(!lib.group.some(function(group){ + if(group==player.group) return false; + return lib.group.contains(group)||game.hasPlayer(function(current){ + return current.group==group; + }); + })) return false; return !player.storage.bingzhao&&player.hasZhuSkill('bingzhao')&&(event.name!='phase'||game.phaseNumber==0); }, content:function(){ 'step 0' var list=lib.group.filter(function(group){ - return ['wei','shu','wu','qun'].contains(group)||game.hasPlayer(function(current){ + if(group==player.group) return false; + return lib.group.contains(group)||game.hasPlayer(function(current){ return current.group==group; - }) + }); }); - player.chooseControl(list).set('prompt','秉诏:请选择一个势力').set('ai',function(){ + player.chooseControl(list).set('prompt','秉诏:请选择一个其他势力').set('ai',function(){ var listx=list.slice(0); listx.sort(function(a,b){ return game.countPlayer(function(current){