【炼魄】bug修复

This commit is contained in:
157 2023-12-27 22:07:35 +08:00
parent 201336225d
commit 4d982b73f4
1 changed files with 17 additions and 3 deletions

View File

@ -374,6 +374,12 @@ game.import('character',function(lib,game,ui,get,ai,_status){
//神贾诩 //神贾诩
jxlianpo:{ jxlianpo:{
audio:2, audio:2,
init:()=>{
game.addGlobalSkill('jxlianpo_global');
},
onremove:()=>{
if(!game.hasPlayer(i=>i.hasSkill('jxlianpo'),true)) game.removeGlobalSkill('jxlianpo_global');
},
trigger:{global:'dieAfter'}, trigger:{global:'dieAfter'},
filter:function(event,player){ filter:function(event,player){
if(lib.skill.jxlianpo.getMax().length<=1) return false; if(lib.skill.jxlianpo.getMax().length<=1) return false;
@ -381,7 +387,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}, },
forced:true, forced:true,
logTarget:'source', logTarget:'source',
global:'jxlianpo_global',
getMax:()=>{ getMax:()=>{
const map={ const map={
zhu:game.countPlayer(current=>{ zhu:game.countPlayer(current=>{
@ -521,20 +526,29 @@ game.import('character',function(lib,game,ui,get,ai,_status){
}); });
}, },
cardSavable:function(card,player,target){ cardSavable:function(card,player,target){
if(card.name=='tao'){ if(card.name=='tao'&&!player.hasSkill('jxlianpo')){
if(!lib.skill.jxlianpo.getMax().includes('zhu')) return; if(!lib.skill.jxlianpo.getMax().includes('zhu')) return;
if(player==target) return; if(player==target) return;
return false; return false;
} }
}, },
playerEnabled:function(card,player,target){ playerEnabled:function(card,player,target){
if(card.name=='tao'){ if(card.name=='tao'&&!player.hasSkill('jxlianpo')){
if(!lib.skill.jxlianpo.getMax().includes('zhu')) return; if(!lib.skill.jxlianpo.getMax().includes('zhu')) return;
if(player==target) return; if(player==target) return;
return false; return false;
} }
} }
}, },
trigger:{player:'dieAfter'},
filter:()=>{
return !game.hasPlayer(i=>i.hasSkill('jxlianpo'),true);
},
silent:true,
forceDie:true,
content:()=>{
game.removeGlobalSkill('jxlianpo_global');
}
}, },
}, },
}, },