Browse Source

修复强化12成功率异常问题

master
许孟阳 2 weeks ago
parent
commit
725a598bb4
  1. 4
      src/tool/caller.ts
  2. 2
      src/views/backpack/strengthen.vue

4
src/tool/caller.ts

@ -63,7 +63,9 @@ export const callPlayerAttribute = (playerAttribute: any, rA: any) => {
critdmg = attribute.critDmg / 100; critdmg = attribute.critDmg / 100;
attribute.dps = Math.ceil((1 - crit + crit * critdmg) * atk); attribute.dps = Math.ceil((1 - crit + crit * critdmg) * atk);
//计算减伤比例 //计算减伤比例
attribute.reducPercent = (0.5 * attribute.def) / (35 + 0.55 * attribute.def) + (0.06 * attribute.def) / (attribute.def + 200); attribute.def = 500;
// attribute.reducPercent = (0.5 * attribute.def) / (35 + 0.55 * attribute.def) + (0.09 * attribute.def) / (attribute.def + 200);
attribute.reducPercent = (0.5 * attribute.def) / (200 + 0.502 * attribute.def);
return attribute; return attribute;
}; };

2
src/views/backpack/strengthen.vue

@ -125,7 +125,7 @@ const strengthen = () => {
let idx = lv - successLv - 1; let idx = lv - successLv - 1;
const len = rates.length; const len = rates.length;
idx = idx > len ? len : idx; idx = idx > len ? len : idx;
rate = rates[idx]; rate = rates[idx] || 0.2;
} }
if (Math.random() < rate) { if (Math.random() < rate) {
prop.equip.strengthenLv++ prop.equip.strengthenLv++

Loading…
Cancel
Save