mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2025-02-01 16:05:53 +00:00
修正伤害计算下静态Buff被重复计算导致的错误
This commit is contained in:
parent
7f4705c64e
commit
5b23ea3349
@ -153,6 +153,9 @@ export default class ProfileDmg extends Base {
|
|||||||
}
|
}
|
||||||
let params = lodash.merge({}, defParams, detail.params || {})
|
let params = lodash.merge({}, defParams, detail.params || {})
|
||||||
let { attr } = DmgAttr.calcAttr({ originalAttr, buffs, meta, params, talent: detail.talent || '' })
|
let { attr } = DmgAttr.calcAttr({ originalAttr, buffs, meta, params, talent: detail.talent || '' })
|
||||||
|
if (detail.isStatic) {
|
||||||
|
return
|
||||||
|
}
|
||||||
if (detail.check && !detail.check(DmgAttr.getDs(attr, meta, params))) {
|
if (detail.check && !detail.check(DmgAttr.getDs(attr, meta, params))) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -132,7 +132,9 @@ let DmgAttr = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (buff.isStatic) {
|
||||||
|
return
|
||||||
|
}
|
||||||
// 如果存在rule,则进行计算
|
// 如果存在rule,则进行计算
|
||||||
if (buff.check && !buff.check(ds)) {
|
if (buff.check && !buff.check(ds)) {
|
||||||
return
|
return
|
||||||
|
@ -37,6 +37,7 @@ let DmgBuffs = {
|
|||||||
if (lodash.isPlainObject(weaponCfg)) {
|
if (lodash.isPlainObject(weaponCfg)) {
|
||||||
weaponCfg = [weaponCfg]
|
weaponCfg = [weaponCfg]
|
||||||
}
|
}
|
||||||
|
let ret = []
|
||||||
lodash.forEach(weaponCfg, (ds) => {
|
lodash.forEach(weaponCfg, (ds) => {
|
||||||
if (ds.isStatic) {
|
if (ds.isStatic) {
|
||||||
return true
|
return true
|
||||||
@ -50,8 +51,9 @@ let DmgBuffs = {
|
|||||||
ds.data[key] = ({ refine }) => r[refine] * (ds.buffCount || 1)
|
ds.data[key] = ({ refine }) => r[refine] * (ds.buffCount || 1)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
ret.push(ds)
|
||||||
})
|
})
|
||||||
return weaponCfg
|
return ret
|
||||||
},
|
},
|
||||||
|
|
||||||
getBuffs (profile, buffs = []) {
|
getBuffs (profile, buffs = []) {
|
||||||
|
Loading…
Reference in New Issue
Block a user