From 361a8efb5087125f2b767e63023167ff76c49289 Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Tue, 5 Mar 2024 12:26:30 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E8=B0=8B=E8=A2=81=E7=BB=8D=E3=80=90?= =?UTF-8?q?=E6=80=9D=E5=8F=AC=E5=89=91=E3=80=91bugfix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/onlyOL.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/character/onlyOL.js b/character/onlyOL.js index b642d806e..e77e1847f 100644 --- a/character/onlyOL.js +++ b/character/onlyOL.js @@ -218,8 +218,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ let evt=_status.event; if(evt.name!='chooseToUse') evt=evt.getParent('chooseToUse'); if(!evt||!evt.respondTo||!storage.includes(evt.respondTo[1])) return; - const num = get.number(card); - if(num!='unsure' && (typeof num!='number' || num<=get.number(evt.respondTo[1]))) return false; + const num=get.number(card); + if(num!='unsure'&&typeof num=='number'&&num Date: Tue, 5 Mar 2024 12:32:16 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=98=E7=A3=90?= =?UTF-8?q?=E3=80=90=E6=8A=AB=E8=8D=86=E3=80=91=E6=8C=87=E5=AE=9A=E9=A2=9D?= =?UTF-8?q?=E5=A4=96=E7=9B=AE=E6=A0=87=E6=97=A0=E8=B7=9D=E7=A6=BB=E9=99=90?= =?UTF-8?q?=E5=88=B6=E7=9A=84bug=EF=BC=8C=E8=A1=A5=E5=85=85mod.aiOrder?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/sp.js | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/character/sp.js b/character/sp.js index f4c7ab696..810718ba0 100755 --- a/character/sp.js +++ b/character/sp.js @@ -715,7 +715,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ audio:2, trigger:{player:'useCardToPlayered'}, filter(event,player){ - if(!game.hasPlayer(target=>target!=player&&!event.targets.includes(target)&&lib.filter.targetEnabled2(event.card,player,target))) return false; + if(!game.hasPlayer(target=>target!=player&&!event.targets.includes(target)&&lib.filter.targetEnabled2(event.card,player,target)&&lib.filter.targetInRange(event.card,player,target))) return false; return get.color(event.card)=='black'&&(event.card.name=='sha'||get.type(event.card)=='trick')&&event.targets.length==1; }, usable:1, @@ -725,7 +725,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ const num=Math.max(1,player.getDamagedHp()); const {result:{bool,targets}}=await player.chooseTarget(get.prompt('olpijing'),[1,num],(card,player,target)=>{ const trigger=get.event().getTrigger(); - return target!=player&&!trigger.targets.includes(target)&&lib.filter.targetEnabled2(trigger.card,player,target); + return target!=player&&!trigger.targets.includes(target)&&lib.filter.targetEnabled2(trigger.card,player,target)&&lib.filter.targetInRange(trigger.card,player,target); }).set('ai',target=>{ const player=get.event('player'),trigger=get.event().getTrigger(); return get.effect(target,trigger.card,player,player)*(target.getStorage('olpijing_effect').includes(player)?2:1)+get.effect(target,{name:'shunshou_copy2'},player,player); @@ -741,6 +741,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } else player.storage.counttrigger.olpijing--; }, + mod:{ + aiOrder(player,card,num){ + if(!(card.name=='sha'||get.type(card)=='trick')||get.color(card)!='black') return; + const info=get.info(card); + if(info&&!info.notarget&&(info.toself||info.singleCard||!info.selectTarget||info.selectTarget==1)&&game.countPlayer(target=>{ + if(get.effect(target,card,player,player)<=0) return false; + return lib.filter.targetEnabled2(card,player,target)&&lib.filter.targetInRange(card,player,target); + })>1) return num+0.01; + }, + }, subSkill:{ effect:{ charlotte:true, @@ -757,7 +767,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.removeSkill('olpijing_effect'); const {result:{bool,targets}}=await player.chooseTarget('披荆:请选择此牌的额外目标',[1,storage.length],(card,player,target)=>{ const trigger=get.event().getTrigger(); - return !trigger.targets.includes(target)&&get.event('storage').includes(target)&&lib.filter.targetEnabled2(trigger.card,player,target); + return !trigger.targets.includes(target)&&get.event('storage').includes(target)&&lib.filter.targetEnabled2(trigger.card,player,target)&&lib.filter.targetInRange(trigger.card,player,target); }).set('prompt2','不选择的角色视为你选择摸牌项').set('ai',target=>{ const player=get.event('player'),trigger=get.event().getTrigger(); return get.effect(target,trigger.card,player,player)-get.effect(player,{name:'draw'},player,player);