From 93e1e6b21fda761818a34ba7bf7ae123d0491be3 Mon Sep 17 00:00:00 2001 From: yoimiya-kokomi <592981798@qq.com> Date: Tue, 23 Aug 2022 06:21:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A03.0=E7=9B=B8=E5=85=B3?= =?UTF-8?q?=E7=9A=84=E8=A7=92=E8=89=B2=E4=BF=A1=E6=81=AF=E5=8F=8A=E9=85=8D?= =?UTF-8?q?=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + config/system/character.js | 7 +++---- models/ProfileDmg.js | 3 --- tools/dmg-calc-tool.js | 9 +++++++-- 4 files changed, 11 insertions(+), 9 deletions(-) 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 }