diff --git a/character/clan.js b/character/clan.js index 0a660d7a2..706833aee 100644 --- a/character/clan.js +++ b/character/clan.js @@ -662,7 +662,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, clanmingjie:{ init:function(player){ - var skill='clanmingjie_'+player.playerid; + player.addSkill('clanmingjie_record'); + }, + initSkill:function(skill){ if(!lib.skill[skill]){ lib.skill[skill]={ charlotte:true, @@ -673,7 +675,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ lib.translate[skill]='铭戒'; lib.translate[skill+'_bg']='戒'; } - player.addSkill('clanmingjie_record'); }, onremove:function(player){ player.removeSkill('clanmingjie_record'); @@ -690,6 +691,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ player.awakenSkill('clanmingjie'); player.addSkill('clanmingjie_effect'); var skill='clanmingjie_'+player.playerid; + game.broadcastAll(lib.skill.clanmingjie.initSkill,skill); target.addTempSkill(skill,{player:'phaseAfter'}); target.storage[skill]=player; }, diff --git a/character/mobile.js b/character/mobile.js index f09caa344..cf0588a74 100644 --- a/character/mobile.js +++ b/character/mobile.js @@ -1224,9 +1224,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, //郭照 yichong:{ - init:function(player){ - if(!lib.skill['yichong_'+player.playerid]){ - lib.skill['yichong_'+player.playerid]={ + initSkill:function(skill){ + if(!lib.skill[skill]){ + lib.skill[skill]={ + charlotte:true, onremove:true, mark:true, marktext:'雀', @@ -1239,8 +1240,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, }; - lib.translate['yichong_'+player.playerid]='易宠'; - lib.translate['yichong_'+player.playerid+'_bg']='雀'; + lib.translate[skill]='易宠'; + lib.translate[skill+'_bg']='雀'; } }, getLimit:1, @@ -1302,6 +1303,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var suit=event.suit; player.storage.yichong=suit; player.markSkill('yichong'); + var skill='yichong_'+player.playerid; + game.broadcastAll(lib.skill.yichong.initSkill,skill); game.broadcastAll(function(player,suit){ if(player.marks.yichong) player.marks.yichong.firstChild.innerHTML=get.translation(suit); },player,suit); diff --git a/character/refresh.js b/character/refresh.js index cea5266d4..98cb6c6ad 100755 --- a/character/refresh.js +++ b/character/refresh.js @@ -5556,10 +5556,9 @@ game.import('character',function(lib,game,ui,get,ai,_status){ xinquanji:{ audio:2, trigger:{ - global:'gainAfter', - player:['damageEnd','loseAsyncAfter'], + player:['damageEnd'], + global:['gainAfter','loseAsyncAfter'], }, - frequent:true, filter:function(event,player){ if(event.name=='damage') return true; if(event.name=='loseAsync'){ @@ -5579,6 +5578,7 @@ game.import('character',function(lib,game,ui,get,ai,_status){ var evt=event.getl(player); return evt&&evt.cards2&&evt.cards2.length>0; }, + frequent:true, content:function(){ 'step 0' event.count=(trigger.name=='damage'?trigger.num:1); @@ -5693,7 +5693,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, select:2, filter:function(button,player){ - if(ui.selected.buttons.length) return (typeof ui.selected.buttons[0].link)!=(typeof button.link) + if(typeof button.link=='number'&&player.hasSkill('xinpaiyi_'+button.link)) return false; + if(ui.selected.buttons.length) return (typeof ui.selected.buttons[0].link)!=(typeof button.link); return true; }, backup:function(links){ diff --git a/character/shiji.js b/character/shiji.js index 577e2814e..7845bbdbc 100644 --- a/character/shiji.js +++ b/character/shiji.js @@ -5591,17 +5591,17 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, }, fyjianyu:{ - init:function(player){ - if(!lib.skill['fyjianyu_'+player.playerid]){ - lib.skill['fyjianyu_'+player.playerid]={ + initSkill:function(skill){ + if(!lib.skill[skill]){ + lib.skill[skill]={ marktext:'喻', intro:{ markcount:()=>1, content:'指定另一名有“喻”的角色为目标时,其摸一张牌', }, }; - lib.translate['fyjianyu_'+player.playerid]='谏喻'; - lib.translate['fyjianyu_'+player.playerid+'_bg']='喻'; + lib.translate[skill]='谏喻'; + lib.translate[skill+'_bg']='喻'; } }, audio:2, @@ -5617,8 +5617,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, selectTarget:2, content:function(){ + var skill='fyjianyu_'+player.playerid; + game.broadcastAll(lib.skill.fyjianyu.initSkill,skill); player.addTempSkill('fyjianyu_draw',{player:'phaseBegin'}); - target.addMark('fyjianyu_'+player.playerid,1); + target.addMark(skill,1); }, ai:{ order:0.1, diff --git a/character/xianding.js b/character/xianding.js index 9315779c1..8334d7239 100644 --- a/character/xianding.js +++ b/character/xianding.js @@ -2102,7 +2102,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ filterTarget:()=>true, filterCard:()=>false, selectCard:-1, - charlotte:true, content:function(){ 'step 0' target.draw(); @@ -2130,7 +2129,6 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, filterCard:()=>false, selectCard:-1, - charlotte:true, content:function(){ 'step 0' target.chooseToDiscard('he',true,'谏国:请弃置一张牌'); diff --git a/game/game.js b/game/game.js index 1a58faa54..65f37e630 100644 --- a/game/game.js +++ b/game/game.js @@ -22880,6 +22880,7 @@ new Promise(resolve=>{ delete this.name; delete this.name1; + delete this.tempname; delete this.sex; delete this.group; delete this.hp; @@ -27797,7 +27798,7 @@ new Promise(resolve=>{ if(info.trigger&&this.playerid){ const removeTrigger=(role,evt)=>{ const name=this.playerid+'_'+role+'_'+evt; - if(lib.hook[name]) return; + if(!lib.hook[name]) return; lib.hook[name].remove(skill); if(lib.hook[name].length==0) delete lib.hook[name]; }