minor balance changes

This commit is contained in:
lilgreenland
2019-12-05 15:44:52 -08:00
parent 23f953f699
commit dc408dd464
4 changed files with 8 additions and 95 deletions

View File

@@ -898,9 +898,7 @@ const mobs = {
}
},
damage(dmg) {
console.log(dmg, "before")
dmg /= Math.sqrt(this.mass)
console.log(dmg, "after")
if (b.isModLowHealthDmg) dmg *= (3 / (2 + mech.health)) //up to 50% dmg at zero player health
if (b.isModFarAwayDmg) dmg *= 1 + Math.sqrt(Math.max(1000, Math.min(3500, this.distanceToPlayer())) - 1000) * 0.01 //up to 50% dmg at max range of 3500
if (dmg !== Infinity) {
@@ -909,7 +907,7 @@ const mobs = {
}
this.health -= dmg
//this.fill = this.color + this.health + ')';
if (this.health < 0.01) this.death();
if (this.health < 0.05) this.death();
this.onDamage(this); //custom damage effects
},
onDamage() {