From b53950506b437530659baba4b14adcf1b2dd17f3 Mon Sep 17 00:00:00 2001 From: copcap Date: Fri, 19 Jan 2024 23:23:55 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E6=A2=A6=E8=AF=B8=E8=91=9B=E4=BA=AE?= =?UTF-8?q?=E5=87=BA=E5=B8=88bug=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/jsrg.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/character/jsrg.js b/character/jsrg.js index bad9c601e..ed31a1534 100644 --- a/character/jsrg.js +++ b/character/jsrg.js @@ -284,12 +284,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){ usable:1, filter(event,player){ const zhu=get.zhu(player); - if(!zhu||!zhu.isZhu2()) return false; + if(!zhu||!zhu.isZhu2()||!zhu.countCards('h')) return false; return !player.isZhu2(); }, async content(event,trigger,player){ player.chooseToDebate(game.filterPlayer(current=>{ - return current==player||current.isZhu2(); + return current==player||current.isZhu2()&¤t.countCards('h'); })).set('callback',async event=>{ const result=event.debateResult; if(result.bool&&result.opinion){ From b70b25e4a9879ace1f3653d5978eae999441a040 Mon Sep 17 00:00:00 2001 From: copcap Date: Fri, 19 Jan 2024 23:30:22 +0800 Subject: [PATCH 2/2] fix2 --- character/jsrg.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/character/jsrg.js b/character/jsrg.js index ed31a1534..a9886f12d 100644 --- a/character/jsrg.js +++ b/character/jsrg.js @@ -285,11 +285,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filter(event,player){ const zhu=get.zhu(player); if(!zhu||!zhu.isZhu2()||!zhu.countCards('h')) return false; - return !player.isZhu2(); + return !player.isZhu2()&&player.countCards('h'); }, async content(event,trigger,player){ player.chooseToDebate(game.filterPlayer(current=>{ - return current==player||current.isZhu2()&¤t.countCards('h'); + return (current==player||current.isZhu2())&¤t.countCards('h'); })).set('callback',async event=>{ const result=event.debateResult; if(result.bool&&result.opinion){