diff --git a/character/shenhua.js b/character/shenhua.js index f719f6a8f..50686fa68 100755 --- a/character/shenhua.js +++ b/character/shenhua.js @@ -215,6 +215,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.recast(cards); }, }, + lianhuan1:{audio:2}, + lianhuan2:{audio:2}, //新杀小加强 陈到 dcwanglie:{ audio:'drlt_wanglie', diff --git a/character/sp.js b/character/sp.js index bf3f88566..6b8c0c689 100755 --- a/character/sp.js +++ b/character/sp.js @@ -23891,6 +23891,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ complexSelect:true, complexTarget:true, multitarget:true, + prompt:'移动场上的“龙印”或“凤印”', targetprompt:['失去印','获得印'], content:function(){ 'step 0' @@ -23908,6 +23909,21 @@ game.import('character',function(lib,game,ui,get,ai,_status){ skill.addMark(mark,player,targets[1]); 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:{ audio:'xinfu_jianjie', diff --git a/game/game.js b/game/game.js index adf7426ec..f2c328d43 100644 --- a/game/game.js +++ b/game/game.js @@ -26603,23 +26603,30 @@ return this; }, removeAdditionalSkill:function(skill,target){ + const player=this; 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(additionalSkills.contains(target)){ additionalSkills.remove(target); - if(!this.skills.contains(target)&&!this.tempSkills[target]) this.removeSkill(target); + if(!hasAnotherSKill(skill,target)) this.removeSkill(target); } } else{ delete this.additionalSkills[skill]; 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)){ - for(var i=0;i!hasAnotherSKill(skill,target)) + this.removeSkill(skillsToRemove); } } }