diff --git a/character/sp2.js b/character/sp2.js index 00b31c790..7ea467c33 100644 --- a/character/sp2.js +++ b/character/sp2.js @@ -3045,14 +3045,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ effect:{ target:function(card,player,target,current){ if(get.tag(card,'damage')){ - if(player.hp==target.hp) return; + if(player.hp==target.hp||lib.linked.contains(get.nature(card))) return; var cards=[card]; if(card.cards&&card.cards.length) cards.addArray(card.cards); if(ui.selected.cards.length) cards.addArray(ui.selected.cards); if(player.countCards('h',function(card){ return !cards.contains(card); })==target.countCards('h')) return; - return 'zerotarget'; + return 'zeroplayertarget'; } }, }, @@ -4707,6 +4707,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){ if(num==0) player.awakenSkill('recuorui'); player.gainPlayerCard(target,true,'h'); }, + ai:{ + order:10, + result:{ + player:1, + target:function(player,target){ + if(target.hasSkillTag('noh')) return 0; + return -1; + } + } + } }, reliewei:{ audio:'liewei', @@ -8948,10 +8958,27 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, ai:{ - order:1, - result:{ - target:0, + order:function(){ + var player=_status.event.player,num=0; + for(var i=1;i<6;i++){ + num+=player.countEquipableSlot(i); + } + if(num<=2) return 6; + if(player.hp<=2||!game.hasPlayer((current)=>{ + if(player==current||get.attitude(player,current)<0||current.hp<=1) return false; + return current.hp>2||current.countCards('hs')>2; + })) return 1; + return 0; }, + result:{ + target:function(player,target){ + var num=0; + for(var i=1;i<6;i++){ + num+=target.countEquipableSlot(i); + } + return num; + } + } }, mark:true, intro:{ diff --git a/character/tw.js b/character/tw.js index a9a76e1f9..539881b53 100644 --- a/character/tw.js +++ b/character/tw.js @@ -2558,7 +2558,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var target=list[0],count=list[1]||1; event.target=target; event.count=count; 'step 1' - if(player.countMark('twqiangling')>=2){ + if(player.countMark('twlinglu_order')>=2){ game.log(player,'成功完成了',target,'发布的','#g【令戮】','强令'); player.popup('强令成功','wood'); player.draw(2); @@ -2569,7 +2569,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.popup('强令失败','fire'); } 'step 2' - if(player.countMark('twqiangling')>=2){ + if(player.countMark('twlinglu_order')>=2){ game.delayx(); } else{ diff --git a/character/xinghuoliaoyuan.js b/character/xinghuoliaoyuan.js index 63ce1e896..514055af9 100755 --- a/character/xinghuoliaoyuan.js +++ b/character/xinghuoliaoyuan.js @@ -523,6 +523,23 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, }, + ai:{ + effect:{ + target:function(card,player,target,current){ + if(get.type(card)=='equip'&&!get.cardtag(card,'gifts')&&game.hasPlayer(function(current){ + return target.canUse('sha',current); + })) return [1,1.5]; + } + }, + noe:true, + reverseEquip:true, + skillTagFilter:function(player,tag,arg){ + if(tag=='noe') return player.countCards('e')==player.hp+1; + return game.hasPlayer(function(current){ + return player.canUse('sha',current); + }); + } + } }, xinfu_jijun:{ ai:{ @@ -810,6 +827,31 @@ game.import('character',function(lib,game,ui,get,ai,_status){ target.addToExpansion(cards,player,'give').gaintag.add('xinfu_zengdao2'); target.addSkill('xinfu_zengdao2'); }, + ai:{ + order:function(){ + var player=_status.event.player,num=0; + if(player.hasCard((card)=>get.value(card,player)<0,'e')) return 9; + for(var i=1;i<6;i++){ + num+=player.countEquipableSlot(i); + } + if(num<=2) return 9; + var targets=player.getStorage('xinfu_weilu_recover'),num=0; + if(player.hp<=2||!game.hasPlayer((current)=>{ + if(player==current||get.attitude(player,current)<0||current.hp<=1) return false; + for(var arr of targets){ + if(current==arr[0]) break; + } + return current.hp>2||current.countCards('hs')>2; + })) return 1; + return 0; + }, + result:{ + target:function(player,target){ + if(target.hasValueTarget({name:'sha',isCard:true})) return ui.selected.cards.length; + return 0; + } + } + } }, xinfu_zengdao2:{ trigger:{source:'damageBegin1'}, diff --git a/character/yijiang.js b/character/yijiang.js index 33c10f6da..486dd53e9 100755 --- a/character/yijiang.js +++ b/character/yijiang.js @@ -11532,6 +11532,14 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, miji:{ audio:2, + mod:{ + aiOrder:function(player,card,num){ + if(num>0&&_status.event&&_status.event.type==='phase'&&get.tag(card,'recover')){ + if(player.needsToDiscard()) return num/3; + return 0; + } + } + }, trigger:{player:'phaseJieshuBegin'}, filter:function(event,player){ return player.hp=player.maxHp-1) return [0,0]; + if(target.hp<=2&&get.tag(card,'damage')){ + var num=1; + if(get.itemtype(player)=='player'&&player.hasSkillTag('damageBonus',false,{ + target:target, + card:card + })&&!target.hasSkillTag('filterDamage',null,{ + player:player, + card:card + })) num=2; + if(target.hp>num) return [1,1]; + } } } }