2022-10-06 22:20:46 +00:00
|
|
|
import { erType } from './DmgCalcMeta.js'
|
2022-06-20 22:55:08 +00:00
|
|
|
|
2022-08-24 01:07:06 +00:00
|
|
|
let DmgMastery = {
|
2022-11-05 11:31:07 +00:00
|
|
|
getMultiple (type, mastery = 0) {
|
2022-07-30 20:20:10 +00:00
|
|
|
let typeCfg = erType[type]
|
|
|
|
if (typeCfg.type === 'pct') {
|
2022-11-05 11:31:07 +00:00
|
|
|
return (25 / 9) * mastery / (mastery + 1400)
|
2022-07-30 20:20:10 +00:00
|
|
|
} else if (typeCfg.type === 'fusion') {
|
2022-11-05 11:31:07 +00:00
|
|
|
return 16 * mastery / (mastery + 2000)
|
2022-11-05 15:47:44 +00:00
|
|
|
} else if (typeCfg.type === 'bonus') {
|
2022-11-05 11:31:07 +00:00
|
|
|
return 5 * mastery / (mastery + 1200)
|
2024-01-02 15:42:36 +00:00
|
|
|
} else if (typeCfg.type === 'shield') {
|
|
|
|
return (40 / 9) * mastery / (mastery + 1400)
|
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-24 01:07:06 +00:00
|
|
|
export default DmgMastery
|