mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-16 04:35:42 +00:00
修正伤害计算的问题
This commit is contained in:
parent
03d585484f
commit
2078ac56d0
@ -137,7 +137,7 @@ export default class ProfileDmg extends Base {
|
||||
|
||||
buffs = this.getBuffs(buffs)
|
||||
|
||||
let { msg } = DmgAttr.calcAttr({ originalAttr, buffs, meta, params: defParams || {} })
|
||||
let { msg } = DmgAttr.calcAttr({ originalAttr, buffs, meta, params: defParams || {}, game })
|
||||
let msgList = []
|
||||
|
||||
let ret = []
|
||||
@ -172,7 +172,7 @@ export default class ProfileDmg extends Base {
|
||||
detail = detail({ ...ds, attr, profile })
|
||||
}
|
||||
let params = lodash.merge({}, defParams, detail?.params || {})
|
||||
let { attr, msg } = DmgAttr.calcAttr({ originalAttr, buffs, meta, params, talent: detail.talent || '' })
|
||||
let { attr, msg } = DmgAttr.calcAttr({ originalAttr, buffs, meta, params, talent: detail.talent || '', game })
|
||||
if (detail.isStatic) {
|
||||
return
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ let DmgAttr = {
|
||||
|
||||
// 计算属性
|
||||
calcAttr ({ originalAttr, buffs, meta, params = {}, incAttr = '', reduceAttr = '', talent = '', game = 'gs' }) {
|
||||
let attr = DmgAttr.getAttr({ originalAttr, game: originalAttr.game })
|
||||
let attr = DmgAttr.getAttr({ originalAttr, game })
|
||||
let msg = []
|
||||
let { attrMap } = Meta.getMeta(game, 'arti')
|
||||
|
||||
@ -202,9 +202,6 @@ let DmgAttr = {
|
||||
}
|
||||
let aRet = /^(hp|def|atk|mastery|cpct|cdmg|heal|recharge|dmg|phy|shield|speed)(Plus|Pct|Inc)?$/.exec(key)
|
||||
if (aRet) {
|
||||
if (aRet[1] === 'hp') {
|
||||
console.log(val, key, attr[aRet[1]], val)
|
||||
}
|
||||
attr[aRet[1]][aRet[2] ? aRet[2].toLowerCase() : 'plus'] += val * 1 || 0
|
||||
return
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user