Browse Source

调整减伤公式适应负护甲

v1.0
许孟阳 2 weeks ago
parent
commit
2beadbf588
  1. 5
      src/tool/caller/attribute.ts

5
src/tool/caller/attribute.ts

@ -57,8 +57,9 @@ export const callPlayerAttribute = (player: Player, rA: any) => { @@ -57,8 +57,9 @@ export const callPlayerAttribute = (player: Player, rA: any) => {
* @returns
*/
export const callReducPercent = (def: number, lv: number): number => {
// return def / (200 + 1.1 * def) + (0.09 * def) / (def + 200);
return def / (300 + 1.05263 * def) + lv * 0.0003;
const constant = 300;
const factor = def < 0 ? -1.05263 : 1.05263;
return def / (constant + factor * def) + lv * 0.0003;
};
/**

Loading…
Cancel
Save