This commit is contained in:
Spmario233 2023-10-11 16:06:18 +08:00
parent c781e69408
commit d299123229
3 changed files with 31 additions and 6 deletions

View File

@ -215,6 +215,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){
player.recast(cards); player.recast(cards);
}, },
}, },
lianhuan1:{audio:2},
lianhuan2:{audio:2},
//新杀小加强 陈到 //新杀小加强 陈到
dcwanglie:{ dcwanglie:{
audio:'drlt_wanglie', audio:'drlt_wanglie',

View File

@ -23891,6 +23891,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){
complexSelect:true, complexSelect:true,
complexTarget:true, complexTarget:true,
multitarget:true, multitarget:true,
prompt:'移动场上的“龙印”或“凤印”',
targetprompt:['失去印','获得印'], targetprompt:['失去印','获得印'],
content:function(){ content:function(){
'step 0' 'step 0'
@ -23908,6 +23909,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){
skill.addMark(mark,player,targets[1]); skill.addMark(mark,player,targets[1]);
game.delayx(); game.delayx();
}, },
ai:{
order:8,
result:{
target:function(player,target){
if(ui.selected.targets.length==0){
return get.attitude(player,target)<0?-999:-3;
}
else{
return target.countCards('h')+1;
}
},
},
expose:0.4,
threaten:3,
},
}, },
die:{ die:{
audio:'xinfu_jianjie', audio:'xinfu_jianjie',

View File

@ -26603,23 +26603,30 @@
return this; return this;
}, },
removeAdditionalSkill:function(skill,target){ removeAdditionalSkill:function(skill,target){
const player=this;
if(this.additionalSkills[skill]){ if(this.additionalSkills[skill]){
var additionalSkills=this.additionalSkills[skill]; const additionalSkills=this.additionalSkills[skill];
const hasAnotherSKill=function(skillkey,skill){
return (player.skills.contains(skill)||player.tempSkills[skill]||Object.keys(player.additionalSkills).some(key=>{
if(key===skillkey) return false;
if(Array.isArray(player.additionalSkills[key])) return player.additionalSkills[key].includes(skill);
return player.additionalSkills[key]==skill;
}))
}
if(Array.isArray(additionalSkills)&&typeof target=='string'){ if(Array.isArray(additionalSkills)&&typeof target=='string'){
if(additionalSkills.contains(target)){ if(additionalSkills.contains(target)){
additionalSkills.remove(target); additionalSkills.remove(target);
if(!this.skills.contains(target)&&!this.tempSkills[target]) this.removeSkill(target); if(!hasAnotherSKill(skill,target)) this.removeSkill(target);
} }
} }
else{ else{
delete this.additionalSkills[skill]; delete this.additionalSkills[skill];
if(typeof additionalSkills=='string'){ if(typeof additionalSkills=='string'){
if(!this.skills.contains(additionalSkills)&&!this.tempSkills[additionalSkills]) this.removeSkill(additionalSkills); if(!hasAnotherSKill(skill,additionalSkills)) this.removeSkill(additionalSkills);
} }
else if(Array.isArray(additionalSkills)){ else if(Array.isArray(additionalSkills)){
for(var i=0;i<additionalSkills.length;i++){ const skillsToRemove=additionalSkills.filter(target=>!hasAnotherSKill(skill,target))
if(!this.skills.contains(additionalSkills[i])&&!this.tempSkills[additionalSkills[i]]) this.removeSkill(additionalSkills[i]); this.removeSkill(skillsToRemove);
}
} }
} }
} }