修正更新面板时伤害计算无法重新触发的问题

修正圣遗物详情角色立绘偏移的问题
This commit is contained in:
Kokomi 2023-11-02 03:14:09 +08:00
parent 74f94e4b0f
commit b2253078f8
9 changed files with 46 additions and 10 deletions

View File

@ -43,7 +43,7 @@ export async function profileArtis (e) {
charCfg,
game,
changeProfile: e._profileMsg
}, { e, scale: 1.3 })
}, { e, scale: 1.6 / 1.1 })
}
/*

View File

@ -338,10 +338,11 @@ export default class Avatar extends Base {
// 计算当前profileData的伤害信息
async calcDmg ({ enemyLv = 91, mode = 'profile', dmgIdx = 0, idxIsInput = false }) {
if (!this.dmg) {
if (!this.dmg || this.dmg._update !== this._update) {
let ds = this.getData('id,level,attr,cons,artis:artis.sets,trees')
ds.talent = lodash.mapValues(this.talent, 'level')
ds.weapon = Data.getData(this.weapon, 'name,affix')
ds._update = this._update
this.dmg = new ProfileDmg(ds, this.game)
}
return await this.dmg.calcData({ enemyLv, mode, dmgIdx, idxIsInput })

View File

@ -12,6 +12,7 @@ export default class ProfileDmg extends Base {
super()
this.profile = profile
this.game = game
this._update = profile._update
if (profile && profile.id) {
let { id } = profile
this.char = Character.get(id)

View File

@ -1,6 +1,11 @@
body,
.container {
width: 650px;
width: 660px;
}
.main-pic {
width: 1540px;
height: 550px;
margin-left: -599.5px;
}
.container > .cont {
margin-left: 15px;
@ -61,12 +66,20 @@ body,
.artis .no-bg {
opacity: 0;
}
.artis ul.detail.attr-detail {
border-radius: 0;
}
.artis ul.detail li span {
width: initial;
}
.artis ul.detail li span.val {
padding-right: 8px;
}
.artis ul.detail li span.mark {
text-align: right;
padding-right: 10px;
padding-left: 5px;
padding-right: 6px;
background: rgba(0, 0, 0, 0.4);
}
.artis ul.detail li span.mark:after {
content: "分";
@ -89,6 +102,6 @@ body,
}
.artis .item {
height: inherit;
width: 200px;
width: 205px;
}
/*# sourceMappingURL=artis-mark.css.map */

View File

@ -50,7 +50,7 @@
<strong>{{ds.name}}</strong>
<span class="mark mark-{{ds.markClass}}"><span>{{ds.mark}}分</span> - {{ds.markClass}}</span>
</div>
<ul class="detail attr">
<ul class="detail attr attr-detail">
<li class="arti-main">
<span class="title">{{artisKeyTitle[ds.main.key]}}</span>
<span class="val">+{{ds.main.value}}</span>

View File

@ -1,5 +1,12 @@
body, .container {
width: 650px;
width: 660px;
}
.main-pic {
@n: 1.1;
width: 1400px * @n;
height: 500px * @n;
margin-left: -545px * @n;
}
.container > .cont {
@ -81,12 +88,22 @@ body, .container {
opacity: 0;
}
ul.detail.attr-detail {
border-radius: 0;
}
ul.detail li span {
width: initial;
&.val {
padding-right: 8px;
}
&.mark {
text-align: right;
padding-right: 10px;
padding-left: 5px;
padding-right: 6px;
background: rgba(0, 0, 0, .4);
&:after {
content: "分";
@ -116,7 +133,7 @@ body, .container {
.item {
height: inherit;
width: 200px;
width: 205px;
}

View File

@ -7,7 +7,7 @@ export const usefulAttr = {
甘雨: { atk: 75, cpct: 100, cdmg: 100, mastery: 75, dmg: 100 },
雷电将军: { atk: 75, cpct: 100, cdmg: 100, mastery: 0, dmg: 75, recharge: 90 },
神里绫人: { hp: 50, atk: 75, def: 0, cpct: 100, cdmg: 100, mastery: 0, dmg: 100, phy: 0, recharge: 30, heal: 0 },
八重神子: { hp: 0, atk: 75, def: 0, cpct: 100, cdmg: 100, mastery: 75, dmg: 100, phy: 0, recharge: 55, heal: 0 },
八重神子: { hp: 0, atk: 75, def: 0, cpct: 100, cdmg: 100, mastery: 75, dmg: 75, phy: 0, recharge: 55, heal: 0 },
申鹤: { hp: 0, atk: 100, def: 0, cpct: 100, cdmg: 100, mastery: 0, dmg: 100, phy: 0, recharge: 55, heal: 0 },
云堇: { hp: 0, atk: 75, def: 100, cpct: 80, cdmg: 80, mastery: 0, dmg: 80, phy: 0, recharge: 80, heal: 0 },
荒泷一斗: { hp: 0, atk: 50, def: 100, cpct: 100, cdmg: 100, mastery: 0, dmg: 100, phy: 0, recharge: 30, heal: 0 },

View File

@ -48,3 +48,5 @@ export const buffs = [{
dotEnemyDmg: 30
}
}]
export const createdBy = 'Aluxes'

View File

@ -40,3 +40,5 @@ export const buffs = [{
_hpPlus: ({ calc, attr }) => calc(attr.hp) * 0.06
}
}]
export const createdBy = 'Aluxes'