diff --git a/apps/character.js b/apps/character.js index 7b2c87e4..a6805350 100644 --- a/apps/character.js +++ b/apps/character.js @@ -67,6 +67,19 @@ export async function character(e, { render, User }) { 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 }) { @@ -200,6 +213,18 @@ export async function wife(e, { render, User }) { 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) { let data = await MysApi.getCharacter(); if (!data) return false; @@ -211,8 +236,10 @@ async function getAvatarList(e, type, MysApi) { } let list = []; for (let val of avatars) { - if (!genshin.wifeData[type].includes(Number(val.id))) { - continue; + if (type !== false) { + if (!genshin.wifeData[type].includes(Number(val.id))) { + continue; + } } if (val.rarity > 5) { val.rarity = 5; @@ -228,6 +255,7 @@ async function getAvatarList(e, type, MysApi) { return list; } + async function renderAvatar(e, avatar, render, renderType = "card") { // 如果传递的是名字,则获取 diff --git a/resources/meta/character/夜兰/cons_3.png b/resources/meta/character/夜兰/cons_3.png index d8cbd7d1..fb591613 100644 Binary files a/resources/meta/character/夜兰/cons_3.png and b/resources/meta/character/夜兰/cons_3.png differ diff --git a/resources/meta/character/夜兰/cons_5.png b/resources/meta/character/夜兰/cons_5.png index fb591613..d8cbd7d1 100644 Binary files a/resources/meta/character/夜兰/cons_5.png and b/resources/meta/character/夜兰/cons_5.png differ diff --git a/resources/meta/character/夜兰/data.json b/resources/meta/character/夜兰/data.json index 05fc4888..dfe2f23d 100644 --- a/resources/meta/character/夜兰/data.json +++ b/resources/meta/character/夜兰/data.json @@ -624,9 +624,9 @@ "desc": "「玄掷玲珑」协同攻击时,会发射一枚额外的水箭,造成相当于夜兰生命值上限14%的水元素伤害。 该效果每1.8秒至多触发一次。" }, "3": { - "icon": "/img/skills/c_603.png", - "name": "坐庄者,三仙戏法", - "desc": "萦络纵命索的技能等级提高3级。 至多提升至15级。" + "icon": "/img/skills/c_605.png", + "name": "晃盅者,琼畟药骰", + "desc": "渊图玲珑骰的技能等级提高3级。 至多提升至15级。" }, "4": { "icon": "/img/skills/c_604.png", @@ -634,9 +634,9 @@ "desc": "依照「络命丝」标记敌人的数量,每次标记将在爆发时使队伍中所有角色的生命值上限提升10%,持续25秒。通过这种方式,生命值上限至多获得40%提升。" }, "5": { - "icon": "/img/skills/c_605.png", - "name": "晃盅者,琼畟药骰", - "desc": "渊图玲珑骰的技能等级提高3级。 至多提升至15级。" + "icon": "/img/skills/c_603.png", + "name": "坐庄者,三仙戏法", + "desc": "萦络纵命索的技能等级提高3级。 至多提升至15级。" }, "6": { "icon": "/img/skills/c_606.png",