Round armor/weapon durability values to 2 DP
This commit is contained in:
parent
5c077dc99b
commit
2c50139dba
@ -171,7 +171,7 @@ export class DurabilityLimitsHelper
|
|||||||
const minDelta = this.getMinWeaponDeltaFromConfig(botRole);
|
const minDelta = this.getMinWeaponDeltaFromConfig(botRole);
|
||||||
const maxDelta = this.getMaxWeaponDeltaFromConfig(botRole);
|
const maxDelta = this.getMaxWeaponDeltaFromConfig(botRole);
|
||||||
const delta = this.randomUtil.getInt(minDelta, maxDelta);
|
const delta = this.randomUtil.getInt(minDelta, maxDelta);
|
||||||
const result = maxDurability - delta;
|
const result = Number((maxDurability - delta).toFixed(2));
|
||||||
const durabilityValueMinLimit = Math.round(
|
const durabilityValueMinLimit = Math.round(
|
||||||
(this.getMinWeaponLimitPercentFromConfig(botRole) / 100) * maxDurability,
|
(this.getMinWeaponLimitPercentFromConfig(botRole) / 100) * maxDurability,
|
||||||
);
|
);
|
||||||
@ -185,7 +185,7 @@ export class DurabilityLimitsHelper
|
|||||||
const minDelta = this.getMinArmorDeltaFromConfig(botRole);
|
const minDelta = this.getMinArmorDeltaFromConfig(botRole);
|
||||||
const maxDelta = this.getMaxArmorDeltaFromConfig(botRole);
|
const maxDelta = this.getMaxArmorDeltaFromConfig(botRole);
|
||||||
const delta = this.randomUtil.getInt(minDelta, maxDelta);
|
const delta = this.randomUtil.getInt(minDelta, maxDelta);
|
||||||
const result = maxDurability - delta;
|
const result = Number((maxDurability - delta).toFixed(2));
|
||||||
const durabilityValueMinLimit = Math.round(
|
const durabilityValueMinLimit = Math.round(
|
||||||
(this.getMinArmorLimitPercentFromConfig(botRole) / 100) * maxDurability,
|
(this.getMinArmorLimitPercentFromConfig(botRole) / 100) * maxDurability,
|
||||||
);
|
);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user