miao-plugin/models/profile-lib/Mastery.js

26 lines
537 B
JavaScript
Raw Normal View History

import { erType } from './calc-meta.js'
2022-08-18 10:13:42 +00:00
let Mastery = {
getType () {
},
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
}
}
2022-08-18 10:13:42 +00:00
export default Mastery