From dc16c5480bf60d1761f82aa459e77f7ea55455e5 Mon Sep 17 00:00:00 2001 From: yoimiya-kokomi <592981798@qq.com> Date: Sat, 14 May 2022 03:31:49 +0800 Subject: [PATCH] =?UTF-8?q?`#=E8=A7=92=E8=89=B2=E9=9D=A2=E6=9D=BF`=20?= =?UTF-8?q?=E4=BC=A4=E5=AE=B3=E8=AE=A1=E7=AE=97=E5=A2=9E=E5=8A=A0=E5=87=9D?= =?UTF-8?q?=E5=85=89=E3=80=81=E4=B8=83=E4=B8=83=E3=80=81=E5=8F=AF=E8=8E=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 8 +++++ components/Calc.js | 3 ++ resources/character/detail.css | 4 +++ resources/common/common.css | 9 ++++- resources/common/common.less | 10 +++++- resources/common/tpl.css | 33 +++++++++-------- resources/common/tpl/artis-item.html | 2 +- resources/common/tpl/avatar-profile.html | 2 +- resources/common/tpl/avatar-profile.less | 1 + resources/common/tpl/item-card.less | 46 ++++++++++++------------ resources/meta/character/七七/calc.js | 15 ++++++++ resources/meta/character/凝光/calc.js | 19 ++++++++++ resources/meta/character/可莉/calc.js | 36 +++++++++++++++++++ resources/meta/weapons/calc.js | 4 +-- 14 files changed, 148 insertions(+), 44 deletions(-) create mode 100644 resources/meta/character/七七/calc.js create mode 100644 resources/meta/character/凝光/calc.js create mode 100644 resources/meta/character/可莉/calc.js diff --git a/CHANGELOG.md b/CHANGELOG.md index ba4fdfed..15fd0f8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,11 @@ +# 1.5.1 + +* `#角色面板` 伤害计算增加部分角色,目前支持 + * 长柄武器:雷神、胡桃、魈、钟离、香菱 + * 法器:神子、心海、可莉ⁿᵉʷ、凝光ⁿᵉʷ + * 弓:甘雨、宵宫、公子 + * 单手剑:绫人、绫华、刻晴、阿贝多、行秋、班尼特、七七ⁿᵉʷ + # 1.5.0 * 增加`#喵喵日历` 功能 diff --git a/components/Calc.js b/components/Calc.js index 677f40a3..29fd6151 100644 --- a/components/Calc.js +++ b/components/Calc.js @@ -426,6 +426,9 @@ let Calc = { } dmgFn.heal = function (num) { + if(showDetail){ + console.log(num, calc(attr.heal), attr.heal.inc) + } return { avg: num * (1 + calc(attr.heal) / 100) * (attr.heal.inc / 100) } diff --git a/resources/character/detail.css b/resources/character/detail.css index c5fe6dfe..47e38384 100644 --- a/resources/character/detail.css +++ b/resources/character/detail.css @@ -841,4 +841,8 @@ body { .char-迪奥娜 .main-pic { margin-left: -180px; +} + +.char-可莉 .main-pic { + margin-left: -210px; } \ No newline at end of file diff --git a/resources/common/common.css b/resources/common/common.css index 037617b7..89f8c527 100644 --- a/resources/common/common.css +++ b/resources/common/common.css @@ -87,7 +87,14 @@ body { text-shadow: 1px 1px 1px #000; margin-bottom: 10px; } -/* */ +/* */ +.cons { + display: inline-block; + vertical-align: middle; + padding: 0 5px; + border-radius: 4px; + font-family: Number, YS; +} .cons-0 { border-radius: 4px; background: #666; diff --git a/resources/common/common.less b/resources/common/common.less index 47c19206..249f9690 100644 --- a/resources/common/common.less +++ b/resources/common/common.less @@ -106,7 +106,15 @@ body { margin-bottom: 10px; } -/* */ +/* */ + +.cons { + display: inline-block; + vertical-align: middle; + padding: 0 5px; + border-radius: 4px; + font-family: Number, YS; +} .cons(@idx, @bg, @color:#fff) { .cons-@{idx} { diff --git a/resources/common/tpl.css b/resources/common/tpl.css index 6da491c9..978c4067 100644 --- a/resources/common/tpl.css +++ b/resources/common/tpl.css @@ -6,19 +6,25 @@ } .item-card .badge { overflow: hidden; - border-radius: 5px; - position: relative; + border-radius: 50%; + display: block; + width: 26px; + height: 26px; + position: absolute; + right: -4px; + top: -4px; background: #e9e5dc; - box-shadow: 0 2px 6px 0 rgba(132, 93, 90, 0.3); + box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.8), 2px 2px 2px rgba(50, 50, 50, 0.5); + z-index: 10; } .item-card .badge img { - width: 100%; + width: 140%; + left: -27%; + top: -45%; overflow: hidden; background-size: 100%; background-repeat: no-repeat; position: absolute; - top: 0; - /*filter: contrast(95%);*/ } .item-card .item-bg { width: 100%; @@ -29,30 +35,28 @@ } .item-card .bg1 { background-image: url("./item/bg1.png"); + border-radius: 5px 5px 15px 0; } .item-card .bg2 { background-image: url("./item/bg2.png"); + border-radius: 5px 5px 15px 0; } .item-card .bg3 { background-image: url("./item/bg3.png"); + border-radius: 5px 5px 15px 0; } .item-card .bg4 { background-image: url("./item/bg4.png"); + border-radius: 5px 5px 15px 0; } .item-card .bg5 { background-image: url("./item/bg5.png"); + border-radius: 5px 5px 15px 0; } .item-card .box { border-radius: 5px; overflow: hidden; -} -.item-card .box:after { - content: ""; - display: block; - position: absolute; - width: 15px; - right: 0; - bottom: 15px; + background: #e9e5dc; } .item-card .box .item-desc { display: block; @@ -163,6 +167,7 @@ .profile .attr { border-radius: 4px; overflow: hidden; + background: rgba(0, 0, 0, 0.3); } .profile .detail li { width: 300px; diff --git a/resources/common/tpl/artis-item.html b/resources/common/tpl/artis-item.html index 2b5653e0..b8e4a6e7 100644 --- a/resources/common/tpl/artis-item.html +++ b/resources/common/tpl/artis-item.html @@ -4,7 +4,7 @@
- +
{{ if ds.affix_level>1}} diff --git a/resources/common/tpl/avatar-profile.html b/resources/common/tpl/avatar-profile.html index c74be473..4d768a66 100644 --- a/resources/common/tpl/avatar-profile.html +++ b/resources/common/tpl/avatar-profile.html @@ -9,7 +9,7 @@
{{ds.name}}
{{if uid}}UID {{uid}} - {{/if}} - {{if ds.lv}} Lv.{{ds.lv}}{{/if}} + {{ds.cons}}命 {{if ds.lv}} Lv.{{ds.lv}}{{/if}}
{{each ds.talentMap tName key}} diff --git a/resources/common/tpl/avatar-profile.less b/resources/common/tpl/avatar-profile.less index 344a72bf..9e187a8b 100644 --- a/resources/common/tpl/avatar-profile.less +++ b/resources/common/tpl/avatar-profile.less @@ -51,6 +51,7 @@ .attr { border-radius: 4px; overflow: hidden; + background: rgba(0, 0, 0, .3); } .detail li { diff --git a/resources/common/tpl/item-card.less b/resources/common/tpl/item-card.less index 13feb52a..77bdf21c 100644 --- a/resources/common/tpl/item-card.less +++ b/resources/common/tpl/item-card.less @@ -8,20 +8,27 @@ .badge { overflow: hidden; - border-radius: 5px; - position: relative; - background: #e9e5dc; - box-shadow: 0 2px 6px 0 rgb(132 93 90 / 30%); - } - - .badge img { - width: 100%; - overflow: hidden; - background-size: 100%; - background-repeat: no-repeat; + border-radius: 50%; + display: block; + width: 26px; + height: 26px; position: absolute; - top: 0; - /*filter: contrast(95%);*/ + right: -4px; + top: -4px; + background: #e9e5dc; + box-shadow: 0 0 1px 0 rgba(0, 0, 0, 0.8), 2px 2px 2px rgba(50, 50, 50, .5); + z-index: 10; + + + img { + width: 140%; + left: -27%; + top: -45%; + overflow: hidden; + background-size: 100%; + background-repeat: no-repeat; + position: absolute; + } } .item-bg { @@ -35,23 +42,14 @@ each(range(5), { .bg@{value} { background-image: url("./item/bg@{value}.png"); - + border-radius: 5px 5px 15px 0; } }) .box { border-radius: 5px; overflow: hidden; - - - &:after { - content: ""; - display: block; - position: absolute; - width: 15px; - right: 0; - bottom: 15px; - } + background: #e9e5dc; .item-desc { display: block; diff --git a/resources/meta/character/七七/calc.js b/resources/meta/character/七七/calc.js new file mode 100644 index 00000000..d6d2341f --- /dev/null +++ b/resources/meta/character/七七/calc.js @@ -0,0 +1,15 @@ +export const details = [{ + title: "E每跳治疗", + dmg: ({ + talent, + attr, + calc + }, { heal }) => heal(talent.e['持续治疗量2'][0] * calc(attr.atk) / 100 + talent.e['持续治疗量2'][1] * 1) +}, { + title: "度厄真符每次治疗", + dmg: ({ talent, attr, calc }, { heal }) => heal(talent.q['治疗量2'][0] * calc(attr.atk) / 100 + talent.q['治疗量2'][1] * 1) +}]; + +export const mainAttr = "atk,cpct,cdmg"; + +export const buffs = [] diff --git a/resources/meta/character/凝光/calc.js b/resources/meta/character/凝光/calc.js new file mode 100644 index 00000000..190ce84a --- /dev/null +++ b/resources/meta/character/凝光/calc.js @@ -0,0 +1,19 @@ +export const details = [{ + title: "重击伤害", + dmg: ({ talent }, dmg) => dmg(talent.a['重击伤害'], 'a2') +}, { + title: "璇玑屏伤害", + dmg: ({ talent }, dmg) => dmg(talent.e['技能伤害'], 'e') +}, { + title: "Q单颗宝石伤害", + dmg: ({ talent }, dmg) => dmg(talent.q['宝石伤害'], 'q') +}]; + +export const mainAttr = "atk,cpct,cdmg"; + +export const buffs = [{ + title: "凝光被动:穿过璇玑屏获得12%岩伤加成", + data: { + dmg: 12 + } +}] diff --git a/resources/meta/character/可莉/calc.js b/resources/meta/character/可莉/calc.js new file mode 100644 index 00000000..48c9c5bb --- /dev/null +++ b/resources/meta/character/可莉/calc.js @@ -0,0 +1,36 @@ +export const details = [{ + title: "E后带火花重击", + params: { q: false }, + dmg: ({ talent }, dmg) => dmg(talent.a['重击伤害'], 'a2') +}, { + title: "E后带火花重击蒸发", + params: { q: false }, + dmg: ({ talent }, dmg) => dmg(talent.a['重击伤害'], 'a2', 'zf') +}, { + title: "单次轰轰火花伤害", + dmg: ({ talent }, dmg) => dmg(talent.q['轰轰火花伤害'], 'q') +}]; + +export const mainAttr = "atk,cpct,cdmg,mastery"; + +export const buffs = [{ + title: "可莉天赋:爆裂火花使重击伤害提升50%", + data: { + a2Dmg: 50 + } +}, { + title: "可莉2命:蹦蹦炸弹的诡雷会使敌人的防御力降低23%", + cons: 2, + data: { + enemyDef: 23 + } +}, { + title: "可莉6命:释放轰轰火花后获得10%火元素伤害加成", + cons: 6, + data: { + dmg: ({ params }) => params.q === false ? 0 : 10 + } +}, { + title: "元素精通:蒸发融化伤害提高[zf]%", + mastery: "zf,rh" +}] diff --git a/resources/meta/weapons/calc.js b/resources/meta/weapons/calc.js index 8b984d46..f52dd3e1 100644 --- a/resources/meta/weapons/calc.js +++ b/resources/meta/weapons/calc.js @@ -566,9 +566,9 @@ let sword = { } }], "风鹰剑": { - title: "攻击力提高[atkPct]%", + title: "攻击力提高[_atkPct]%", refine: { - atkPct: step(20) + _atkPct: step(20) } },