From ee42b184ea0f59a76394980474ffb97ad49312af Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=AB=E8=B0=B7=E5=89=91=E4=BB=99?= Date: Wed, 17 Aug 2022 10:37:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=80=E5=A4=84=E6=8A=80?= =?UTF-8?q?=E8=83=BDBug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script-universal_function.js | 6 +++--- service-worker.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/script-universal_function.js b/script-universal_function.js index ab694ce7..b096a052 100644 --- a/script-universal_function.js +++ b/script-universal_function.js @@ -1043,12 +1043,12 @@ function countTeamHp(team, leader1id, leader2id, solo, noAwoken = false) { break; } case 229:{ //队员中存在每个属性或Type都算一次 - const atCount = countTeamTotalAttrsTypes(memberArr, assistArr); + const {attrs, types} = countTeamTotalAttrsTypes(memberArr, assistArr); let correAttrs = flags(sk[0]), correTypes = flags(sk[1]); //符合的属性/类型 //符合的次数 - let correTimes = correAttrs.reduce((pre,attr)=>pre + (atCount.attrs.get(attr) || 0),0) + - correTypes.reduce((pre,type)=>pre + (atCount.types.get(type) || 0),0); + let correTimes = correAttrs.reduce((pre,attr)=>pre + (attrs[attr] || 0),0) + + correTypes.reduce((pre,type)=>pre + (types[type] || 0),0); scale = sk[2] * correTimes / 100 + 1; console.debug('属性、类型个数动态倍率,当前队长HP倍率为 %s (匹配 %d 次)', scale, correTimes); break; diff --git a/service-worker.js b/service-worker.js index 7f4b1d7f..449f00dd 100644 --- a/service-worker.js +++ b/service-worker.js @@ -6063,7 +6063,7 @@ const cachesMap = new Map([ ], [ "script-universal_function.js", - "8fe814d0a489684971409307c6953a7b" + "c07d2bc3aa7c4bca548da9930276766b" ], [ "script.js",