From 4de9823e43e0f6226449340b65922e9101b02728 Mon Sep 17 00:00:00 2001 From: rainbowwarmth <3445487890@qq.com> Date: Sun, 19 Jan 2025 22:50:29 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E8=AE=B0=E5=BF=86=E4=B8=BB=E9=9D=A2?= =?UTF-8?q?=E6=9D=BF=E6=97=A0=E6=B3=95=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/profile/ProfileChange.js | 2 +- models/Character.js | 4 +- models/avatar/ProfileAvatar.js | 2 +- models/character/CharTalent.js | 2 +- models/serv/api/MysPanelHSRData.js | 19 ++--- resources/meta-sr/character/data.json | 28 ++++---- .../meta-sr/character/星·记忆/data.json | 67 +++++++++++------- .../meta-sr/character/穹·记忆/data.json | 69 ++++++++++++------- 8 files changed, 119 insertions(+), 74 deletions(-) diff --git a/apps/profile/ProfileChange.js b/apps/profile/ProfileChange.js index bd99e4e9..a6928b17 100644 --- a/apps/profile/ProfileChange.js +++ b/apps/profile/ProfileChange.js @@ -163,7 +163,7 @@ const ProfileChange = { // 行迹树匹配 let treeRet = /满行迹/.exec(txt) if (!isGs && treeRet) { - char.trees = ['101', '102', '103', '201', '202', '203', '204', '205', '206', '207', '208', '209', '210'] + char.trees = ['101', '102', '103', '201', '202', '203', '204', '205', '206', '207', '208', '209', '210', '301', '302'] txt = txt.replace(treeRet[0], '') } diff --git a/models/Character.js b/models/Character.js index 472e8634..bd173ac6 100644 --- a/models/Character.js +++ b/models/Character.js @@ -261,7 +261,9 @@ class Character extends Base { '002': 'e', '003': 'q', '004': 't', - '007': 'z' + '007': 'z', + "301": "me", + "302": "mt" }[id] } return false diff --git a/models/avatar/ProfileAvatar.js b/models/avatar/ProfileAvatar.js index 96909a2d..9365d92e 100644 --- a/models/avatar/ProfileAvatar.js +++ b/models/avatar/ProfileAvatar.js @@ -76,7 +76,7 @@ const ProfileAvatar = { isSuper = true } - let treeSet = ['101', '102', '103', '201', '202', '203', '204', '205', '206', '207', '208', '209', '210'] + let treeSet = ['101', '102', '103', '201', '202', '203', '204', '205', '206', '207', '208', '209', '210','301','302'] let treeSuper = false if (!isGs && profile.trees) { treeSuper = true diff --git a/models/character/CharTalent.js b/models/character/CharTalent.js index 7118e91a..b39a7857 100644 --- a/models/character/CharTalent.js +++ b/models/character/CharTalent.js @@ -10,7 +10,7 @@ const CharTalent = { let ret = {} let addTalent = { gs: { a: 3, e: 3, q: 3 }, - sr: { a: 1, e: 2, q: 2, t: 2 } + sr: { a: 1, e: 2, q: 2, t: 2, me: 1, mt: 1} } lodash.forEach(addTalent[game], (addNum, key) => { let ds = talent[key] diff --git a/models/serv/api/MysPanelHSRData.js b/models/serv/api/MysPanelHSRData.js index 656f4a25..bac157de 100644 --- a/models/serv/api/MysPanelHSRData.js +++ b/models/serv/api/MysPanelHSRData.js @@ -15,7 +15,7 @@ let MysPanelHSRData = { level: ds.level, cons: ds.rank, weapon: ds.equip ? MysPanelHSRData.getWeapon(ds.equip) : null, - talent: MysPanelHSRData.getTalent(char, ds.skills), + talent: MysPanelHSRData.getTalent(char, ds.rank, ds.skills), trees: MysPanelHSRData.getTrees(ds.skills), artis: MysPanelHSRData.getArtifact([...ds.relics, ...ds.ornaments]) }, 'mysPanelHSR') @@ -30,14 +30,9 @@ let MysPanelHSRData = { } }, - getTalent (char, ds = {}) { + getTalent (char, cons, ds = {}) { // 照抄 EnkaData 实现 - let { talentId = {}, talentElem = {} } = char.meta - // 这里编号有出入,需要先洗一下 - // e.g. 800501 -> 8005001 - talentId = lodash.mapKeys(talentId, (value, key) => { - return key.substring(0, 4) + '0' + key.substring(4) - }) + let { talentId = {}, talentCons = {} } = char.meta let idx = 0 let ret = {} lodash.forEach(ds, (talent_data) => { @@ -48,10 +43,16 @@ let MysPanelHSRData = { let key = talentId[id] ret[key] = lv } else if (talent_data.point_type == 2) { // 1 属性加成;2 aeqtz;3 额外能力 - key = ['a', 'e', 'q', 't', 'z'][idx++] + key = ['a', 'e', 'q', 't', 'z', 'me', 'mt'][idx++] ret[key] = ret[key] || lv } }) + if (cons >= 3) { + lodash.forEach(talentCons, (lv, key) => { + let addTalent = { a: 1, e: 2, q: 2, t: 2, me: 1, mt: 1 } + if (lv != 0 && ret[key] && cons >= lv) ret[key] = Math.max(1, ret[key] - addTalent[key]) + }) + } return ret }, diff --git a/resources/meta-sr/character/data.json b/resources/meta-sr/character/data.json index 400e4106..12d7de8f 100644 --- a/resources/meta-sr/character/data.json +++ b/resources/meta-sr/character/data.json @@ -1650,13 +1650,13 @@ "weapon": "记忆", "sp": 103, "talentId": { - "800701": "a", - "800702": "e", - "800703": "q", - "800704": "t", - "800707": "z", - "1800701": "me", - "1800703": "mt" + "8007001": "a", + "8007002": "e", + "8007003": "q", + "8007004": "t", + "8007007": "z", + "8007301": "me", + "8007303": "mt" }, "talentCons": { "3": "e", @@ -1678,13 +1678,13 @@ "weapon": "记忆", "sp": 103, "talentId": { - "800701": "a", - "800702": "e", - "800703": "q", - "800704": "t", - "800707": "z", - "1800701": "me", - "1800703": "mt" + "8008001": "a", + "8008002": "e", + "8008003": "q", + "8008004": "t", + "8008007": "z", + "8008301": "me", + "8008803": "mt" }, "talentCons": { "3": "e", diff --git a/resources/meta-sr/character/星·记忆/data.json b/resources/meta-sr/character/星·记忆/data.json index a2b01e68..dd5b6ab2 100644 --- a/resources/meta-sr/character/星·记忆/data.json +++ b/resources/meta-sr/character/星·记忆/data.json @@ -26,17 +26,17 @@ "speed": 0 }, "talentId": { - "800701": "a", - "800702": "e", - "800703": "q", - "800704": "t", - "800707": "z", - "1800701": "me", - "1800703": "mt" + "8008001": "a", + "8008002": "e", + "8008003": "q", + "8008004": "t", + "8008007": "z", + "8008301": "me", + "8008303": "mt" }, "talent": { "a": { - "id": "800801", + "id": "8008001", "name": "包在我身上!", "type": "普攻", "tag": "单攻", @@ -60,7 +60,7 @@ } }, "e": { - "id": "800802", + "id": "8008002", "name": "就决定是你了!", "type": "战技", "tag": "召唤", @@ -90,7 +90,7 @@ } }, "q": { - "id": "800803", + "id": "8008003", "name": "一起上吧,迷迷!", "type": "终结技", "tag": "群攻", @@ -120,7 +120,7 @@ } }, "t": { - "id": "800804", + "id": "8008004", "name": "无所不能的伙伴", "type": "天赋", "tag": "强化", @@ -171,7 +171,7 @@ } }, "z": { - "id": "800807", + "id": "8008007", "name": "记忆如往日重现", "type": "秘技", "tag": "伤害", @@ -179,7 +179,7 @@ "tables":{} }, "me": { - "id": "1800801", + "id": "8008301", "name": "坏人!麻烦!", "type": "忆灵技", "tag": "群攻", @@ -220,7 +220,7 @@ } }, "mt": { - "id": "1800803", + "id": "8008303", "name": "伙伴!一起!", "type": "忆灵天赋", "tag": "强化", @@ -490,7 +490,11 @@ "levelReq": 0, "desc": "战斗开始时,开拓者的行动提前30%。首次召唤迷迷时,使迷迷获得40%充能。", "cost": {}, - "idx": 1 + "idx": 1, + "children": [ + 8008204, + 8008205 + ] }, "8008102": { "id": 8008102, @@ -500,7 +504,11 @@ "levelReq": 0, "desc": "迷迷施放【坏人!麻烦!】时,立即获得5%充能。", "cost": {}, - "idx": 2 + "idx": 2, + "children": [ + 8008206, + 8008207 + ] }, "8008103": { "id": 8008103, @@ -510,10 +518,13 @@ "levelReq": 0, "desc": "持有【迷迷的声援】的我方目标能量上限大于100点时,每超过10点,通过【迷迷的声援】造成的真实伤害倍率额外提高2%,最多提高20%。", "cost": {}, - "idx": 3 + "idx": 3, + "children": [ + 8008208 + ] }, - "1800805": { - "id": 1800805, + "8008305": { + "id": 8008305, "type": "skill", "root": true, "name": "迷迷,加油!", @@ -523,7 +534,7 @@ "idx": 4 }, "1800806": { - "id": 1800806, + "id": 8008306, "type": "skill", "root": true, "name": "遗憾…不留", @@ -541,7 +552,11 @@ "cost": {}, "data": { "cdmgPct": 5.3 - } + }, + "children": [ + 8008202, + 8008203 + ] }, "8008202": { "id": "8008201", @@ -618,7 +633,10 @@ "cost": {}, "data": { "atkPct": 6 - } + }, + "children": [ + 8008209 + ] }, "8008209": { "id": "8008209", @@ -629,7 +647,10 @@ "cost": {}, "data": { "hpPct": 8 - } + }, + "children": [ + 8008210 + ] }, "8008210": { "id": "8008210", diff --git a/resources/meta-sr/character/穹·记忆/data.json b/resources/meta-sr/character/穹·记忆/data.json index 3ab3a74a..4a75dd6c 100644 --- a/resources/meta-sr/character/穹·记忆/data.json +++ b/resources/meta-sr/character/穹·记忆/data.json @@ -26,17 +26,17 @@ "speed": 0 }, "talentId": { - "800701": "a", - "800702": "e", - "800703": "q", - "800704": "t", - "800707": "z", - "1800701": "me", - "1800703": "mt" + "8007001": "a", + "8007002": "e", + "8007003": "q", + "8007004": "t", + "8007007": "z", + "8007301": "me", + "8007302": "mt" }, "talent": { "a": { - "id": "800701", + "id": "8007001", "name": "包在我身上!", "type": "普攻", "tag": "单攻", @@ -60,7 +60,7 @@ } }, "e": { - "id": "800702", + "id": "8007002", "name": "就决定是你了!", "type": "战技", "tag": "召唤", @@ -90,7 +90,7 @@ } }, "q": { - "id": "800703", + "id": "8007003", "name": "一起上吧,迷迷!", "type": "终结技", "tag": "群攻", @@ -120,7 +120,7 @@ } }, "t": { - "id": "800704", + "id": "8007004", "name": "无所不能的伙伴", "type": "天赋", "tag": "强化", @@ -171,7 +171,7 @@ } }, "z": { - "id": "800707", + "id": "8007007", "name": "记忆如往日重现", "type": "秘技", "tag": "伤害", @@ -179,7 +179,7 @@ "tables":{} }, "me": { - "id": "1800701", + "id": "8007301", "name": "坏人!麻烦!", "type": "忆灵技", "tag": "群攻", @@ -220,7 +220,7 @@ } }, "mt": { - "id": "1800703", + "id": "8007303", "name": "伙伴!一起!", "type": "忆灵天赋", "tag": "强化", @@ -490,7 +490,11 @@ "levelReq": 0, "desc": "战斗开始时,开拓者的行动提前30%。首次召唤迷迷时,使迷迷获得40%充能。", "cost": {}, - "idx": 1 + "idx": 1, + "children": [ + 8007204, + 8007205 + ] }, "8007102": { "id": 8007102, @@ -500,7 +504,11 @@ "levelReq": 0, "desc": "迷迷施放【坏人!麻烦!】时,立即获得5%充能。", "cost": {}, - "idx": 2 + "idx": 2, + "children": [ + 8007206, + 8007207 + ] }, "8007103": { "id": 8007103, @@ -510,10 +518,13 @@ "levelReq": 0, "desc": "持有【迷迷的声援】的我方目标能量上限大于100点时,每超过10点,通过【迷迷的声援】造成的真实伤害倍率额外提高2%,最多提高20%。", "cost": {}, - "idx": 3 + "idx": 3, + "children": [ + 8007208 + ] }, - "1800705": { - "id": 1800705, + "8007305": { + "id": 8007305, "type": "skill", "root": true, "name": "迷迷,加油!", @@ -522,8 +533,8 @@ "cost": {}, "idx": 4 }, - "1800706": { - "id": 1800706, + "8007306": { + "id": 8007306, "type": "skill", "root": true, "name": "遗憾…不留", @@ -541,7 +552,11 @@ "cost": {}, "data": { "cdmgPct": 5.3 - } + }, + "children": [ + 8007202, + 8007203 + ] }, "8007202": { "id": "8007201", @@ -618,7 +633,10 @@ "cost": {}, "data": { "atkPct": 6 - } + }, + "children": [ + 8007209 + ] }, "8007209": { "id": "8007209", @@ -629,7 +647,10 @@ "cost": {}, "data": { "hpPct": 8 - } + }, + "children": [ + 8007210 + ] }, "8007210": { "id": "8007210",