miao-plugin/tools/dmg-calc-tool.js

16 lines
423 B
JavaScript
Raw Normal View History

// eslint-disable-next-line no-unused-vars
2022-08-22 20:53:31 +00:00
import { Data } from '../components/index.js'
import { ProfileDmg } from '../models/index.js'
export async function calcDmg (inputData, enemyLv = 86) {
2022-08-22 20:53:31 +00:00
let dmg = new ProfileDmg(inputData)
let ret = await dmg.calcData({ enemyLv })
if (ret === false) {
return {}
} else {
ret = Data.getData(ret, 'ret,msg,enemyName')
ret.enemyLevel = enemyLv
}
2022-08-22 20:53:31 +00:00
return ret
}