diff --git a/.gitignore b/.gitignore index 2fd0122e..c7b549f6 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,6 @@ *.psd .idea +/tools/char-data-sprider.js /components/cfg.json /resources/miao-res-plus/ /components/setting.json diff --git a/config/system/character.js b/config/system/character.js index d021109d..7b7ecef0 100644 --- a/config/system/character.js +++ b/config/system/character.js @@ -69,10 +69,9 @@ export const characters = { 10000066: ['神里绫人', 'Kamisato Ayato', 'Ayato', '绫人', '神里凌人', '凌人', '0人', '神人', '零人', '大舅哥'], // 3.0 - // ID暂无,使用临时ID代替 - 10000100: ['提纳里', '提那里', '驴'], - 10000101: ['柯莱', '柯来', '科莱', '科来', '小天使'], - 10000102: ['多莉', '多利', '多力'], + 10000069: ['提纳里', 'Tighnari', '提那里', '驴'], + 10000067: ['柯莱', 'Collei', '柯来', '科莱', '科来', '小天使'], + 10000068: ['多莉', 'Dori', '多利', '多力'], // 以下为Miao新增自定义角色 paimon: ['派蒙', '应急食物', '应急食品', '吉祥物', '宠物', '外置器官', '会说话的动物', '矮堇瓜', '飞行矮堇瓜', '最好的伙伴'], diff --git a/models/ProfileDmg.js b/models/ProfileDmg.js index 0af31b9e..f9cb4189 100644 --- a/models/ProfileDmg.js +++ b/models/ProfileDmg.js @@ -15,9 +15,6 @@ export default class ProfileDmg extends Base { let { id } = profile this.char = Character.get(id) } - if (!this.char) { - return false - } } // 获取天赋数据 diff --git a/tools/dmg-calc-tool.js b/tools/dmg-calc-tool.js index 03987ea4..12c1d949 100644 --- a/tools/dmg-calc-tool.js +++ b/tools/dmg-calc-tool.js @@ -1,10 +1,15 @@ +// eslint-disable-next-line no-unused-vars import { Data } from '../components/index.js' import { ProfileDmg } from '../models/index.js' export async function calcDmg (inputData, enemyLv = 86) { let dmg = new ProfileDmg(inputData) let ret = await dmg.calcData({ enemyLv }) - ret = Data.getData(ret, 'ret,msg,enemyName') - ret.enemyLevel = enemyLv + if (ret === false) { + return {} + } else { + ret = Data.getData(ret, 'ret,msg,enemyName') + ret.enemyLevel = enemyLv + } return ret }