From b8e432f6b34de2bee9c222f4fde6c514bcb21f2b Mon Sep 17 00:00:00 2001 From: 157 <3619242020@qq.com> Date: Sat, 6 Apr 2024 23:22:56 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E6=AE=8B=E7=8E=BA=E3=80=91=E5=88=9B?= =?UTF-8?q?=E5=BB=BA=E6=8A=80=E8=83=BD=E5=B9=BF=E6=92=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- character/sp2.js | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/character/sp2.js b/character/sp2.js index a909f06d5..63fe3f59c 100644 --- a/character/sp2.js +++ b/character/sp2.js @@ -718,8 +718,18 @@ game.import('character',function(lib,game,ui,get,ai,_status){ } }, create:function(group,player){ - if(!lib.skill['starcanxi_'+group]){ - lib.skill['starcanxi_'+group]={ + const skill='starcanxi_'+group; + get.info('starcanxi').createSkill(skill); + if(!_status.postReconnect.starcanxi){ + _status.postReconnect.starcanxi=[get.info('starcanxi').createSkill,[]]; + } + _status.postReconnect.starcanxi[1].add(skill); + player.addSkill(skill); + }, + createSkill(skill){ + if(!lib.skill[skill]) game.broadcastAll(skill=>{ + const group=skill.slice('starcanxi_'.length); + lib.skill[skill]={ mark:true, charlotte:true, onremove:function(player){ @@ -727,11 +737,10 @@ game.import('character',function(lib,game,ui,get,ai,_status){ }, intro:{content:'玉玺的一角'}, }; - lib.translate['starcanxi_'+group]='残玺·'+get.translation(group+'2'); - lib.skill['starcanxi_'+group].marktext=get.translation(group); - lib.translate['starcanxi_'+group+'_bg']=get.translation(group); - } - player.addSkill('starcanxi_'+group); + lib.translate[skill]='残玺·'+get.translation(group+'2'); + lib.skill[skill].marktext=get.translation(group); + lib.translate[skill+'_bg']=get.translation(group); + },skill); }, subSkill:{ wangsheng:{