bugfix, ai优化

This commit is contained in:
PZ157 2023-11-15 19:20:12 +08:00
parent c1221c0320
commit 270499d660
2 changed files with 14 additions and 5 deletions

View File

@ -5529,7 +5529,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
ai:{
effect:{
target:function(card,player,target,current,isLink){
if(isLink||!player.isPhaseUsing()) return;
if(isLink||typeof card!=='object'||!player.isPhaseUsing()) return;
var num;
var evt=_status.event.getParent('useCard'),evt2=_status.event.getParent('phaseUse');
if(evt.card==card){
@ -5541,8 +5541,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return evt.getParent('phaseUse')==evt2;
}).length;
if(num<0||num>1) return;
if(num==0&&get.tag(card,'damage')) return 'zerotarget';
if(num==1&&get.color(card)=='black') return 'zeroplayertarget';
if(num===0&&get.tag(card,'damage')){
if(target.hasSkillTag('filterDamage',null,{
player:player,
card:card
})||!player.hasSkillTag('damageBonus',true,{
target:target,
card:card
})) return 'zerotarget';
return [0.5,0,0.5,0];
}
if(num===1&&get.color(card)=='black') return 'zeroplayertarget';
},
},
},

View File

@ -13712,11 +13712,11 @@ game.import('character',function(lib,game,ui,get,ai,_status){
effect:{
target:function(card,player,target){
if(typeof card=='object'&&target.storage.gx_chongyingshenfu_effect&&target.getStorage('gx_chongyingshenfu_effect').includes(card.name)&&!target.hasSkillTag('unequip2')&&
get.itemtype(player)!=='player'||!player.hasSkillTag('jueqing',false,target)&&!player.hasSkillTag('unequip',false,{
(get.itemtype(player)!=='player'||!player.hasSkillTag('jueqing',false,target)&&!player.hasSkillTag('unequip',false,{
name:card.name,
target:target,
card:card,
})){
}))){
if(player&&player.hasSkillTag('damageBonus',true,{
target:target,
card:card