修复#角色详情 伤害计算的一处Bug

This commit is contained in:
Kokomi 2022-04-24 10:28:25 +08:00
parent 27f3ea4eed
commit 1a4a45fc7c
2 changed files with 17 additions and 13 deletions

View File

@ -283,7 +283,7 @@ let Calc = {
let atkNum = (atk.base + atk.plus + atk.base * atk.pct / 100);
// 增伤区
let dmgNum = (1 + dmg.base + dmg.plus / 100);
let dmgNum = (1 + dmg.base/100 + dmg.plus / 100);
//console.log({ base: Format.comma(dmg.base, 2), plus: Format.comma(dmg.plus, 2) })
@ -316,10 +316,14 @@ let Calc = {
let kNum = 0.9;
// 计算最终伤害
return {
let ret = {
dmg: atkNum * pctNum * dmgNum * (1 + cdmgNum) * defNum * kNum,
avg: atkNum * pctNum * dmgNum * (1 + cpctNum * cdmgNum) * defNum * kNum
}
console.log(attr, {atkNum, pctNum, dmgNum, cpctNum, cdmgNum, defNum}, ret)
return ret;
};
if (detail.dmg) {

View File

@ -315,7 +315,7 @@ body {
display: table;
width: calc(100% - 25px);
color: #fff;
font-size: 14px;
font-size: 16px;
}
.dmg-cont .tr {