修复【良姻】ai
This commit is contained in:
parent
29d6f111c9
commit
b9e0813459
|
@ -414,20 +414,31 @@ game.import('character',function(lib,game,ui,get,ai,_status){
|
||||||
return target!=player&&target.countCards('he')>0;
|
return target!=player&&target.countCards('he')>0;
|
||||||
},
|
},
|
||||||
ai1:function(card){
|
ai1:function(card){
|
||||||
var player=_status.event.player;
|
let player=_status.event.player;
|
||||||
var num=player.getExpansions('olkongsheng').length,hs=player.countCards('h');
|
if(_status.event.me){
|
||||||
if(get.position(card)!='e') hs--;
|
if(get.position(card)===_status.event.me) return 12-player.hp-get.value(card);
|
||||||
if(hs==num&&player.isDamaged()&&get.recoverEffect(player,player,player)>0) return 9-get.value(card);
|
return 0;
|
||||||
|
}
|
||||||
return 5-get.value(card);
|
return 5-get.value(card);
|
||||||
},
|
},
|
||||||
ai2:function(target){
|
ai2:function(target){
|
||||||
var player=_status.event.player;
|
let player=_status.event.player,att=get.attitude(player,target);
|
||||||
var has=target.hasCard(function(card){
|
if(att>0&&(_status.event.me||target.isHealthy())) return -att;
|
||||||
|
if(att>0&&(target.countCards('he')>target.hp||target.hasCard(function(card){
|
||||||
return get.value(card,target)<=0;
|
return get.value(card,target)<=0;
|
||||||
},'e'),att=get.attitude(player,target);
|
},'e'))) return att;
|
||||||
if(!has) att=-att;
|
return -att;
|
||||||
return att*has?2:1;
|
|
||||||
},
|
},
|
||||||
|
me:function(){
|
||||||
|
if(player.isHealthy()||get.recoverEffect(player,player,_status.event.player)<=0) return false;
|
||||||
|
let ph=player.countCards('h'),num=player.getExpansions('olkongsheng').length;
|
||||||
|
if(ph===num){
|
||||||
|
if(player.hasSkillTag('noh')) return 'h';
|
||||||
|
return 'e';
|
||||||
|
}
|
||||||
|
if(ph-1===num) return 'h';
|
||||||
|
return false;
|
||||||
|
}()
|
||||||
});
|
});
|
||||||
'step 1'
|
'step 1'
|
||||||
if(result.bool){
|
if(result.bool){
|
||||||
|
|
Loading…
Reference in New Issue