Current stamina will scale as max stamina increases, this prevents players from having very high penalty when they gain huge amount of exp at the start of a reset.

This commit is contained in:
Olivier Gagnon 2021-03-07 16:48:48 -05:00
parent 56802fc85e
commit 6ca7f10faf

@ -992,12 +992,16 @@ Bladeburner.prototype.process = function() {
}
Bladeburner.prototype.calculateMaxStamina = function() {
var effAgility = Player.agility * this.skillMultipliers.effAgi;
var maxStamina = (Math.pow(effAgility, 0.8) + this.staminaBonus);
maxStamina *= this.skillMultipliers.stamina;
maxStamina *= Player.bladeburner_max_stamina_mult;
if (isNaN(maxStamina)) {throw new Error("Max Stamina calculated to be NaN in Bladeburner.calculateMaxStamina()");}
const effAgility = Player.agility * this.skillMultipliers.effAgi;
let maxStamina = (Math.pow(effAgility, 0.8) + this.staminaBonus) *
this.skillMultipliers.stamina *
Player.bladeburner_max_stamina_mult;
if (this.maxStamina !== maxStamina) {
const oldMax = this.maxStamina;
this.maxStamina = maxStamina;
this.stamina = this.maxStamina * this.stamina / oldMax;
}
if (isNaN(maxStamina)) {throw new Error("Max Stamina calculated to be NaN in Bladeburner.calculateMaxStamina()");}
}
Bladeburner.prototype.calculateStaminaGainPerSecond = function() {