修正一些已知问题

This commit is contained in:
Kokomi 2023-05-24 03:30:30 +08:00
parent 21c3926ef7
commit ec39f6146f
7 changed files with 98 additions and 14 deletions

View File

@ -104,6 +104,7 @@ export default class ProfileDmg extends Base {
}
let { profile } = this
let { game } = this.char
let sp = this.detail?.sp
let charCalcData = await this.getCalcRule()
if (!charCalcData) {
@ -123,7 +124,7 @@ export default class ProfileDmg extends Base {
defParams = defParams || {}
let originalAttr = DmgAttr.getAttr({ id, weapon, attr, char: this.char, game })
let originalAttr = DmgAttr.getAttr({ id, weapon, attr, char: this.char, game, sp })
buffs = this.getBuffs(buffs)

View File

@ -189,7 +189,7 @@ let ArtisMark = {
let ds = artis[idx]
if (ds) {
// 不再支持非id格式的面板
if (!ds.name || !ds.main || !ds.attrs || !ds?.main?.key || !ds.mainId) {
if (!ds.attrs || !ds.mainId) {
return false
}
}

View File

@ -9,7 +9,7 @@ import { Format } from '#miao'
let DmgAttr = {
// 计算并返回指定属性值
getAttrValue (ds) {
getAttrValue (ds = {}) {
return (ds.base || 0) + (ds.plus || 0) + ((ds.base || 0) * (ds.pct || 0) / 100)
},

View File

@ -0,0 +1,43 @@
export const details = [{
title: 'A普攻伤害',
dmg: ({ talent }, dmg) => dmg(talent.a['技能伤害'], 'a')
}, {
title: 'E战技伤害',
dmg: ({ talent }, dmg) => dmg(talent.e['技能伤害'], 'e')
}, {
title: 'Q终结技伤害',
dmg: ({ talent }, dmg) => dmg(talent.q['技能伤害'], 'q')
}, {
title: '10层神君单体伤害',
dmg: ({ talent }, dmg) => dmg(talent.t['技能伤害'] * 10, 'a3')
}]
export const mainAttr = 'atk,cpct,cdmg,speed'
export const buffs = [{
title: '景元2命神君行动后普攻战技及终结技的伤害提高20%',
cons: 2,
data: {
aDmg: 20,
eDmg: 20,
qDmg: 20
}
}, {
title: '景元6命神君会使目标陷入易伤状态使伤害提高12%最多3层',
cons: 6,
data: {
a3Dmg: (12 + 12 * 2 + 12 * 3 * 7) / 10
}
}, {
title: '行迹-破阵攻击段数大于等于6段则其下回合的暴击伤害提高25%',
tree: 1,
data: {
a3Cdmg: 25
}
}, {
title: '行迹-遣将施放战技后暴击率提升10%',
tree: 3,
data: {
cpct: 10
}
}]

View File

@ -6,7 +6,6 @@
"star": 5,
"elem": "雷",
"allegiance": "仙舟「罗浮」",
"weapon": "智识",
"sp": 130,
"desc": "仙舟联盟帝弓七天将之一,负责节制罗浮云骑军的「神策将军」。 师从前代「罗浮」剑首,但并不显名于武力。",
"cncv": "孙晔",

View File

@ -28,12 +28,13 @@ let loadBuffs = async function () {
key
}
}, (title, key, idx) => {
if (arguments.length === 2) {
if (lodash.isPlainObject(key)) {
return (tables) => {
let data = {}
lodash.forEach(key, (idx, k) => {
data[k] = tables[idx]
})
console.log(data)
return {
title,
data

View File

@ -1,23 +1,63 @@
export default function (staticIdx, keyIdx) {
return {
'「我」的诞生': [
keyIdx(1, 'a3Dmg', '追加攻击伤害提高[a3Dmg]%')
(tables) => {
return {
title: '敌方目标当前生命值百分比小于等于50%追加伤害提高[a3Dmg]%',
data: {
a3Dmg: tables[1] + tables[2]
}
}
}
],
今日亦是和平的一日: (tables) => {
return {
title: '根据能量上限提高数据',
data: {
dmg: () => tables
dmg: ({ sp }) => tables[1] * Math.min(sp, 160)
}
}
},
别让世界静下来: [staticIdx(1, 'recharge')],
天才们的休憩: [staticIdx(1, 'atkPct')],
拂晓之前: [staticIdx(1, 'cdmg')],
早餐的仪式感: [staticIdx(1, 'dmg')],
智库: [],
别让世界静下来: [
staticIdx(1, 'recharge'),
keyIdx('终结技造成的伤害提高[qDmg]%', 'qDmg', 2)
],
天才们的休憩: [
staticIdx(1, 'atkPct'),
keyIdx('消灭敌方目标后爆伤提高[cdmg]%', 'cdmg', 2)
],
拂晓之前: [
staticIdx(1, 'cdmg'),
keyIdx('战技和终结技造成的伤害提高[eDmg]%,追加攻击造成的伤害提高[a3Dmg]%', { eDmg: 2, qDmg: 2, a3Dmg: 3 })
],
早餐的仪式感: [
staticIdx(1, 'dmg'),
(tables) => {
return {
title: '3层Buff下提高攻击力[atkPct]%',
data: {
atkPct: tables[2] * 3
}
}
}
],
智库: [
keyIdx('使装备者终结技造成的伤害提高[qDmg]%', 'qDmg', 1)
],
灵钥: [],
睿见: [],
银河铁道之夜: []
睿见: [
keyIdx('施放终结技时攻击力提高[atkPct]%', 'atkPct', 1)
],
银河铁道之夜: [
(tables) => {
return {
title: '3个敌方目标提高攻击力[atkPct]%,弱点击破时伤害提高[dmg]%',
data: {
atkPct: tables[1] * 3,
dmg: tables[2]
}
}
}
]
}
}