diff --git a/js/bullet.js b/js/bullet.js index 3005dab..ca59d3b 100644 --- a/js/bullet.js +++ b/js/bullet.js @@ -4028,7 +4028,7 @@ const b = { bullet[me] = Bodies.polygon(where.x, where.y, 12, radius, b.fireAttributes(dir, false)); Composite.add(engine.world, bullet[me]); //add bullet to world Matter.Body.setVelocity(bullet[me], velocity); - bullet[me].calcDensity = function () { 0.0007 + 0.00055 * tech.isSuperHarm + 0.0004 * tech.isBulletTeleport } + bullet[me].calcDensity = function () { return 0.0007 + 0.00055 * tech.isSuperHarm + 0.0004 * tech.isBulletTeleport } Matter.Body.setDensity(bullet[me], bullet[me].calcDensity()); bullet[me].endCycle = simulation.cycle + Math.floor(270 + 90 * Math.random()); bullet[me].minDmgSpeed = 0; diff --git a/js/level.js b/js/level.js index 1dbae0a..85744ce 100644 --- a/js/level.js +++ b/js/level.js @@ -45,8 +45,8 @@ const level = { // for (let i = 0; i < 1; i++) tech.giveTech("tungsten carbide") - // for (let i = 0; i < 1; ++i) tech.giveTech("induction furnace") - // for (let i = 0; i < 1; ++i) tech.giveTech("autonomous defense") + // for (let i = 0; i < 1; ++i) tech.giveTech("quenching") + // for (let i = 0; i < 3; ++i) tech.giveTech("adiabatic healing") // for (let i = 0; i < 3; i++) powerUps.directSpawn(450, -50, "tech"); // for (let i = 0; i < 10; i++) powerUps.directSpawn(1750, -500, "research"); // for (let i = 0; i < 100; i++) powerUps.directSpawn(1750, -500, "coupling"); @@ -72,7 +72,7 @@ const level = { // simulation.setZoom(); // for (let i = 0; i < 2; ++i) powerUps.directSpawn(m.pos.x + 50 * Math.random(), m.pos.y + 50 * Math.random(), "tech"); // for (let i = 0; i < 2; ++i) powerUps.directSpawn(m.pos.x + 450, m.pos.y + 50 * Math.random(), "boost"); - // for (let i = 0; i < 20; ++i) powerUps.directSpawn(m.pos.x + 50 * Math.random(), m.pos.y + 50 * Math.random(), "ammo"); + // for (let i = 0; i < 20; ++i) powerUps.directSpawn(m.pos.x + 50 * Math.random(), m.pos.y + 50 * Math.random(), "heal"); // for (let i = 0; i < 2; i++) powerUps.spawn(player.position.x + Math.random() * 50, player.position.y - Math.random() * 50, "field", false); //lore testing // localSettings.isTrainingNotAttempted = true diff --git a/js/player.js b/js/player.js index 462f64a..8b8673f 100644 --- a/js/player.js +++ b/js/player.js @@ -478,7 +478,7 @@ const m = { Engine.clear(engine); simulation.splashReturn(); //if you die after clearing fewer than 4 levels the difficulty settings automatically opens - if (level.levelsCleared < 4 && !simulation.isTraining && !simulation.isCheating) document.getElementById("settings-details").open = true; + if ((level.levelsCleared < 4 || level.levelsCleared > 12) && !simulation.isTraining && !simulation.isCheating) document.getElementById("settings-details").open = true; }, 5000); } }, diff --git a/js/powerup.js b/js/powerup.js index cb5c4e2..649659d 100644 --- a/js/powerup.js +++ b/js/powerup.js @@ -537,12 +537,18 @@ const powerUps = { powerUps.animatePowerUpGrab('rgba(0, 238, 187,0.25)') let heal = (this.size / 40 / (simulation.healScale ** 0.25)) ** 2 //simulation.healScale is undone here because heal scale is already properly affected on m.addHealth() if (heal > 0) { - const overHeal = m.health + heal * simulation.healScale - m.maxHealth //used with tech.isOverHeal + let overHeal = m.health + heal * simulation.healScale - m.maxHealth //used with tech.isOverHeal const healOutput = Math.min(m.maxHealth - m.health, heal) * simulation.healScale m.addHealth(heal); if (healOutput > 0) simulation.makeTextLog(`m.health += ${(healOutput).toFixed(3)}`) //
${m.health.toFixed(3)} if (tech.isOverHeal && overHeal > 0) { //tech quenching + overHeal *= 2 //double the over heal converted to max health + //make sure overHeal doesn't kill player + if (m.health - overHeal * m.defense() < 0) overHeal = m.health - 0.01 + tech.extraMaxHealth += overHeal //increase max health + m.setMaxHealth(); m.damage(overHeal); + overHeal *= m.defense() // account for defense after m.damage() so the text log is accurate simulation.makeTextLog(`m.health -= ${(overHeal).toFixed(3)}`) //
${m.health.toFixed(3)} simulation.drawList.push({ //add dmg to draw queue x: m.pos.x, @@ -551,8 +557,6 @@ const powerUps = { color: simulation.mobDmgColor, time: simulation.drawTime }); - tech.extraMaxHealth += overHeal * Math.sqrt(simulation.healScale) //increase max health - m.setMaxHealth(); } else if (overHeal > 0.13) { //if leftover heals spawn a new spammer heal power up requestAnimationFrame(() => { powerUps.directSpawn(this.position.x, this.position.y, "heal", true, null, overHeal * 40 * (simulation.healScale ** 0.25))// directSpawn(x, y, target, moving = true, mode = null, size = powerUps[target].size()) { diff --git a/js/tech.js b/js/tech.js index 693f402..12db9e6 100644 --- a/js/tech.js +++ b/js/tech.js @@ -3169,7 +3169,7 @@ const tech = { { name: "quenching", descriptionFunction() { - return `after over healing from ${powerUps.orb.heal()}
gain max health and lose current health` + return `${powerUps.orb.heal()} over healing results in 200% health loss
and 200% max health increase` }, maxCount: 1, count: 0, diff --git a/todo.txt b/todo.txt index 4dbf500..2b2dfdc 100644 --- a/todo.txt +++ b/todo.txt @@ -1,14 +1,11 @@ ******************************************************** NEXT PATCH ************************************************** -electronegativity: +26->23% damage +after beating the final boss the difficulty settings automatically opens +quenching - double the damage and double the max health given + aligned the effects more consistently with defense and difficulty based heal reduction + prevented possible death by quenching -gun cancel button doesn't show up on the initial level if you haven't done the training yet and you didn't choose a gun -after exiting initial level players are prompted to start the training levels - only if they haven't done the training and they didn't pick up a gun, and a few other conditions -community training levels only are added when community maps setting is on and player clicks on training - -if you die after clearing fewer than 4 levels the difficulty settings automatically opens -improved text formatting on updates +fixed super balls bug *********************************************************** TODO *****************************************************