fix sleeve memory bug

This commit is contained in:
Olivier Gagnon
2021-09-08 23:47:34 -04:00
parent bada8a5f39
commit 2a13db39c7
360 changed files with 5424 additions and 15764 deletions
+2 -10
View File
@@ -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;