diff --git a/CHANGELOG.md b/CHANGELOG.md index 3587a44e..83e2e3f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# 1.6.1 + +* `#角色面板` 伤害计算增加 皇女、温迪、夜兰 +* `#角色面板` 部分细节样式调整 + # 1.6.0 * `#喵喵设置` 支持设置 面板查询 的功能开关 diff --git a/README.md b/README.md index 8028f74e..6770a5e6 100644 --- a/README.md +++ b/README.md @@ -6,14 +6,16 @@ Miao-Plugin是一个Yunzai-Bot的升级插件,提供包括角色查询等升 部分非重复功能会在逐步稳定之后会合并入Yunzai-Bot。 - 具体功能可在安装插件后 通过 #喵喵帮助 进行查看。如需进行设置可通过 #喵喵设置 命令进行管理。 - ## 使用说明 Miao-Plugin需要最新版本的Yunzai-Bot,请确认Yunzai-Bot已升级至最新版 +## 关于面板查询 + +`#面板查询` 及附带的伤害计算、圣遗物列表等功能依赖于面板查询API,此API接口目前为内部小范围使用,需具备token才可调用。 + ## 安装与更新 直接将miao-plugin放置在Yunzai-Bot的plugins目录下,重启Yunzai-Bot后即可使用。 @@ -21,24 +23,31 @@ Miao-Plugin需要最新版本的Yunzai-Bot,请确认Yunzai-Bot已升级至最 推荐使用git进行安装,以方便后续升级。在BOT根目录夹打开终端,运行 ``` +// 使用gitee git clone https://gitee.com/yoimiya-kokomi/miao-plugin.git ./plugins/miao-plugin/ + +// 使用github +git clone https://github.com/yoimiya-kokomi/miao-plugin.git ./plugins/miao-plugin/ ``` -进行安装。如需更新,在BOT文件夹打开终端,运行 -``` -git -C ./plugins/miao-plugin/ pull -``` + +进行安装。建议使用上述命令进行安装,以便于后续更新。 管理员发送`#喵喵更新`即可自动更新 + +如果是手工下载的zip压缩包,请将解压后的miao-plugin文件夹(请删除压缩自带的-master后缀)放置在Yunzai目录下的plugins文件夹内。 # 免责声明 -1. 功能仅限内部交流与小范围使用,严禁将Yunzai-Bot及Miao-Plugin用于任何商业用途或盈利 + +1. 功能仅限内部交流与小范围使用,请勿将Yunzai-Bot及Miao-Plugin用于任何以盈利为目的的场景 3. 图片与其他素材均来自于网络,仅供交流学习使用,如有侵权请联系,会立即删除 -#其他 +# 其他 + * [Yunzai-Bot](https://github.com/Le-niao/Yunzai-Bot) -* [Miao-Plugin](https://github.com/yoimiya-kokomi/miao-plugin) ( [gitee](https://github.com/yoimiya-kokomi/miao-plugin) / [github](https://github.com/yoimiya-kokomi/miao-plugin)) +* [Miao-Plugin](https://github.com/yoimiya-kokomi/miao-plugin) ( [gitee](https://github.com/yoimiya-kokomi/miao-plugin) + / [github](https://github.com/yoimiya-kokomi/miao-plugin)) * [SnapGenshin](https://www.snapgenshin.com/home/) : 感谢SnapGenshin团队的胡桃API -* Yunzai-Bot QQ群:213938015(暂时停止新加入) -* Miao-Plugin QQ群:607710456 (在Yunzai恢复前可先使用此群) +* Yunzai-Bot 官方QQ群:213938015 +* 喵喵Miao-Plugin QQ群:607710456 (暂时停止新加入) * [爱发电](https://afdian.net/@kokomi) 欢迎老板打赏,喵~ diff --git a/apps/help.js b/apps/help.js index 7c830da0..3b7efe50 100644 --- a/apps/help.js +++ b/apps/help.js @@ -49,5 +49,6 @@ export async function versionInfo(e, { render }) { return await Common.render("help/version-info", { currentVersion, changelogs, + elem: "cryo", }, { e, render, scale: 1.2 }) } \ No newline at end of file diff --git a/resources/character/detail.css b/resources/character/detail.css index 7cc027e2..95ac952f 100644 --- a/resources/character/detail.css +++ b/resources/character/detail.css @@ -52,6 +52,9 @@ body { text-shadow: 0 0 3px #000, 2px 2px 4px rgba(0, 0, 0, 0.7); text-align: right; } +.char-lv .cons { + vertical-align: bottom; +} .attr { border-radius: 4px; overflow: hidden; @@ -373,7 +376,7 @@ body { width: 600px; flex-wrap: wrap; margin-bottom: 5px; - padding: 5px; + padding: 0 5px; } .artis .item { width: 185px; @@ -381,9 +384,10 @@ body { background: url("../common/cont/card-bg.png") top left repeat-x; background-size: auto 100%; margin: 5px; - height: 210px; + height: 200px; position: relative; box-shadow: 0 0 1px 0 #ccc, 2px 2px 4px 0 rgba(50, 50, 50, 0.8); + overflow: hidden; } .artis .item .arti-icon { width: 60px; @@ -525,7 +529,6 @@ body { text-align: right; padding: 13px 12px 13px 0; z-index: 3; - background-image: linear-gradient(to right, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.7)); } .artis .weapon .head strong { font-size: 18px; @@ -567,12 +570,12 @@ body { background: #fff6dd; } .artis .stat { - height: 100px; + height: 90px; margin-top: 10px; } .artis .stat { display: table-row; - padding: 18px 10px; + padding: 13px 10px; display: table; } .artis .stat > div { @@ -683,4 +686,10 @@ body { .char-可莉 .main-pic { margin-left: -210px; } +.char-凝光 .main-pic { + margin-left: -320px; +} +.char-班尼特 .main-pic { + margin-left: -220px; +} /*# sourceMappingURL=detail.css.map */ \ No newline at end of file diff --git a/resources/character/detail.html b/resources/character/detail.html index 7307f130..7d8b2db3 100644 --- a/resources/character/detail.html +++ b/resources/character/detail.html @@ -9,7 +9,8 @@ style="background-image:url({{_res_path}}/meta/character/{{name}}/gacha_splash.png)">
{{name}}
-
UID {{uid}} - Lv.{{data.lv}}
+
UID {{uid}} - Lv.{{data.lv}} + {{avatar.actived_constellation_num}}命
{{each talentMap tName key}}
diff --git a/resources/character/detail.less b/resources/character/detail.less index 0a261568..a781e130 100644 --- a/resources/character/detail.less +++ b/resources/character/detail.less @@ -60,6 +60,10 @@ body { margin-bottom: 20px; text-shadow: 0 0 3px #000, 2px 2px 4px rgba(0, 0, 0, .7); text-align: right; + + .cons { + vertical-align: bottom; + } } .attr { @@ -454,7 +458,7 @@ body { width: 600px; flex-wrap: wrap; margin-bottom: 5px; - padding: 5px; + padding: 0 5px; } .artis .item { @@ -463,9 +467,10 @@ body { background: url("../common/cont/card-bg.png") top left repeat-x; background-size: auto 100%; margin: 5px; - height: 210px; + height: 200px; position: relative; box-shadow: 0 0 1px 0 #ccc, 2px 2px 4px 0 rgba(50, 50, 50, .8); + overflow: hidden; } @@ -637,7 +642,7 @@ body { text-align: right; padding: 13px 12px 13px 0; z-index: 3; - background-image: linear-gradient(to right, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.7)); + //background-image: linear-gradient(to right, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.7)); } .artis .weapon .head strong { @@ -691,13 +696,13 @@ body { } .artis .stat { - height: 100px; + height: 90px; margin-top: 10px; } .artis .stat { display: table-row; - padding: 18px 10px; + padding: 13px 10px; display: table; } @@ -845,4 +850,12 @@ body { .char-可莉 .main-pic { margin-left: -210px; +} + +.char-凝光 .main-pic { + margin-left: -320px; +} + +.char-班尼特 .main-pic { + margin-left: -220px; } \ No newline at end of file diff --git a/resources/help/version-info.css b/resources/help/version-info.css index e8cc1f70..069a8c8a 100644 --- a/resources/help/version-info.css +++ b/resources/help/version-info.css @@ -18,7 +18,12 @@ body { background-size: 100% 100%; } .log-cont { - margin-bottom: 10px; + background-size: cover; + margin: 5px 15px 5px 10px; + border-radius: 10px; +} +.log-cont .cont { + margin: 0; } .log-cont .cont-title { font-size: 16px; diff --git a/resources/help/version-info.html b/resources/help/version-info.html index 30fe8070..74f53ca9 100644 --- a/resources/help/version-info.html +++ b/resources/help/version-info.html @@ -6,27 +6,29 @@ {{block 'main'}} {{each changelogs ds idx}} -
- {{if idx === 0 }} -
当前版本 {{ds.version}}
- {{else}} -
喵喵版本 {{ds.version}}
- {{/if}} -
-
    - {{each ds.logs log}} -
  • -

    {{@log.title}}

    - {{if log.logs.length > 0}} -
      - {{each log.logs ls}} -
    • {{@ls}}
    • - {{/each}} -
    - {{/if}} -
  • - {{/each}} -
+
+
+ {{if idx === 0 }} +
当前版本 {{ds.version}}
+ {{else}} +
喵喵版本 {{ds.version}}
+ {{/if}} +
+
    + {{each ds.logs log}} +
  • +

    {{@log.title}}

    + {{if log.logs.length > 0}} +
      + {{each log.logs ls}} +
    • {{@ls}}
    • + {{/each}} +
    + {{/if}} +
  • + {{/each}} +
+
{{/each}} diff --git a/resources/help/version-info.less b/resources/help/version-info.less index a3daa77e..166294c3 100644 --- a/resources/help/version-info.less +++ b/resources/help/version-info.less @@ -22,10 +22,17 @@ body { width: 520px; padding: 10px 0 10px 0; background-size: 100% 100%; + } .log-cont { - margin-bottom: 10px; + background-size: cover; + margin: 5px 15px 5px 10px; + border-radius: 10px; + + .cont { + margin: 0; + } .cont-title { font-size: 16px; diff --git a/resources/meta/character/夜兰/calc.js b/resources/meta/character/夜兰/calc.js new file mode 100644 index 00000000..166dac8a --- /dev/null +++ b/resources/meta/character/夜兰/calc.js @@ -0,0 +1,28 @@ +export const details = [{ + title: "破局矢伤害", + dmg: ({ talent, attr, calc }, { basic }) => basic(calc(attr.hp) * talent.a['破局矢伤害'] / 100, 'a2') +}, { + title: "E络命丝伤害", + dmg: ({ talent, attr, calc }, { basic }) => basic(calc(attr.hp) * talent.e['技能伤害'] / 100, 'e') +}, { + title: "Q协同攻击伤害", + dmg: ({ talent, attr, calc, cons }, { basic }) => + basic(calc(attr.hp) * (talent.q['玄掷玲珑伤害'] / 100 + (cons >= 2 ? 0.14 : 0)), 'q') +}]; + +export const mainAttr = "hp,atk,cpct,cdmg"; + +export const buffs = [{ + title: "夜兰被动:有4个不同元素类型角色时,夜兰生命值上线提高30%", + data: { + hpPct: 30 + } +}, { + title: "夜兰2命:Q协同攻击额外发射水箭,造成夜兰生命值上线14%的水元素伤害" +}, { + title: "夜兰4命:E络命丝爆发提高生命值,满Buff下提高40%", + cons: 4, + data: { + hpPct: 4 + } +}]; \ No newline at end of file diff --git a/resources/meta/character/温迪/calc.js b/resources/meta/character/温迪/calc.js new file mode 100644 index 00000000..cf83a67e --- /dev/null +++ b/resources/meta/character/温迪/calc.js @@ -0,0 +1,41 @@ +export const details = [{ + title: "E点按伤害", + dmg: ({ talent }, dmg) => dmg(talent.e['点按伤害'], 'e') +}, { + title: "E长按伤害", + dmg: ({ talent }, dmg) => dmg(talent.e['长按伤害'], 'e') +}, { + title: "Q单段伤害", + params: { q: true }, + dmg: ({ talent }, dmg) => { + let basic = dmg(talent.q['持续伤害'], 'q'); + //暂时以物伤近似计算 + let fj = dmg(talent.q['附加元素伤害'], 'q', 'phy'); + return { + dmg: basic.dmg + fj.dmg, + avg: basic.avg + fj.avg + } + } +}]; + +export const mainAttr = "atk,cpct,cdmg"; + +export const buffs = [{ + title: "温迪2命:E降低12%风抗与物抗", + cons: 2, + data: { + kx: 12 + } +}, { + title: "温迪4命:温迪获取元素晶球或元素微粒后,获得25%风元素伤害加成", + cons: 4, + data: { + dmg: 25 + } +}, { + title: "温迪6命:Q降低20%风抗", + cons: 6, + data: { + kx: ({ params }) => params.q ? 20 : 0 + } +}]; \ No newline at end of file diff --git a/resources/meta/character/菲谢尔/calc.js b/resources/meta/character/菲谢尔/calc.js new file mode 100644 index 00000000..ea8f3eb0 --- /dev/null +++ b/resources/meta/character/菲谢尔/calc.js @@ -0,0 +1,25 @@ +export const details = [{ + title: "奥兹攻击伤害", + dmg: ({ talent }, dmg) => dmg(talent.e['奥兹攻击伤害'], 'e') +}, { + title: "奥兹召唤伤害", + params: { e: true }, + dmg: ({ talent, cons }, dmg) => dmg(talent.e['召唤伤害'], 'e') +}, { + title: "至夜幻现伤害", + dmg: ({ talent, cons }, dmg) => dmg(talent.q['落雷伤害'], 'q') +}]; + +export const mainAttr = "atk,hp,cpct,cdmg"; + +export const buffs = [{ + title: "皇女2命:施放夜巡影翼时,能额外造成200%攻击力的伤害", + data: { + ePct: ({ params }) => params.e ? 200 : 0 + } +}, { + title: "皇女4命:施放夜巡影翼时,能额外造成200%攻击力的伤害", + data: { + qPct: ({ params }) => params.q ? 222 : 0 + } +}]; diff --git a/resources/meta/character/迪卢克/calc.js b/resources/meta/character/迪卢克/calc.js index 9edf3a19..3c1bd008 100644 --- a/resources/meta/character/迪卢克/calc.js +++ b/resources/meta/character/迪卢克/calc.js @@ -24,9 +24,22 @@ export const buffs = [{ } }, { title: "迪卢克1命:对于生命值高于50%的敌人,造成伤害提高15%", + cons: 1, data: { dmg: 15 } +}, { + title: "迪卢克2命:受伤3层提高攻击力30%", + cons: 2, + data: { + atkPct: 30 + } +}, { + title: "迪卢克4命:间隔2秒释放E提高伤害40%", + cons: 4, + data: { + eDmg: 40 + } }, { title: "元素精通:蒸发伤害提高[zf]%", mastery: "zf" diff --git a/resources/meta/character/迪奥娜/calc.js b/resources/meta/character/迪奥娜/calc.js index 710f8e08..125424a1 100644 --- a/resources/meta/character/迪奥娜/calc.js +++ b/resources/meta/character/迪奥娜/calc.js @@ -2,7 +2,7 @@ export const details = [{ title: "长按E总伤害", dmg: ({ talent }, dmg) => dmg(talent.e['猫爪伤害'] * 5, 'e') }, { - title: "长按E总伤害", + title: "长按E护盾量", dmg: ({ talent, attr, calc }, { shield }) => shield(talent.e['护盾基础吸收量2'][0] * calc(attr.hp) / 100 + talent.e['护盾基础吸收量2'][1] * 1) }, ({ cons }) => {