acid mod only active when above 90% health

This commit is contained in:
landgreen
2020-01-19 12:37:24 -08:00
parent 33e2a65eb7
commit 27373d22e6
6 changed files with 74 additions and 139 deletions

View File

@@ -437,6 +437,7 @@ const mech = {
addHealth(heal) {
mech.health += heal * game.healScale;
if (mech.health > mech.maxHealth) mech.health = mech.maxHealth;
b.acidModSetCheck();
mech.displayHealth();
},
defaultFPSCycle: 0, //tracks when to return to normal fps
@@ -453,6 +454,7 @@ const mech = {
mech.death();
return;
}
b.acidModSetCheck();
mech.displayHealth();
document.getElementById("dmg").style.transition = "opacity 0s";
document.getElementById("dmg").style.opacity = 0.1 + Math.min(0.6, dmg * 4);