2022-07-30 20:20:10 +00:00
|
|
|
import { erType } from './calc-meta.js'
|
2022-06-20 22:55:08 +00:00
|
|
|
|
2022-08-18 10:13:42 +00:00
|
|
|
let Mastery = {
|
2022-06-20 22:55:08 +00:00
|
|
|
|
2022-07-30 20:20:10 +00:00
|
|
|
getType () {
|
2022-06-20 22:55:08 +00:00
|
|
|
|
|
|
|
},
|
2022-07-30 20:20:10 +00:00
|
|
|
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
|
2022-06-20 22:55:08 +00:00
|
|
|
}
|
2022-07-30 20:20:10 +00:00
|
|
|
return 0
|
2022-06-20 22:55:08 +00:00
|
|
|
},
|
2022-07-30 20:20:10 +00:00
|
|
|
getBasePct (type, element) {
|
|
|
|
let typeCfg = erType[type]
|
2022-06-20 22:55:08 +00:00
|
|
|
if (typeCfg) {
|
2022-07-30 20:20:10 +00:00
|
|
|
return typeCfg.num({ element }) || 1
|
2022-06-20 22:55:08 +00:00
|
|
|
}
|
2022-07-30 20:20:10 +00:00
|
|
|
return 1
|
2022-06-20 22:55:08 +00:00
|
|
|
}
|
2022-07-30 20:20:10 +00:00
|
|
|
}
|
2022-08-18 10:13:42 +00:00
|
|
|
export default Mastery
|