From e67cc71aa09e1c9cf2cf9b700a295a2e78406f6b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9E=AB=E8=B0=B7=E5=89=91=E4=BB=99?= Date: Fri, 1 Nov 2024 22:41:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=B0=E6=8A=80=E8=83=BD?= =?UTF-8?q?=EF=BC=8C=E6=8C=89=E5=B1=9E=E6=80=A7=E5=A2=9E=E5=8A=A0=E4=BC=A4?= =?UTF-8?q?=E5=AE=B3=E4=B8=8A=E9=99=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- script-skill-parser.js | 27 +++++++++++++++++++-------- service-worker.js | 2 +- 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/script-skill-parser.js b/script-skill-parser.js index a7ed21e2..cb51b121 100644 --- a/script-skill-parser.js +++ b/script-skill-parser.js @@ -1064,8 +1064,8 @@ function impartAwakenings(attrs, types, awakenings) { function obstructOpponent(typeName, pos, ids) { return { kind: SkillKinds.ObstructOpponent, typeName: typeName, pos: pos, enemy_skills: ids }; } -function increaseDamageCapacity(cap, targets) { - return { kind: SkillKinds.IncreaseDamageCapacity, cap: cap, targets: targets}; +function increaseDamageCapacity(cap, targets, attrs, types) { + return { kind: SkillKinds.IncreaseDamageCapacity, cap, targets, attrs, types}; } function boardJammingStates(state, posType, options) { return { kind: SkillKinds.BoardJammingStates, state: state, posType: posType, ...options}; @@ -1729,6 +1729,11 @@ const skillObjectParsers = { [259](percent) { return breakingShield(v.xShield(percent)); }, [260](skillStage, voiceId) { return skillPlayVoice(skillStage, voiceId); }, [261](percent) { return gravity(v.xCHP(percent), 'single'); }, + [263](turns, cap, attr, type) { //按属性改变伤害上限主动技 + return activeTurns(turns, + increaseDamageCapacity(cap * 1e8, void 0, Bin.unflags(attr), Bin.unflags(type)) + ); + }, [1000](type, pos, ...ids) { const posType = (type=>{ switch (type) { @@ -2685,18 +2690,24 @@ function renderSkill(skill, option = {}) break; } case SkillKinds.IncreaseDamageCapacity: { //增加伤害上限 - const {cap, targets} = skill; + const {cap, targets, attrs, types} = skill; let dict = { icon: createIcon(skill.kind, cap > 0x7FFFFFFF ? "cap-incr" : "cap-decr"), targets: document.createDocumentFragment(), cap: cap.bigNumberToString(), }; - // if (targets[0] !== 'self' || targets.length > 1) { + if (targets?.length) { dict.targets.append(createTeamFlags(targets)); - // } - dict.targets.append(targets.map(target=> - tsp?.target[target.replaceAll("-","_")]?.()) - .nodeJoin(tsp.word.slight_pause())); + dict.targets.append(targets.map(target=> + tsp?.target[target.replaceAll("-","_")]?.()) + .nodeJoin(tsp.word.slight_pause())); + } + if (attrs?.length) { + dict.targets.append(renderAttrs(attrs)); + } + if (types?.length) { + dict.targets.append(renderTypes(types)); + } frg.ap(tsp.skill.increase_damage_cap(dict)); break; diff --git a/service-worker.js b/service-worker.js index 3616aedf..00c21c7d 100644 --- a/service-worker.js +++ b/service-worker.js @@ -37343,7 +37343,7 @@ const cachesMap = new Map([ ], [ "script-skill-parser.js", - "733b36d01b6b994d8a4c03d2374cc7ac" + "64aced0baa3b08776e7cf22775be353a" ], [ "script-universal_function.js",