From b5433f71a9bebec05439ed2546af6e19212801ad Mon Sep 17 00:00:00 2001 From: PZ157 <3619242020@qq.com> Date: Sun, 10 Dec 2023 19:07:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=85=B8=E5=AD=99=E6=9D=83?= =?UTF-8?q?=E3=80=90=E5=88=B6=E8=A1=A1=E3=80=91=E5=92=8C=E3=80=90=E9=85=92?= =?UTF-8?q?=E3=80=91ai?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- card/extra.js | 5 +++-- character/collab.js | 13 ++++++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/card/extra.js b/card/extra.js index d85e983b8..a02ea45bc 100644 --- a/card/extra.js +++ b/card/extra.js @@ -155,10 +155,11 @@ game.import('card',function(lib,game,ui,get,ai,_status){ effs[i].eff=temp; return false; }); - if(effs[i].target&&(target.hasSkillTag('directHit_ai',true,{ + if(!effs[i].target) continue; + if(target.hasSkillTag('directHit_ai',true,{ target:effs[i].target, card:i - },true) || target.needsToDiscard()>Math.max(0,3-target.hp) || !effs[i].target.mayHaveShan(player,'use'))){ + },true) || usable===1&&(target.needsToDiscard()>Math.max(0,3-target.hp) || !effs[i].target.mayHaveShan(player,'use'))){ delete target._jiu_temp; return 1; } diff --git a/character/collab.js b/character/collab.js index cc55af7b4..b5dc6b50d 100644 --- a/character/collab.js +++ b/character/collab.js @@ -372,10 +372,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, ai:{ - order:1, + order:function(item,player){ + if(player.hasCard((i)=>{ + return get.value(i)>Math.max(6,9-player.hp); + },'he')) return 1; + return 10; + }, result:{ player:1 }, + nokeep:true, + skillTagFilter:function(player,tag,arg){ + if(tag==='nokeep') return (!arg||arg&&arg.card&&get.name(arg.card)==='tao')&&player.isPhaseUsing()&&player.countSkill('dczhiheng')<1+player.getStorage('dczhiheng_hit').length&&player.hasCard((card)=>{ + return get.name(card)!=='tao'; + },'h'); + }, threaten:1.55 }, },