更新面板增加单用户更新间隔控制,默认5分钟

This commit is contained in:
yoimiya-kokomi 2022-07-31 04:20:10 +08:00
parent 36064596f4
commit 078be6ded9
23 changed files with 1235 additions and 1509 deletions

View File

@ -1,7 +1,10 @@
# 1.9.1
# 1.9.2
* `#更新面板`支持配置更新API
* 若面板更新失败可尝试在**miao-plugin/config/profile.js**文件中配置切换更新API
* `#更新面板`支持配置更新API适配Enka新校验逻辑
* B服角色使用Enka服务进行面板信息获取
* 感谢Enka官方 **@Algoinde**的官方授权及UA校验
* 感谢 **@MiniGrayGay**提供的Enka服务中转若面板更新失败可尝试在**miao-plugin/config/profile.js**文件中配置切换更新API
* 更新面板增加单用户更新间隔控制默认5分钟
* 修正部分V3Yunzai下的适配问题
# 1.9.0

View File

@ -1,52 +1,49 @@
import fs from "fs";
import lodash from "lodash";
import Format from "./Format.js";
import { Character } from "./models.js"
import { eleBaseDmg, eleMap, attrMap } from "./calc/calc-meta.js";
import { Mastery } from "./calc/mastery.js";
import fs from 'fs'
import lodash from 'lodash'
import Format from './Format.js'
import { Character } from './models.js'
import { eleBaseDmg, eleMap, attrMap } from './calc/calc-meta.js'
import { Mastery } from './calc/mastery.js'
let Calc = {
async getCharCalcRule(name) {
async getCharCalcRule (name) {
const _path = process.cwd()
const cfgPath = `${_path}/plugins/miao-plugin/resources/meta/character/${name}/calc.js`
const _path = process.cwd();
const cfgPath = `${_path}/plugins/miao-plugin/resources/meta/character/${name}/calc.js`;
let details, buffs = [], defParams = {}, defDmgIdx = -1, mainAttr = "atk,cpct,cdmg", enemyName = "小宝";
let details; let buffs = []; let defParams = {}; let defDmgIdx = -1; let mainAttr = 'atk,cpct,cdmg'; let enemyName = '小宝'
if (fs.existsSync(cfgPath)) {
let fileData = await import (`file://${cfgPath}`);
details = fileData.details || false;
buffs = fileData.buffs || [];
defParams = fileData.defParams || {};
let fileData = await import(`file://${cfgPath}`)
details = fileData.details || false
buffs = fileData.buffs || []
defParams = fileData.defParams || {}
if (fileData.defDmgIdx) {
defDmgIdx = fileData.defDmgIdx;
defDmgIdx = fileData.defDmgIdx
}
if (fileData.mainAttr) {
mainAttr = fileData.mainAttr;
mainAttr = fileData.mainAttr
}
if (fileData.enemyName) {
enemyName = fileData.enemyName;
enemyName = fileData.enemyName
}
}
if (details) {
return { details, buffs, defParams, defDmgIdx, mainAttr, enemyName }
}
return false;
return false
},
// 获取基础属性
attr(profile) {
let ret = {},
{ attr } = profile;
attr (profile) {
let ret = {}
let { attr } = profile
ret.dataSource = profile.dataSource || "miao";
ret.dataSource = profile.dataSource || 'miao'
// 基础属性
lodash.forEach("atk,def,hp".split(","), (key) => {
lodash.forEach('atk,def,hp'.split(','), (key) => {
ret[key] = {
base: attr[`${key}Base`] * 1 || 0,
plus: attr[key] * 1 - attr[`${key}Base`] * 1 || 0,
@ -54,7 +51,7 @@ let Calc = {
}
})
lodash.forEach("mastery,recharge".split(","), (key) => {
lodash.forEach('mastery,recharge'.split(','), (key) => {
ret[key] = {
base: attr[key] * 1 || 0,
plus: 0,
@ -62,7 +59,7 @@ let Calc = {
}
})
lodash.forEach({ cRate: "cpct", cDmg: "cdmg", hInc: "heal" }, (val, key) => {
lodash.forEach({ cRate: 'cpct', cDmg: 'cdmg', hInc: 'heal' }, (val, key) => {
ret[val] = {
base: attr[key] * 1 || 0,
plus: 0,
@ -71,105 +68,103 @@ let Calc = {
}
})
lodash.forEach("dmg,phy".split(","), (key) => {
lodash.forEach('dmg,phy'.split(','), (key) => {
ret[key] = {
base: attr[key + "Bonus"] * 1 || 0,
base: attr[key + 'Bonus'] * 1 || 0,
plus: 0,
pct: 0
}
})
// 技能属性记录
lodash.forEach("a,a2,a3,e,q".split(","), (key) => {
lodash.forEach('a,a2,a3,e,q'.split(','), (key) => {
ret[key] = {
pct: 0, // 倍率加成
multi: 0, // 独立倍率乘区加成
plus: 0, // 伤害值提高
dmg: 0, // 伤害提高
cpct: 0,// 暴击提高
cdmg: 0, //爆伤提高
cpct: 0, // 暴击提高
cdmg: 0, // 爆伤提高
def: 0, // 防御降低
ignore: 0, // 无视防御
ignore: 0 // 无视防御
}
})
ret.enemy = {
def: 0, // 降低防御
ignore: 0, // 无视防御
phy: 0 // 物理防御
phy: 0 // 物理防御
}
ret.shield = {
base: 100, // 基础
plus: 0, // 护盾强效
inc: 100, // 吸收倍率
inc: 100 // 吸收倍率
}
let char = Character.get(profile);
ret.weapon = profile.weapon;
ret.weaponType = char.weaponType;
ret.element = eleMap[char.elem.toLowerCase()];
ret.refine = (profile.weapon.affix * 1 - 1) || 0;
let char = Character.get(profile)
ret.weapon = profile.weapon
ret.weaponType = char.weaponType
ret.element = eleMap[char.elem.toLowerCase()]
ret.refine = (profile.weapon.affix * 1 - 1) || 0
ret.multi = 0;
ret.multi = 0
ret.zf = 0;
ret.rh = 0;
ret.gd = 0;
ret.ks = 0;
ret.zf = 0
ret.rh = 0
ret.gd = 0
ret.ks = 0
ret.kx = 0;
ret.fykx = 0;
return ret;
ret.kx = 0
ret.fykx = 0
return ret
},
// 获取天赋数据
talent(profile, char) {
let ret = {};
talent (profile, char) {
let ret = {}
let talentData = profile.talent || {};
let talentData = profile.talent || {}
lodash.forEach(['a', 'e', 'q'], (key) => {
let td = talentData[key] || {};
let lv = td.level_current * 1 || 1,
lvKey = `Lv${lv}`;
let td = talentData[key] || {}
let lv = td.level_current * 1 || 1
let map = {};
let map = {}
lodash.forEach(char.talent[key].tables, (tr) => {
let val = tr.values[lv - 1];
val = val.replace(/[^\x00-\xff]/g, "").trim();
let valArr = [], valArr2 = [];
lodash.forEach(val.split("/"), (v, idx) => {
let valNum = 0;
lodash.forEach(v.split("+"), (v) => {
v = v.split("*")
let v1 = v[0].replace("%", "").trim();
valNum += v1 * (v[1] || 1);
let val = tr.values[lv - 1]
val = val.replace(/[^\x00-\xff]/g, '').trim()
let valArr = []; let valArr2 = []
lodash.forEach(val.split('/'), (v, idx) => {
let valNum = 0
lodash.forEach(v.split('+'), (v) => {
v = v.split('*')
let v1 = v[0].replace('%', '').trim()
valNum += v1 * (v[1] || 1)
valArr2.push(v1)
})
valArr.push(valNum);
});
valArr.push(valNum)
})
if (isNaN(valArr[0])) {
map[tr.name] = false;
map[tr.name] = false
} else if (valArr.length === 1) {
map[tr.name] = valArr[0];
map[tr.name] = valArr[0]
} else {
map[tr.name] = valArr;
map[tr.name] = valArr
}
map[tr.name + "2"] = valArr2;
map[tr.name + '2'] = valArr2
})
ret[key] = map;
ret[key] = map
})
return ret;
return ret
},
getDs(attr, meta, params) {
getDs (attr, meta, params) {
return {
...meta,
attr,
@ -178,80 +173,79 @@ let Calc = {
weaponType: attr.weaponType,
weapon: attr.weapon,
element: eleMap[attr.element] || attr.element,
calc(ds) {
calc (ds) {
return (ds.base || 0) + (ds.plus || 0) + ((ds.base || 0) * (ds.pct || 0) / 100)
}
}
},
calcAttr({ originalAttr, buffs, meta, params = {}, incAttr = '', reduceAttr = '', talent = '' }) {
let attr = lodash.merge({}, originalAttr);
let msg = [];
calcAttr ({ originalAttr, buffs, meta, params = {}, incAttr = '', reduceAttr = '', talent = '' }) {
let attr = lodash.merge({}, originalAttr)
let msg = []
if (incAttr && attrMap[incAttr]) {
let aCfg = attrMap[incAttr];
attr[incAttr][aCfg.type] += aCfg.val;
let aCfg = attrMap[incAttr]
attr[incAttr][aCfg.type] += aCfg.val
}
if (reduceAttr && attrMap[reduceAttr]) {
let aCfg = attrMap[reduceAttr];
attr[reduceAttr][aCfg.type] -= aCfg.val;
let aCfg = attrMap[reduceAttr]
attr[reduceAttr][aCfg.type] -= aCfg.val
}
lodash.forEach(buffs, (buff) => {
let ds = Calc.getDs(attr, meta, params);
let ds = Calc.getDs(attr, meta, params)
ds.currentTalent = talent;
ds.currentTalent = talent
// 如果存在rule则进行计算
if (buff.check && !buff.check(ds)) {
return;
return
}
if (buff.cons) {
if (ds.cons * 1 < buff.cons * 1) {
return;
return
}
}
let title = buff.title;
let title = buff.title
if (buff.mastery) {
let mastery = Math.max(0, attr.mastery.base + attr.mastery.plus);
let mastery = Math.max(0, attr.mastery.base + attr.mastery.plus)
// let masteryNum = 2.78 * mastery / (mastery + 1400) * 100;
buff.data = buff.data || {};
lodash.forEach(buff.mastery.split(","), (key) => {
buff.data[key] = Mastery.getMultiple(key, mastery);
buff.data = buff.data || {}
lodash.forEach(buff.mastery.split(','), (key) => {
buff.data[key] = Mastery.getMultiple(key, mastery)
// buff.data[key] = masteryNum;
})
}
lodash.forEach(buff.data, (val, key) => {
if (lodash.isFunction(val)) {
val = val(ds);
val = val(ds)
}
title = title.replace(`[${key}]`, Format.comma(val, 1));
title = title.replace(`[${key}]`, Format.comma(val, 1))
// 技能提高
let tRet = /^(a|a2|a3|e|q)(Def|Ignore|Dmg|Plus|Pct|Cpct|Cdmg|Multi)$/.exec(key);
let tRet = /^(a|a2|a3|e|q)(Def|Ignore|Dmg|Plus|Pct|Cpct|Cdmg|Multi)$/.exec(key)
if (tRet) {
attr[tRet[1]][tRet[2].toLowerCase()] += val * 1 || 0;
return;
attr[tRet[1]][tRet[2].toLowerCase()] += val * 1 || 0
return
}
let aRet = /^(hp|def|atk|mastery|cpct|cdmg|heal|recharge|dmg|phy|shield)(Plus|Pct|Inc)?$/.exec(key);
let aRet = /^(hp|def|atk|mastery|cpct|cdmg|heal|recharge|dmg|phy|shield)(Plus|Pct|Inc)?$/.exec(key)
if (aRet) {
attr[aRet[1]][aRet[2] ? aRet[2].toLowerCase() : "plus"] += val * 1 || 0;
return;
attr[aRet[1]][aRet[2] ? aRet[2].toLowerCase() : 'plus'] += val * 1 || 0
return
}
if (key === "enemyDef") {
attr.enemy.def += val * 1 || 0;
return;
if (key === 'enemyDef') {
attr.enemy.def += val * 1 || 0
return
}
if (["zf", "rh", "kx", 'gd', 'ks', 'fykx'].includes(key)) {
attr[key] += val * 1 || 0;
if (['zf', 'rh', 'kx', 'gd', 'ks', 'fykx'].includes(key)) {
attr[key] += val * 1 || 0
}
});
msg.push(title);
})
msg.push(title)
})
return {
@ -259,57 +253,56 @@ let Calc = {
}
},
async weapon(weaponName) {
const _path = process.cwd();
const cfgPath = `${_path}/plugins/miao-plugin/resources/meta/weapons/calc.js`;
async weapon (weaponName) {
const _path = process.cwd()
const cfgPath = `${_path}/plugins/miao-plugin/resources/meta/weapons/calc.js`
let weapons = {};
let weapons = {}
if (fs.existsSync(cfgPath)) {
let fileData = await import (`file://${cfgPath}`);
weapons = fileData.weapons || {};
let fileData = await import(`file://${cfgPath}`)
weapons = fileData.weapons || {}
}
let weaponCfg = weapons[weaponName] || [];
let weaponCfg = weapons[weaponName] || []
if (lodash.isPlainObject(weaponCfg)) {
weaponCfg = [weaponCfg];
weaponCfg = [weaponCfg]
}
lodash.forEach(weaponCfg, (ds) => {
if (!//.test(ds.title)) {
ds.title = `${weaponName}${ds.title}`;
ds.title = `${weaponName}${ds.title}`
}
if (ds.refine) {
ds.data = ds.data || {};
ds.data = ds.data || {}
lodash.forEach(ds.refine, (r, key) => {
ds.data[key] = ({ refine }) => r[refine] * (ds.buffCount || 1);
ds.data[key] = ({ refine }) => r[refine] * (ds.buffCount || 1)
})
}
})
return weaponCfg;
return weaponCfg
},
async reliquaries(sets) {
const _path = process.cwd();
const cfgPath = `${_path}/plugins/miao-plugin/resources/meta/reliquaries/calc.js`;
async reliquaries (sets) {
const _path = process.cwd()
const cfgPath = `${_path}/plugins/miao-plugin/resources/meta/reliquaries/calc.js`
let buffs = {};
let buffs = {}
if (fs.existsSync(cfgPath)) {
let fileData = await import (`file://${cfgPath}`);
buffs = fileData.buffs || {};
let fileData = await import(`file://${cfgPath}`)
buffs = fileData.buffs || {}
}
let setMap = {};
let setMap = {}
lodash.forEach(sets, (set) => {
if (set && set.set) {
let name = set.set
setMap[name] = (setMap[name] || 0) + 1
}
});
})
let retBuffs = [];
let retBuffs = []
lodash.forEach(setMap, (count, setName) => {
if (count >= 2 && buffs[setName + 2]) {
@ -319,100 +312,95 @@ let Calc = {
retBuffs.push(buffs[setName + 4])
}
})
return retBuffs;
return retBuffs
},
getDmgFn({ ds, attr, profile, enemyLv, showDetail = false }) {
getDmgFn ({ ds, attr, profile, enemyLv, showDetail = false }) {
let { calc } = ds
let { calc } = ds;
let dmgFn = function (pctNum = 0, talent = false, ele = false, basicNum = 0, mode = "talent") {
let { atk, dmg, phy, cdmg, cpct } = attr;
let dmgFn = function (pctNum = 0, talent = false, ele = false, basicNum = 0, mode = 'talent') {
let { atk, dmg, phy, cdmg, cpct } = attr
// 攻击区
let atkNum = calc(atk);
let atkNum = calc(atk)
// 倍率独立乘区
let multiNum = attr.multi / 100;
let multiNum = attr.multi / 100
// 增伤区
let dmgNum = (1 + dmg.base / 100 + dmg.plus / 100);
let dmgNum = (1 + dmg.base / 100 + dmg.plus / 100)
if (ele === "phy") {
dmgNum = (1 + phy.base / 100 + phy.plus / 100);
if (ele === 'phy') {
dmgNum = (1 + phy.base / 100 + phy.plus / 100)
}
//console.log({ base: Format.comma(dmg.base, 2), plus: Format.comma(dmg.plus, 2) })
// console.log({ base: Format.comma(dmg.base, 2), plus: Format.comma(dmg.plus, 2) })
let cpctNum = cpct.base / 100 + cpct.plus / 100;
let cpctNum = cpct.base / 100 + cpct.plus / 100
// 爆伤区
let cdmgNum = cdmg.base / 100 + cdmg.plus / 100;
let cdmgNum = cdmg.base / 100 + cdmg.plus / 100
let enemyDef = attr.enemy.def / 100
let enemyIgnore = attr.enemy.ignore / 100
let enemyDef = attr.enemy.def / 100;
let enemyIgnore = attr.enemy.ignore / 100;
let plusNum = 0;
let plusNum = 0
if (talent && attr[talent]) {
pctNum = pctNum / 100;
pctNum = pctNum / 100
let ds = attr[talent];
pctNum += ds.pct / 100;
dmgNum += ds.dmg / 100;
cpctNum += ds.cpct / 100;
cdmgNum += ds.cdmg / 100;
enemyDef += ds.def / 100;
enemyIgnore += ds.ignore / 100;
multiNum += ds.multi / 100;
plusNum += ds.plus;
let ds = attr[talent]
pctNum += ds.pct / 100
dmgNum += ds.dmg / 100
cpctNum += ds.cpct / 100
cdmgNum += ds.cdmg / 100
enemyDef += ds.def / 100
enemyIgnore += ds.ignore / 100
multiNum += ds.multi / 100
plusNum += ds.plus
}
// 防御区
let lv = profile.lv;
let defNum = (lv + 100) / ((lv + 100) + (enemyLv + 100) * (1 - enemyDef) * (1 - enemyIgnore));
let lv = profile.lv
let defNum = (lv + 100) / ((lv + 100) + (enemyLv + 100) * (1 - enemyDef) * (1 - enemyIgnore))
// 抗性区
let kx = attr.kx;
if (talent === "fy") {
kx = attr.fykx;
let kx = attr.kx
if (talent === 'fy') {
kx = attr.fykx
}
kx = 10 - (kx || 0);
let kNum = 0.9;
kx = 10 - (kx || 0)
let kNum = 0.9
if (kx >= 0) {
kNum = (100 - kx) / 100;
kNum = (100 - kx) / 100
} else {
kNum = 1 - kx / 200
}
// 反应区
let eleNum = 1, eleBase = 0;
let eleNum = 1; let eleBase = 0
if (ele === "ks" || ele === "gd") {
eleBase = eleBaseDmg[lv] || 0;
if (ele === 'ks' || ele === 'gd') {
eleBase = eleBaseDmg[lv] || 0
}
if (ele === "phy") {
//do nothing
if (ele === 'phy') {
// do nothing
} else if (ele) {
eleNum = Mastery.getBasePct(ele, attr.element);
eleNum = Mastery.getBasePct(ele, attr.element)
if (attr[ele]) {
eleNum = eleNum * (1 + attr[ele] / 100);
eleNum = eleNum * (1 + attr[ele] / 100)
}
}
cpctNum = Math.max(0, Math.min(1, cpctNum));
cpctNum = Math.max(0, Math.min(1, cpctNum))
if (cpctNum === 0) {
cdmgNum = 0;
cdmgNum = 0
}
let ret = {};
if (mode === "basic") {
let ret = {}
if (mode === 'basic') {
ret = {
dmg: basicNum * dmgNum * (1 + cdmgNum) * defNum * kNum * eleNum,
avg: basicNum * dmgNum * (1 + cpctNum * cdmgNum) * defNum * kNum * eleNum
@ -433,11 +421,11 @@ let Calc = {
console.log(attr, { atkNum, pctNum, multiNum, plusNum, dmgNum, cpctNum, cdmgNum, defNum, eleNum, kNum }, ret)
}
return ret;
};
return ret
}
dmgFn.basic = function (basicNum = 0, talent = false, ele = false) {
return dmgFn(0, talent, ele, basicNum, "basic");
return dmgFn(0, talent, ele, basicNum, 'basic')
}
dmgFn.heal = function (num) {
@ -452,73 +440,71 @@ let Calc = {
dmgFn.shield = function (num) {
return {
avg: num * (calc(attr.shield) / 100) * (attr.shield.inc / 100)
};
}
}
dmgFn.ks = function () {
return dmgFn(0, 'fy', 'ks');
return dmgFn(0, 'fy', 'ks')
}
return dmgFn;
return dmgFn
},
async calcData({ profile, char, enemyLv = 91, mode = 'profile', dmgIdx = 0 }) {
let charCalcData = await Calc.getCharCalcRule(char.name);
async calcData ({ profile, char, enemyLv = 91, mode = 'profile', dmgIdx = 0 }) {
let charCalcData = await Calc.getCharCalcRule(char.name)
if (!charCalcData) {
return false;
return false
}
let talent = Calc.talent(profile, char);
let talent = Calc.talent(profile, char)
let meta = {
cons: profile.cons * 1,
talent
}
let { buffs, details, defParams, mainAttr, defDmgIdx, enemyName } = charCalcData;
let { buffs, details, defParams, mainAttr, defDmgIdx, enemyName } = charCalcData
defParams = defParams || {};
defParams = defParams || {}
let originalAttr = Calc.attr(profile);
let originalAttr = Calc.attr(profile)
let weaponBuffs = await Calc.weapon(profile.weapon.name);
let reliBuffs = await Calc.reliquaries(profile.artis);
buffs = lodash.concat(buffs, weaponBuffs, reliBuffs);
let weaponBuffs = await Calc.weapon(profile.weapon.name)
let reliBuffs = await Calc.reliquaries(profile.artis)
buffs = lodash.concat(buffs, weaponBuffs, reliBuffs)
lodash.forEach(buffs, (buff) => {
buff.sort = lodash.isUndefined(buff.sort) ? 1 : buff.sort
});
})
buffs = lodash.sortBy(buffs, ["sort"]);
buffs = lodash.sortBy(buffs, ['sort'])
let { msg } = Calc.calcAttr({ originalAttr, buffs, meta, params: defParams || {} });
let ret = [], detailMap = [], dmgRet = [], dmgDetail = {};
let { msg } = Calc.calcAttr({ originalAttr, buffs, meta, params: defParams || {} })
let ret = []; let detailMap = []; let dmgRet = []; let dmgDetail = {}
lodash.forEach(details, (detail, detailSysIdx) => {
if (lodash.isFunction(detail)) {
let { attr } = Calc.calcAttr({ originalAttr, buffs, meta });
let ds = lodash.merge({ talent }, Calc.getDs(attr, meta));
detail = detail({ ...ds, attr, profile });
let { attr } = Calc.calcAttr({ originalAttr, buffs, meta })
let ds = lodash.merge({ talent }, Calc.getDs(attr, meta))
detail = detail({ ...ds, attr, profile })
}
let params = lodash.merge({}, defParams, detail.params || {});
let { attr } = Calc.calcAttr({ originalAttr, buffs, meta, params, talent: detail.talent || "" });
let params = lodash.merge({}, defParams, detail.params || {})
let { attr } = Calc.calcAttr({ originalAttr, buffs, meta, params, talent: detail.talent || '' })
if (detail.check && !detail.check(Calc.getDs(attr, meta, params))) {
return;
return
}
if (detail.cons && meta.cons * 1 < detail.cons * 1) {
return;
return
}
let ds = lodash.merge({ talent }, Calc.getDs(attr, meta, params));
let ds = lodash.merge({ talent }, Calc.getDs(attr, meta, params))
let dmg = Calc.getDmgFn({ ds, attr, profile, enemyLv, showDetail: detail.showDetail }),
basicDmgRet;
let dmg = Calc.getDmgFn({ ds, attr, profile, enemyLv, showDetail: detail.showDetail })
let basicDmgRet
if (detail.dmg) {
basicDmgRet = detail.dmg(ds, dmg);
detail.userIdx = detailMap.length;
detailMap.push(detail);
basicDmgRet = detail.dmg(ds, dmg)
detail.userIdx = detailMap.length
detailMap.push(detail)
ret.push({
title: detail.title,
...basicDmgRet
@ -526,14 +512,14 @@ let Calc = {
}
})
if (mode === "dmg") {
let detail;
if (mode === 'dmg') {
let detail
if (dmgIdx && detailMap[dmgIdx - 1]) {
detail = detailMap[dmgIdx - 1];
detail = detailMap[dmgIdx - 1]
} else if (!lodash.isUndefined(defDmgIdx) && details[defDmgIdx]) {
detail = details[defDmgIdx];
detail = details[defDmgIdx]
} else {
detail = detailMap[0];
detail = detailMap[0]
}
dmgDetail = {
@ -541,19 +527,18 @@ let Calc = {
userIdx: detail.userIdx,
basicRet: lodash.merge({}, ret[detail.userIdx]),
attr: []
};
}
mainAttr = mainAttr.split(",");
let params = lodash.merge({}, defParams, detail.params || {});
let basicDmg = dmgDetail.basicRet;
mainAttr = mainAttr.split(',')
let params = lodash.merge({}, defParams, detail.params || {})
let basicDmg = dmgDetail.basicRet
lodash.forEach(mainAttr, (reduceAttr) => {
dmgDetail.attr.push(attrMap[reduceAttr])
let rowData = [];
let rowData = []
lodash.forEach(mainAttr, (incAttr) => {
if (incAttr === reduceAttr) {
rowData.push({ type: 'na' });
return;
rowData.push({ type: 'na' })
return
}
let { attr } = Calc.calcAttr({
originalAttr,
@ -562,19 +547,19 @@ let Calc = {
params,
incAttr,
reduceAttr,
talent: detail.talent || ""
});
let ds = lodash.merge({ talent }, Calc.getDs(attr, meta, params));
let dmg = Calc.getDmgFn({ ds, attr, profile, enemyLv });
talent: detail.talent || ''
})
let ds = lodash.merge({ talent }, Calc.getDs(attr, meta, params))
let dmg = Calc.getDmgFn({ ds, attr, profile, enemyLv })
if (detail.dmg) {
let dmgCalcRet = detail.dmg(ds, dmg);
let dmgCalcRet = detail.dmg(ds, dmg)
rowData.push({
type: dmgCalcRet.avg === basicDmg.avg ? "avg" : (dmgCalcRet.avg > basicDmg.avg ? "gt" : "lt"),
type: dmgCalcRet.avg === basicDmg.avg ? 'avg' : (dmgCalcRet.avg > basicDmg.avg ? 'gt' : 'lt'),
...dmgCalcRet
})
}
})
dmgRet.push(rowData);
dmgRet.push(rowData)
})
}
@ -589,4 +574,4 @@ let Calc = {
}
export default Calc;
export default Calc

View File

@ -1,45 +1,45 @@
import fs from "fs";
import lodash from "lodash";
import fs from 'fs'
import lodash from 'lodash'
const _path = process.cwd();
const _cfgPath = `${_path}/plugins/miao-plugin/components/`;
let cfg = {};
const _path = process.cwd()
const _cfgPath = `${_path}/plugins/miao-plugin/components/`
let cfg = {}
try {
if (fs.existsSync(_cfgPath + "cfg.json")) {
cfg = JSON.parse(fs.readFileSync(_cfgPath + "cfg.json", "utf8")) || {};
if (fs.existsSync(_cfgPath + 'cfg.json')) {
cfg = JSON.parse(fs.readFileSync(_cfgPath + 'cfg.json', 'utf8')) || {}
}
} catch (e) {
// do nth
}
let Cfg = {
get(rote, def = '') {
return lodash.get(cfg, rote, def);
get (rote, def = '') {
return lodash.get(cfg, rote, def)
},
set(rote, val) {
lodash.set(cfg, rote, val);
fs.writeFileSync(_cfgPath + "cfg.json", JSON.stringify(cfg, null, "\t"));
set (rote, val) {
lodash.set(cfg, rote, val)
fs.writeFileSync(_cfgPath + 'cfg.json', JSON.stringify(cfg, null, '\t'))
},
del(rote) {
lodash.set(cfg, rote, undefined);
fs.writeFileSync(_cfgPath + "cfg.json", JSON.stringify(cfg, null, "\t"));
del (rote) {
lodash.set(cfg, rote, undefined)
fs.writeFileSync(_cfgPath + 'cfg.json', JSON.stringify(cfg, null, '\t'))
},
scale(pct = 1) {
let scale = Cfg.get("sys.scale", 100);
scale = Math.min(2, Math.max(0.5, scale / 100));
pct = pct * scale;
return `style=transform:scale(${pct})`;
scale (pct = 1) {
let scale = Cfg.get('sys.scale', 100)
scale = Math.min(2, Math.max(0.5, scale / 100))
pct = pct * scale
return `style=transform:scale(${pct})`
},
isDisable(e, rote) {
isDisable (e, rote) {
if (Cfg.get(rote, true)) {
return false;
return false
}
if (/^#*喵喵/.test(e.msg || "")) {
return false;
if (/^#*喵喵/.test(e.msg || '')) {
return false
}
return true;
return true
}
};
}
export default Cfg;
export default Cfg

View File

@ -2,7 +2,6 @@ import fs from 'fs'
import lodash from 'lodash'
import Format from './Format.js'
import Character from './models/Character.js'
import Reliquaries from './models/Reliquaries.js'
import Miao from './profile-data/miao.js'
import Enka from './profile-data/enka.js'
import Data from './Data.js'
@ -23,9 +22,11 @@ function sleep (ms) {
}
function getServ (uid) {
return (diyCfg.profileApi || sysCfg.profileApi)({ uid, Miao, Enka })
return (diyCfg.profileApi || sysCfg.profileApi)({ uid, Miao, Enka, diyCfg })
}
const requestInterval = diyCfg.requestInterval || sysCfg.requestInterval || 5
let Profile = {
async request (uid, e) {
if (uid.toString().length !== 9) {
@ -37,8 +38,8 @@ let Profile = {
if (inCd === 'loading') {
e.reply('请求过快,请稍后重试..')
return false
} else if (inCd === 'pending' && false) {
e.reply(`距上次请求刷新成功间隔小于${Serv.cd}分钟,请稍后重试..`)
} else if (inCd === 'pending') {
e.reply(`距上次请求刷新成功间隔小于${requestInterval}分钟,请稍后重试..`)
return false
}
@ -49,7 +50,7 @@ let Profile = {
try {
data = await Serv.request({ uid, e, sysCfg, diyCfg })
// enka服务测冷却时间5分钟
await redis.set(`miao:role-all:${uid}`, 'pending', { EX: Serv.cd * 60 })
await redis.set(`miao:role-all:${uid}`, 'pending', { EX: requestInterval * 60 })
return Profile.save(uid, data, Serv.key)
} catch (err) {
console.log(err)
@ -143,7 +144,6 @@ let Profile = {
return ret
}
let title = ds[0]
let key = ''
let val = ds[1]
let num = ds[1]
if (!title || title === 'undefined') {
@ -160,14 +160,10 @@ let Profile = {
if (/元素伤害加成/.test(title)) {
title = title.replace('元素伤害', '伤')
key = 'dmg'
} else if (title === '物理伤害加成') {
title = '物伤加成'
key = 'phy'
}
key = key || keyMap[title]
let mark = 0
if (markCfg) {
mark = Format.comma(markCfg[title] * num || 0)
@ -178,20 +174,6 @@ let Profile = {
return { title, val, mark }
},
getArtiMark (data, ds) {
Reliquaries.getMark(data)
let total = 0
lodash.forEach(data, (ret) => {
if (ret[0] && ret[1]) {
total += mark[ret[0]] * ret[1]
}
})
if (ds && /暴/.test(ds[0])) {
total += 20
}
return total
},
inputProfile (uid, e) {
let { avatar, inputData } = e
let char = Character.get(avatar)
@ -200,7 +182,7 @@ let Profile = {
return `请先获取${char.name}的面板数据后,再进行面板数据更新`
}
inputData = inputData.replace('#', '')
inputData = inputData.replace(/|||\n|\t/g, ',')
inputData = inputData.replace(/[,;、\n\t]/g, ',')
let attr = originalData.attr || {}
let attrMap = {
hp: /生命/,
@ -211,7 +193,7 @@ let Profile = {
cDmg: /(暴伤|暴击伤害)/,
hInc: /治疗/,
recharge: /充能/,
dmgBonus: /[火|||||||素|^]伤/,
dmgBonus: /[火水雷草风岩冰素]伤|^伤/,
phyBonus: /(物理|物伤)/
}
lodash.forEach(inputData.split(','), (ds, idx) => {
@ -219,7 +201,7 @@ let Profile = {
if (!ds) {
return
}
let dRet = /(.*?)([0-9\.\+\s]+)/.exec(ds)
let dRet = /(.*?)([0-9.+\s]+)/.exec(ds)
if (!dRet || !dRet[1] || !dRet[2]) {
return
}

View File

@ -90,33 +90,33 @@ export const eleBaseDmg = {
88: 1636,
89: 1686,
90: 1736
};
}
export const eleMap = {
anemo: "风",
cryo: "冰",
electro: "雷",
geo: "岩",
hydro: "水",
pyro: "火"
};
anemo: '风',
cryo: '冰',
electro: '雷',
geo: '岩',
hydro: '水',
pyro: '火'
}
// 元素反应类型及基数
// 暂无需考虑碎冰
export const erType = {
zf: { type: "pct", num: ({ element }) => element === "水" ? 2 : 1.5 },
rh: { type: "pct", num: ({ element }) => element === "火" ? 2 : 1.5 },
gd: { type: "fusion", num: () => 1 },
cz: { type: "fusion", num: () => 4 / 2.4 },
ks: { type: "fusion", num: () => 0.5 }
zf: { type: 'pct', num: ({ element }) => element === '水' ? 2 : 1.5 },
rh: { type: 'pct', num: ({ element }) => element === '火' ? 2 : 1.5 },
gd: { type: 'fusion', num: () => 1 },
cz: { type: 'fusion', num: () => 4 / 2.4 },
ks: { type: 'fusion', num: () => 0.5 }
}
export const attrMap = {
atk: { type: "pct", val: 5.83, title: "大攻击", text: "5.8%" },
hp: { type: "pct", val: 5.83, title: "大生命", text: "5.8%" },
def: { type: "pct", val: 7.29, title: "大防御", text: "7.3%" },
recharge: { type: "plus", val: 6.48, title: "元素充能", text: "6.5%" },
mastery: { type: "plus", val: 23.31, title: "元素精通", text: "23.3" },
cpct: { type: "plus", val: 3.89, title: "暴击率", text: "3.9%" },
cdmg: { type: "plus", val: 7.77, title: "暴击伤害", text: "7.8%" },
};
atk: { type: 'pct', val: 5.83, title: '大攻击', text: '5.8%' },
hp: { type: 'pct', val: 5.83, title: '大生命', text: '5.8%' },
def: { type: 'pct', val: 7.29, title: '大防御', text: '7.3%' },
recharge: { type: 'plus', val: 6.48, title: '元素充能', text: '6.5%' },
mastery: { type: 'plus', val: 23.31, title: '元素精通', text: '23.3' },
cpct: { type: 'plus', val: 3.89, title: '暴击率', text: '3.9%' },
cdmg: { type: 'plus', val: 7.77, title: '暴击伤害', text: '7.8%' }
}

View File

@ -1,24 +1,24 @@
import { erType } from "./calc-meta.js";
import { erType } from './calc-meta.js'
export const Mastery = {
getType() {
getType () {
},
getMultiple(type = 'zf', mastery = 0) {
let typeCfg = erType[type];
if (typeCfg.type === "pct") {
return 2.78 * mastery / (mastery + 1400) * 100;
} else if (typeCfg.type === "fusion") {
return (1 + mastery * 16) / (mastery + 2000) * 100;
getMultiple (type = 'zf', mastery = 0) {
let typeCfg = erType[type]
if (typeCfg.type === 'pct') {
return 2.78 * mastery / (mastery + 1400) * 100
} else if (typeCfg.type === 'fusion') {
return (1 + mastery * 16) / (mastery + 2000) * 100
}
return 0;
return 0
},
getBasePct(type, element) {
let typeCfg = erType[type];
getBasePct (type, element) {
let typeCfg = erType[type]
if (typeCfg) {
return typeCfg.num({ element }) || 1;
return typeCfg.num({ element }) || 1
}
return 1;
return 1
}
}
}

View File

@ -1,10 +1,10 @@
import Data from "./Data.js";
import Cfg from "./Cfg.js";
import Profile from "./Profile.js";
import Common from "./Common.js";
import Format from "./Format.js";
import Calc from "./Calc.js";
import Data from './Data.js'
import Cfg from './Cfg.js'
import Profile from './Profile.js'
import Common from './Common.js'
import Format from './Format.js'
import Calc from './Calc.js'
import * as Models from "./models.js";
import * as Models from './models.js'
export { Data, Cfg, Profile, Common, Format, Models,Calc }
export { Data, Cfg, Profile, Common, Format, Models, Calc }

View File

@ -1,5 +1,5 @@
import Character from "./models/Character.js";
import HutaoApi from "./models/HutaoApi.js";
import Artifact from "./models/Artifact.js";
import Character from './models/Character.js'
import HutaoApi from './models/HutaoApi.js'
import Artifact from './models/Artifact.js'
export { Character, HutaoApi, Artifact };
export { Character, HutaoApi, Artifact }

View File

@ -1,58 +1,57 @@
import { attrValue, attrNameMap, attrMap, mainAttr, subAttr, usefulAttr }
from "../../resources/meta/reliquaries/reliquaries-mark-new.js";
import { Character } from "../models.js";
import lodash from "lodash";
import Format from "../Format.js";
import _Data from "../Data.js";
from '../../resources/meta/reliquaries/reliquaries-mark-new.js'
import { Character } from '../models.js'
import lodash from 'lodash'
import Format from '../Format.js'
import _Data from '../Data.js'
let _path = process.cwd();
let artis = _Data.readJSON(`${_path}/plugins/miao-plugin/resources/meta/reliquaries/`, "data.json") || {};
let _path = process.cwd()
let artis = _Data.readJSON(`${_path}/plugins/miao-plugin/resources/meta/reliquaries/`, 'data.json') || {}
let artisMap = {}
lodash.forEach(artis, (ds) => {
artisMap[ds.name] = ds;
artisMap[ds.name] = ds
})
let charCfg = {};
let charCfg = {}
let Artifact = {
getCharCfg(name) {
getCharCfg (name) {
if (charCfg[name]) {
return charCfg[name]
}
let attrWeight = usefulAttr[name] || { atk: 75, cp: 100, cd: 100 };
let attrMark = {};
let attrWeight = usefulAttr[name] || { atk: 75, cp: 100, cd: 100 }
let attrMark = {}
let char = Character.get(name);
let baseAttr = char.lvStat.detail['90'];
let char = Character.get(name)
let baseAttr = char.lvStat.detail['90']
lodash.forEach(attrWeight, (weight, attr) => {
attrMark[attr] = weight / attrValue[attr];
});
attrMark[attr] = weight / attrValue[attr]
})
// let baseAttr = [400, 500, 300];
if (attrMark.hp) {
attrMark.hpPlus = attrMark.hp / baseAttr[0] * 100;
attrMark.hpPlus = attrMark.hp / baseAttr[0] * 100
}
if (attrMark.atk) {
// 以520作为武器白值均值计算
attrMark.atkPlus = attrMark.atk / (baseAttr[1] * 1 + 520) * 100;
attrMark.atkPlus = attrMark.atk / (baseAttr[1] * 1 + 520) * 100
}
if (attrMark.def) {
attrMark.defPlus = attrMark.def / baseAttr[2] * 100;
attrMark.defPlus = attrMark.def / baseAttr[2] * 100
}
let maxMark = Artifact.getMaxMark(attrWeight);
let titleMark = {}, titleWeight = {};
let maxMark = Artifact.getMaxMark(attrWeight)
let titleMark = {}; let titleWeight = {}
lodash.forEach(attrMark, (mark, attr) => {
let aTitle = attrMap[attr].title;
let aTitle = attrMap[attr].title
if (/小/.test(aTitle)) {
return;
return
}
titleMark[aTitle] = mark;
titleWeight[aTitle] = attrWeight[attr] || 0;
titleMark[aTitle] = mark
titleWeight[aTitle] = attrWeight[attr] || 0
if (/大/.test(aTitle)) {
let sTitle = aTitle.replace("大", "小");
titleWeight[sTitle] = titleWeight[aTitle];
let sTitle = aTitle.replace('大', '小')
titleWeight[sTitle] = titleWeight[aTitle]
}
})
charCfg[name] = {
@ -61,164 +60,163 @@ let Artifact = {
titleMap: titleMark,
titleWeight,
maxMark
};
return charCfg[name];
}
return charCfg[name]
},
getMaxAttr(charAttr = {}, list2 = [], maxLen = 1, banAttr = "") {
let tmp = [];
getMaxAttr (charAttr = {}, list2 = [], maxLen = 1, banAttr = '') {
let tmp = []
lodash.forEach(list2, (attr) => {
if (attr === banAttr) return;
if (!charAttr[attr]) return;
tmp.push({ attr, mark: charAttr[attr] });
});
tmp = lodash.sortBy(tmp, "mark");
tmp = tmp.reverse();
let ret = [];
lodash.forEach(tmp, (ds) => ret.push(ds.attr));
return ret.slice(0, maxLen);
if (attr === banAttr) return
if (!charAttr[attr]) return
tmp.push({ attr, mark: charAttr[attr] })
})
tmp = lodash.sortBy(tmp, 'mark')
tmp = tmp.reverse()
let ret = []
lodash.forEach(tmp, (ds) => ret.push(ds.attr))
return ret.slice(0, maxLen)
},
getMaxMark(attrWeight) {
let ret = {};
getMaxMark (attrWeight) {
let ret = {}
for (let idx = 1; idx <= 5; idx++) {
let totalMark = 0, mMark = 0;
let mAttr = "";
let totalMark = 0; let mMark = 0
let mAttr = ''
if (idx === 1) {
mAttr = "hpPlus";
mAttr = 'hpPlus'
} else if (idx === 2) {
mAttr = "atkPlus";
mAttr = 'atkPlus'
} else if (idx >= 3) {
mAttr = Artifact.getMaxAttr(attrWeight, mainAttr[idx])[0];
mMark = attrWeight[mAttr];
totalMark += attrWeight[mAttr] * 2;
mAttr = Artifact.getMaxAttr(attrWeight, mainAttr[idx])[0]
mMark = attrWeight[mAttr]
totalMark += attrWeight[mAttr] * 2
}
let sAttr = Artifact.getMaxAttr(attrWeight, subAttr, 4, mAttr);
let sAttr = Artifact.getMaxAttr(attrWeight, subAttr, 4, mAttr)
lodash.forEach(sAttr, (attr, aIdx) => {
totalMark += attrWeight[attr] * (aIdx === 0 ? 6 : 1)
});
ret[idx] = totalMark;
ret['m' + idx] = mMark;
})
ret[idx] = totalMark
ret['m' + idx] = mMark
}
return ret;
return ret
},
getAttr(ds) {
getAttr (ds) {
let title = ds[0]
let attr = attrNameMap[title];
let attr = attrNameMap[title]
if (/元素伤害/.test(title)) {
attr = "dmg";
attr = 'dmg'
} else if (/物理|物伤/.test(title)) {
attr = "phy"
attr = 'phy'
}
return attr;
return attr
},
getAttrMark(attrMark, ds) {
getAttrMark (attrMark, ds) {
if (!ds || !ds[1]) {
return 0;
return 0
}
let attr = Artifact.getAttr(ds);
let val = ds[1];
return (attrMark[attr] || 0) * val;
let attr = Artifact.getAttr(ds)
let val = ds[1]
return (attrMark[attr] || 0) * val
},
getMark(charCfg, posIdx, mainAttr, subAttr) {
let ret = 0;
let { mark, maxMark, weight } = charCfg;
let mAttr = Artifact.getAttr(mainAttr);
getMark (charCfg, posIdx, mainAttr, subAttr) {
let ret = 0
let { mark, maxMark, weight } = charCfg
let mAttr = Artifact.getAttr(mainAttr)
let fixPct = 1;
let fixPct = 1
if (posIdx >= 3) {
fixPct = Math.max(0, Math.min(1, (weight[mAttr] || 0) / (maxMark['m' + posIdx])));
fixPct = Math.max(0, Math.min(1, (weight[mAttr] || 0) / (maxMark['m' + posIdx])))
ret += Artifact.getAttrMark(mark, mainAttr) / 4
}
lodash.forEach(subAttr, (ds) => {
ret += Artifact.getAttrMark(mark, ds)
});
})
return ret * (1 + fixPct) / 2 / maxMark[posIdx] * 66;
return ret * (1 + fixPct) / 2 / maxMark[posIdx] * 66
},
getArtisMark(charName = "", artis = {}) {
let total = 0;
let charCfg = Artifact.getCharCfg(charName);
getArtisMark (charName = '', artis = {}) {
let charCfg = Artifact.getCharCfg(charName)
let ret = {}
lodash.forEach(artis, (ds, idx) => {
idx = idx.replace("arti", "");
idx = idx.replace('arti', '')
ret[idx] = Artifact.getMark(charCfg, idx, ds.main, ds.attrs)
});
return ret;
})
return ret
},
getMarkClass(mark) {
let pct = mark;
let scoreMap = [["D", 10], ["C", 16.5], ["B", 23.1], ["A", 29.7], ["S", 36.3], ["SS", 42.9], ["SSS", 49.5], ["ACE", 56.1], ["ACE²", 66]];
getMarkClass (mark) {
let pct = mark
let scoreMap = [['D', 10], ['C', 16.5], ['B', 23.1], ['A', 29.7], ['S', 36.3], ['SS', 42.9], ['SSS', 49.5], ['ACE', 56.1], ['ACE²', 66]]
for (let idx = 0; idx < scoreMap.length; idx++) {
if (pct < scoreMap[idx][1]) {
return scoreMap[idx][0];
return scoreMap[idx][0]
}
}
},
getSetByArti(name) {
getSetByArti (name) {
for (let idx in artisMap) {
for (let idx2 in artisMap[idx].sets) {
if (artisMap[idx].sets[idx2].name === name) {
return artisMap[idx];
return artisMap[idx]
}
}
}
return false;
return false
},
getMeta() {
getMeta () {
return {
attrMap
}
},
formatArti(ds, markCfg = false, isMain = false) {
formatArti (ds, markCfg = false, isMain = false) {
if (lodash.isArray(ds[0])) {
let ret = [];
let ret = []
lodash.forEach(ds, (d) => {
ret.push(Artifact.formatArti(d, markCfg, isMain));
ret.push(Artifact.formatArti(d, markCfg, isMain))
})
return ret;
return ret
}
let title = ds[0], key = "", val = ds[1], num = ds[1];
if (!title || title === "undefined") {
return [];
let title = ds[0]; let key = ''; let val = ds[1]; let num = ds[1]
if (!title || title === 'undefined') {
return []
}
if (/伤害加成/.test(title) && val < 1) {
val = Format.pct(val * 100);
num = num * 100;
val = Format.pct(val * 100)
num = num * 100
} else if (/伤害加成|大|暴|充能|治疗/.test(title)) {
val = Format.pct(val);
val = Format.pct(val)
} else {
val = Format.comma(val, 1);
val = Format.comma(val, 1)
}
if (/元素伤害加成/.test(title)) {
title = title.replace("元素伤害", "伤");
key = "dmg";
} else if (title === "物理伤害加成") {
title = "物伤加成";
key = "phy";
title = title.replace('元素伤害', '伤')
key = 'dmg'
} else if (title === '物理伤害加成') {
title = '物伤加成'
key = 'phy'
}
key = key || attrNameMap[title];
key = key || attrNameMap[title]
let mark = markCfg[key] * num;
let mark = markCfg[key] * num
if (markCfg) {
if (isMain) {
mark = mark / 4 + 0.01;
mark = mark / 4 + 0.01
}
mark = Format.comma(mark || 0);
mark = Format.comma(mark || 0)
}
return { title, val, mark };
},
return { title, val, mark }
}
}
export default Artifact;
export default Artifact

View File

@ -1,23 +1,20 @@
import { Data } from "../index.js";
import { Data } from '../index.js'
export default class Base {
constructor() {
this.name = "";
constructor () {
this.name = ''
}
toString() {
return this.name;
toString () {
return this.name
}
getData(arrList = "", cfg = {}) {
return Data.getData(this, arrList, cfg);
getData (arrList = '', cfg = {}) {
return Data.getData(this, arrList, cfg)
}
// 获取指定值数据,支持通过
getVal(key, defaultValue) {
return Data.getVal(this, key, defaultValue);
getVal (key, defaultValue) {
return Data.getVal(this, key, defaultValue)
}
}
}

View File

@ -4,9 +4,9 @@ import fs from 'fs'
import Data from '../Data.js'
import sizeOf from 'image-size'
let aliasMap = {};
let idMap = {};
let abbrMap = {};
let aliasMap = {}
let idMap = {}
let abbrMap = {}
let wifeMap = {}
const _path = process.cwd()
const metaPath = `${_path}/plugins/miao-plugin/resources/meta/character/`
@ -229,7 +229,7 @@ Character.getAbbr = function () {
}
Character.checkWifeType = function (charid, type) {
return !!wifeMap[type][charid];
return !!wifeMap[type][charid]
}
Character.getRandomImg = function (type) {

View File

@ -4,76 +4,72 @@
*
* */
import fetch from "node-fetch";
import lodash from "lodash";
import fetch from 'node-fetch'
const host = "http://49.232.91.210:88/miaoPlugin/hutaoApi";
const host = 'http://49.232.91.210:88/miaoPlugin/hutaoApi'
let hutaoApi = null;
function getApi(api) {
return `${host}?api=${api}`;
function getApi (api) {
return `${host}?api=${api}`
}
let HutaoApi = {
async req(url, param = {}) {
let cacheData = await redis.get(`hutao:${url}`);
if (cacheData && param.method !== "POST") {
async req (url, param = {}) {
let cacheData = await redis.get(`hutao:${url}`)
if (cacheData && param.method !== 'POST') {
return JSON.parse(cacheData)
}
let response = await fetch(getApi(`${url}`), {
...param,
method: param.method || "GET",
});
let retData = await response.json();
if (retData && retData.data && param.method !== "POST") {
let d = new Date();
retData.lastUpdate = `${d.toLocaleDateString()} ${d.toTimeString().substr(0, 5)}`;
await redis.set(`hutao:${url}`, JSON.stringify(retData), { EX: 3600 });
method: param.method || 'GET'
})
let retData = await response.json()
if (retData && retData.data && param.method !== 'POST') {
let d = new Date()
retData.lastUpdate = `${d.toLocaleDateString()} ${d.toTimeString().substr(0, 5)}`
await redis.set(`hutao:${url}`, JSON.stringify(retData), { EX: 3600 })
}
return retData;
return retData
},
// 角色持有及命座分布
async getCons() {
return await HutaoApi.req("/Statistics/Constellation");
async getCons () {
return await HutaoApi.req('/Statistics/Constellation')
},
async getAbyssPct() {
return await HutaoApi.req("/Statistics/AvatarParticipation");
async getAbyssPct () {
return await HutaoApi.req('/Statistics/AvatarParticipation')
},
async getAbyssUse() {
return await HutaoApi.req("/Statistics2/AvatarParticipation");
async getAbyssUse () {
return await HutaoApi.req('/Statistics2/AvatarParticipation')
},
async getAbyssTeam() {
return await HutaoApi.req("/Statistics/TeamCombination");
async getAbyssTeam () {
return await HutaoApi.req('/Statistics/TeamCombination')
},
async upload(data) {
let body = JSON.stringify(data);
return await HutaoApi.req("/Record/Upload", {
method: "POST",
async upload (data) {
let body = JSON.stringify(data)
return await HutaoApi.req('/Record/Upload', {
method: 'POST',
headers: {
'Content-Type': 'text/json; charset=utf-8',
'Content-Type': 'text/json; charset=utf-8'
},
body
});
})
},
async uploadData(data = {}) {
let body = JSON.stringify(data);
return await HutaoApi.req("/Record/UploadData", {
method: "POST",
async uploadData (data = {}) {
let body = JSON.stringify(data)
return await HutaoApi.req('/Record/UploadData', {
method: 'POST',
headers: {
'Content-Type': 'text/json; charset=utf-8',
'Content-Type': 'text/json; charset=utf-8'
},
body
});
})
}
};
}
export default HutaoApi;
export default HutaoApi

View File

@ -2,9 +2,9 @@ export default {
10000002: {
SkillOrder: [10024, 10018, 10019],
Skills: {
10018: "Skill_S_Ayaka_01",
10019: "Skill_E_Ayaka",
10024: "Skill_A_01"
10018: 'Skill_S_Ayaka_01',
10019: 'Skill_E_Ayaka',
10024: 'Skill_A_01'
},
ProudMap: {
10018: 232,
@ -16,9 +16,9 @@ export default {
10000003: {
SkillOrder: [10031, 10033, 10034],
Skills: {
10031: "Skill_A_01",
10033: "Skill_S_Qin_02",
10034: "Skill_E_Qin_01"
10031: 'Skill_A_01',
10033: 'Skill_S_Qin_02',
10034: 'Skill_E_Qin_01'
},
ProudMap: {
10031: 331,
@ -28,13 +28,13 @@ export default {
NameTextMapHash: 3221566250,
Costumes: {
200301: {
icon: "UI_AvatarIcon_QinCostumeSea",
art: "UI_Costume_QinCostumeSea",
icon: 'UI_AvatarIcon_QinCostumeSea',
art: 'UI_Costume_QinCostumeSea',
avatarId: 10000003
},
200302: {
icon: "UI_AvatarIcon_QinCostumeWic",
art: "UI_Costume_QinCostumeWic",
icon: 'UI_AvatarIcon_QinCostumeWic',
art: 'UI_Costume_QinCostumeWic',
avatarId: 10000003
}
}
@ -42,9 +42,9 @@ export default {
10000005: {
SkillOrder: [100543, 10067, 10068],
Skills: {
10067: "Skill_S_PlayerWind_01",
10068: "Skill_E_PlayerWind_01",
100543: "Skill_A_01"
10067: 'Skill_S_PlayerWind_01',
10068: 'Skill_E_PlayerWind_01',
100543: 'Skill_A_01'
},
NameTextMapHash: 1533656818,
ProudMap: {
@ -56,9 +56,9 @@ export default {
10000006: {
SkillOrder: [10060, 10061, 10062],
Skills: {
10060: "Skill_A_Catalyst_MD",
10061: "Skill_S_Lisa_01",
10062: "Skill_E_Lisa_01"
10060: 'Skill_A_Catalyst_MD',
10061: 'Skill_S_Lisa_01',
10062: 'Skill_E_Lisa_01'
},
ProudMap: {
10060: 431,
@ -70,9 +70,9 @@ export default {
10000007: {
SkillOrder: [100553, 10067, 10068],
Skills: {
10067: "Skill_S_PlayerWind_01",
10068: "Skill_E_PlayerWind_01",
100553: "Skill_A_01"
10067: 'Skill_S_PlayerWind_01',
10068: 'Skill_E_PlayerWind_01',
100553: 'Skill_A_01'
},
NameTextMapHash: 3816664530,
ProudMap: {
@ -84,9 +84,9 @@ export default {
10000014: {
SkillOrder: [10070, 10071, 10072],
Skills: {
10070: "Skill_A_Catalyst_MD",
10071: "Skill_S_Barbara_01",
10072: "Skill_E_Barbara_01"
10070: 'Skill_A_Catalyst_MD',
10071: 'Skill_S_Barbara_01',
10072: 'Skill_E_Barbara_01'
},
ProudMap: {
10070: 1431,
@ -96,8 +96,8 @@ export default {
NameTextMapHash: 3775299170,
Costumes: {
201401: {
icon: "UI_AvatarIcon_BarbaraCostumeSummertime",
art: "UI_Costume_BarbaraCostumeSummertime",
icon: 'UI_AvatarIcon_BarbaraCostumeSummertime',
art: 'UI_Costume_BarbaraCostumeSummertime',
avatarId: 10000014
}
}
@ -105,9 +105,9 @@ export default {
10000015: {
SkillOrder: [10073, 10074, 10075],
Skills: {
10073: "Skill_A_01",
10074: "Skill_S_Kaeya_01",
10075: "Skill_E_Kaeya_01"
10073: 'Skill_A_01',
10074: 'Skill_S_Kaeya_01',
10075: 'Skill_E_Kaeya_01'
},
ProudMap: {
10073: 1531,
@ -119,9 +119,9 @@ export default {
10000016: {
SkillOrder: [10160, 10161, 10165],
Skills: {
10160: "Skill_A_04",
10161: "Skill_S_Diluc_01_01",
10165: "Skill_E_Diluc_01"
10160: 'Skill_A_04',
10161: 'Skill_S_Diluc_01_01',
10165: 'Skill_E_Diluc_01'
},
ProudMap: {
10160: 1631,
@ -131,8 +131,8 @@ export default {
NameTextMapHash: 3608180322,
Costumes: {
201601: {
icon: "UI_AvatarIcon_DilucCostumeFlamme",
art: "UI_Costume_DilucCostumeFlamme",
icon: 'UI_AvatarIcon_DilucCostumeFlamme',
art: 'UI_Costume_DilucCostumeFlamme',
avatarId: 10000016
}
}
@ -140,9 +140,9 @@ export default {
10000020: {
SkillOrder: [10201, 10202, 10203],
Skills: {
10201: "Skill_A_04",
10202: "Skill_S_Razor_01",
10203: "Skill_E_Razor_01"
10201: 'Skill_A_04',
10202: 'Skill_S_Razor_01',
10203: 'Skill_E_Razor_01'
},
ProudMap: {
10201: 2031,
@ -154,9 +154,9 @@ export default {
10000021: {
SkillOrder: [10041, 10032, 10017],
Skills: {
10017: "Skill_E_Ambor",
10032: "Skill_S_Ambor_01",
10041: "Skill_A_02"
10017: 'Skill_E_Ambor',
10032: 'Skill_S_Ambor_01',
10041: 'Skill_A_02'
},
ProudMap: {
10017: 2139,
@ -166,8 +166,8 @@ export default {
NameTextMapHash: 1966438658,
Costumes: {
202101: {
icon: "UI_AvatarIcon_AmborCostumeWic",
art: "UI_Costume_AmborCostumeWic",
icon: 'UI_AvatarIcon_AmborCostumeWic',
art: 'UI_Costume_AmborCostumeWic',
avatarId: 10000021
}
}
@ -175,9 +175,9 @@ export default {
10000022: {
SkillOrder: [10221, 10224, 10225],
Skills: {
10221: "Skill_A_02",
10224: "Skill_S_Venti_01",
10225: "Skill_E_Venti_01"
10221: 'Skill_A_02',
10224: 'Skill_S_Venti_01',
10225: 'Skill_E_Venti_01'
},
ProudMap: {
10221: 2231,
@ -189,9 +189,9 @@ export default {
10000023: {
SkillOrder: [10231, 10232, 10235],
Skills: {
10231: "Skill_A_03",
10232: "Skill_S_Xiangling_01",
10235: "Skill_E_Xiangling_01"
10231: 'Skill_A_03',
10232: 'Skill_S_Xiangling_01',
10235: 'Skill_E_Xiangling_01'
},
ProudMap: {
10231: 2331,
@ -203,9 +203,9 @@ export default {
10000024: {
SkillOrder: [10241, 10242, 10245],
Skills: {
10241: "Skill_A_04",
10242: "Skill_S_Beidou_01",
10245: "Skill_E_Beidou_01"
10241: 'Skill_A_04',
10242: 'Skill_S_Beidou_01',
10245: 'Skill_E_Beidou_01'
},
ProudMap: {
10241: 2431,
@ -217,9 +217,9 @@ export default {
10000025: {
SkillOrder: [10381, 10382, 10385],
Skills: {
10381: "Skill_A_01",
10382: "Skill_S_Xingqiu_01",
10385: "Skill_E_Xingqiu_01"
10381: 'Skill_A_01',
10382: 'Skill_S_Xingqiu_01',
10385: 'Skill_E_Xingqiu_01'
},
ProudMap: {
10381: 2531,
@ -231,9 +231,9 @@ export default {
10000026: {
SkillOrder: [10261, 10262, 10265],
Skills: {
10261: "Skill_A_03",
10262: "Skill_S_Xiao_01",
10265: "Skill_E_Xiao_01"
10261: 'Skill_A_03',
10262: 'Skill_S_Xiao_01',
10265: 'Skill_E_Xiao_01'
},
ProudMap: {
10261: 2631,
@ -245,9 +245,9 @@ export default {
10000027: {
SkillOrder: [10271, 10272, 10274],
Skills: {
10271: "Skill_A_Catalyst_MD",
10272: "Skill_S_Ningguang_01",
10274: "Skill_E_Ningguang_01"
10271: 'Skill_A_Catalyst_MD',
10272: 'Skill_S_Ningguang_01',
10274: 'Skill_E_Ningguang_01'
},
ProudMap: {
10271: 2731,
@ -257,8 +257,8 @@ export default {
NameTextMapHash: 4127888970,
Costumes: {
202701: {
icon: "UI_AvatarIcon_NingguangCostumeFloral",
art: "UI_Costume_NingguangCostumeFloral",
icon: 'UI_AvatarIcon_NingguangCostumeFloral',
art: 'UI_Costume_NingguangCostumeFloral',
avatarId: 10000027
}
}
@ -266,9 +266,9 @@ export default {
10000029: {
SkillOrder: [10291, 10292, 10295],
Skills: {
10291: "Skill_A_Catalyst_MD",
10292: "Skill_S_Klee_01",
10295: "Skill_E_Klee_01"
10291: 'Skill_A_Catalyst_MD',
10292: 'Skill_S_Klee_01',
10295: 'Skill_E_Klee_01'
},
ProudMap: {
10291: 2931,
@ -280,9 +280,9 @@ export default {
10000030: {
SkillOrder: [10301, 10302, 10303],
Skills: {
10301: "Skill_A_03",
10302: "Skill_S_Zhongli_01",
10303: "Skill_E_Zhongli_01"
10301: 'Skill_A_03',
10302: 'Skill_S_Zhongli_01',
10303: 'Skill_E_Zhongli_01'
},
ProudMap: {
10301: 3031,
@ -294,9 +294,9 @@ export default {
10000031: {
SkillOrder: [10311, 10312, 10313],
Skills: {
10311: "Skill_A_02",
10312: "Skill_S_Fischl_01",
10313: "Skill_E_Fischl_01"
10311: 'Skill_A_02',
10312: 'Skill_S_Fischl_01',
10313: 'Skill_E_Fischl_01'
},
ProudMap: {
10311: 3131,
@ -306,8 +306,8 @@ export default {
NameTextMapHash: 3277782506,
Costumes: {
203101: {
icon: "UI_AvatarIcon_FischlCostumeHighness",
art: "UI_Costume_FischlCostumeHighness",
icon: 'UI_AvatarIcon_FischlCostumeHighness',
art: 'UI_Costume_FischlCostumeHighness',
avatarId: 10000031
}
}
@ -315,9 +315,9 @@ export default {
10000032: {
SkillOrder: [10321, 10322, 10323],
Skills: {
10321: "Skill_A_01",
10322: "Skill_S_Bennett_01",
10323: "Skill_E_Bennett_01"
10321: 'Skill_A_01',
10322: 'Skill_S_Bennett_01',
10323: 'Skill_E_Bennett_01'
},
ProudMap: {
10321: 3231,
@ -329,9 +329,9 @@ export default {
10000033: {
SkillOrder: [10331, 10332, 10333],
Skills: {
10331: "Skill_A_02",
10332: "Skill_S_Tartaglia_01",
10333: "Skill_E_Tartaglia_01"
10331: 'Skill_A_02',
10332: 'Skill_S_Tartaglia_01',
10333: 'Skill_E_Tartaglia_01'
},
ProudMap: {
10331: 3331,
@ -343,9 +343,9 @@ export default {
10000034: {
SkillOrder: [10341, 10342, 10343],
Skills: {
10341: "Skill_A_04",
10342: "Skill_S_Noel_01",
10343: "Skill_E_Noel_01"
10341: 'Skill_A_04',
10342: 'Skill_S_Noel_01',
10343: 'Skill_E_Noel_01'
},
ProudMap: {
10341: 3431,
@ -357,9 +357,9 @@ export default {
10000035: {
SkillOrder: [10351, 10352, 10353],
Skills: {
10351: "Skill_A_01",
10352: "Skill_S_Qiqi_01",
10353: "Skill_E_Qiqi_01"
10351: 'Skill_A_01',
10352: 'Skill_S_Qiqi_01',
10353: 'Skill_E_Qiqi_01'
},
ProudMap: {
10351: 3531,
@ -371,9 +371,9 @@ export default {
10000036: {
SkillOrder: [10401, 10402, 10403],
Skills: {
10401: "Skill_A_04",
10402: "Skill_S_Chongyun_01",
10403: "Skill_E_Chongyun_01"
10401: 'Skill_A_04',
10402: 'Skill_S_Chongyun_01',
10403: 'Skill_E_Chongyun_01'
},
ProudMap: {
10401: 3631,
@ -385,9 +385,9 @@ export default {
10000037: {
SkillOrder: [10371, 10372, 10373],
Skills: {
10371: "Skill_A_02",
10372: "Skill_S_Ganyu_01",
10373: "Skill_E_Ganyu_01"
10371: 'Skill_A_02',
10372: 'Skill_S_Ganyu_01',
10373: 'Skill_E_Ganyu_01'
},
ProudMap: {
10371: 3731,
@ -399,9 +399,9 @@ export default {
10000038: {
SkillOrder: [10386, 10387, 10388],
Skills: {
10386: "Skill_A_01",
10387: "Skill_S_Albedo_01",
10388: "Skill_E_Albedo_01"
10386: 'Skill_A_01',
10387: 'Skill_S_Albedo_01',
10388: 'Skill_E_Albedo_01'
},
ProudMap: {
10386: 3831,
@ -413,9 +413,9 @@ export default {
10000039: {
SkillOrder: [10391, 10392, 10395],
Skills: {
10391: "Skill_A_02",
10392: "Skill_S_Diona_01",
10395: "Skill_E_Diona_01"
10391: 'Skill_A_02',
10392: 'Skill_S_Diona_01',
10395: 'Skill_E_Diona_01'
},
ProudMap: {
10391: 3931,
@ -427,9 +427,9 @@ export default {
10000041: {
SkillOrder: [10411, 10412, 10415],
Skills: {
10411: "Skill_A_Catalyst_MD",
10412: "Skill_S_Mona_01",
10415: "Skill_E_Mona_01"
10411: 'Skill_A_Catalyst_MD',
10412: 'Skill_S_Mona_01',
10415: 'Skill_E_Mona_01'
},
ProudMap: {
10411: 4131,
@ -439,8 +439,8 @@ export default {
NameTextMapHash: 1113306282,
Costumes: {
204101: {
icon: "UI_AvatarIcon_MonaCostumeWic",
art: "UI_Costume_MonaCostumeWic",
icon: 'UI_AvatarIcon_MonaCostumeWic',
art: 'UI_Costume_MonaCostumeWic',
avatarId: 10000041
}
}
@ -448,9 +448,9 @@ export default {
10000042: {
SkillOrder: [10421, 10422, 10425],
Skills: {
10421: "Skill_A_01",
10422: "Skill_S_Keqing_01",
10425: "Skill_E_Keqing_01"
10421: 'Skill_A_01',
10422: 'Skill_S_Keqing_01',
10425: 'Skill_E_Keqing_01'
},
ProudMap: {
10421: 4231,
@ -460,8 +460,8 @@ export default {
NameTextMapHash: 1864015138,
Costumes: {
204201: {
icon: "UI_AvatarIcon_KeqingCostumeFeather",
art: "UI_Costume_KeqingCostumeFeather",
icon: 'UI_AvatarIcon_KeqingCostumeFeather',
art: 'UI_Costume_KeqingCostumeFeather',
avatarId: 10000042
}
}
@ -469,9 +469,9 @@ export default {
10000043: {
SkillOrder: [10431, 10432, 10435],
Skills: {
10431: "Skill_A_Catalyst_MD",
10432: "Skill_S_Sucrose_01",
10435: "Skill_E_Sucrose_01"
10431: 'Skill_A_Catalyst_MD',
10432: 'Skill_S_Sucrose_01',
10435: 'Skill_E_Sucrose_01'
},
ProudMap: {
10431: 4331,
@ -483,9 +483,9 @@ export default {
10000044: {
SkillOrder: [10441, 10442, 10443],
Skills: {
10441: "Skill_A_04",
10442: "Skill_S_Xinyan_01",
10443: "Skill_E_Xinyan_01"
10441: 'Skill_A_04',
10442: 'Skill_S_Xinyan_01',
10443: 'Skill_E_Xinyan_01'
},
ProudMap: {
10441: 4431,
@ -497,9 +497,9 @@ export default {
10000045: {
SkillOrder: [10451, 10452, 10453],
Skills: {
10451: "Skill_A_03",
10452: "Skill_S_Rosaria_01",
10453: "Skill_E_Rosaria_01"
10451: 'Skill_A_03',
10452: 'Skill_S_Rosaria_01',
10453: 'Skill_E_Rosaria_01'
},
ProudMap: {
10451: 4531,
@ -509,8 +509,8 @@ export default {
NameTextMapHash: 4260733330,
Costumes: {
204501: {
icon: "UI_AvatarIcon_RosariaCostumeWic",
art: "UI_Costume_RosariaCostumeWic",
icon: 'UI_AvatarIcon_RosariaCostumeWic',
art: 'UI_Costume_RosariaCostumeWic',
avatarId: 10000045
}
}
@ -518,9 +518,9 @@ export default {
10000046: {
SkillOrder: [10461, 10462, 10463],
Skills: {
10461: "Skill_A_03",
10462: "Skill_S_Hutao_01",
10463: "Skill_E_Hutao_01"
10461: 'Skill_A_03',
10462: 'Skill_S_Hutao_01',
10463: 'Skill_E_Hutao_01'
},
ProudMap: {
10461: 4631,
@ -532,9 +532,9 @@ export default {
10000047: {
SkillOrder: [10471, 10472, 10475],
Skills: {
10471: "Skill_A_01",
10472: "Skill_S_Kazuha_01",
10475: "Skill_E_Kazuha_01"
10471: 'Skill_A_01',
10472: 'Skill_S_Kazuha_01',
10475: 'Skill_E_Kazuha_01'
},
ProudMap: {
10471: 4731,
@ -546,9 +546,9 @@ export default {
10000048: {
SkillOrder: [10481, 10482, 10485],
Skills: {
10481: "Skill_A_Catalyst_MD",
10482: "Skill_S_Feiyan_01",
10485: "Skill_E_Feiyan_01"
10481: 'Skill_A_Catalyst_MD',
10482: 'Skill_S_Feiyan_01',
10485: 'Skill_E_Feiyan_01'
},
ProudMap: {
10481: 4831,
@ -560,9 +560,9 @@ export default {
10000049: {
SkillOrder: [10491, 10492, 10495],
Skills: {
10491: "Skill_A_02",
10492: "Skill_S_Yoimiya_01",
10495: "Skill_E_Yoimiya_01"
10491: 'Skill_A_02',
10492: 'Skill_S_Yoimiya_01',
10495: 'Skill_E_Yoimiya_01'
},
ProudMap: {
10491: 4931,
@ -574,9 +574,9 @@ export default {
10000050: {
SkillOrder: [10501, 10502, 10505],
Skills: {
10501: "Skill_A_03",
10502: "Skill_S_Tohma_01",
10505: "Skill_E_Tohma_01"
10501: 'Skill_A_03',
10502: 'Skill_S_Tohma_01',
10505: 'Skill_E_Tohma_01'
},
ProudMap: {
10501: 5031,
@ -588,9 +588,9 @@ export default {
10000051: {
SkillOrder: [10511, 10512, 10515],
Skills: {
10511: "Skill_A_04",
10512: "Skill_S_Eula_01",
10515: "Skill_E_Eula_01"
10511: 'Skill_A_04',
10512: 'Skill_S_Eula_01',
10515: 'Skill_E_Eula_01'
},
ProudMap: {
10511: 5131,
@ -602,9 +602,9 @@ export default {
10000052: {
SkillOrder: [10521, 10522, 10525],
Skills: {
10521: "Skill_A_03",
10522: "Skill_S_Shougun_01",
10525: "Skill_E_Shougun_01"
10521: 'Skill_A_03',
10522: 'Skill_S_Shougun_01',
10525: 'Skill_E_Shougun_01'
},
ProudMap: {
10521: 5231,
@ -616,9 +616,9 @@ export default {
10000053: {
SkillOrder: [10531, 10532, 10535],
Skills: {
10531: "Skill_A_04",
10532: "Skill_S_Sayu_01",
10535: "Skill_E_Sayu_01"
10531: 'Skill_A_04',
10532: 'Skill_S_Sayu_01',
10535: 'Skill_E_Sayu_01'
},
ProudMap: {
10531: 5331,
@ -630,9 +630,9 @@ export default {
10000054: {
SkillOrder: [10541, 10542, 10545],
Skills: {
10541: "Skill_A_Catalyst_MD",
10542: "Skill_S_Kokomi_01",
10545: "Skill_E_Kokomi_01"
10541: 'Skill_A_Catalyst_MD',
10542: 'Skill_S_Kokomi_01',
10545: 'Skill_E_Kokomi_01'
},
ProudMap: {
10541: 5431,
@ -644,9 +644,9 @@ export default {
10000055: {
SkillOrder: [10551, 10552, 10555],
Skills: {
10551: "Skill_A_02",
10552: "Skill_S_Gorou_01",
10555: "Skill_E_Gorou_01"
10551: 'Skill_A_02',
10552: 'Skill_S_Gorou_01',
10555: 'Skill_E_Gorou_01'
},
ProudMap: {
10551: 5531,
@ -658,9 +658,9 @@ export default {
10000056: {
SkillOrder: [10561, 10562, 10565],
Skills: {
10561: "Skill_A_02",
10562: "Skill_S_Sara_01",
10565: "Skill_E_Sara_01"
10561: 'Skill_A_02',
10562: 'Skill_S_Sara_01',
10565: 'Skill_E_Sara_01'
},
ProudMap: {
10561: 5631,
@ -672,9 +672,9 @@ export default {
10000057: {
SkillOrder: [10571, 10572, 10575],
Skills: {
10571: "Skill_A_04",
10572: "Skill_S_Itto_01",
10575: "Skill_E_Itto_01"
10571: 'Skill_A_04',
10572: 'Skill_S_Itto_01',
10575: 'Skill_E_Itto_01'
},
ProudMap: {
10571: 5731,
@ -686,9 +686,9 @@ export default {
10000058: {
SkillOrder: [10581, 10582, 10585],
Skills: {
10581: "Skill_A_Catalyst_MD",
10582: "Skill_S_Yae_01",
10585: "Skill_E_Yae_01"
10581: 'Skill_A_Catalyst_MD',
10582: 'Skill_S_Yae_01',
10585: 'Skill_E_Yae_01'
},
ProudMap: {
10581: 5831,
@ -700,9 +700,9 @@ export default {
10000059: {
SkillOrder: [10591, 10592, 10595],
Skills: {
10591: "Skill_A_Catalyst_MD",
10592: "Skill_S_Heizo_01",
10595: "Skill_E_Heizo_01"
10591: 'Skill_A_Catalyst_MD',
10592: 'Skill_S_Heizo_01',
10595: 'Skill_E_Heizo_01'
},
ProudMap: {
10591: 5931,
@ -714,9 +714,9 @@ export default {
10000060: {
SkillOrder: [10606, 10607, 10610],
Skills: {
10606: "Skill_A_02",
10607: "Skill_S_Yelan_01",
10610: "Skill_E_Yelan_01"
10606: 'Skill_A_02',
10607: 'Skill_S_Yelan_01',
10610: 'Skill_E_Yelan_01'
},
ProudMap: {
10606: 6031,
@ -728,9 +728,9 @@ export default {
10000062: {
SkillOrder: [10621, 10622, 10625],
Skills: {
10621: "Skill_A_02",
10622: "Skill_S_Aloy_01",
10625: "Skill_E_Aloy_01"
10621: 'Skill_A_02',
10622: 'Skill_S_Aloy_01',
10625: 'Skill_E_Aloy_01'
},
ProudMap: {
10621: 6231,
@ -742,9 +742,9 @@ export default {
10000063: {
SkillOrder: [10631, 10632, 10635],
Skills: {
10631: "Skill_A_03",
10632: "Skill_S_Shenhe_01",
10635: "Skill_E_Shenhe_01"
10631: 'Skill_A_03',
10632: 'Skill_S_Shenhe_01',
10635: 'Skill_E_Shenhe_01'
},
ProudMap: {
10631: 6331,
@ -756,9 +756,9 @@ export default {
10000064: {
SkillOrder: [10641, 10642, 10643],
Skills: {
10641: "Skill_A_03",
10642: "Skill_S_Yunjin_01",
10643: "Skill_E_Yunjin_01"
10641: 'Skill_A_03',
10642: 'Skill_S_Yunjin_01',
10643: 'Skill_E_Yunjin_01'
},
ProudMap: {
10641: 6431,
@ -770,9 +770,9 @@ export default {
10000065: {
SkillOrder: [10651, 10652, 10655],
Skills: {
10651: "Skill_A_01",
10652: "Skill_S_Shinobu_01",
10655: "Skill_E_Shinobu_01"
10651: 'Skill_A_01',
10652: 'Skill_S_Shinobu_01',
10655: 'Skill_E_Shinobu_01'
},
ProudMap: {
10651: 6531,
@ -784,9 +784,9 @@ export default {
10000066: {
SkillOrder: [10661, 10662, 10665],
Skills: {
10661: "Skill_A_01",
10662: "Skill_S_Ayato_01",
10665: "Skill_E_Ayato_01"
10661: 'Skill_A_01',
10662: 'Skill_S_Ayato_01',
10665: 'Skill_E_Ayato_01'
},
ProudMap: {
10661: 6631,
@ -795,15 +795,15 @@ export default {
},
NameTextMapHash: 1588620330
},
"10000005-501": {},
"10000005-502": {},
"10000005-503": {},
"10000005-504": {
'10000005-501': {},
'10000005-502': {},
'10000005-503': {},
'10000005-504': {
SkillOrder: [100543, 10067, 10068],
Skills: {
10067: "Skill_S_PlayerWind_01",
10068: "Skill_E_PlayerWind_01",
100543: "Skill_A_01"
10067: 'Skill_S_PlayerWind_01',
10068: 'Skill_E_PlayerWind_01',
100543: 'Skill_A_01'
},
NameTextMapHash: 1533656818,
ProudMap: {
@ -812,13 +812,13 @@ export default {
100543: 730
}
},
"10000005-505": {},
"10000005-506": {
'10000005-505': {},
'10000005-506': {
SkillOrder: [100545, 10077, 10078],
Skills: {
10077: "Skill_S_PlayerRock_01",
10078: "Skill_E_PlayerRock_01",
100545: "Skill_A_01"
10077: 'Skill_S_PlayerRock_01',
10078: 'Skill_E_PlayerRock_01',
100545: 'Skill_A_01'
},
NameTextMapHash: 1533656818,
ProudMap: {
@ -827,12 +827,12 @@ export default {
100545: 730
}
},
"10000005-507": {
'10000005-507': {
SkillOrder: [100546, 10602, 10605],
Skills: {
10602: "Skill_S_PlayerElectric_01",
10605: "Skill_E_PlayerElectric_01",
100546: "Skill_A_01"
10602: 'Skill_S_PlayerElectric_01',
10605: 'Skill_E_PlayerElectric_01',
100546: 'Skill_A_01'
},
NameTextMapHash: 1533656818,
ProudMap: {
@ -841,15 +841,15 @@ export default {
100546: 1030
}
},
"10000007-701": {},
"10000007-702": {},
"10000007-703": {},
"10000007-704": {
'10000007-701': {},
'10000007-702': {},
'10000007-703': {},
'10000007-704': {
SkillOrder: [100553, 10067, 10068],
Skills: {
10067: "Skill_S_PlayerWind_01",
10068: "Skill_E_PlayerWind_01",
100553: "Skill_A_01"
10067: 'Skill_S_PlayerWind_01',
10068: 'Skill_E_PlayerWind_01',
100553: 'Skill_A_01'
},
NameTextMapHash: 3816664530,
ProudMap: {
@ -858,13 +858,13 @@ export default {
100553: 731
}
},
"10000007-705": {},
"10000007-706": {
'10000007-705': {},
'10000007-706': {
SkillOrder: [100555, 10077, 10078],
Skills: {
10077: "Skill_S_PlayerRock_01",
10078: "Skill_E_PlayerRock_01",
100555: "Skill_A_01"
10077: 'Skill_S_PlayerRock_01',
10078: 'Skill_E_PlayerRock_01',
100555: 'Skill_A_01'
},
NameTextMapHash: 3816664530,
ProudMap: {
@ -873,12 +873,12 @@ export default {
100555: 731
}
},
"10000007-707": {
'10000007-707': {
SkillOrder: [100556, 10602, 10605],
Skills: {
10602: "Skill_S_PlayerElectric_01",
10605: "Skill_E_PlayerElectric_01",
100556: "Skill_A_01"
10602: 'Skill_S_PlayerElectric_01',
10605: 'Skill_E_PlayerElectric_01',
100556: 'Skill_A_01'
},
NameTextMapHash: 3816664530,
ProudMap: {
@ -887,4 +887,4 @@ export default {
100556: 1031
}
}
};
}

View File

@ -1,396 +1,396 @@
export default {
20848859: "黑岩斩刀",
33330467: "元素熟练",
37147251: "匣里日月",
43015699: "待定",
54857595: "止水息雷",
83115355: "被怜爱的少女",
85795635: "专注",
88505754: "枫原万叶",
135182203: "止水息雷",
147298547: "流浪大地的乐团",
156294403: "沉沦之心",
160493219: "暗铁剑",
168956722: "七七",
197755235: "贯虹之槊",
212557731: "祭雷之人",
240385755: "破浪",
246984427: "踏火息雷",
262428003: "祭冰之人",
270124867: "护国的无垢之心",
287454963: "祭风之人",
288666635: "无垢之心",
302691299: "琥珀玥",
303155515: "离簇不归",
310247243: "神乐之真意",
334242634: "申鹤",
339931171: "乘胜追击",
342097547: "辰砂之纺锤",
346510395: "衔珠海皇",
368014203: "斩裂晴空的龙脊",
391273955: "斫断黑翼的利齿",
411685275: "钢轮弓",
479076483: "冷刃",
481755219: "黑岩刺枪",
486287579: "余热",
500612819: "「旗杆」",
500987603: "(test)穿模测试",
506630267: "顺风而行",
514784907: "踏火止水",
521221323: "护国的无垢之心",
540938627: "掠食者",
566772267: "御伽大王御伽话",
577103787: "能量沐浴",
578575283: "流月针",
597991835: "白夜皓月",
607067963: "澄澄一心传",
613846163: "降世",
618786571: "钺矛",
623494555: "摧坚",
623534363: "西风秘典",
630452219: "樱之斋宫",
646032090: "鹿野院平藏",
646100491: "千岩诀·同心",
650049651: "风花之颂",
655825874: "云堇",
656120259: "神射手之誓",
680510411: "白影剑",
688991243: "息灾",
693354267: "尘世之锁",
697277554: "烟绯",
716252627: "千岩长枪",
729851187: "冰之川与雪之砂",
735056795: "西风大剑",
807607555: "天空之卷",
824949859: "嘟嘟!大冒险",
828711395: "阿莫斯之弓",
836208539: "炊金",
850802171: "白铁大剑",
855894507: "战狂",
862591315: "苍白之火",
877751435: "宗室大剑",
902264035: "风鹰剑",
902282051: "收割",
909145139: "护国的无垢之心",
930640955: "钟剑",
933076627: "冰风迷途的勇士",
942758755: "专注",
944332883: "斫峰之刃",
949506483: "海洋的胜利",
968378595: "西风之鹰的抗争",
968893378: "班尼特",
991968139: "非时之梦·常世灶食",
1006042610: "神里绫华",
1012170803: "笼钓瓶一心",
1021898539: "弹弓",
1021947690: "魈",
1028735635: "抗争的践行之歌",
1053433018: "砂糖",
1072884907: "万国诸海图谱",
1075647299: "松籁响起之时",
1082448331: "微光的海渊民",
1089950259: "天空之傲",
1097898243: "沉重",
1103732675: "幸运儿",
1113306282: "莫娜",
1114777131: "和弦",
1119368259: "旅程",
1130996346: "香菱",
1133599347: "矢志不忘",
1148024603: "「渔获」",
1154009435: "试作星镰",
1163263227: "流浪乐章",
1163616891: "霜葬",
1182966603: "佣兵重剑",
1186209435: "赌徒",
1212345779: "角斗士的终幕礼",
1217552947: "白刃流转",
1240067179: "西风猎弓",
1307222899: "徊徊切舍刀",
1319974859: "激励",
1321135667: "匣里龙吟",
1337666507: "千岩牢固",
1344953075: "顺风而行",
1345343763: "磐岩结绿",
1383639611: "奇迹",
1388004931: "飞天御剑",
1390797107: "白缨枪",
1404688115: "别离的思念之歌",
1406746947: "异世界行记",
1414366819: "金璋皇极",
1437658243: "螭骨剑",
1438974835: "逆飞的流星",
1455107995: "四风原典",
1468367538: "迪奥娜",
1479961579: "铁影阔剑",
1483922610: "九条裟罗",
1485303435: "注能之刺",
1492752155: "气定神闲",
1499235563: "乘胜追击",
1499745907: "「一心传」名刀",
1499817443: "苍翠之风",
1516554699: "石英大剑",
1522029867: "踏火息雷",
1524173875: "炽烈的炎之魔女",
1533656818: "旅行者",
1538092267: "「一心传」名刀",
1541919827: "染血的骑士道",
1545992315: "「正义」",
1558036915: "辰砂往生录",
1562601179: "翠绿之影",
1588620330: "神里绫人",
1595734083: "(test)穿模测试",
1600275315: "波乱月白经津",
1608953539: "黎明神剑",
1610242915: "传承",
1628928163: "风花之愿",
1632377563: "渡过烈火的贤人",
1651985379: "极昼的先兆者",
1660598451: "岩藏之胤",
1675686363: "祭礼大剑",
1706534267: "有话直说",
1722706579: "止水融冰",
1745286795: "名士振舞",
1745712907: "驭浪的海祇民",
1751039235: "昔日宗室之仪",
1756609915: "海染砗磲",
1771603299: "金璋皇极",
1773425155: "降临之剑",
1789612403: "回响",
1820235315: "无矢之歌",
1836628747: "叛逆的守护者",
1860795787: "曚云之月",
1864015138: "刻晴",
1873342283: "平息鸣雷的尊者",
1890163363: "不灭月华",
1901973075: "冬极白星",
1921418842: "诺艾尔",
1932742643: "灭却之戒法",
1934830979: "无尽的渴慕",
1940821986: "久岐忍",
1940919994: "胡桃",
1966438658: "安柏",
1982136171: "专注",
1990641987: "祭礼剑",
1990820123: "天目影打刀",
1991707099: "试作斩岩",
1997709467: "和璞鸢",
2006422931: "千岩古剑",
2009975571: "(test)穿模测试",
2017033267: "气定神闲",
2025598051: "顺风而行",
2040573235: "悠古的磐岩",
2060049099: "祭火之人",
2108574027: "碎石",
2109571443: "专注",
2125206395: "银剑",
2149411851: "金璋皇极",
2172529947: "乘胜追击",
2176134843: "专注",
2190368347: "决",
2191797987: "冒险家",
2195665683: "祭礼残章",
2242027395: "黑檀弓",
2276480763: "绝缘之旗印",
2279290283: "魔导绪论",
2297485451: "速射弓斗",
2312640651: "气定神闲",
2317820211: "注能之针",
2322648115: "粉碎",
2324146259: "白辰之环",
2340970067: "历练的猎弓",
2359799475: "恶王丸",
2364208851: "行者之心",
2365025043: "街巷游侠",
2375993851: "宗室长剑",
2383998915: "驭浪的海祇民",
2384519283: "弹弓",
2388785242: "早柚",
2400012995: "祭礼弓",
2410593283: "无锋剑",
2417717595: "暗巷猎手",
2425414923: "落霞",
2433755451: "揭旗的叛逆之歌",
2440850563: "回响长天的诗歌",
2466140362: "温迪",
2469300579: "乘胜追击",
2470306939: "飞雷御执",
2474354867: "西风剑",
2476346187: "踏火止水",
2491797315: "喜多院十文字",
2504399314: "宵宫",
2512309395: "如雷的盛怒",
2521338131: "试作金珀",
2534304035: "雾切御腰物",
2539208459: "证誓之明瞳",
2546254811: "华馆梦醒形骸记",
2556914683: "绝弦",
2587614459: "忍冬之果",
2614170427: "飞天大御剑",
2646367730: "北斗",
2664629131: "匣里灭辰",
2666951267: "训练大剑",
2673337443: "注能之矢",
2679781122: "甘雨",
2684365579: "登场乐",
2705029563: "口袋魔导书",
2713453234: "八重神子",
2719832059: "(test)穿模测试",
2743659331: "激流",
2749508387: "金璋皇极",
2749853923: "腐殖之剑",
2753539619: "雪葬的星银",
2764598579: "流放者",
2792766467: "无工之剑",
2796697027: "新手长枪",
2832648187: "宗室长弓",
2834803571: "金璋皇极",
2848374378: "夜兰",
2853296811: "穿刺高天的利齿",
2871793795: "锐利",
2876340530: "重云",
2890909531: "武人",
2893964243: "飞矢传书",
2915865819: "渊中霞彩",
2918525947: "飞雷之弦振",
2935286715: "宗室猎枪",
2947140987: "暗巷闪光",
2949448555: "苍古自由之誓",
2963220587: "翡玉法球",
3001782875: "气定神闲",
3018479371: "船歌",
3024507506: "雷电将军",
3063488107: "强力攻击",
3068316954: "荒泷一斗",
3070169307: "铁尖枪",
3079462611: "驭浪的海祇民",
3090373787: "暗巷的酒与诗",
3097441915: "以理服人",
3112448011: "决心",
3112679155: "终末嗟叹之诗",
3156385731: "昭心",
3159145923: "徊徊切舍刀",
3169209451: "弓藏",
3192689683: "霜葬",
3221566250: "琴",
3235324891: "护摩之杖",
3252085691: "顺风而行",
3258658763: "嗜魔",
3265161211: "注能之锋",
3273999011: "黑岩绯玉",
3277782506: "菲谢尔",
3302787771: "霜葬",
3305772819: "奔袭战术",
3314157803: "克柔",
3337185491: "浅濑之弭",
3337249451: "过载",
3339083250: "可莉",
3344622722: "丽莎",
3364338659: "无边际的眷顾",
3371922315: "神樱神游神乐舞",
3378007475: "黑岩长剑",
3400133546: "五郎",
3406113971: "顺风而行",
3421967235: "吃虎鱼刀",
3439749859: "苍翠猎弓",
3443142923: "龙脊长枪",
3447737235: "黑岩战弓",
3456986819: "嘟嘟可故事集",
3464027035: "「一心传」名刀",
3465493459: "精准",
3500935003: "讨龙英杰谭",
3535784755: "勇士之心",
3541083923: "角斗士",
3555115602: "托马",
3584825427: "学徒笔记",
3587062891: "千岩诀·同心",
3587621259: "笛剑",
3600623979: "猎弓",
3608180322: "迪卢克",
3618167299: "学士",
3625393819: "试作澹月",
3626268211: "来歆余响",
3673792067: "旅行剑",
3684723963: "雨裁",
3685735523: "徊徊切舍刀",
3689108098: "埃洛伊",
3717667418: "优菈",
3717849275: "薙草之稻光",
3719372715: "甲级宝珏",
3722933411: "试作古华",
3755004051: "西风长枪",
3762437019: "(test)穿模测试",
3775299170: "芭芭拉",
3782508715: "游医",
3796702635: "变化万端",
3796905611: "黑剑",
3816664530: "旅行者",
3827789435: "宗室秘法录",
3832443723: "不屈",
3836188467: "无羁的朱赤之蝶",
3847143266: "达达利亚",
3862787418: "钟离",
3890292467: "教官",
3898539027: "浮游四方的灵云",
3914045794: "珊瑚宫心海",
3914951691: "赤角石溃杵",
3933622347: "天空之翼",
3949653579: "幽夜华尔兹",
3966753539: "洗濯诸类之形",
3975746731: "鸦羽弓",
3995710363: "狼的末路",
3996017211: "收割",
3999792907: "祭水之人",
4000770243: "街巷伏击",
4022012131: "乘胜追击",
4049410651: "决斗之枪",
4055003299: "天空之刃",
4060235987: "日月辉",
4080317355: "勇气",
4082302819: "守护之心",
4090429643: "沐浴龙血的剑",
4103022435: "铁蜂刺",
4103766499: "黑缨枪",
4108620722: "阿贝多",
4113638323: "昭理的鸢之枪",
4119663210: "凯亚",
4122509083: "断浪长鳍",
4124851547: "雾切之回光",
4127888970: "凝光",
4137694339: "(test)竿测试",
4139294531: "信使",
4144069251: "追忆之注连",
4158505619: "天空之脊",
4160147242: "雷泽",
4162981171: "(test)穿模测试",
4186179883: "破魔之弓",
4193089947: "桂木斩长正",
4197635682: "行秋",
4226083179: "名士振舞",
4230231107: "若水",
4245213187: "注能之卷",
4258047555: "极夜二重奏",
4260733330: "罗莎莉亚",
4267718859: "反曲弓",
4273845410: "辛焱",
4275754179: "如狼般狩猎者",
FIGHT_PROP_ATTACK: "攻击力",
FIGHT_PROP_CHARGE_EFFICIENCY: "元素充能效率",
FIGHT_PROP_CRITICAL: "暴击率",
FIGHT_PROP_CRITICAL_HURT: "暴击伤害",
FIGHT_PROP_DEFENSE: "防御力",
FIGHT_PROP_ELEC_ADD_HURT: "雷元素伤害加成",
FIGHT_PROP_ELEMENT_MASTERY: "元素精通",
FIGHT_PROP_FIRE_ADD_HURT: "火元素伤害加成",
FIGHT_PROP_GRASS_ADD_HURT: "草元素伤害加成",
FIGHT_PROP_HEALED_ADD: "受治疗加成",
FIGHT_PROP_HEAL_ADD: "治疗加成",
FIGHT_PROP_ICE_ADD_HURT: "冰元素伤害加成",
FIGHT_PROP_MAX_HP: "生命值上限",
FIGHT_PROP_PHYSICAL_ADD_HURT: "物理伤害加成",
FIGHT_PROP_ROCK_ADD_HURT: "岩元素伤害加成",
FIGHT_PROP_SHIELD_COST_MINUS_RATIO: "护盾强效",
FIGHT_PROP_WATER_ADD_HURT: "水元素伤害加成",
FIGHT_PROP_WIND_ADD_HURT: "风元素伤害加成",
level: "等级",
}
20848859: '黑岩斩刀',
33330467: '元素熟练',
37147251: '匣里日月',
43015699: '待定',
54857595: '止水息雷',
83115355: '被怜爱的少女',
85795635: '专注',
88505754: '枫原万叶',
135182203: '止水息雷',
147298547: '流浪大地的乐团',
156294403: '沉沦之心',
160493219: '暗铁剑',
168956722: '七七',
197755235: '贯虹之槊',
212557731: '祭雷之人',
240385755: '破浪',
246984427: '踏火息雷',
262428003: '祭冰之人',
270124867: '护国的无垢之心',
287454963: '祭风之人',
288666635: '无垢之心',
302691299: '琥珀玥',
303155515: '离簇不归',
310247243: '神乐之真意',
334242634: '申鹤',
339931171: '乘胜追击',
342097547: '辰砂之纺锤',
346510395: '衔珠海皇',
368014203: '斩裂晴空的龙脊',
391273955: '斫断黑翼的利齿',
411685275: '钢轮弓',
479076483: '冷刃',
481755219: '黑岩刺枪',
486287579: '余热',
500612819: '「旗杆」',
500987603: '(test)穿模测试',
506630267: '顺风而行',
514784907: '踏火止水',
521221323: '护国的无垢之心',
540938627: '掠食者',
566772267: '御伽大王御伽话',
577103787: '能量沐浴',
578575283: '流月针',
597991835: '白夜皓月',
607067963: '澄澄一心传',
613846163: '降世',
618786571: '钺矛',
623494555: '摧坚',
623534363: '西风秘典',
630452219: '樱之斋宫',
646032090: '鹿野院平藏',
646100491: '千岩诀·同心',
650049651: '风花之颂',
655825874: '云堇',
656120259: '神射手之誓',
680510411: '白影剑',
688991243: '息灾',
693354267: '尘世之锁',
697277554: '烟绯',
716252627: '千岩长枪',
729851187: '冰之川与雪之砂',
735056795: '西风大剑',
807607555: '天空之卷',
824949859: '嘟嘟!大冒险',
828711395: '阿莫斯之弓',
836208539: '炊金',
850802171: '白铁大剑',
855894507: '战狂',
862591315: '苍白之火',
877751435: '宗室大剑',
902264035: '风鹰剑',
902282051: '收割',
909145139: '护国的无垢之心',
930640955: '钟剑',
933076627: '冰风迷途的勇士',
942758755: '专注',
944332883: '斫峰之刃',
949506483: '海洋的胜利',
968378595: '西风之鹰的抗争',
968893378: '班尼特',
991968139: '非时之梦·常世灶食',
1006042610: '神里绫华',
1012170803: '笼钓瓶一心',
1021898539: '弹弓',
1021947690: '魈',
1028735635: '抗争的践行之歌',
1053433018: '砂糖',
1072884907: '万国诸海图谱',
1075647299: '松籁响起之时',
1082448331: '微光的海渊民',
1089950259: '天空之傲',
1097898243: '沉重',
1103732675: '幸运儿',
1113306282: '莫娜',
1114777131: '和弦',
1119368259: '旅程',
1130996346: '香菱',
1133599347: '矢志不忘',
1148024603: '「渔获」',
1154009435: '试作星镰',
1163263227: '流浪乐章',
1163616891: '霜葬',
1182966603: '佣兵重剑',
1186209435: '赌徒',
1212345779: '角斗士的终幕礼',
1217552947: '白刃流转',
1240067179: '西风猎弓',
1307222899: '徊徊切舍刀',
1319974859: '激励',
1321135667: '匣里龙吟',
1337666507: '千岩牢固',
1344953075: '顺风而行',
1345343763: '磐岩结绿',
1383639611: '奇迹',
1388004931: '飞天御剑',
1390797107: '白缨枪',
1404688115: '别离的思念之歌',
1406746947: '异世界行记',
1414366819: '金璋皇极',
1437658243: '螭骨剑',
1438974835: '逆飞的流星',
1455107995: '四风原典',
1468367538: '迪奥娜',
1479961579: '铁影阔剑',
1483922610: '九条裟罗',
1485303435: '注能之刺',
1492752155: '气定神闲',
1499235563: '乘胜追击',
1499745907: '「一心传」名刀',
1499817443: '苍翠之风',
1516554699: '石英大剑',
1522029867: '踏火息雷',
1524173875: '炽烈的炎之魔女',
1533656818: '旅行者',
1538092267: '「一心传」名刀',
1541919827: '染血的骑士道',
1545992315: '「正义」',
1558036915: '辰砂往生录',
1562601179: '翠绿之影',
1588620330: '神里绫人',
1595734083: '(test)穿模测试',
1600275315: '波乱月白经津',
1608953539: '黎明神剑',
1610242915: '传承',
1628928163: '风花之愿',
1632377563: '渡过烈火的贤人',
1651985379: '极昼的先兆者',
1660598451: '岩藏之胤',
1675686363: '祭礼大剑',
1706534267: '有话直说',
1722706579: '止水融冰',
1745286795: '名士振舞',
1745712907: '驭浪的海祇民',
1751039235: '昔日宗室之仪',
1756609915: '海染砗磲',
1771603299: '金璋皇极',
1773425155: '降临之剑',
1789612403: '回响',
1820235315: '无矢之歌',
1836628747: '叛逆的守护者',
1860795787: '曚云之月',
1864015138: '刻晴',
1873342283: '平息鸣雷的尊者',
1890163363: '不灭月华',
1901973075: '冬极白星',
1921418842: '诺艾尔',
1932742643: '灭却之戒法',
1934830979: '无尽的渴慕',
1940821986: '久岐忍',
1940919994: '胡桃',
1966438658: '安柏',
1982136171: '专注',
1990641987: '祭礼剑',
1990820123: '天目影打刀',
1991707099: '试作斩岩',
1997709467: '和璞鸢',
2006422931: '千岩古剑',
2009975571: '(test)穿模测试',
2017033267: '气定神闲',
2025598051: '顺风而行',
2040573235: '悠古的磐岩',
2060049099: '祭火之人',
2108574027: '碎石',
2109571443: '专注',
2125206395: '银剑',
2149411851: '金璋皇极',
2172529947: '乘胜追击',
2176134843: '专注',
2190368347: '决',
2191797987: '冒险家',
2195665683: '祭礼残章',
2242027395: '黑檀弓',
2276480763: '绝缘之旗印',
2279290283: '魔导绪论',
2297485451: '速射弓斗',
2312640651: '气定神闲',
2317820211: '注能之针',
2322648115: '粉碎',
2324146259: '白辰之环',
2340970067: '历练的猎弓',
2359799475: '恶王丸',
2364208851: '行者之心',
2365025043: '街巷游侠',
2375993851: '宗室长剑',
2383998915: '驭浪的海祇民',
2384519283: '弹弓',
2388785242: '早柚',
2400012995: '祭礼弓',
2410593283: '无锋剑',
2417717595: '暗巷猎手',
2425414923: '落霞',
2433755451: '揭旗的叛逆之歌',
2440850563: '回响长天的诗歌',
2466140362: '温迪',
2469300579: '乘胜追击',
2470306939: '飞雷御执',
2474354867: '西风剑',
2476346187: '踏火止水',
2491797315: '喜多院十文字',
2504399314: '宵宫',
2512309395: '如雷的盛怒',
2521338131: '试作金珀',
2534304035: '雾切御腰物',
2539208459: '证誓之明瞳',
2546254811: '华馆梦醒形骸记',
2556914683: '绝弦',
2587614459: '忍冬之果',
2614170427: '飞天大御剑',
2646367730: '北斗',
2664629131: '匣里灭辰',
2666951267: '训练大剑',
2673337443: '注能之矢',
2679781122: '甘雨',
2684365579: '登场乐',
2705029563: '口袋魔导书',
2713453234: '八重神子',
2719832059: '(test)穿模测试',
2743659331: '激流',
2749508387: '金璋皇极',
2749853923: '腐殖之剑',
2753539619: '雪葬的星银',
2764598579: '流放者',
2792766467: '无工之剑',
2796697027: '新手长枪',
2832648187: '宗室长弓',
2834803571: '金璋皇极',
2848374378: '夜兰',
2853296811: '穿刺高天的利齿',
2871793795: '锐利',
2876340530: '重云',
2890909531: '武人',
2893964243: '飞矢传书',
2915865819: '渊中霞彩',
2918525947: '飞雷之弦振',
2935286715: '宗室猎枪',
2947140987: '暗巷闪光',
2949448555: '苍古自由之誓',
2963220587: '翡玉法球',
3001782875: '气定神闲',
3018479371: '船歌',
3024507506: '雷电将军',
3063488107: '强力攻击',
3068316954: '荒泷一斗',
3070169307: '铁尖枪',
3079462611: '驭浪的海祇民',
3090373787: '暗巷的酒与诗',
3097441915: '以理服人',
3112448011: '决心',
3112679155: '终末嗟叹之诗',
3156385731: '昭心',
3159145923: '徊徊切舍刀',
3169209451: '弓藏',
3192689683: '霜葬',
3221566250: '琴',
3235324891: '护摩之杖',
3252085691: '顺风而行',
3258658763: '嗜魔',
3265161211: '注能之锋',
3273999011: '黑岩绯玉',
3277782506: '菲谢尔',
3302787771: '霜葬',
3305772819: '奔袭战术',
3314157803: '克柔',
3337185491: '浅濑之弭',
3337249451: '过载',
3339083250: '可莉',
3344622722: '丽莎',
3364338659: '无边际的眷顾',
3371922315: '神樱神游神乐舞',
3378007475: '黑岩长剑',
3400133546: '五郎',
3406113971: '顺风而行',
3421967235: '吃虎鱼刀',
3439749859: '苍翠猎弓',
3443142923: '龙脊长枪',
3447737235: '黑岩战弓',
3456986819: '嘟嘟可故事集',
3464027035: '「一心传」名刀',
3465493459: '精准',
3500935003: '讨龙英杰谭',
3535784755: '勇士之心',
3541083923: '角斗士',
3555115602: '托马',
3584825427: '学徒笔记',
3587062891: '千岩诀·同心',
3587621259: '笛剑',
3600623979: '猎弓',
3608180322: '迪卢克',
3618167299: '学士',
3625393819: '试作澹月',
3626268211: '来歆余响',
3673792067: '旅行剑',
3684723963: '雨裁',
3685735523: '徊徊切舍刀',
3689108098: '埃洛伊',
3717667418: '优菈',
3717849275: '薙草之稻光',
3719372715: '甲级宝珏',
3722933411: '试作古华',
3755004051: '西风长枪',
3762437019: '(test)穿模测试',
3775299170: '芭芭拉',
3782508715: '游医',
3796702635: '变化万端',
3796905611: '黑剑',
3816664530: '旅行者',
3827789435: '宗室秘法录',
3832443723: '不屈',
3836188467: '无羁的朱赤之蝶',
3847143266: '达达利亚',
3862787418: '钟离',
3890292467: '教官',
3898539027: '浮游四方的灵云',
3914045794: '珊瑚宫心海',
3914951691: '赤角石溃杵',
3933622347: '天空之翼',
3949653579: '幽夜华尔兹',
3966753539: '洗濯诸类之形',
3975746731: '鸦羽弓',
3995710363: '狼的末路',
3996017211: '收割',
3999792907: '祭水之人',
4000770243: '街巷伏击',
4022012131: '乘胜追击',
4049410651: '决斗之枪',
4055003299: '天空之刃',
4060235987: '日月辉',
4080317355: '勇气',
4082302819: '守护之心',
4090429643: '沐浴龙血的剑',
4103022435: '铁蜂刺',
4103766499: '黑缨枪',
4108620722: '阿贝多',
4113638323: '昭理的鸢之枪',
4119663210: '凯亚',
4122509083: '断浪长鳍',
4124851547: '雾切之回光',
4127888970: '凝光',
4137694339: '(test)竿测试',
4139294531: '信使',
4144069251: '追忆之注连',
4158505619: '天空之脊',
4160147242: '雷泽',
4162981171: '(test)穿模测试',
4186179883: '破魔之弓',
4193089947: '桂木斩长正',
4197635682: '行秋',
4226083179: '名士振舞',
4230231107: '若水',
4245213187: '注能之卷',
4258047555: '极夜二重奏',
4260733330: '罗莎莉亚',
4267718859: '反曲弓',
4273845410: '辛焱',
4275754179: '如狼般狩猎者',
FIGHT_PROP_ATTACK: '攻击力',
FIGHT_PROP_CHARGE_EFFICIENCY: '元素充能效率',
FIGHT_PROP_CRITICAL: '暴击率',
FIGHT_PROP_CRITICAL_HURT: '暴击伤害',
FIGHT_PROP_DEFENSE: '防御力',
FIGHT_PROP_ELEC_ADD_HURT: '雷元素伤害加成',
FIGHT_PROP_ELEMENT_MASTERY: '元素精通',
FIGHT_PROP_FIRE_ADD_HURT: '火元素伤害加成',
FIGHT_PROP_GRASS_ADD_HURT: '草元素伤害加成',
FIGHT_PROP_HEALED_ADD: '受治疗加成',
FIGHT_PROP_HEAL_ADD: '治疗加成',
FIGHT_PROP_ICE_ADD_HURT: '冰元素伤害加成',
FIGHT_PROP_MAX_HP: '生命值上限',
FIGHT_PROP_PHYSICAL_ADD_HURT: '物理伤害加成',
FIGHT_PROP_ROCK_ADD_HURT: '岩元素伤害加成',
FIGHT_PROP_SHIELD_COST_MINUS_RATIO: '护盾强效',
FIGHT_PROP_WATER_ADD_HURT: '水元素伤害加成',
FIGHT_PROP_WIND_ADD_HURT: '风元素伤害加成',
level: '等级'
}

View File

@ -1,6 +1,5 @@
import fetch from 'node-fetch'
import EnkaData from './enka-data.js'
import Data from '../Data.js'
let Enka = {
key: 'enka',
@ -21,7 +20,7 @@ let Enka = {
}
let details = data.avatarInfoList
if (!details || details.length === 0 || !details[0].propMap) {
e.reply('请打开游戏内角色展柜的“显示详情”等待5分钟重新获取面板')
e.reply('请打开游戏内角色展柜的【显示详情】等待5分钟重新获取面板')
return false
}
return EnkaData.getData(uid, data)

View File

@ -1,47 +1,47 @@
import _Data from "../Data.js";
import lodash from "lodash";
import _Data from '../Data.js'
import lodash from 'lodash'
const _path = process.cwd();
const _path = process.cwd()
export const artiIdx = {
"生之花": 1,
"死之羽": 2,
"时之沙": 3,
"空之杯": 4,
"理之冠": 5
生之花: 1,
死之羽: 2,
时之沙: 3,
空之杯: 4,
理之冠: 5
}
let relis = _Data.readJSON(`${_path}/plugins/miao-plugin/resources/meta/reliquaries/`, "data.json") || {};
let setMap = {};
let relis = _Data.readJSON(`${_path}/plugins/miao-plugin/resources/meta/reliquaries/`, 'data.json') || {}
let setMap = {}
lodash.forEach(relis, (ds) => {
if (ds.sets) {
lodash.forEach(ds.sets, (tmp) => {
if (tmp.name) {
setMap[tmp.name] = ds.name;
setMap[tmp.name] = ds.name
}
})
}
})
export const artiSetMap = setMap;
export const artiSetMap = setMap
export const attrMap = {
HP: "小生命",
HP_PERCENT: "大生命",
ATTACK: "小攻击",
ATTACK_PERCENT: "大攻击",
DEFENSE: "小防御",
DEFENSE_PERCENT: "大防御",
FIRE_ADD_HURT: "火元素伤害加成",
ICE_ADD_HURT: "冰元素伤害加成",
ROCK_ADD_HURT: "岩元素伤害加成",
ELEC_ADD_HURT: "雷元素伤害加成",
WIND_ADD_HURT: "风元素伤害加成",
WATER_ADD_HURT: "水元素伤害加成",
PHYSICAL_ADD_HURT: "物理伤害加成",
HEAL_ADD: "治疗加成",
ELEMENT_MASTERY: "元素精通",
CRITICAL: "暴击率",
CRITICAL_HURT: "暴击伤害",
CHARGE_EFFICIENCY: "充能效率",
};
HP: '小生命',
HP_PERCENT: '大生命',
ATTACK: '小攻击',
ATTACK_PERCENT: '大攻击',
DEFENSE: '小防御',
DEFENSE_PERCENT: '大防御',
FIRE_ADD_HURT: '火元素伤害加成',
ICE_ADD_HURT: '冰元素伤害加成',
ROCK_ADD_HURT: '岩元素伤害加成',
ELEC_ADD_HURT: '雷元素伤害加成',
WIND_ADD_HURT: '风元素伤害加成',
WATER_ADD_HURT: '水元素伤害加成',
PHYSICAL_ADD_HURT: '物理伤害加成',
HEAL_ADD: '治疗加成',
ELEMENT_MASTERY: '元素精通',
CRITICAL: '暴击率',
CRITICAL_HURT: '暴击伤害',
CHARGE_EFFICIENCY: '充能效率'
}

View File

@ -98,7 +98,7 @@ let Miao = {
attr: Miao.getAttr(data.uidDataCombatValue),
weapon: Miao.getWeapon(ds.weapon),
artis: Miao.getArtifact(data.uidDataByReliquary),
cons: ds.constellationNum,
cons: ds.constellationNum || 0,
talent: Miao.getTalent(char.id, ds.skill),
_priority: 10
}

View File

@ -1,205 +1,203 @@
import lodash from "lodash";
import Character from "../models/Character.js";
import lodash from 'lodash'
import Character from '../models/Character.js'
const artifactMap = {
'生命值': {
title: "小生命"
生命值: {
title: '小生命'
},
'生命值_百分比': {
title: "大生命",
生命值_百分比: {
title: '大生命',
pct: true
},
'暴击率': {
title: "暴击率",
暴击率: {
title: '暴击率',
pct: true
},
'暴击伤害': {
title: "暴击伤害",
暴击伤害: {
title: '暴击伤害',
pct: true
},
'防御力': {
title: "小防御"
防御力: {
title: '小防御'
},
'防御力_百分比': {
title: "大防御",
防御力_百分比: {
title: '大防御',
pct: true
},
'攻击力': {
title: "小攻击"
攻击力: {
title: '小攻击'
},
'攻击力_百分比': {
title: "大攻击",
攻击力_百分比: {
title: '大攻击',
pct: true
},
'元素精通': {
title: "元素精通"
元素精通: {
title: '元素精通'
},
'元素充能效率': {
title: "充能效率",
元素充能效率: {
title: '充能效率',
pct: true
},
'治疗加成': {
title: "治疗加成",
治疗加成: {
title: '治疗加成',
pct: true
}
}
let posIdx = {
"生之花": {
生之花: {
idx: 1
},
"死之羽": {
死之羽: {
idx: 2
},
"时之沙": {
时之沙: {
idx: 3
},
"空之杯": {
空之杯: {
idx: 4
},
"理之冠": {
理之冠: {
idx: 5
}
};
}
let Data = {
getData(uid, data) {
getData (uid, data) {
let ret = {
uid,
chars: {}
};
}
lodash.forEach({
name: "角色名称",
avatar: "头像ID",
lv: "冒险等阶"
name: '角色名称',
avatar: '头像ID',
lv: '冒险等阶'
}, (title, key) => {
ret[key] = data[title] || "";
ret[key] = data[title] || ''
})
lodash.forEach(data.items, (ds) => {
let char = Data.getAvatar(ds);
ret.chars[char.id] = char;
});
return ret;
let char = Data.getAvatar(ds)
ret.chars[char.id] = char
})
return ret
},
getAvatar(data) {
let char = Character.get(data["英雄Id"]);
getAvatar (data) {
let char = Character.get(data['英雄Id'])
return {
id: data["英雄Id"],
name: char ? char.name : "",
id: data['英雄Id'],
name: char ? char.name : '',
lv: data['等级'],
attr: Data.getAttr(data),
// weapon: Data.getWeapon(data),
artis: Data.getArtifact(data),
//cons: data["命之座数量"] * 1 || 0,
//talent: Data.getTalent(data)
};
artis: Data.getArtifact(data)
// cons: data["命之座数量"] * 1 || 0,
// talent: Data.getTalent(data)
}
},
getAttr(data) {
let ret = {};
getAttr (data) {
let ret = {}
let attrKey = {
atk: "攻击力_总",
atkBase: "属性攻击力",
def: "防御力_总",
defBase: "属性防御力",
hp: "生命值上限_总",
hpBase: "属性生命值上限",
mastery: "属性元素精通",
atk: '攻击力_总',
atkBase: '属性攻击力',
def: '防御力_总',
defBase: '属性防御力',
hp: '生命值上限_总',
hpBase: '属性生命值上限',
mastery: '属性元素精通',
cRate: {
title: "属性暴击率",
title: '属性暴击率',
pct: true
},
cDmg: {
title: "属性暴击伤害",
title: '属性暴击伤害',
pct: true
},
hInc: {
title: "属性治疗加成",
title: '属性治疗加成',
pct: true
},
recharge: {
title: "属性元素充能效率",
title: '属性元素充能效率',
pct: true
}
};
}
lodash.forEach(attrKey, (cfg, key) => {
if (typeof (cfg) === "string") {
cfg = {title: cfg};
if (typeof (cfg) === 'string') {
cfg = { title: cfg }
}
let val = data[cfg.title] || "";
let val = data[cfg.title] || ''
if (cfg.pct) {
val = (val * 100).toFixed(2)
}
ret[key] = val;
});
let maxDmg = 0;
lodash.forEach("火水草雷风冰岩".split(""), (key) => {
maxDmg = Math.max(data[`属性${key}元素伤害加成`] * 1, maxDmg);
});
ret.dmgBonus = (maxDmg * 100).toFixed(2);
ret.phyBonus = (data[`属性物理伤害加成`] * 100).toFixed(2);
ret[key] = val
})
let maxDmg = 0
lodash.forEach('火水草雷风冰岩'.split(''), (key) => {
maxDmg = Math.max(data[`属性${key}元素伤害加成`] * 1, maxDmg)
})
ret.dmgBonus = (maxDmg * 100).toFixed(2)
ret.phyBonus = (data['属性物理伤害加成'] * 100).toFixed(2)
return ret;
return ret
},
getWeapon(data) {
getWeapon (data) {
return {
name: data['武器名称'],
lv: data['武器等级'],
refine: data["武器精炼"]
refine: data['武器精炼']
}
},
getArtifact(data) {
let ret = {};
getArtifact (data) {
let ret = {}
let get = function (idx, key) {
let v = data[`圣遗物${idx}${key}`];
let ret = /^([^\d]*)([\d\.\-]*)$/.exec(v);
let v = data[`圣遗物${idx}${key}`]
let ret = /^([^\d]*)([\d\.\-]*)$/.exec(v)
if (ret && ret[1]) {
let title = ret[1], val = ret[2];
let title = ret[1]; let val = ret[2]
if (artifactMap[title]) {
if (artifactMap[title].pct) {
val = (val * 100).toFixed(2);
val = (val * 100).toFixed(2)
}
title = artifactMap[title].title;
title = artifactMap[title].title
}
return [title, val];
return [title, val]
}
return [];
return []
}
for (let idx = 1; idx <= 5; idx++) {
ret[`arti${idx}`] = {
name: data[`圣遗物${idx}名称`],
type: data[`圣遗物${idx}类型`],
main: get(idx, "主词条"),
main: get(idx, '主词条'),
attrs: [
get(idx, "副词条1"),
get(idx, "副词条2"),
get(idx, "副词条3"),
get(idx, "副词条4"),
get(idx, '副词条1'),
get(idx, '副词条2'),
get(idx, '副词条3'),
get(idx, '副词条4')
]
};
}
}
return ret;
return ret
},
getTalent(data) {
let ret = {};
getTalent (data) {
let ret = {}
lodash.forEach({
a: 1,
e: 2,
q: 3
}, (idx, key) => {
let val = data[`天赋主动名称${idx}`]
let regRet = /等级(\d*)$/.exec(val);
let regRet = /等级(\d*)$/.exec(val)
if (regRet && regRet[1]) {
ret[key] = regRet[1] * 1 || 1
} else {
ret[key] = 1;
ret[key] = 1
}
})
return ret;
return ret
}
}
}

View File

@ -1,6 +1,5 @@
/*
* 如需配置复制此文件改名为profile.js
*
* 暂未做热更新修改完毕请重启yunzai
* */
@ -10,7 +9,7 @@
* Enka官网https://enka.shinshin.moe/
* 感谢Enka提供的面板查询服务
* https://github.com/yoimiya-kokomi/miao-plugin/issues/63#issuecomment-1199348789
* 如果可以的话也可考虑在 Patreon上支持Enka或提供不用的原神账户具体可在Discord联系
* 如果可以的话也可考虑在Patreon上支持Enka或提供闲置的原神账户具体可在Discord联系
*
*
* 如Enka服务访问不稳定可尝试更换MiniGrayGay大佬提供的中转服务
@ -25,9 +24,18 @@ export const enkaApi = {
}
/*
* MiaoApi面板更新地址暂时只支持B服角色
* 单个用户请求面板的间隔时间单位分钟
* 不同用户的计时独立
*
* 因为服务数据更新需要5分钟左右建议设置为5分钟或5分钟以上
* 可降低对服务的压力同时防止过度刷屏
* */
export const requestInterval = 5
/*
* MiaoApi面板更新地址暂时支持B服角色
* */
export const miaoApi = {
url: 'http://49.232.91.210/profile',
token: 'miao-token'
token: '请求Token'
}

View File

@ -3,8 +3,9 @@
* 如需自定义配置请复制修改上一级profile_default.js
* */
export const profileApi = ({ uid, Miao, Enka }) => {
if ((uid + '')[0] === '5') {
export const profileApi = ({ uid, Miao, Enka, diyCfg }) => {
let token = diyCfg?.miaoApi?.token
if (token && token.length === 32) {
return Miao
}
return Enka
@ -28,3 +29,6 @@ export const enkaApi = {
return `${url}u/${uid}/__data.json`
}
}
/* 请求面板的冷却时间,单位分钟 */
export const requestInterval = 5

View File

@ -0,0 +1,3 @@
此目录为系统配置目录
请勿修改此目录下的文件,否则可能导致工作不正常
如需配置可配置上级目录复制对应_default.js 文件进行配置

View File

@ -1,258 +1,11 @@
import Profile from "../components/Profile.js";
import Calc from "../components/Calc.js";
import { Character } from "../components/models.js";
import Miao from "../components/profile-data/miao.js";
import Profile from '../components/Profile.js'
import Calc from '../components/Calc.js'
import { Character } from '../components/models.js'
import Miao from '../components/profile-data/miao.js'
export async function calcDmg(inputData) {
let profile = Miao.getAvatarDetail(inputData);
let char = Character.get(profile);
return await Calc.calcData({ profile, char, enemyLv: 86 });
}
let testData = {
"uidData": {
"kid": 2046882,
"id": 10000065,
"uid": 138638352,
"name": "久岐忍",
"internalName": "Shinobu",
"fetterLevel": 7,
"level": 90,
"promoteLevel": 6,
"constellationNum": 4,
"skill": [
{
"id": 10651,
"name": "普通攻击·忍流飞刃斩",
"level": 6
},
{
"id": 10652,
"name": "越祓雷草之轮",
"level": 12
},
{
"id": 10655,
"name": "御咏鸣神刈山祭",
"level": 9
}
],
"weapon": {
"id": 11503,
"rank": 5,
"icon": "UI_EquipIcon_Sword_Widsith_Awaken",
"name": "苍古自由之誓",
"desc": "如同悠古的歌声一般苍蓝的直剑,如同风之国土自由的誓言一般锐利的武器。",
"affix": 111503,
"level": 90,
"affixLevel": 0,
"promoteLevel": 6
},
"reliquarySet": [
2140040,
2140041
]
},
"uidDataCombatValue": {
"kid": 2046824,
"roleid": 10000065,
"uid": 138638352,
"health": 28460.025390625,
"attack": 1794.4952392578125,
"defense": 750.773681640625,
"critRate": 0.13940000534057617,
"critDamage": 1.0906000137329102,
"recharge": 1.103600025177002,
"elementMastery": 214.78079223632812,
"heal": 0.5090000033378601,
"addHurt": {
"physical": 0,
"fire": 0,
"elec": 0.4659999907016754,
"water": 0,
"grass": 0,
"wind": 0,
"rock": 0,
"ice": 0
},
"baseHP": 12288.654296875,
"baseATK": 820.4718627929688,
"baseDEF": 750.773681640625
},
"uidDataByReliquary": [
{
"kid": 9383961,
"roleid": 10000065,
"uid": 138638352,
"id": 71554,
"icon": "UI_RelicIcon_14001_5",
"name": "冰雪故园的终期",
"rank": 5,
"type": "时之沙",
"level": 20,
"mainAffix": {
"name": "FIGHT_PROP_ATTACK_PERCENT",
"value": 0.4659999907016754,
"score": null
},
"appendAffix": [
{
"name": "FIGHT_PROP_CRITICAL",
"value": 0.0272000003606081
},
{
"name": "FIGHT_PROP_HP",
"value": 448.1300048828125
},
{
"name": "FIGHT_PROP_ATTACK",
"value": 48.630001068115234
},
{
"name": "FIGHT_PROP_HP_PERCENT",
"value": 0.1573999971151352
}
]
},
{
"kid": 9383960,
"roleid": 10000065,
"uid": 138638352,
"id": 74523,
"icon": "UI_RelicIcon_14004_2",
"name": "少女飘摇的思念",
"rank": 5,
"type": "死之羽",
"level": 20,
"mainAffix": {
"name": "FIGHT_PROP_ATTACK",
"value": 311,
"score": null
},
"appendAffix": [
{
"name": "FIGHT_PROP_CHARGE_EFFICIENCY",
"value": 0.05829999968409538
},
{
"name": "FIGHT_PROP_CRITICAL_HURT",
"value": 0.2175999917089939
},
{
"name": "FIGHT_PROP_ATTACK_PERCENT",
"value": 0.11079999804496764
},
{
"name": "FIGHT_PROP_CRITICAL",
"value": 0.06219999864697456
}
]
},
{
"kid": 9383963,
"roleid": 10000065,
"uid": 138638352,
"id": 74533,
"icon": "UI_RelicIcon_14004_3",
"name": "少女易逝的芳颜",
"rank": 5,
"type": "理之冠",
"level": 20,
"mainAffix": {
"name": "FIGHT_PROP_HEAL_ADD",
"value": 0.35899999737739563,
"score": null
},
"appendAffix": [
{
"name": "FIGHT_PROP_HP",
"value": 687.1300048828125
},
{
"name": "FIGHT_PROP_CRITICAL_HURT",
"value": 0.0544000007212162
},
{
"name": "FIGHT_PROP_ATTACK_PERCENT",
"value": 0.040800001472234726
},
{
"name": "FIGHT_PROP_HP_PERCENT",
"value": 0.15159999951720238
}
]
},
{
"kid": 9383959,
"roleid": 10000065,
"uid": 138638352,
"id": 74543,
"icon": "UI_RelicIcon_14004_4",
"name": "远方的少女之心",
"rank": 5,
"type": "生之花",
"level": 20,
"mainAffix": {
"name": "FIGHT_PROP_HP",
"value": 4780,
"score": null
},
"appendAffix": [
{
"name": "FIGHT_PROP_ELEMENT_MASTERY",
"value": 16.31999969482422
},
{
"name": "FIGHT_PROP_CRITICAL_HURT",
"value": 0.147599995136261
},
{
"name": "FIGHT_PROP_HP_PERCENT",
"value": 0.19819999858736992
},
{
"name": "FIGHT_PROP_CHARGE_EFFICIENCY",
"value": 0.04529999941587448
}
]
},
{
"kid": 9383962,
"roleid": 10000065,
"uid": 138638352,
"id": 74514,
"icon": "UI_RelicIcon_14004_1",
"name": "少女片刻的闲暇",
"rank": 5,
"type": "空之杯",
"level": 20,
"mainAffix": {
"name": "FIGHT_PROP_ELEC_ADD_HURT",
"value": 0.4659999907016754,
"score": null
},
"appendAffix": [
{
"name": "FIGHT_PROP_HP_PERCENT",
"value": 0.08740000054240227
},
{
"name": "FIGHT_PROP_CRITICAL_HURT",
"value": 0.17100000008940697
},
{
"name": "FIGHT_PROP_ATTACK_PERCENT",
"value": 0.093299999833107
},
{
"name": "FIGHT_PROP_ATTACK",
"value": 31.1200008392334
}
]
}
],
"status": 0
};
let testRet = await calcDmg(testData);
console.log(testRet);
export async function calcDmg (inputData, enemyLv = 86) {
let profile = Miao.getAvatarDetail(inputData)
console.log(profile)
let char = Character.get(profile)
return await Calc.calcData({ profile, char, enemyLv })
}