waste heat recovery

mod: electric reactive armor - reduce harm from explosions by 6% for every 10 energy
mod: waste heat recovery - laser damage grows to 400%, but you start to eject your health as a heal power up

new community level by Francois:  house
This commit is contained in:
landgreen
2020-09-13 19:14:33 -07:00
parent 5c2319cc75
commit cab6feda13
11 changed files with 750 additions and 556 deletions

View File

@@ -487,7 +487,7 @@ const mech = {
}
return dmg
},
damage(dmg) {
damage(dmg, isShowRed = true) {
mech.lastHarmCycle = mech.cycle
if (mod.isDroneOnDamage) { //chance to build a drone on damage from mod
const len = Math.min((dmg - 0.06 * Math.random()) * 40, 40)
@@ -552,8 +552,10 @@ const mech = {
}
}
mech.displayHealth();
document.getElementById("dmg").style.transition = "opacity 0s";
document.getElementById("dmg").style.opacity = 0.1 + Math.min(0.6, dmg * 4);
if (isShowRed) {
document.getElementById("dmg").style.transition = "opacity 0s";
document.getElementById("dmg").style.opacity = 0.1 + Math.min(0.6, dmg * 4);
}
}
if (dmg > 0.06 / mech.holdingMassScale) mech.drop(); //drop block if holding
@@ -577,11 +579,11 @@ const mech = {
mech.defaultFPSCycle = mech.cycle + 20 + Math.min(90, Math.floor(200 * dmg))
if (mod.isHarmFreeze) { //freeze all mobs
for (let i = 0, len = mob.length; i < len; i++) {
mobs.statusSlow(mob[i], 360)
mobs.statusSlow(mob[i], 300)
}
}
} else {
if (dmg > 0.05) { // freeze game for high damage hits
if (dmg > 0.05 && isShowRed) { // freeze game for high damage hits
game.fpsCap = 4 //40 - Math.min(25, 100 * dmg)
game.fpsInterval = 1000 / game.fpsCap;
} else {