调整夜兰的命座信息

This commit is contained in:
yoimiya-kokomi 2022-04-14 03:30:16 +08:00
parent 889a5bb317
commit e03dbeb651
4 changed files with 36 additions and 8 deletions

View File

@ -67,6 +67,19 @@ export async function character(e, { render, User }) {
return renderAvatar(e, char.name, render); return renderAvatar(e, char.name, render);
} }
let _pokeCharacter = false;
async function initPoke() {
if (!_pokeCharacter) {
_pokeCharacter = YunzaiApps.mysInfo.pokeCharacter;
}
YunzaiApps.mysInfo.pokeCharacter = async function (e, components) {
if (Cfg.isDisable('char.poke', true)) {
return await _pokeCharacter(e, components);
}
return await pokeCharacter(e, components);
}
}
//#老婆 //#老婆
export async function wife(e, { render, User }) { export async function wife(e, { render, User }) {
@ -200,6 +213,18 @@ export async function wife(e, { render, User }) {
return true; return true;
} }
async function pokeCharacter(e, { render }) {
let MysApi = await e.getMysApi({
auth: "all",
targetType: Cfg.get("char.queryOther", true) ? "all" : "self",
cookieType: "all",
actionName: "查询信息"
});
let avatarList = await getAvatarList(e, false, MysApi);
let avatar = lodash.sample(avatarList);
return renderAvatar(e, avatar, render, 'card');
}
async function getAvatarList(e, type, MysApi) { async function getAvatarList(e, type, MysApi) {
let data = await MysApi.getCharacter(); let data = await MysApi.getCharacter();
if (!data) return false; if (!data) return false;
@ -211,8 +236,10 @@ async function getAvatarList(e, type, MysApi) {
} }
let list = []; let list = [];
for (let val of avatars) { for (let val of avatars) {
if (!genshin.wifeData[type].includes(Number(val.id))) { if (type !== false) {
continue; if (!genshin.wifeData[type].includes(Number(val.id))) {
continue;
}
} }
if (val.rarity > 5) { if (val.rarity > 5) {
val.rarity = 5; val.rarity = 5;
@ -228,6 +255,7 @@ async function getAvatarList(e, type, MysApi) {
return list; return list;
} }
async function renderAvatar(e, avatar, render, renderType = "card") { async function renderAvatar(e, avatar, render, renderType = "card") {
// 如果传递的是名字,则获取 // 如果传递的是名字,则获取

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 22 KiB

View File

@ -624,9 +624,9 @@
"desc": "「玄掷玲珑」协同攻击时会发射一枚额外的水箭造成相当于夜兰生命值上限14%的水元素伤害。 该效果每1.8秒至多触发一次。" "desc": "「玄掷玲珑」协同攻击时会发射一枚额外的水箭造成相当于夜兰生命值上限14%的水元素伤害。 该效果每1.8秒至多触发一次。"
}, },
"3": { "3": {
"icon": "/img/skills/c_603.png", "icon": "/img/skills/c_605.png",
"name": "坐庄者,三仙戏法", "name": "晃盅者,琼畟药骰",
"desc": "萦络纵命索的技能等级提高3级。 至多提升至15级。" "desc": "渊图玲珑骰的技能等级提高3级。 至多提升至15级。"
}, },
"4": { "4": {
"icon": "/img/skills/c_604.png", "icon": "/img/skills/c_604.png",
@ -634,9 +634,9 @@
"desc": "依照「络命丝」标记敌人的数量每次标记将在爆发时使队伍中所有角色的生命值上限提升10%持续25秒。通过这种方式生命值上限至多获得40%提升。" "desc": "依照「络命丝」标记敌人的数量每次标记将在爆发时使队伍中所有角色的生命值上限提升10%持续25秒。通过这种方式生命值上限至多获得40%提升。"
}, },
"5": { "5": {
"icon": "/img/skills/c_605.png", "icon": "/img/skills/c_603.png",
"name": "晃盅者,琼畟药骰", "name": "坐庄者,三仙戏法",
"desc": "渊图玲珑骰的技能等级提高3级。 至多提升至15级。" "desc": "萦络纵命索的技能等级提高3级。 至多提升至15级。"
}, },
"6": { "6": {
"icon": "/img/skills/c_606.png", "icon": "/img/skills/c_606.png",