bug修复,ai优化

受主之誉,袭敌无惧!
This commit is contained in:
157 2024-02-25 22:21:03 +08:00
parent 1e7740e73a
commit f0c12b3a34
3 changed files with 17 additions and 7 deletions

View File

@ -1244,6 +1244,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}
},
charlotte:true,
onremove:true,
mod:{
maxHandcard(player,num){
return num-player.countMark('jsrgzhaotu_handcard');
@ -1255,8 +1256,13 @@ game.import('character',function(lib,game,ui,get,ai,_status){
order:5,
result:{
target(player,target){
if(player.hasSkill('jsrgjingju')||player.hasZhuSkill('jsrgweizhui')) return get.attitude(player,target);
return -1;
let dis=target.needsToDiscard(2,null,true)+0.5;
if(dis>0) return dis;
if(player.hasSkill('jsrgjingju')&&player.hasZhuSkill('jsrgweizhui')&&get.attitude(player,target)>0) return game.countPlayer(current=>{
if(current===player||current===target||current.group!=='wei') return false;
return player.hasZhuSkill('jsrgweizhui',current)&&get.attitude(player,current)>0;
});
return dis;
},
},
},
@ -1283,8 +1289,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return ui.create.dialog('惊惧',[vcards,'vcard'],'hidden');
},
check:function(button){
let player=_status.event.player;
if(get.event().getParent().type!='phase') return 1;
return get.player().getUseValue({name:button.link[2],nature:button.link[3]});
return get.player().getUseValue({name:button.link[2],nature:button.link[3]})+game.countPlayer(current=>{
if(current===player||current.group!=='wei') return false;
return player.hasZhuSkill('jsrgweizhui',current)&&get.attitude(player,current)>0;
});
},
backup:function(links,player){
return {
@ -1373,7 +1383,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return player.canUse(get.autoViewAs({name:'guohe'},[card]),get.event('target'));
}).set('target',player).set('ai',card=>{
if(get.effect(get.event('target'),get.autoViewAs({name:'guohe'},[card]),player)<=0) return 0;
return 6-get.value(card);
return 7-get.value(card);
});
if(bool){
trigger.player.logSkill('jsrgweizhui',player);

View File

@ -29,7 +29,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
xin_huojun:['male','shu',4,['sidai','jieyu'],['character:tw_huojun','die_audio:tw_huojun']],
muludawang:['male','qun','3/3/1',['shoufa','zhoulin','yuxiang']],
mb_chengui:['male','qun',3,['guimou','zhouxian']],
mb_huban:['male','wei',3,['mbyilie']],
mb_huban:['male','wei',4,['mbyilie']],
mb_xianglang:['male','shu',3,['naxue','yijie']],
yanxiang:['male','qun',3,['kujian','twruilian'],['die_audio:tw_yanxiang']],
mb_sunluyu:['female','wu',3,['mbmeibu','mbmumu']],

View File

@ -65,7 +65,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
const player=get.event('player'),trigger=get.event().getTrigger();
if(trigger.card.name=='tiesuo'){
const att=get.attitude(player,target);
return get.agn(att)*(2+get.sgn(att));
return get.sgn(att)*(2+get.sgn(att));
}
const sum=trigger.targets.reduce((i,j)=>i+get.effect(j,trigger.card,trigger.player,player),0);
return get.effect(target,trigger.card,trigger.player,player)*2-sum;
@ -150,7 +150,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
if(bool) player.draw(Math.min(5,sum));
if(goon){
const targets=game.filterPlayer(target=>trigger.targets.includes(target))
if(targets.length) player.useCard(trigger.card,targets,false);
if(targets.length) player.useCard(trigger.card,targets,false);
}
});
},