mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-25 09:27:34 +00:00
fix: 星铁偶现伤害为NaN
This commit is contained in:
parent
de4b5b8540
commit
c1bc9fec44
@ -50,7 +50,7 @@ let ProfileDetail = {
|
||||
let name = msg.replace(/#|老婆|老公|星铁|原神/g, '').trim()
|
||||
msg = msg.replace('面版', '面板')
|
||||
let dmgRet = /(?:伤害|武器)(\d*)$/.exec(name)
|
||||
let dmgIdx = 0, idxIsInput = false
|
||||
let dmgIdx = 0; let idxIsInput = false
|
||||
if (/(最强|最高|最高分|最牛|第一)/.test(msg)) {
|
||||
mode = /(分|圣遗物|评分|ACE)/.test(msg) ? 'rank-mark' : 'rank-dmg'
|
||||
name = name.replace(/(最强|最高分|第一|最高|最牛|圣遗物|评分|群)/g, '')
|
||||
@ -177,7 +177,7 @@ let ProfileDetail = {
|
||||
wCfg.weapons = await ProfileWeapon.calc(profile)
|
||||
}
|
||||
|
||||
let enemyLv = isGs ? (await selfUser.getCfg('char.enemyLv', 91)) : profile.level
|
||||
let enemyLv = isGs ? (await selfUser.getCfg('char.enemyLv', 91)) : 80
|
||||
let dmgCalc = await ProfileDetail.getProfileDmgCalc({ profile, enemyLv, mode, params })
|
||||
|
||||
let rank = false
|
||||
@ -203,7 +203,7 @@ let ProfileDetail = {
|
||||
// 属性
|
||||
lodash.forEach('0113355778'.split(''), (pos, idx) => {
|
||||
treeData[pos] = treeData[pos] || []
|
||||
let tmp = { type: 'tree', img: `/meta-sr/public/icons/tree-cpct.webp` }
|
||||
let tmp = { type: 'tree', img: '/meta-sr/public/icons/tree-cpct.webp' }
|
||||
treeData[pos].push(tmp)
|
||||
treeMap[idx + 201 + ''] = tmp
|
||||
})
|
||||
|
@ -7,7 +7,7 @@ const CharTalent = {
|
||||
for (let i = 1; i <= 15; i++) {
|
||||
lvs.push('Lv' + i)
|
||||
}
|
||||
let detail = lodash.extend({}, char.getDetail())
|
||||
let detail = JSON.parse(JSON.stringify(char.getDetail()))
|
||||
if (char.game === 'sr') {
|
||||
lodash.forEach(['cons', 'talent', 'treeData'], (key) => {
|
||||
lodash.forEach(detail[key], (ds, idx) => {
|
||||
@ -27,7 +27,7 @@ const CharTalent = {
|
||||
saveId: `${mode}-${char.id}`,
|
||||
...char.getData(),
|
||||
game: char.game,
|
||||
detail: char.getDetail(),
|
||||
detail,
|
||||
imgs: char.getImgs(),
|
||||
mode,
|
||||
lvs,
|
||||
|
@ -5,7 +5,7 @@ import CharMaterial from './CharMaterial.js'
|
||||
import { Cfg, Common } from '#miao'
|
||||
import { Character } from '#miao.models'
|
||||
|
||||
const wikiReg = /^(?:#|喵喵)?(?:星铁)?(.*)(天赋|技能|命座|命之座|资料|图鉴|照片|写真|图片|图像)$/
|
||||
const wikiReg = /^(?:#|喵喵)?(?:星铁)?(.*)(天赋|技能|行迹|命座|命之座|星魂|资料|图鉴|照片|写真|图片|图像)$/
|
||||
|
||||
const CharWiki = {
|
||||
check (e) {
|
||||
@ -18,7 +18,7 @@ const CharWiki = {
|
||||
return false
|
||||
}
|
||||
let mode = 'talent'
|
||||
if (/命/.test(ret[2])) {
|
||||
if (/(命|星魂)/.test(ret[2])) {
|
||||
mode = 'cons'
|
||||
} else if (/(图鉴|资料)/.test(ret[2])) {
|
||||
mode = 'wiki'
|
||||
|
@ -195,6 +195,7 @@ let DmgCalc = {
|
||||
break
|
||||
}
|
||||
|
||||
// 技能持续伤害 = 伤害值乘区 * 增伤区 * 易伤区 * 防御区 * 抗性区 * 减伤区
|
||||
case 'skillDot': {
|
||||
ret = {
|
||||
avg: dmgBase * dmgNum * enemyDmgNum * defNum * kNum * dmgReduceNum
|
||||
|
@ -11,7 +11,7 @@ export const details = [{
|
||||
return dmg(talent.q['技能伤害'] + addDmg, 'q')
|
||||
}
|
||||
}, {
|
||||
title: '对10韧性敌人量子击破纠缠伤害',
|
||||
title: '击破纠缠伤害(10韧性怪)',
|
||||
dmg: ({ calc, attr }, { reaction }) => {
|
||||
return {
|
||||
avg: reaction('entanglement').avg * 5 * (10 + 2) / 4
|
||||
|
@ -81,7 +81,7 @@ export const buffs = [{
|
||||
check: ({ params }) => params.break === true,
|
||||
cons: 4,
|
||||
data: {
|
||||
stance: ({ attr }) => attr.stance
|
||||
stance: 100
|
||||
}
|
||||
}, {
|
||||
title: '阮梅6命:天赋造成的击破伤害倍率额外提高200%',
|
||||
|
Loading…
Reference in New Issue
Block a user