fix: 记忆主面板无法查询

This commit is contained in:
rainbowwarmth 2025-01-19 22:50:29 +08:00 committed by 时雨◎星空
parent d7eb64dd87
commit 4de9823e43
8 changed files with 119 additions and 74 deletions

View File

@ -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], '')
}

View File

@ -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

View File

@ -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

View File

@ -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]

View File

@ -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 aeqtz3 额外能力
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
},

View File

@ -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",

View File

@ -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": "战斗开始时,开拓者的行动提前<nobr>30%</nobr>。首次召唤迷迷时,使迷迷获得<nobr>40%</nobr>充能。",
"cost": {},
"idx": 1
"idx": 1,
"children": [
8008204,
8008205
]
},
"8008102": {
"id": 8008102,
@ -500,7 +504,11 @@
"levelReq": 0,
"desc": "迷迷施放【坏人!麻烦!】时,立即获得<nobr>5%</nobr>充能。",
"cost": {},
"idx": 2
"idx": 2,
"children": [
8008206,
8008207
]
},
"8008103": {
"id": 8008103,
@ -510,10 +518,13 @@
"levelReq": 0,
"desc": "持有【迷迷的声援】的我方目标能量上限大于<nobr>100</nobr>点时,每超过<nobr>10</nobr>点,通过【迷迷的声援】造成的真实伤害倍率额外提高<nobr>2%</nobr>,最多提高<nobr>20%</nobr>。",
"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",

View File

@ -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": "战斗开始时,开拓者的行动提前<nobr>30%</nobr>。首次召唤迷迷时,使迷迷获得<nobr>40%</nobr>充能。",
"cost": {},
"idx": 1
"idx": 1,
"children": [
8007204,
8007205
]
},
"8007102": {
"id": 8007102,
@ -500,7 +504,11 @@
"levelReq": 0,
"desc": "迷迷施放【坏人!麻烦!】时,立即获得<nobr>5%</nobr>充能。",
"cost": {},
"idx": 2
"idx": 2,
"children": [
8007206,
8007207
]
},
"8007103": {
"id": 8007103,
@ -510,10 +518,13 @@
"levelReq": 0,
"desc": "持有【迷迷的声援】的我方目标能量上限大于<nobr>100</nobr>点时,每超过<nobr>10</nobr>点,通过【迷迷的声援】造成的真实伤害倍率额外提高<nobr>2%</nobr>,最多提高<nobr>20%</nobr>。",
"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",