mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2025-02-17 02:22:23 +01:00
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:
@ -992,12 +992,16 @@ Bladeburner.prototype.process = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
Bladeburner.prototype.calculateMaxStamina = function() {
|
Bladeburner.prototype.calculateMaxStamina = function() {
|
||||||
var effAgility = Player.agility * this.skillMultipliers.effAgi;
|
const effAgility = Player.agility * this.skillMultipliers.effAgi;
|
||||||
var maxStamina = (Math.pow(effAgility, 0.8) + this.staminaBonus);
|
let maxStamina = (Math.pow(effAgility, 0.8) + this.staminaBonus) *
|
||||||
maxStamina *= this.skillMultipliers.stamina;
|
this.skillMultipliers.stamina *
|
||||||
maxStamina *= Player.bladeburner_max_stamina_mult;
|
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()");}
|
if (isNaN(maxStamina)) {throw new Error("Max Stamina calculated to be NaN in Bladeburner.calculateMaxStamina()");}
|
||||||
this.maxStamina = maxStamina;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Bladeburner.prototype.calculateStaminaGainPerSecond = function() {
|
Bladeburner.prototype.calculateStaminaGainPerSecond = function() {
|
||||||
|
Reference in New Issue
Block a user