修复两个【催进】ai

This commit is contained in:
157 2024-01-29 14:35:18 +08:00
parent 88749fd97d
commit cb48e902f4
2 changed files with 27 additions and 40 deletions

View File

@ -4843,26 +4843,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.chooseToDiscard('he',get.prompt('dccuijin',target),'弃置一张牌并令'+get.translation(trigger.player)+'使用的【杀】伤害+1但若其未造成伤害则你摸一张牌并对其造成1点伤害。').set('ai',function(card){
if(_status.event.goon) return 7-get.value(card);
return 0;
}).set('goon',function(){
var d1=true;
if(trigger.player.hasSkill('jueqing')||trigger.player.hasSkill('gangzhi')) d1=false
for(var target of trigger.targets){
if(!target.mayHaveShan(player,'use',target.getCards(i=>{
return i.hasGaintag('sha_notshan');
}))||trigger.player.hasSkillTag('directHit_ai',true,{
target:target,
card:trigger.card,
},true)){
if(!target.hasSkill('gangzhi')) d1=false;
if(!target.hasSkillTag('filterDamage',null,{
player:trigger.player,
card:trigger.card,
})&&get.attitude(player,target)<0) return true;
}
}
if(d1) return get.damageEffect(trigger.player,player,player)>0;
return false;
}()).logSkill=['dccuijin',target];
}).set('goon',lib.skill.cuijin.checkx(trigger,player)).logSkill=['dccuijin',target];
'step 1'
if(result.bool){
if(typeof trigger.baseDamage!='number') trigger.baseDamage=1;

View File

@ -13986,6 +13986,31 @@ game.import('character',function(lib,game,ui,get,ai,_status){
filter:function(event,player){
return event.card.name=='sha'&&(event.player==player||player.inRange(event.player))&&player.countCards('he')>0;
},
checkx(event,player){
let d1=true,e=false;
if(event.player.hasSkill('jueqing')||event.player.hasSkill('gangzhi')) d1=false;
for(let tar of event.targets){
if(!tar.mayHaveShan(player,'use',tar.getCards('h',i=>{
return i.hasGaintag('sha_notshan');
}))||event.player.hasSkillTag('directHit_ai',true,{
target:tar,
card:event.card,
},true)){
if(!tar.hasSkill('gangzhi')) d1=false;
if(!tar.hasSkillTag('filterDamage',null,{
player:event.player,
card:event.card,
})){
let att=get.attitude(_status.event.player,tar);
if(att>0) return false;
if(att<0) e=true;
}
}
}
if(e) return true;
if(d1) return get.damageEffect(event.player,player,_status.event.player)>0;
return false;
},
content:function(){
'step 0'
if(player!=game.me&&!player.isOnline()) game.delayx();
@ -13994,26 +14019,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.chooseToDiscard('he',get.prompt('cuijin',target),'弃置一张牌并令'+get.translation(trigger.player)+'使用的【杀】伤害+1但若其未造成伤害则你对其造成1点伤害。').set('ai',function(card){
if(_status.event.goon) return 7-get.value(card);
return 0;
}).set('goon',function(){
var d1=true;
if(trigger.player.hasSkill('jueqing')||trigger.player.hasSkill('gangzhi')) d1=false
for(var target of trigger.targets){
if(!target.mayHaveShan(player,'use',target.getCards(i=>{
return i.hasGaintag('sha_notshan');
}))||trigger.player.hasSkillTag('directHit_ai',true,{
target:target,
card:trigger.card,
},true)){
if(!target.hasSkill('gangzhi')) d1=false;
if(!target.hasSkillTag('filterDamage',null,{
player:trigger.player,
card:trigger.card,
})&&get.attitude(player,target)<0) return true;
}
}
if(d1) return get.damageEffect(trigger.player,player,player)>0;
return false;
}()).logSkill=['cuijin',target];
}).set('goon',lib.skill.cuijin.checkx(trigger,player)).logSkill=['cuijin',target];
'step 1'
if(result.bool){
if(typeof trigger.baseDamage!='number') trigger.baseDamage=1;