对无天赋等级的面板数据增加容错

This commit is contained in:
Kokomi 2022-12-28 04:01:22 +08:00
parent 55e422de40
commit 0ad91f77b1
14 changed files with 2800 additions and 2785 deletions

View File

@ -1,10 +1,10 @@
# 2.1.6
# 2.1.7
* 增加瑶瑶、艾尔海森的信息,可通过`#瑶瑶天赋`、`#瑶瑶图鉴`等查看
* 更新瑶瑶、艾尔海森的信息,可通过`#瑶瑶天赋`、`#瑶瑶图鉴`等查看
* 增加艾尔海森 **@panganqi**、珐露珊的伤害计算
* 一些已知问题修复
# 2.1.1~2.1.5
# 2.1.1~2.1.6
* 增加角色面板立绘图相关命令 **@cvs**
* 支持`#上传刻晴面板图`上传

View File

@ -56,6 +56,9 @@ function checkCharacter (e) {
}
let name = msg.replace(/#|老婆|老公|卡片/g, '').trim()
// cache gsCfg
Character.gsCfg = Character.gsCfg || e?.runtime?.gsCfg
let char = Character.get(name.trim())
if (!char) {

View File

@ -51,12 +51,12 @@ export async function getTargetUid (e) {
}
try {
let mys = await MysApi.init(e)
let user = await MysApi.initUser(e)
if (!mys || !mys.uid) {
if (!user || !user.uid) {
return false
}
uid = mys.uid
uid = user.uid
if (!uid || !uidReg.test(uid)) {
e.reply('请先发送【#绑定+你的UID】来绑定查询目标')
return false

View File

@ -197,12 +197,12 @@ const ProfileChange = {
let wDs = {
name: weapon.name,
star: weapon.star,
level: wCfg.level || wSource.level || weapon.maxLv || 90
level: Math.min(weapon.maxLv || 90, wCfg.level || wSource.level || 90)
}
if (wSource.level === wDs.level) {
wDs.promote = wSource.promote
}
wDs.affix = wCfg.affix || ((wDs.star === 5 && wSource.star !== 5) ? 1 : (wSource.affix || 5))
wDs.affix = Math.min(weapon.maxAffix || 5, wCfg.affix || ((wDs.star === 5 && wSource.star !== 5) ? 1 : (wSource.affix || 5)))
ret.setWeapon(wDs)
// 设置天赋

View File

@ -203,7 +203,6 @@ class Character extends Base {
}
if (!this._imgs[cacheId]) {
this._imgs[cacheId] = CharImg.getImgs(this.name, costumeCfg, this.isTraveler ? this.elem : '', this.source === 'amber' ? 'png' : 'webp')
}
let ret = this._imgs[cacheId]
let nPath = `meta/character/${this.name}`
@ -288,7 +287,7 @@ class Character extends Base {
// 基于角色名获取Character
static get (val) {
let id = CharId.getId(val)
let id = CharId.getId(val, Character.gsCfg)
if (!id) {
return false
}

View File

@ -41,6 +41,15 @@ class Weapon extends Base {
return this.getDetail()
}
get maxLv () {
return this.star <= 2 ? 70 : 90
}
get maxAffix () {
let datas = this.detail?.affixData?.datas || {}
return (datas['0'] && datas['0'][4]) ? 5 : 1
}
getDetail () {
if (this._detail) {
return this._detail

View File

@ -16,8 +16,6 @@ let wifeMap = {}
// id排序
let idSort = {}
let gsCfg
async function init () {
let { sysCfg, diyCfg } = await Data.importCfg('character')
lodash.forEach([diyCfg.customCharacters, sysCfg.characters], (roleIds) => {
@ -51,7 +49,6 @@ async function init () {
})
})
abbrMap = sysCfg.abbr
gsCfg = await Data.importDefault('plugins/genshin/model/gsCfg.js', 'root')
}
await init()
@ -72,7 +69,7 @@ const CharId = {
abbrMap,
wifeMap,
idSort,
getId (ds = '') {
getId (ds = '', gsCfg = null) {
if (!ds) {
return false
}
@ -80,7 +77,8 @@ const CharId = {
return { id, elem, name: idMap[id] }
}
if (!lodash.isObject(ds)) {
ds = lodash.trim(ds || '').toLowerCase()
let original = lodash.trim(ds || '')
ds = original.toLowerCase()
// 尝试使用元素起始匹配
let em = Format.matchElem(ds, '', true)
if (em && aliasMap[em.name] && CharId.isTraveler(aliasMap[em.name])) {
@ -92,7 +90,7 @@ const CharId = {
}
// 调用V3方法匹配
if (gsCfg && gsCfg.getRole) {
let roleRet = gsCfg.getRole(ds)
let roleRet = gsCfg.getRole(original)
if (roleRet.name && aliasMap[roleRet.name]) {
return ret(aliasMap[roleRet.name])
}

View File

@ -1,15 +1,21 @@
export const details = [{
title: 'E每跳治疗',
dmg: ({
talent,
attr,
calc
}, { heal }) => heal(talent.e['持续治疗量2'][0] * calc(attr.atk) / 100 + talent.e['持续治疗量2'][1] * 1)
dmg: ({ talent, attr, calc }, { heal }) =>
heal(talent.e['持续治疗量2'][0] * calc(attr.atk) / 100 + talent.e['持续治疗量2'][1] * 1)
}, {
title: '度厄真符每次治疗',
dmg: ({ talent, attr, calc }, { heal }) => heal(talent.q['治疗量2'][0] * calc(attr.atk) / 100 + talent.q['治疗量2'][1] * 1)
}, {
title: '重击伤害',
dmg: ({ talent, attr, calc }, dmg) => dmg(talent.a['重击伤害'], 'a2', 'phy')
}]
export const mainAttr = 'atk,cpct,cdmg'
export const buffs = []
export const buffs = [{
title: '七七二命对受冰元素影响的敌人普攻及重击伤害提升15%',
cons: 2,
data: {
a2: 15
}
}]

View File

@ -2,14 +2,14 @@
"id": 10000077,
"name": "瑶瑶",
"abbr": "瑶瑶",
"title": "",
"title": "仙蕊玲珑",
"star": 4,
"elem": "dendro",
"allegiance": "",
"allegiance": "歌尘浪市真君洞天",
"weapon": "polearm",
"birth": "1-1",
"birth": "3-6",
"astro": "木樨座",
"desc": "测试角色",
"desc": "歌尘浪市真君膝下最年幼的弟子,温柔体贴的「小大人」。",
"cncv": "",
"jpcv": "",
"costume": false,

View File

@ -19,21 +19,21 @@
"unit": "",
"isSame": false,
"values": [
"55.61%",
"60.14%",
"64.66%",
"71.13%",
"75.66%",
"80.83%",
"87.94%",
"95.05%",
"102.17%",
"109.93%",
"117.69%",
"125.45%",
"133.21%",
"140.97%",
"148.72%"
"51%",
"55.15%",
"59.3%",
"65.23%",
"69.39%",
"74.13%",
"80.65%",
"87.18%",
"93.7%",
"100.82%",
"107.93%",
"115.05%",
"122.17%",
"129.28%",
"136.4%"
]
},
{
@ -41,21 +41,21 @@
"unit": "",
"isSame": false,
"values": [
"51.07%",
"55.23%",
"59.38%",
"65.32%",
"69.48%",
"74.23%",
"80.76%",
"87.29%",
"93.82%",
"100.95%",
"108.08%",
"115.2%",
"122.33%",
"129.45%",
"136.58%"
"47.44%",
"51.3%",
"55.17%",
"60.68%",
"64.54%",
"68.96%",
"75.03%",
"81.09%",
"87.16%",
"93.78%",
"100.4%",
"107.02%",
"113.64%",
"120.26%",
"126.88%"
]
},
{
@ -63,21 +63,21 @@
"unit": "",
"isSame": false,
"values": [
"33.82% + 37.2%",
"36.57% + 40.23%",
"39.33% + 43.26%",
"43.26% + 47.58%",
"46.01% + 50.61%",
"49.16% + 54.07%",
"53.48% + 58.83%",
"57.81% + 63.59%",
"62.14% + 68.35%",
"66.86% + 73.54%",
"71.58% + 78.73%",
"76.29% + 83.92%",
"81.01% + 89.11%",
"85.73% + 94.3%",
"90.45% + 99.5%"
"31.38% + 32.95%",
"33.93% + 35.63%",
"36.49% + 38.31%",
"40.13% + 42.14%",
"42.69% + 44.82%",
"45.61% + 47.89%",
"49.62% + 52.1%",
"53.63% + 56.31%",
"57.65% + 60.53%",
"62.02% + 65.13%",
"66.4% + 69.72%",
"70.78% + 74.32%",
"75.16% + 78.92%",
"79.54% + 83.51%",
"83.92% + 88.11%"
]
},
{
@ -85,21 +85,21 @@
"unit": "",
"isSame": false,
"values": [
"83.16%",
"89.93%",
"96.7%",
"106.37%",
"113.14%",
"120.87%",
"131.51%",
"142.14%",
"152.78%",
"164.38%",
"175.99%",
"187.59%",
"199.2%",
"210.8%",
"222.4%"
"77.93%",
"84.27%",
"90.62%",
"99.68%",
"106.02%",
"113.27%",
"123.24%",
"133.21%",
"143.18%",
"154.05%",
"164.92%",
"175.8%",
"186.67%",
"197.55%",
"208.42%"
]
},
{
@ -205,7 +205,7 @@
"月桂·抛掷型会依据附近的情况,选择投掷白玉萝卜的目标:",
"·附近的角色如果生命值均高于70%,会向附近的一名敌人投掷;",
"·附近如果存在生命值低于或等于70%的角色则会向附近场上生命值百分比最低的角色投掷。若附近不存在敌人即使角色的生命值均高于70%,也会向角色投掷。",
"同时只能至多2个月桂·抛掷型。",
"同时至多存在2个月桂·抛掷型。",
"<i>「萝卜上市,郎中无事!啊,这不是说萝卜治百病的意思,不过,多吃萝卜确实有好处!」</i>"
],
"tables": [
@ -327,12 +327,11 @@
"desc": [
"依照某位仙人的嘱咐,在紧急情况下,解放月桂的全部潜能,对周围的敌人造成草元素伤害,并进入(某种意义上)所向披靡的「桂子仙机」状态。",
"<h3>桂子仙机</h3>",
"·产生的白玉萝卜将转为依据本技能详细属性造成伤害与治疗,炸裂时将为队伍中附近的所有角色恢复生命值,造成的草元素伤害转视为元素爆发伤害;",
"·产生的白玉萝卜将转为依据本技能详细属性造成伤害与治疗,炸裂时将为队伍中附近的所有角色恢复生命值,造成的草元素伤害转视为元素爆发伤害;",
"·周期性召唤「月桂·弹跳型」直到数量达到上限。月桂·弹跳型与元素战技「云台团团降芦菔」召唤的月桂·抛掷型行为方式相同。同时至多存在3个月桂·弹跳型",
"·瑶瑶的移动速度提升15%",
"·瑶瑶获得草元素抗性提升。",
"瑶瑶处于队伍后台时,将不会召唤月桂·弹跳型。",
"桂子仙机状态结束时,将移除剩余的月桂·弹跳型。",
"桂子仙机状态将在退场时结束。桂子仙机状态结束时,将移除剩余的月桂·弹跳型。",
"<i>「咦,你问我这一个和那一个里哪个是月桂?奇怪,这里的每一个都是月桂呀!」</i>"
],
"tables": [
@ -363,21 +362,21 @@
"unit": "",
"isSame": false,
"values": [
"81.84%",
"87.98%",
"94.12%",
"102.3%",
"108.44%",
"114.58%",
"122.76%",
"130.94%",
"139.13%",
"147.31%",
"155.5%",
"163.68%",
"173.91%",
"184.14%",
"194.37%"
"72.16%",
"77.57%",
"82.98%",
"90.2%",
"95.61%",
"101.02%",
"108.24%",
"115.46%",
"122.67%",
"129.89%",
"137.1%",
"144.32%",
"153.34%",
"162.36%",
"171.38%"
]
},
{
@ -385,21 +384,21 @@
"unit": "",
"isSame": false,
"values": [
"2.57%HP + 247.62",
"2.76%HP + 272.39",
"2.96%HP + 299.22",
"3.21%HP + 328.11",
"3.41%HP + 359.07",
"3.6%HP + 392.09",
"3.86%HP + 427.17",
"4.11%HP + 464.32",
"4.37%HP + 503.53",
"4.63%HP + 544.81",
"4.89%HP + 588.15",
"5.14%HP + 633.55",
"5.46%HP + 681.02",
"5.79%HP + 730.55",
"6.11%HP + 782.14"
"2.02%HP + 194.21",
"2.17%HP + 213.64",
"2.32%HP + 234.68",
"2.52%HP + 257.34",
"2.67%HP + 281.62",
"2.82%HP + 307.52",
"3.03%HP + 335.04",
"3.23%HP + 364.17",
"3.43%HP + 394.93",
"3.63%HP + 427.3",
"3.83%HP + 461.29",
"4.03%HP + 496.9",
"4.29%HP + 534.13",
"4.54%HP + 572.98",
"4.79%HP + 613.45"
]
},
{
@ -496,134 +495,134 @@
"talentData": {
"a": {
"一段伤害": [
55.61,
60.14,
64.66,
71.13,
75.66,
80.83,
87.94,
95.05,
102.17,
109.93,
117.69,
125.45,
133.21,
140.97,
148.72
51,
55.15,
59.3,
65.23,
69.39,
74.13,
80.65,
87.18,
93.7,
100.82,
107.93,
115.05,
122.17,
129.28,
136.4
],
"二段伤害": [
51.07,
55.23,
59.38,
65.32,
69.48,
74.23,
80.76,
87.29,
93.82,
100.95,
108.08,
115.2,
122.33,
129.45,
136.58
47.44,
51.3,
55.17,
60.68,
64.54,
68.96,
75.03,
81.09,
87.16,
93.78,
100.4,
107.02,
113.64,
120.26,
126.88
],
"三段伤害": [
71.02000000000001,
76.8,
82.59,
90.84,
96.62,
103.22999999999999,
112.31,
121.4,
130.49,
140.4,
150.31,
160.21,
170.12,
180.03,
189.95
64.33,
69.56,
74.80000000000001,
82.27000000000001,
87.50999999999999,
93.5,
101.72,
109.94,
118.18,
127.15,
136.12,
145.1,
154.07999999999998,
163.05,
172.03
],
"三段伤害2": [
[
33.82,
37.2
31.38,
32.95
],
[
36.57,
40.23
33.93,
35.63
],
[
39.33,
43.26
36.49,
38.31
],
[
43.26,
47.58
40.13,
42.14
],
[
46.01,
50.61
42.69,
44.82
],
[
49.16,
54.07
45.61,
47.89
],
[
53.48,
58.83
49.62,
52.1
],
[
57.81,
63.59
53.63,
56.31
],
[
62.14,
68.35
57.65,
60.53
],
[
66.86,
73.54
62.02,
65.13
],
[
71.58,
78.73
66.4,
69.72
],
[
76.29,
83.92
70.78,
74.32
],
[
81.01,
89.11
75.16,
78.92
],
[
85.73,
94.3
79.54,
83.51
],
[
90.45,
99.5
83.92,
88.11
]
],
"四段伤害": [
83.16,
89.93,
96.7,
106.37,
113.14,
120.87,
131.51,
142.14,
152.78,
164.38,
175.99,
187.59,
199.2,
210.8,
222.4
77.93,
84.27,
90.62,
99.68,
106.02,
113.27,
123.24,
133.21,
143.18,
154.05,
164.92,
175.8,
186.67,
197.55,
208.42
],
"重击伤害": [
112.66,
@ -901,99 +900,99 @@
272.08
],
"桂子仙机白玉萝卜伤害": [
81.84,
87.98,
94.12,
102.3,
108.44,
114.58,
122.76,
130.94,
139.13,
147.31,
155.5,
163.68,
173.91,
184.14,
194.37
72.16,
77.57,
82.98,
90.2,
95.61,
101.02,
108.24,
115.46,
122.67,
129.89,
137.1,
144.32,
153.34,
162.36,
171.38
],
"桂子仙机白玉萝卜治疗量": [
250.19,
275.15,
302.18,
331.32,
362.48,
395.69,
431.03000000000003,
468.43,
507.9,
549.4399999999999,
593.04,
638.6899999999999,
686.48,
736.3399999999999,
788.25
196.23000000000002,
215.80999999999997,
237,
259.85999999999996,
284.29,
310.34,
338.07,
367.40000000000003,
398.36,
430.93,
465.12,
500.92999999999995,
538.42,
577.52,
618.24
],
"桂子仙机白玉萝卜治疗量2": [
[
2.57,
247.62
2.02,
194.21
],
[
2.76,
272.39
2.17,
213.64
],
[
2.96,
299.22
2.32,
234.68
],
[
3.21,
328.11
2.52,
257.34
],
[
3.41,
359.07
2.67,
281.62
],
[
3.6,
392.09
2.82,
307.52
],
[
3.86,
427.17
3.03,
335.04
],
[
4.11,
464.32
3.23,
364.17
],
[
4.37,
503.53
3.43,
394.93
],
[
4.63,
544.81
3.63,
427.3
],
[
4.89,
588.15
3.83,
461.29
],
[
5.14,
633.55
4.03,
496.9
],
[
5.46,
681.02
4.29,
534.13
],
[
5.79,
730.55
4.54,
572.98
],
[
6.11,
782.14
4.79,
613.45
]
]
}
@ -1008,7 +1007,7 @@
"2": {
"name": "正思无邪",
"desc": [
"处于玉颗珊珊月中落的桂子仙机状态下时若白玉萝卜的炸裂伤害命中敌人瑶瑶将恢复3点元素能量。每0.8至多通过这种方式恢复一次元素能量。"
"处于玉颗珊珊月中落的桂子仙机状态下时若白玉萝卜的炸裂伤害命中敌人瑶瑶将恢复3点元素能量。每0.8至多通过这种方式恢复一次元素能量。"
]
},
"3": {
@ -1032,7 +1031,7 @@
"6": {
"name": "慈惠仁心",
"desc": [
"月桂·抛掷型投掷白玉萝卜时有50%概率额外投掷超厉害·大萝卜。相比白玉萝卜,超厉害·大萝卜炸裂时的影响范围更大,炸裂时产生如下效果:",
"月桂·抛掷型每投掷2次白玉萝卜就会在下次投掷时额外投掷1枚超厉害·大萝卜。相比白玉萝卜,超厉害·大萝卜炸裂时的影响范围更大,炸裂时产生如下效果:",
"·基于瑶瑶攻击力的75%,造成草元素范围伤害;",
"·基于瑶瑶生命值上限的7.5%,为其中的当前场上角色恢复生命值。",
"每个月桂·抛掷型至多投掷2次超厉害·大萝卜。"
@ -1050,7 +1049,7 @@
{
"name": "天星漫散",
"desc": [
"处于玉颗珊珊月中落的桂子仙机状态下时,瑶瑶冲刺或跳跃时将立即召唤1个月桂·弹跳型。每0.5秒至多通过这种方式召唤1个月桂·弹跳型。"
"处于玉颗珊珊月中落的桂子仙机状态下时,当瑶瑶进行冲刺、跳跃或处于奔跑状态下时将不断向附近的敌人投掷白玉萝卜。每0.6秒至多通过这种方式投掷1枚白玉萝卜。"
]
},
{

View File

@ -2,14 +2,14 @@
"id": 10000078,
"name": "艾尔海森",
"abbr": "艾尔海森",
"title": "",
"title": "诲韬诤言",
"star": 5,
"elem": "dendro",
"allegiance": "",
"allegiance": "须弥教令院",
"weapon": "sword",
"birth": "1-1",
"birth": "2-11",
"astro": "天隼座",
"desc": "测试角色",
"desc": "须弥教令院现任书记官,有过人的智慧与才能。生活得自由自在,一般人基本找不到他。",
"cncv": "",
"jpcv": "",
"costume": false,

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -26,6 +26,7 @@ export default function (step, staticStep) {
},
千岩长枪: {
title: '四璃月队伍提高[atkPct]%攻击力及[cpct]%的暴击率提高',
buffCount: 4,
refine: {
atkPct: [7, 8, 9, 10, 11],
cpct: [3, 4, 5, 6, 7]