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 }, },