优化【杀】ai
非强命砍非卖血将命中后ai会默认其这些手牌里没有闪; ai使用属性杀优先选择被连环的没闪目标/队友
This commit is contained in:
parent
d546e879cc
commit
0154a3382e
|
@ -159,7 +159,9 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
if(target.hasSkillTag('directHit_ai',true,{
|
if(target.hasSkillTag('directHit_ai',true,{
|
||||||
target:effs[i].target,
|
target:effs[i].target,
|
||||||
card:i
|
card:i
|
||||||
},true) || usable===1&&(target.needsToDiscard()>Math.max(0,3-target.hp) || !effs[i].target.mayHaveShan(player,'use'))){
|
},true) || usable===1&&(target.needsToDiscard()>Math.max(0,3-target.hp) || !effs[i].target.mayHaveShan(player,'use',effs[i].target.getCards(i=>{
|
||||||
|
return i.hasGaintag('sha_notshan');
|
||||||
|
})))){
|
||||||
delete target._jiu_temp;
|
delete target._jiu_temp;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
|
@ -184,6 +184,8 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
}
|
}
|
||||||
"step 3"
|
"step 3"
|
||||||
if((!result||!result.bool||!result.result||result.result!='shaned')&&!event.unhurt){
|
if((!result||!result.bool||!result.result||result.result!='shaned')&&!event.unhurt){
|
||||||
|
if (!event.directHit&&!event.directHit2&&lib.filter.cardEnabled(new lib.element.VCard('shan'), target, 'forceEnable')&&
|
||||||
|
target.hasCard(()=>true,'hs')&&get.damageEffect(target,player,target)<0) target.addGaintag(target.getCards('hs'),'sha_notshan');
|
||||||
target.damage(get.nature(event.card));
|
target.damage(get.nature(event.card));
|
||||||
event.result={bool:true}
|
event.result={bool:true}
|
||||||
event.trigger('shaDamage');
|
event.trigger('shaDamage');
|
||||||
|
@ -278,29 +280,41 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
},
|
},
|
||||||
result:{
|
result:{
|
||||||
target:function(player,target,card,isLink){
|
target:function(player,target,card,isLink){
|
||||||
var eff=function(){
|
let eff=-1.5,odds=1.35,num=1;
|
||||||
if(!isLink&&player.hasSkill('jiu')){
|
if(isLink){
|
||||||
if(!target.hasSkillTag('filterDamage',null,{
|
let cache=_status.event.getTempCache('sha_result','eff');
|
||||||
player:player,
|
if(typeof cache!=='object'||cache.card!==get.translation(card)) return eff;
|
||||||
card:card,
|
if(cache.odds<1.35&&cache.bool) return 1.35*cache.eff;
|
||||||
jiu:true,
|
return cache.odds*cache.eff;
|
||||||
})){
|
}
|
||||||
if(get.attitude(player,target)>0){
|
if(player.hasSkill('jiu')||player.hasSkillTag('damageBonus',true,{
|
||||||
return -7;
|
target:target,
|
||||||
}
|
card:card
|
||||||
else{
|
})){
|
||||||
return -4;
|
if(target.hasSkillTag('filterDamage',null,{
|
||||||
}
|
player:player,
|
||||||
}
|
card:card,
|
||||||
return -0.5;
|
jiu:true,
|
||||||
|
})) eff=-0.5;
|
||||||
|
else{
|
||||||
|
num=2;
|
||||||
|
if(get.attitude(player,target)>0) eff=-7;
|
||||||
|
else eff=-4;
|
||||||
}
|
}
|
||||||
return -1.5;
|
}
|
||||||
}();
|
if(!player.hasSkillTag('directHit_ai',true,{
|
||||||
if(!isLink&&target.mayHaveShan(player,'use')&&!player.hasSkillTag('directHit_ai',true,{
|
|
||||||
target:target,
|
target:target,
|
||||||
card:card,
|
card:card,
|
||||||
},true)) return eff/1.2;
|
},true)) odds-=0.7*target.mayHaveShan(player,'use',target.getCards(i=>{
|
||||||
return eff;
|
return i.hasGaintag('sha_notshan');
|
||||||
|
}),'odds');
|
||||||
|
_status.event.putTempCache('sha_result','eff',{
|
||||||
|
bool:target.hp>num&&get.attitude(player,target)>0,
|
||||||
|
card:get.translation(card),
|
||||||
|
eff:eff,
|
||||||
|
odds:odds
|
||||||
|
});
|
||||||
|
return odds*eff;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
tag:{
|
tag:{
|
||||||
|
@ -3477,6 +3491,7 @@ game.import('card',function(lib,game,ui,get,ai,_status){
|
||||||
shandian_info:'出牌阶段,对自己使用。若判定结果为黑桃2~9,则目标角色受到3点雷电伤害。若判定不为黑桃2~9,将之移动到下家的判定区里。',
|
shandian_info:'出牌阶段,对自己使用。若判定结果为黑桃2~9,则目标角色受到3点雷电伤害。若判定不为黑桃2~9,将之移动到下家的判定区里。',
|
||||||
icesha_skill:'冰冻',
|
icesha_skill:'冰冻',
|
||||||
icesha_skill_info:'防止即将造成的伤害,改为依次弃置其两张牌。',
|
icesha_skill_info:'防止即将造成的伤害,改为依次弃置其两张牌。',
|
||||||
|
sha_notshan:'invisible',
|
||||||
qinggang2:'破防',
|
qinggang2:'破防',
|
||||||
},
|
},
|
||||||
list:[
|
list:[
|
||||||
|
|
Loading…
Reference in New Issue