Browse Source

修复爆伤计算错误

v1.0
许孟阳 6 days ago
parent
commit
48c89eefba
  1. 2
      src/tool/caller/battle.ts

2
src/tool/caller/battle.ts

@ -165,7 +165,7 @@ export class BattleRole {
const crit = attr.crit + extra.crit - target.attr.critAvoid - target.extraAttr.critAvoid; //最终暴击率 const crit = attr.crit + extra.crit - target.attr.critAvoid - target.extraAttr.critAvoid; //最终暴击率
this.crit = Math.random() < crit / 100; this.crit = Math.random() < crit / 100;
if (this.crit) { if (this.crit) {
let critDmg = attr.critDmg + extra.critDmg - target.attr.critDmgReduc - target.extraAttr.critDmg; //目标最终承受暴击伤害 let critDmg = attr.critDmg + extra.critDmg - target.attr.critDmgReduc - target.extraAttr.critDmgReduc; //目标最终承受暴击伤害
critDmg = critDmg < 100 ? 100 : critDmg; //暴击伤害不低于100% critDmg = critDmg < 100 ? 100 : critDmg; //暴击伤害不低于100%
this.baseDmg *= critDmg / 100; //暴击时目标承受伤害 this.baseDmg *= critDmg / 100; //暴击时目标承受伤害
} }

Loading…
Cancel
Save