mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-05 23:27:55 +02:00
fix sleeve memory bug
This commit is contained in:
@@ -19,16 +19,8 @@ let container: HTMLElement = document.createElement("div");
|
||||
})();
|
||||
|
||||
function calcDifficulty(player: IPlayer, startingDifficulty: number): number {
|
||||
const totalStats =
|
||||
player.strength +
|
||||
player.defense +
|
||||
player.dexterity +
|
||||
player.agility +
|
||||
player.charisma;
|
||||
const difficulty =
|
||||
startingDifficulty -
|
||||
Math.pow(totalStats, 0.9) / 250 -
|
||||
player.intelligence / 1600;
|
||||
const totalStats = player.strength + player.defense + player.dexterity + player.agility + player.charisma;
|
||||
const difficulty = startingDifficulty - Math.pow(totalStats, 0.9) / 250 - player.intelligence / 1600;
|
||||
if (difficulty < 0) return 0;
|
||||
if (difficulty > 3) return 3;
|
||||
return difficulty;
|
||||
|
||||
Reference in New Issue
Block a user