mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-16 04:35:42 +00:00
e7081578ab
Signed-off-by: liangshi <1142607614@qq.com>
26 lines
684 B
JavaScript
26 lines
684 B
JavaScript
import { erType } from './DmgCalcMeta.js'
|
|
|
|
let DmgMastery = {
|
|
getMultiple (type, mastery = 0) {
|
|
let typeCfg = erType[type]
|
|
if (typeCfg.type === 'pct') {
|
|
return (25 / 9) * mastery / (mastery + 1400)
|
|
} else if (typeCfg.type === 'fusion') {
|
|
return 16 * mastery / (mastery + 2000)
|
|
} else if (typeCfg.type === 'bonus') {
|
|
return 5 * mastery / (mastery + 1200)
|
|
} else if (typeCfg.type === 'shield') {
|
|
return (40 / 9) * mastery / (mastery + 1400)
|
|
}
|
|
return 0
|
|
},
|
|
getBasePct (type, element) {
|
|
let typeCfg = erType[type]
|
|
if (typeCfg) {
|
|
return typeCfg.num({ element }) || 1
|
|
}
|
|
return 1
|
|
}
|
|
}
|
|
export default DmgMastery
|