继续优化神马超ai

This commit is contained in:
157 2023-12-27 10:24:53 +08:00
parent a81c5c5c9f
commit f6a70ee223
4 changed files with 70 additions and 0 deletions

View File

@ -2193,6 +2193,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){
intro:{ intro:{
content:'受到的伤害+1且改为雷属性', content:'受到的伤害+1且改为雷属性',
}, },
ai:{
effect:{
target:(card,player,target)=>{
if(!get.tag(card,'damage')) return;
if(target.hasSkillTag('nodamage')||target.hasSkillTag('nothunder')) return 'zeroplayertarget';
if(target.hasSkillTag('filterDamage',null,{
player:player,
card:lib.element.VCard({
name:card.name,
nature:'thunder'
},[card])
})) return;
return 2;
}
}
}
}, },
init:{ init:{
audio:'shouli', audio:'shouli',
@ -2286,6 +2302,16 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return get.suit(card,current)==suit; return get.suit(card,current)==suit;
}); });
})]; })];
},
target:(card,player,target)=>{
if(card.name==='sha'&&!player.hasSkillTag('directHit_ai',true,{
target:target,
card:card
},true)&&game.hasPlayer(current=>{
return current.hasCard(cardx=>{
return get.subtype(cardx)==='equip3';
},'e');
})) return [0, -0.5];
} }
} }
} }

View File

@ -758,6 +758,22 @@ game.import('character',function(lib,game,ui,get,ai,_status){
intro:{ intro:{
content:'受到的伤害+1且改为雷属性', content:'受到的伤害+1且改为雷属性',
}, },
ai:{
effect:{
target:(card,player,target)=>{
if(!get.tag(card,'damage')) return;
if(target.hasSkillTag('nodamage')||target.hasSkillTag('nothunder')) return 'zeroplayertarget';
if(target.hasSkillTag('filterDamage',null,{
player:player,
card:lib.element.VCard({
name:card.name,
nature:'thunder'
},[card])
})) return;
return 2;
}
}
}
}, },
init:{ init:{
audio:'psshouli', audio:'psshouli',
@ -900,6 +916,32 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ai:{ ai:{
threaten:100, threaten:100,
reverseEquip:true, reverseEquip:true,
ai:{
effect:{
player:(card,player,target)=>{
if(typeof card!=='object') return;
let suit=get.suit(card);
if(!lib.suit.contains(suit)||player.hasCard(function(i){
return get.suit(i,player)==suit;
},'h')) return;
return [1,game.countPlayer(current=>{
return current.countCards('e',card=>{
return get.suit(card,current)==suit;
});
})];
},
target:(card,player,target)=>{
if(card.name==='sha'&&!player.hasSkillTag('directHit_ai',true,{
target:target,
card:card
},true)&&game.hasPlayer(current=>{
return current.hasCard(cardx=>{
return get.subtype(cardx)==='equip3';
},'e');
})) return [0, -0.5];
}
}
}
} }
}, },
//战役篇田丰 //战役篇田丰

View File

@ -4146,6 +4146,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
logTarget:'source', logTarget:'source',
ai:{ ai:{
maixie_defend:true,
threaten:function(player,target){ threaten:function(player,target){
if(target.hp==1) return 0.2; if(target.hp==1) return 0.2;
return 1.5; return 1.5;

View File

@ -8253,6 +8253,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
ai:{ ai:{
expose:0.5, expose:0.5,
maixie_defend:true
}, },
}, },
"yechou2":{ "yechou2":{