mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-16 04:35:42 +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 { attr } = DmgAttr.calcAttr({ originalAttr, buffs, meta, params, talent: detail.talent || '' })
|
||||
if (detail.isStatic) {
|
||||
return
|
||||
}
|
||||
if (detail.check && !detail.check(DmgAttr.getDs(attr, meta, params))) {
|
||||
return
|
||||
}
|
||||
|
@ -132,7 +132,9 @@ let DmgAttr = {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (buff.isStatic) {
|
||||
return
|
||||
}
|
||||
// 如果存在rule,则进行计算
|
||||
if (buff.check && !buff.check(ds)) {
|
||||
return
|
||||
|
@ -37,6 +37,7 @@ let DmgBuffs = {
|
||||
if (lodash.isPlainObject(weaponCfg)) {
|
||||
weaponCfg = [weaponCfg]
|
||||
}
|
||||
let ret = []
|
||||
lodash.forEach(weaponCfg, (ds) => {
|
||||
if (ds.isStatic) {
|
||||
return true
|
||||
@ -50,8 +51,9 @@ let DmgBuffs = {
|
||||
ds.data[key] = ({ refine }) => r[refine] * (ds.buffCount || 1)
|
||||
})
|
||||
}
|
||||
ret.push(ds)
|
||||
})
|
||||
return weaponCfg
|
||||
return ret
|
||||
},
|
||||
|
||||
getBuffs (profile, buffs = []) {
|
||||
|
Loading…
Reference in New Issue
Block a user