mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-30 03:23:48 +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:
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() {
|
||||
|
Loading…
Reference in New Issue
Block a user