添加【赠刀】【勤国】ai

This commit is contained in:
PZ157 2023-09-20 22:25:41 +08:00 committed by GitHub
parent 78f6a550c4
commit 76ed4c34c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 42 additions and 0 deletions

View File

@ -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:{ xinfu_jijun:{
ai:{ 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.addToExpansion(cards,player,'give').gaintag.add('xinfu_zengdao2');
target.addSkill('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:{ xinfu_zengdao2:{
trigger:{source:'damageBegin1'}, trigger:{source:'damageBegin1'},