From ac7adea4b567e9220d4db618220745bcd8a9a4d0 Mon Sep 17 00:00:00 2001 From: mengxinzxz <2223529500@qq.com> Date: Wed, 29 Nov 2023 12:50:22 +0800 Subject: [PATCH] =?UTF-8?q?=E7=AE=80=E5=8C=96=E2=80=9C=E6=AD=A4=E6=A8=A1?= =?UTF-8?q?=E5=BC=8F=E4=B8=8B=E4=B8=8D=E5=8F=AF=E7=94=A8=E2=80=9D=E6=8A=80?= =?UTF-8?q?=E8=83=BD=E4=BF=AE=E6=94=B9=E5=86=99=E6=B3=95=E5=B9=B6=E4=BF=9D?= =?UTF-8?q?=E7=95=99=E8=A2=AB=E6=B8=85=E9=99=A4=E6=8A=80=E8=83=BD=E7=9A=84?= =?UTF-8?q?=E9=85=8D=E9=9F=B3=E4=B8=89=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- game/game.js | 30 +++++++++++++----------------- 1 file changed, 13 insertions(+), 17 deletions(-) diff --git a/game/game.js b/game/game.js index 4316a7f49..50e90faae 100644 --- a/game/game.js +++ b/game/game.js @@ -43170,22 +43170,19 @@ new Promise(resolve=>{ else if(lib.translate[`${iInfo}_${mode}`]) lib.translate[iInfo]=lib.translate[`${iInfo}_${mode}`]; else if(lib.translate[`${iInfo}_zhu`]&&(mode=='identity'||mode=='guozhan'&&_status.mode=='four')) lib.translate[iInfo]=lib.translate[`${iInfo}_zhu`]; else if(lib.translate[`${iInfo}_combat`]&&get.is.versus()) lib.translate[iInfo]=lib.translate[`${iInfo}_combat`]; - if(info.forbid&&info.forbid.contains(mode)){ - lib.skill[i]={}; + var deleteSkill=function(skill,iInfo){ + var skillx={},info=get.info(skill); + if(info){ + ['audio','audioname','audioname2'].forEach(name=>{ + if(info[name]) skillx[name]=info[name]; + }); + } + lib.skill[skill]=skillx; if(lib.translate[iInfo]) lib.translate[iInfo]='此模式下不可用'; - if(lib.dynamicTranslate[i]) lib.dynamicTranslate[i]=()=>'此模式下不可用'; - return; - } - if(info.mode&&info.mode.contains(mode)==false){ - lib.skill[i]={}; - if(lib.translate[iInfo]) lib.translate[iInfo]='此模式下不可用'; - if(lib.dynamicTranslate[i]) lib.dynamicTranslate[i]=()=>'此模式下不可用'; - return; - } - if(info.available&&info.available(mode)==false){ - lib.skill[i]={}; - if(lib.translate[iInfo]) lib.translate[iInfo]='此模式下不可用'; - if(lib.dynamicTranslate[i]) lib.dynamicTranslate[i]=()=>'此模式下不可用'; + if(lib.dynamicTranslate[skill]) lib.dynamicTranslate[skill]=()=>'此模式下不可用'; + }; + if((info.forbid&&info.forbid.contains(mode))||(info.mode&&info.mode.contains(mode)==false)||(info.available&&info.available(mode)==false)){ + deleteSkill(i,iInfo); return; } if(info.viewAs&&typeof info.viewAs!='function'){ @@ -43193,8 +43190,7 @@ new Promise(resolve=>{ name:info.viewAs }; if(!lib.card[info.viewAs.name]){ - lib.skill[i]={}; - lib.translate[iInfo]='技能不可用'; + deleteSkill(i,iInfo); return; } if(info.ai==undefined) info.ai={};