Merge pull request #439 from PZ157/PR-Branch

部分武将技能ai优化
This commit is contained in:
Spmario233 2023-10-01 15:45:58 +08:00 committed by GitHub
commit bab056b03e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 3 deletions

View File

@ -4168,7 +4168,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return player.countCards('hes')>1;
},
check:function(card){
return 0;
var player = _status.event.player;
if(game.countPlayer(function (current) {
return current != player && player.canUse('sha', current) && get.effect(current, {name: 'sha'}, player, player) > 0;
}) <= ui.selected.cards.length) return 0;
if(_status.event.player.countCards('hes') >= 3) return 8 - ui.selected.cards.length - get.value(card);
return 6 - ui.selected.cards.length - get.value(card);
},
position:'hes',
viewAs:{
@ -4179,7 +4184,33 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.addTempSkill('rekenshang_effect');
},
ai:{
order:1,
order:function(item,player){
if(player.countCards('hes') >= 3) return 6;
return 4;
},
result:{
target:function(player,target,card,isLink){
var eff = function () {
if(!isLink && player.hasSkill('jiu')) {
if(!target.hasSkillTag('filterDamage', null, {
player: player,
card: card,
jiu: true
})){
if(get.attitude(player, target) > 0) return -7;
return -4;
}
return -0.5;
}
return -1.5;
}();
if(!isLink && target.mayHaveShan() && !player.hasSkillTag('directHit_ai', true, {
target: target,
card: card
}, true)) return eff / 1.2;
return eff;
}
},
respondSha:true,
skillTagFilter:player=>player.countCards('hes')>1,
},

View File

@ -13273,7 +13273,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return event.player!=player&&event.player.hp<=0&&player.countCards('h')>0;
},
check:function(event,player){
if(get.attitude(player,event.player)<0) return false;
if(get.attitude(player,event.player)<=0) return false;
if(player.countCards('h',{name:['tao','jiu']})+event.player.hp<0) return false;
return true;
},