Merge pull request #988 from PZ157/PR-Branch

受萌主之誉,袭bug无惧!
This commit is contained in:
Spmario233 2024-02-26 20:56:30 +08:00 committed by GitHub
commit 81e09a9ec1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 18 additions and 13 deletions

View File

@ -1366,12 +1366,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
return 1/(1.1+Math.max(-1,get.value(card)));
},
ai2:function(target){
const att=get.attitude(get.player(),target);
const value=ui.selected.cards.map(card=>get.value(card)).reduce((p,c)=>{
return p+c;
},0);
if(value>0||player.getHp()<=1) return att;
return -att;
return get.attitude(get.player(),target);
},
precontent:function*(event,map){
var player=map.player,target=event.result.targets[0];

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=0.5-0.75*target.needsToDiscard(2,null,true);
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);
}
});
},