mirror of
https://github.com/yoimiya-kokomi/miao-plugin.git
synced 2024-11-22 15:36:27 +00:00
22 lines
521 B
JavaScript
22 lines
521 B
JavaScript
import { erType } from './calc-meta.js'
|
|
|
|
let DmgMastery = {
|
|
getMultiple (type = 'zf', mastery = 0) {
|
|
let typeCfg = erType[type]
|
|
if (typeCfg.type === 'pct') {
|
|
return 2.78 * mastery / (mastery + 1400) * 100
|
|
} else if (typeCfg.type === 'fusion') {
|
|
return (1 + mastery * 16) / (mastery + 2000) * 100
|
|
}
|
|
return 0
|
|
},
|
|
getBasePct (type, element) {
|
|
let typeCfg = erType[type]
|
|
if (typeCfg) {
|
|
return typeCfg.num({ element }) || 1
|
|
}
|
|
return 1
|
|
}
|
|
}
|
|
export default DmgMastery
|