difficulty bug fix

This commit is contained in:
landgreen
2020-10-06 05:01:59 -07:00
parent 0d2a570ebd
commit b2cb88832c
6 changed files with 94 additions and 49 deletions

View File

@@ -659,7 +659,7 @@ const game = {
game.difficultyMode = 1
level.difficultyDecrease(6); //if this stops being -6 change in build.calculateCustomDifficulty()
}
if (game.difficultyMode === 4) level.difficultyIncrease(3)
if (game.difficultyMode > 1) level.difficultyIncrease(3)
game.clearNow = true;
document.getElementById("text-log").style.opacity = 0;
@@ -844,7 +844,7 @@ const game = {
if (!(mech.cycle % 60)) { //once a second
//every second energy above max energy loses 25%
if (mech.energy > mech.maxEnergy) mech.energy = 1 + (mech.maxEnergy - mech.energy) * 0.75
if (mech.energy > mech.maxEnergy) mech.energy = mech.maxEnergy + (mech.energy - mech.maxEnergy) * 0.75
if (mech.pos.y > game.fallHeight) { // if 4000px deep
if (game.difficultyMode > 2) {