增加#添加刻晴图像命令,感谢 **@叶**

* 可通过命令上传添加指定角色图片,上传至 **resources/character-img/刻晴/upload**
* 请将图像与命令一同发送,后续会支持at图像及命令后发送图像
部分功能的页面文案及功能优化
This commit is contained in:
yoimiya-kokomi 2022-06-28 04:46:49 +08:00
parent 10ff5c1a9b
commit 67394bf623
21 changed files with 183 additions and 84 deletions

1
.gitignore vendored
View File

@ -5,3 +5,4 @@
/components/setting.json
/config.js
*.css.map
/resources/character-img/*/upload/

View File

@ -1,3 +1,10 @@
# 1.8.1
* 增加`#添加刻晴图像`命令,感谢 **@叶**
* 可通过命令上传添加指定角色图片,上传至 **resources/character-img/刻晴/upload**
* 请将图像与命令一同发送后续会支持at图像及命令后发送图像
* 部分功能的页面文案及功能优化
# 1.8.0
* `#角色面板`、`#圣遗物列表` 使用新的圣遗物评分逻辑计算评分
@ -22,7 +29,6 @@
* 角色图像增加小清新开关,默认关闭
* 对增量包内的角色图像进行分级,较为清凉的图像独立管理
* 勇士们可使用 `#喵喵设置小清新开启` 启用
* 自行添加请到 **resources/character-img/** 的对应角色目录下添加
* 伤害计算增加扩散、感电的计算逻辑,感谢 **@49631073**的逻辑梳理
* `#角色面板` 伤害计算增加部分角色,目前支持
* 长柄武器:雷神、胡桃、魈、钟离、香菱

View File

@ -8,6 +8,9 @@ import { renderProfile } from "./character/profile-detail.js";
export { enemyLv, getOriginalPicture } from "./character/utils.js";
// 角色图像上传
export { uploadCharacterImg } from "./character/character-img-upload.js";
//
export { getProfileAll, getProfile, profileHelp };

View File

@ -1,15 +1,16 @@
import { segment } from "oicq";
import fetch from "node-fetch";
import fs from "fs";
import Data from "../components/Data.js";
import { Character } from "../components/models.js";
import lodash from "lodash";
import { promisify } from "util";
import { pipeline } from "stream";
import { segment } from "oicq";
import MD5 from "md5";
import fetch from "node-fetch";
import lodash from "lodash";
import Data from "../../components/Data.js";
import { Character } from "../../components/models.js";
const rootPath = process.cwd() + "/plugins/miao-plugin/";
let regex = /^#*喵喵(上传|添加)(.+)写真.*$/;
const _res_path = process.cwd() + "/plugins/miao-plugin/resources/";
let regex = /^#?\s*(?:喵喵)?(?:上传|添加)(.+)(?:照片|写真|图片|图像)\s*$/;
export const rule = {
uploadCharacterImage: {
@ -19,47 +20,48 @@ export const rule = {
},
};
export async function uploadCharacterImage(e) {
export async function uploadCharacterImg(e) {
let promise = await isAllowedToUploadCharacterImage(e);
if (!promise) {
return true;
return;
}
let imageMessages = [];
let msg = e.msg;
let regexResult = regex.exec(msg);
let regRet = regex.exec(msg);
//通过解析正则获取消息中的角色名
let characterName = regexResult[2];
//将消息中的角色名转换为官方名称
let officialName = Character.get(characterName).name;
if (officialName === undefined) {
e.reply("未查询到该角色。请输入有效的角色名或别名。");
return true;
if (!regRet || !regRet[1]) {
return;
}
console.log("本次要上传的角色是: ", officialName);
let char = Character.get(regRet[1]);
if (!char || !char.name) {
return;
}
let name = char.name;
for (let val of e.message) {
if ("image" === val.type) {
imageMessages.push(val);
}
}
if (imageMessages.length <= 0) {
e.reply("消息中未找到图片,无法添加。");
// TODO 支持at图片添加以及支持后发送
e.reply("消息中未找到图片,请将要发送的图片与消息一同发送..");
return true;
}
await saveImages(e, officialName, imageMessages);
await saveImages(e, name, imageMessages);
return true;
}
async function saveImages(e, officialName, imageMessages) {
async function saveImages(e, name, imageMessages) {
let imgMaxSize = e.groupConfig.imgMaxSize || 1;
let pathSuffix = "resources/miao-res-plus/character-img/" + officialName;
let path = rootPath + pathSuffix;
let pathSuffix = `character-img/${name}/upload`;
let path = _res_path + pathSuffix;
if (!fs.existsSync(path)) {
console.log("路径不存在,创建目录: ", path);
Data.createDir(rootPath, pathSuffix);
Data.createDir(_res_path, pathSuffix);
}
let senderName = lodash.truncate(e.sender.card, { length: 8 });
let imgCount = 0;
for (let val of imageMessages) {
const response = await fetch(val.url);
if (!response.ok) {
@ -75,12 +77,27 @@ async function saveImages(e, officialName, imageMessages) {
if (response.headers.get("content-type") === "image/gif") {
fileType = "gif";
}
let imgPath = `${path}/${fileName}.${fileType}`;
const streamPipeline = promisify(pipeline);
await streamPipeline(response.body, fs.createWriteStream(`${path}/${fileName}.${fileType}`));
await streamPipeline(response.body, fs.createWriteStream(imgPath));
// 使用md5作为文件名
let buffers = fs.readFileSync(imgPath);
let base64 = new Buffer.from(buffers, 'base64').toString();
let md5 = MD5(base64);
let newImgPath = `${path}/${md5}.${fileType}`
if (fs.existsSync(newImgPath)) {
fs.unlink(newImgPath, (err) => {
console.log('unlink', err);
});
}
fs.rename(imgPath, newImgPath, (err) => {
console.log('rename', err);
})
imgCount++;
Bot.logger.mark(`添加成功: ${path}/${fileName}`);
}
e.reply([segment.at(e.user_id, senderName), `\n添加${officialName}信息成功。`]);
e.reply([segment.at(e.user_id, senderName), `\n成功添加${imgCount}${name}图片`]);
return true;
}
@ -91,6 +108,11 @@ async function isAllowedToUploadCharacterImage(e) {
if (!e.msg) {
return false;
}
if (!e.isMaster) {
return false;
}
// 由于添加角色图是全局,暂时屏蔽非管理员的添加
if (e.isPrivate) {
if (!e.isMaster) {
e.reply(`只有主人才能添加。`);

View File

@ -4,7 +4,7 @@
* */
import lodash from "lodash";
import { Profile, Common, Models, Format } from "../../components/index.js";
import { getTargetUid, profileHelp } from "./profile-common.js";
import { autoRefresh, getTargetUid, profileHelp, autoGetProfile } from "./profile-common.js";
import { Character, Artifact } from "../../components/models.js";
/*
@ -13,11 +13,22 @@ import { Character, Artifact } from "../../components/models.js";
export async function profileArtis(e, { render }) {
let { uid, avatar } = e;
let profile = await Profile.get(uid, avatar);
let char = Character.get(profile.name);
let { profile, char, err } = await autoGetProfile(e, uid, avatar, async () => {
await profileArtis(e, { render });
});
if (err) {
return;
}
let charCfg = Artifact.getCharCfg(profile.name);
let { artis, totalMark, totalMarkClass, usefulMark } = getArtis(profile.name, profile.artis);
if (!profile.artis || profile.artis.length === 0) {
e.reply("未能获得圣遗物详情,请重新获取面板信息后查看")
return true;
}
let { attrMap } = Artifact.getMeta();
//渲染图像
@ -52,7 +63,6 @@ export async function profileArtisList(e, { render }) {
return true;
}
lodash.forEach(profiles || [], (ds) => {
let name = ds.name;
if (!name || name === "空" || name === "荧") {

View File

@ -95,7 +95,7 @@ export async function autoRefresh(e) {
}
if (!data.chars) {
e.reply("请确认角色已在【游戏内】橱窗展示并开放了查看详情。设置完毕后请5分钟后使用 #面板更新 重新获取");
e.reply("请确认角色已在【游戏内】橱窗展示并开放了查看详情。请在设置完毕5分钟后使用 #面板更新 重新获取");
return false;
} else {
let ret = [];
@ -106,7 +106,7 @@ export async function autoRefresh(e) {
}
})
if (ret.length === 0) {
e.reply("请确认角色已在【游戏内】橱窗展示并开放了查看详情。设置完毕后请5分钟后使用 #面板更新 重新获取")
e.reply("请确认角色已在【游戏内】橱窗展示并开放了查看详情。请在设置完毕5分钟后使用 #面板更新 重新获取")
return false;
} else {
// e.reply(`本次获取成功角色: ${ret.join(", ")} `)
@ -116,6 +116,40 @@ export async function autoRefresh(e) {
return true;
}
export async function autoGetProfile(e, uid, avatar, callback) {
let refresh = async () => {
let refreshRet = await autoRefresh(e);
if (refreshRet) {
await callback();
}
return refreshRet;
}
let char = Character.get(avatar);
if (!char) {
return { err: true };
}
let profile = await Profile.get(uid, char.id);
if (!profile) {
if (await refresh()) {
return { err: true };
} else {
e.reply(`请确认${char.name}已展示在【游戏内】的角色展柜中,并打开了“显示角色详情”。然后请使用 #更新面板\n命令来获取${char.name}的面板详情`);
}
return { err: true };
} else if (!['enka', 'input2', 'miao', 'miao-pre'].includes(profile.dataSource)) {
if (!await refresh()) {
e.reply(`由于数据格式升级,请重新获取面板信息后查看`);
}
return { err: true };
}
return { profile, char, refresh }
}
/*
* 面板数据更新
* */

View File

@ -19,7 +19,7 @@ export async function wiki(e, { render }) {
return false;
}
let reg = /#?(.+)(命座|命之座|天赋|技能|资料|照片|写真|图片|插画)$/, msg = e.msg;
let reg = /#?(.+)(命座|命之座|天赋|技能|资料|照片|写真|图片|图像)$/, msg = e.msg;
let ret = reg.exec(msg);
if (!ret || !ret[1] || !ret[2]) {

View File

@ -28,6 +28,9 @@ function sleep(ms) {
}
function getServ(uid) {
if (config.profileApi) {
return config.profileApi({ Enka, Miao })
}
if ((uid + '')[0] === '5') {
return Miao;
}

View File

@ -54,6 +54,7 @@ class Character extends Base {
});
}
addImg(`character-img/${name}`);
addImg(`character-img/${name}/upload`);
addImg(`character-img/${name}/se`, !se)
const plusPath = `./plugins/miao-plugin/resources/miao-res-plus/`;

View File

@ -4,26 +4,21 @@ import Data from "./enka-data.js";
let Enka = {
key: "enka",
cd: 5,
async request({ e, uid, config }) {
let profileApi = config.profileApi || function (uid) {
async request({ e, uid, avatar, config }) {
let profileApi = config.enkaApi || function ({ uid }) {
return `https://enka.shinshin.moe/u/${uid}/__data.json`
};
let api = profileApi(uid);
let api = profileApi({ uid, avatar });
let req = await fetch(api);
let data = await req.json();
if (!data.playerInfo) {
if ((uid + '')[0] === '5') {
e.reply(`请求失败:暂时不支持B服角色面板更新请等待服务后续升级`);
} else {
e.reply(`请求失败:${data.msg || "请求错误,请稍后重试"}`);
}
e.reply(`请求失败:${data.msg || "可能是面板服务并发过高,请稍后重试"}`);
return false;
}
let details = data.avatarInfoList;
if (!details || details.length === 0 || !details[0].propMap) {
e.reply(`请打开角色展柜的显示详情`);
e.reply(`请打开游戏内角色展柜的显示详情”后等待5分钟重新获取面板`);
return false;
}
return Data.getData(uid, data);

View File

@ -10,10 +10,12 @@ const url = "http://49.232.91.210/profile";
let Miao = {
key: "miao",
cd: 1,
async request({ e, uid, avatar = '' }) {
let api = `${url}/list?uid=${uid}`;
async request({ e, uid, avatar = '', config }) {
let profileApi = config.miaoApi && lodash.isFunction(config.miaoApi) ? config.miaoApi : function ({ uid }) {
return `http://49.232.91.210/profile/list?uid=${uid}`
};
let api = profileApi({ uid, avatar });
let data;
let req = await fetch(api);
data = await req.json();
if (data.status !== 0) {
@ -21,7 +23,7 @@ let Miao = {
return false;
}
if (!data.uidListData || data.uidListData.length === 0) {
e.reply(`请打开角色展柜的显示详情`);
e.reply(`请打开游戏内角色展柜的显示详情”后等待5分钟重新获取面板`);
return false;
}

View File

@ -6,8 +6,10 @@ export {
profileArtisList,
getProfileAll,
profileHelp,
getOriginalPicture
getOriginalPicture,
uploadCharacterImg
} from "./apps/character.js";
import { wifeReg } from "./apps/character.js";
import { consStat, abyssPct, abyssTeam } from "./apps/stat.js";
@ -17,9 +19,7 @@ import lodash from "lodash";
import common from "../../lib/common.js";
import { rule as adminRule, updateRes, sysCfg, updateMiaoPlugin, profileCfg } from "./apps/admin.js";
import { currentVersion } from "./components/Changelog.js";
import {
uploadCharacterImage
} from "./apps/uploadCharacterImage.js";
export {
consStat,
@ -32,8 +32,7 @@ export {
help,
versionInfo,
calendar,
profileCfg,
uploadCharacterImage
profileCfg
};
@ -43,6 +42,10 @@ let rule = {
//reg: "noCheck",
describe: "【#角色】角色详情",
},
uploadCharacterImg: {
reg: "^#*(喵喵)?(上传|添加)(.+)(照片|写真|图片|图像)\\s*$",
describe: "喵喵上传角色写真",
},
profileArtisList: {
reg: "^#圣遗物列表\\s*(\\d{9})?$",
describe: "【#角色】圣遗物列表",
@ -63,10 +66,6 @@ let rule = {
reg: "^#?(获取|给我|我要|求|发|发下|发个|发一下)?原图(吧|呗)?$",
describe: "【#原图】 回复角色卡片,可获取原图",
},
uploadCharacterImage: {
reg: "^#*喵喵(上传|添加)(.+)写真.*$",
describe: "喵喵上传角色写真",
},
consStat: {
reg: "^#(喵喵)?角色(持有|持有率|命座|命之座|.命)(分布|统计|持有|持有率)?$",
describe: "【#统计】 #角色持有率 #角色5命统计",
@ -80,7 +79,7 @@ let rule = {
describe: "【#角色】 #深渊组队",
},
wiki: {
reg: "^(#|喵喵)?.*(天赋|技能|命座|命之座|资料|照片|写真|图片|插画)$",
reg: "^(#|喵喵)?.*(天赋|技能|命座|命之座|资料|照片|写真|图片|图像)$",
describe: "【#资料】 #神里天赋 #夜兰命座",
},
help: {
@ -96,11 +95,11 @@ let rule = {
describe: "【#角色】 设置伤害计算中目标敌人的等级",
},
versionInfo: {
reg: "^#喵喵版本$",
reg: "^#?喵喵版本$",
describe: "【#帮助】 喵喵版本介绍",
},
calendar: {
reg: "^#喵喵(日历|活动|日历列表)$",
reg: "^#?喵喵(日历|活动|日历列表)$",
describe: "【#日历】 活动日历",
},
...adminRule

View File

@ -107,7 +107,7 @@
<div>副词条最高分</div>
<div>主词条最高分</div>
</div>
{{each attrMap ds key}}{{if ds.type!== "plus"}}
{{each attrMap ds key}}{{if ds.type!== "plus" && charCfg.weight[key] > 0}}
<div class="tr">
<div class="th">{{ds.title}}</div>
<div class="td">{{charCfg.weight[key]}}</div>
@ -125,10 +125,10 @@
{{/if}}{{/each}}
</div>
<ul class="cont-msg">
<li>每个角色有不同的词条评分权重,后续会逐步扩充不同流派的规则</li>
<li>每个角色有不同的词条评分权重已隐藏权重为0的词条,后续会逐步扩充不同流派的规则</li>
<li>以权重值100的单词条理论最高分46.6分为基准,根据权重值及当前词条成长计算每点得分</li>
<li><strong>词条得分:</strong> 词条数值 * 当前词条每点得分。小攻击、小防御、小生命折算为对应百分比词条进行计分</li>
<li><strong>原始总分:</strong>计算所有副词条的评分之和沙杯头三个位置附加25%的主词条评分</li>
<li><strong>原始总分(对齐前)</strong>计算所有副词条的评分之和沙杯头三个位置附加25%的主词条评分</li>
</ul>
</div>
@ -147,15 +147,7 @@
<div>理之冠</div>
</div>
<div class="tr">
<div class="th">最优主词条权重值</div>
<div>-</div>
<div>-</div>
<div>{{charCfg.maxMark.m3}}</div>
<div>{{charCfg.maxMark.m4}}</div>
<div>{{charCfg.maxMark.m5}}</div>
</div>
<div class="tr">
<div class="th">理论最高原始总分</div>
<div class="th">最高分(对齐前)</div>
{{each charCfg.maxMark m key}}
{{if key.length === 1}}
<div>{{ mark( m / 6 )}}</div>
@ -163,13 +155,21 @@
{{/each}}
</div>
<div class="tr">
<div class="th">理论总分对齐比例</div>
<div class="th">总分对齐比例</div>
{{each charCfg.maxMark m key}}
{{if key.length === 1}}
<div>{{( 66 / (46.6/6/100 * m) * 100).toFixed(1)}}%</div>
{{/if}}
{{/each}}
</div>
<div class="tr">
<div class="th">最优主词缀权重</div>
<div>-</div>
<div>-</div>
<div>{{charCfg.maxMark.m3}}</div>
<div>{{charCfg.maxMark.m4}}</div>
<div>{{charCfg.maxMark.m5}}</div>
</div>
</div>
<ul class="cont-msg">
<li><strong>总分对齐比例: </strong>根据<strong>{{data.name}}</strong>不同圣遗物位置可选词条及评分计算理论最高原始词条总分。为使不同角色不同位置最终总分对齐规定圣遗物满分为66分。理论总分对齐比例

View File

@ -45,7 +45,8 @@
{{each cons con idx}}
<div class="cons-item">
<div class="talent-icon {{idx * 1 > data.cons * 1 ? 'off' : '' }}">
<div class="talent-icon-img" style="background-image:url({{_res_path}}/meta/character/{{name}}/cons_{{idx}}.png)"></div>
<div class="talent-icon-img"
style="background-image:url({{_res_path}}/meta/character/{{name}}/cons_{{idx}}.png)"></div>
</div>
</div>
{{/each}}
@ -102,6 +103,12 @@
面板信息来源于手工输入,面板信息及伤害计算可能不准确。通过<strong>#录入{{name}}面板</strong>可录入面板数据
</div>
</div>
{{else if mode === "profile"}}
<div class="cont">
<div class="cont-footer dmg-desc">
当前评分为<strong>喵喵版评分规则</strong>,分值仅供参考。可使用<strong>#{{name}}圣遗物</strong>来查看评分详情
</div>
</div>
{{/if}}
{{if mode === "profile" && dataSource === "input2"}}

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

View File

@ -213,6 +213,13 @@ body {
.pyro-bg {
background-image: url("./bg/bg-pyro.jpg");
}
.elem-dendro .talent-icon {
background-image: url("./bg/talent-dendro.png");
}
.elem-dendro .elem-bg,
.dendro-bg {
background-image: url("./bg/bg-dendro.jpg");
}
/* cont */
.cont {
border-radius: 10px;

View File

@ -162,7 +162,7 @@ body {
/******** ELEM ********/
@elems: anemo, cryo, electro, geo, hydro, pyro;
@elems: anemo, cryo, electro, geo, hydro, pyro, dendro;
each(@elems, {
.elem-@{value} .talent-icon {

View File

@ -65,7 +65,7 @@ export const usefulAttr = {
'珊瑚宫心海': { hp: 100, atk: 50, def: 0, cp: 0, cd: 0, mastery: 0, dmg: 100, phy: 0, recharge: 55, heal: 100 },
'莫娜': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 75, heal: 0 },
'阿贝多': { hp: 0, atk: 0, def: 100, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 0, heal: 0 },
'迪奥娜': { hp: 100, atk: 0, def: 0, cp: 0, cd: 0, mastery: 0, dmg: 65, phy: 0, recharge: 55, heal: 100 },
'迪奥娜': { hp: 100, atk: 50, def: 0, cp: 50, cd: 50, mastery: 0, dmg: 100, phy: 0, recharge: 75, heal: 100 },
'优菈': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 40, phy: 100, recharge: 40, heal: 0 },
'达达利亚': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 0, heal: 0 },
'魈': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 0, heal: 0 },
@ -78,7 +78,7 @@ export const usefulAttr = {
'凝光': { hp: 0, atk: 80, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 0, heal: 0 },
'北斗': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 55, heal: 0 },
'刻晴': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 100, recharge: 0, heal: 0 },
'托马': { hp: 100, atk: 0, def: 0, cp: 50, cd: 50, mastery: 0, dmg: 75, phy: 0, recharge: 55, heal: 0 },
'托马': { hp: 100, atk: 50, def: 0, cp: 50, cd: 50, mastery: 0, dmg: 75, phy: 0, recharge: 55, heal: 0 },
'迪卢克': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 0, heal: 0 },
'芭芭拉': { hp: 100, atk: 50, def: 0, cp: 75, cd: 75, mastery: 0, dmg: 80, phy: 0, recharge: 55, heal: 100 },
'芭芭拉-暴力': { hp: 50, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 55, heal: 50 },
@ -88,7 +88,7 @@ export const usefulAttr = {
'七七': { hp: 0, atk: 100, def: 0, cp: 75, cd: 75, mastery: 0, dmg: 60, phy: 70, recharge: 55, heal: 100 },
'凯亚': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 100, recharge: 0, heal: 0 },
'烟绯': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 0, heal: 0 },
'早柚': { hp: 0, atk: 0, def: 0, cp: 0, cd: 0, mastery: 100, dmg: 80, phy: 0, recharge: 55, heal: 100 },
'早柚': { hp: 0, atk: 50, def: 0, cp: 50, cd: 50, mastery: 100, dmg: 80, phy: 0, recharge: 55, heal: 100 },
'安柏': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 100, recharge: 0, heal: 0 },
'丽莎': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 75, dmg: 100, phy: 0, recharge: 0, heal: 0 },
'埃洛伊': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 0, heal: 0 },
@ -96,5 +96,5 @@ export const usefulAttr = {
'砂糖': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 100, dmg: 40, phy: 0, recharge: 70, heal: 0 },
'雷泽': { hp: 0, atk: 75, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 50, phy: 100, recharge: 0, heal: 0 },
'夜兰': { hp: 80, atk: 0, def: 0, cp: 100, cd: 100, mastery: 0, dmg: 100, phy: 0, recharge: 75, heal: 0 },
'久岐忍': { hp: 100, atk: 0, def: 0, cp: 80, cd: 80, mastery: 80, dmg: 100, phy: 0, recharge: 75, heal: 100 },
'久岐忍': { hp: 100, atk: 50, def: 0, cp: 80, cd: 80, mastery: 80, dmg: 100, phy: 0, recharge: 75, heal: 100 },
};

View File

@ -17,6 +17,17 @@
{{/if}}
<img class="genshin_logo" src="{{_sys_res_path}}/genshin/roleAll/原神.png"/>
</div>
<div class="cont msg-cont">
<div class="cont-title">深渊出场率统计</div>
<div class="cont-body">
<ul class="cont-msg">
<li>数据来自<strong>胡桃API</strong>为Snap Genshin用户自主上传的角色池信息感谢SG团队</li>
<li>百分比基于全部上传用户的数据进行统计,结果供参考</li>
<li>由于是用户自主上传,数据可能有一定滞后。出场率会在深渊开启后一段时间逐步稳定</li>
<li>数据最后更新时间:{{lastUpdate}}</li>
</ul>
</div>
</div>
<% let pct = function (num) {
return (num * 100).toFixed(2);
} %>
@ -39,9 +50,7 @@
{{/each}}
</div>
</div>
{{/if}}
{{/each}}
<p class="notice notice-center"> 数据来源DGP-Studio-胡桃API . 最后更新时间:{{lastUpdate}} </p>
</div>
{{/block}}

View File

@ -29,7 +29,7 @@ return (num * 100).toFixed(2);
<div class="cont-title">角色持有率说明</div>
<div class="cont-body">
<ul class="cont-msg">
<li>数据来自<strong>胡桃API</strong>为SnapGenshin用户自主上传的角色池信息感谢SG团队</li>
<li>数据来自<strong>胡桃API</strong>为Snap Genshin用户自主上传的角色池信息感谢SG团队</li>
<li>百分比基于全部上传用户的数据进行统计,能够一定程度上反映角色持有情况,结果供参考</li>
<li>由于是用户自主上传,数据可能有一定滞后。新角色的持有率会在卡池结束后的一段时间逐步稳定</li>
<li>数据最后更新时间:{{lastUpdate}}</li>