From 2e7016d3d69d1254d5a66ebe67e908ad6d02a578 Mon Sep 17 00:00:00 2001 From: landgreen Date: Sun, 13 Sep 2020 19:32:20 -0700 Subject: [PATCH] bug fix for waste heat and bayesian --- js/bullet.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/js/bullet.js b/js/bullet.js index d8741a0..4519c0b 100644 --- a/js/bullet.js +++ b/js/bullet.js @@ -2982,12 +2982,17 @@ const b = { if (this.holdCount > 180) { this.holdCount = 0; const size = 15 - const dmg = (mod.largerHeals * (size / 40 / Math.sqrt(mod.largerHeals) / (game.healScale ** 0.25)) ** 2) / mech.harmReduction() * game.healScale + let dmg = (mod.largerHeals * (size / 40 / Math.sqrt(mod.largerHeals) / (game.healScale ** 0.25)) ** 2) / mech.harmReduction() * game.healScale if (mech.health < 0.15) { mech.fireCDcycle = mech.cycle + 120; // fire cool down if about to die } else { + const totalPowerUps = powerUp.length powerUps.spawn(mech.pos.x, mech.pos.y, "heal", true, false, size); mech.damage(dmg, false) + if (powerUp.length > totalPowerUps + 1) { + dmg = (mod.largerHeals * (powerUp[powerUp.length - 1].size / 40 / Math.sqrt(mod.largerHeals) / (game.healScale ** 0.25)) ** 2) / mech.harmReduction() * game.healScale + mech.damage(dmg, false) //do bonus damage if you spawn bonus power ups + } } } } else {