From 920445e02718c4d80b6f8fac17d9fa7dec7d91ac Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Sun, 3 Dec 2023 08:10:31 +0800 Subject: [PATCH 1/6] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=81=94=E6=9C=BA?= =?UTF-8?q?=E6=A8=A1=E5=BC=8F=E4=B8=8B=E9=83=A8=E5=88=86=E4=BD=BF=E7=94=A8?= =?UTF-8?q?playerid=E5=88=9B=E9=80=A0=E7=9A=84=E6=8A=80=E8=83=BD=E5=9B=A0p?= =?UTF-8?q?layerid=E4=B8=8D=E5=AD=98=E5=9C=A8=E5=BC=95=E5=8F=91=E7=9A=84bu?= =?UTF-8?q?g?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/clan.js | 6 ++++-- character/mobile.js | 13 ++++++++----- character/shiji.js | 14 ++++++++------ 3 files changed, 20 insertions(+), 13 deletions(-) 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/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, From 9b71783265e57fe5675bc52aa867c87a05f9928a Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Sun, 3 Dec 2023 08:19:07 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E7=95=8C=E9=92=9F=E4=BC=9A=E3=80=90?= =?UTF-8?q?=E6=9D=83=E8=AE=A1=E3=80=91=E6=97=B6=E6=9C=BAbugfix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/refresh.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/character/refresh.js b/character/refresh.js index cea5266d4..0fb19885d 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','gainAfter'], + global:'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); From adbb890df1d1f3a4404acf3f8b79f17a165337c9 Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Sun, 3 Dec 2023 08:26:01 +0800 Subject: [PATCH 3/6] bugfix --- character/refresh.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/character/refresh.js b/character/refresh.js index 0fb19885d..0e64ca7a1 100755 --- a/character/refresh.js +++ b/character/refresh.js @@ -5556,8 +5556,8 @@ game.import('character',function(lib,game,ui,get,ai,_status){ xinquanji:{ audio:2, trigger:{ - player:['damageEnd','gainAfter'], - global:'loseAsyncAfter', + player:['damageEnd'], + global:['gainAfter','loseAsyncAfter'], }, filter:function(event,player){ if(event.name=='damage') return true; From 150ee24a8e367e2e5ffd4cb3e83d3bdaf32e67ac Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Sun, 3 Dec 2023 08:29:38 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=9D=9C=E9=A2=84?= =?UTF-8?q?=E3=80=90=E8=B0=8F=E5=9B=BD=E3=80=91backup=E6=8A=80=E8=83=BD?= =?UTF-8?q?=E7=9A=84charlotte=E6=A0=87=E7=AD=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/xianding.js | 2 -- 1 file changed, 2 deletions(-) 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,'谏国:请弃置一张牌'); From e053a6402c0eefd2d5aa7c8a2e98a0c11e403b42 Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Sun, 3 Dec 2023 08:47:30 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E7=95=8C=E9=92=9F=E4=BC=9A=E3=80=90?= =?UTF-8?q?=E6=8E=92=E5=BC=82=E3=80=91bugfix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/refresh.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/character/refresh.js b/character/refresh.js index 0e64ca7a1..98cb6c6ad 100755 --- a/character/refresh.js +++ b/character/refresh.js @@ -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){ From b00b6a6eda3c61bac360d5f7cef5b86fff60d077 Mon Sep 17 00:00:00 2001 From: kuangshen04 <2832899707@qq.com> Date: Sun, 3 Dec 2023 11:29:01 +0800 Subject: [PATCH 6/6] bugfix --- game/game.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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]; }