quenching

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

fixed super balls bug
This commit is contained in:
landgreen
2024-01-30 19:26:31 -08:00
parent 778a2c93b6
commit 68f9269d4e
6 changed files with 18 additions and 17 deletions

View File

@@ -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;

View File

@@ -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

View File

@@ -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);
}
},

View File

@@ -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(`<span class='color-var'>m</span>.health <span class='color-symbol'>+=</span> ${(healOutput).toFixed(3)}`) // <br>${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(`<span class='color-var'>m</span>.health <span class='color-symbol'>-=</span> ${(overHeal).toFixed(3)}`) // <br>${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()) {

View File

@@ -3169,7 +3169,7 @@ const tech = {
{
name: "quenching",
descriptionFunction() {
return `after over healing from ${powerUps.orb.heal()}<br>gain max <strong class='color-h'>health</strong> and lose current <strong class='color-h'>health</strong>`
return `${powerUps.orb.heal()} over healing results in <strong>200%</strong> <strong class='color-h'>health</strong> loss<br> and <strong>200%</strong> max <strong class='color-h'>health</strong> increase`
},
maxCount: 1,
count: 0,

View File

@@ -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 *****************************************************