2022-08-22 22:21:56 +00:00
|
|
|
// eslint-disable-next-line no-unused-vars
|
2023-03-07 17:52:11 +00:00
|
|
|
import { Data } from '#miao'
|
|
|
|
import { ProfileDmg } from '#miao.models'
|
2023-04-18 19:01:25 +00:00
|
|
|
import { ProfileWeapon } from '../apps/profile/ProfileWeapon.js'
|
2022-07-16 19:03:06 +00:00
|
|
|
|
2022-07-30 20:20:10 +00:00
|
|
|
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 })
|
2022-08-22 22:21:56 +00:00
|
|
|
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
|
|
|
|
}
|
2023-04-18 19:01:25 +00:00
|
|
|
|
|
|
|
export async function calcWeapon (inputData, enemyLv = 86) {
|
|
|
|
return await ProfileWeapon.calc(inputData)
|
|
|
|
}
|