diff --git a/.DS_Store b/.DS_Store
index de3f348..ccd53dc 100644
Binary files a/.DS_Store and b/.DS_Store differ
diff --git a/js/bullet.js b/js/bullet.js
index f36e883..006521e 100644
--- a/js/bullet.js
+++ b/js/bullet.js
@@ -2961,7 +2961,7 @@ const b = {
if (tech.iceEnergy && !who.shield && !who.isShielded && who.isDropPowerUp && who.alive && m.immuneCycle < m.cycle) {
setTimeout(() => { if (!who.alive) m.energy += tech.iceEnergy * 0.8 }, 10);
}
- mobs.statusSlow(who, 180)
+ mobs.statusSlow(who, tech.iceIXFreezeTime)
this.endCycle = simulation.cycle
// if (tech.isHeavyWater) mobs.statusDoT(who, 0.15, 300)
},
diff --git a/js/index.js b/js/index.js
index fbab545..a0d90dd 100644
--- a/js/index.js
+++ b/js/index.js
@@ -253,7 +253,7 @@ const build = {
`
text += `
damage: ${((tech.damageFromTech())).toPrecision(3)} difficulty: ${((m.dmgScale)).toPrecision(3)}
-
defense: ${(1-m.harmReduction()).toPrecision(3)} difficulty: ${(1/simulation.dmgScale).toPrecision(3)}
+
defense: ${tech.isEnergyHealth ? (1-Math.pow(m.harmReduction(), 0.1)).toPrecision(3) : (1-m.harmReduction()).toPrecision(3) } difficulty: ${(1/simulation.dmgScale).toPrecision(3)}
fire rate: ${((1-b.fireCDscale)*100).toFixed(b.fireCDscale < 0.1 ? 2 : 0)}%
${tech.duplicationChance() ? `
duplication: ${(tech.duplicationChance()*100).toFixed(0)}%`: ""}
${m.coupling ? `
coupling: ${(m.coupling).toFixed(2)} `+m.couplingDescription()+"": ""}
diff --git a/js/level.js b/js/level.js
index a03d5fe..379bd08 100644
--- a/js/level.js
+++ b/js/level.js
@@ -24,17 +24,17 @@ const level = {
// m.immuneCycle = Infinity //you can't take damage
// tech.tech[297].frequency = 100
// m.couplingChange(5)
- // m.setField("perfect diamagnetism") //molecular assembler standing wave time dilation perfect diamagnetism metamaterial cloaking wormhole negative mass
+ // m.setField("metamaterial cloaking") //molecular assembler standing wave time dilation perfect diamagnetism metamaterial cloaking wormhole negative mass
// simulation.molecularMode = 2
// m.damage(0.1);
// b.giveGuns("nail gun") //0 nail gun 1 shotgun 2 super balls 3 wave 4 missiles 5 grenades 6 spores 7 drones 8 foam 9 harpoon 10 mine 11 laser
// b.guns[0].ammo = 1000000
- // tech.giveTech("Meissner effect")
- // for (let i = 0; i < 4; ++i) tech.giveTech("bound state")
- // for (let i = 0; i < 1; ++i) tech.giveTech("isotropic")
- // tech.giveTech("sympathetic resonance")
- // for (let i = 0; i < 9; i++) tech.giveTech("replication")
+ // for (let i = 0; i < 1; ++i) tech.giveTech("mass-energy equivalence")
+ // tech.giveTech("Zeno's paradox")
+ // tech.giveTech("homeostasis")
+ // for (let i = 0; i < 1; ++i) tech.giveTech("1st ionization energy")
+ // for (let i = 0; i < 1; i++) tech.giveTech("negative feedback")
// for (let i = 0; i < 10; i++) powerUps.directSpawn(450, -50, "tech");
// for (let i = 0; i < 10; i++) powerUps.directSpawn(1750, -500, "boost");
// for (let i = 0; i < 10; i++) powerUps.directSpawn(1750, -500, "coupling");
@@ -42,14 +42,14 @@ const level = {
// level.testing();
// spawn.starter(1900, -500)
// spawn.beetleBoss(2538, -1950)
- // for (let i = 0; i < 33; ++i) spawn.starter(1000 + 5000 * Math.random(), -500 + 300 * Math.random())
- // tech.addJunkTechToPool(2)
+ // for (let i = 0; i < 33; ++i) spawn.sniper(1000 + 5000 * Math.random(), -500 + 300 * Math.random())
+ // tech.addJunkTechToPool(0.5)
// tech.tech[322].frequency = 100
// spawn.tetherBoss(1900, -500, { x: 1900, y: -500 })
- // for (let i = 0; i < 13; ++i) powerUps.directSpawn(m.pos.x + 50 * Math.random(), m.pos.y + 50 * Math.random(), "research");
- // for (let i = 0; i < 4; ++i) powerUps.directSpawn(m.pos.x + 50 * Math.random(), m.pos.y + 50 * Math.random(), "tech");
+ // for (let i = 0; i < 13; ++i) powerUps.directSpawn(m.pos.x + 50 * Math.random(), m.pos.y + 50 * Math.random(), "research");
if (simulation.isTraining) { level.walk(); } else { level.intro(); } //normal starting level ************************************************
+ // for (let i = 0; i < 4; ++i) powerUps.directSpawn(m.pos.x + 50 * Math.random(), m.pos.y + 50 * Math.random(), "tech");
// for (let i = 0; i < 30; i++) powerUps.spawn(player.position.x + Math.random() * 50, player.position.y - Math.random() * 50, "tech", false);
//lore testing
@@ -58,7 +58,7 @@ const level = {
// simulation.isCheating = false //true;
// level.levelsCleared = 10
// mobs.mobDeaths = 200
- // localSettings.loreCount = 6 //this sets what conversation is heard
+ // localSettings.loreCount = 7 //this sets what conversation is heard
// if (localSettings.isAllowed) localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage
// level.onLevel = -1 //this sets level.levels[level.onLevel] = undefined which is required to run the conversation
// level.null()
@@ -117,14 +117,23 @@ const level = {
powerUps.spawn(player.position.x + Math.random() * 50, player.position.y - Math.random() * 50, "tech", false);
}
if (tech.isHealLowHealth) {
- const len = Math.ceil((m.maxHealth - m.health) / 0.29)
+ // if (tech.isEnergyHealth) {
+ // var len = Math.ceil((m.maxEnergy - m.energy) / 0.33)
+ // } else {
+ // var len = Math.ceil((m.maxHealth - m.health) / 0.33)
+ // }
+ if (tech.isEnergyHealth) {
+ var len = 3 * (1 - m.energy / m.maxEnergy) //as a percent
+ } else {
+ var len = 3 * (1 - m.health / m.maxHealth) //as a percent
+ }
for (let i = 0; i < len; i++) powerUps.spawn(player.position.x + 90 * (Math.random() - 0.5), player.position.y + 90 * (Math.random() - 0.5), "heal", false);
}
if (tech.isMACHO) spawn.MACHO()
for (let i = 0; i < tech.wimpCount; i++) {
spawn.WIMP()
mob[mob.length - 1].isDecoupling = true //so you can find it to remove
- for (let j = 0, len = 5; j < len; j++) powerUps.spawn(level.exit.x + 100 * (Math.random() - 0.5), level.exit.y - 100 + 100 * (Math.random() - 0.5), "research", false)
+ for (let j = 0, len = 4; j < len; j++) powerUps.spawn(level.exit.x + 100 * (Math.random() - 0.5), level.exit.y - 100 + 100 * (Math.random() - 0.5), "research", false)
}
// if (tech.isFlipFlopLevelReset && !tech.isFlipFlopOn) {
if ((tech.isRelay || tech.isFlipFlop) && !tech.isFlipFlopOn) {
@@ -1320,7 +1329,7 @@ const level = {
}
},
isHazardRise: false,
- hazard(x, y, width, height, damage = 0.003) {
+ hazard(x, y, width, height, damage = 0.002) {
return {
min: {
x: x,
@@ -1374,7 +1383,7 @@ const level = {
if (this.height > 0 && Matter.Query.region([player], this).length) {
if (m.immuneCycle < m.cycle) {
- const DRAIN = 0.0032 * (tech.isRadioactiveResistance ? 0.25 : 1)
+ const DRAIN = 0.004 * (tech.isRadioactiveResistance ? 0.25 : 1)
if (m.energy > DRAIN) {
m.energy -= DRAIN
// m.damage(damage * (tech.isRadioactiveResistance ? 0.25 : 1) * 0.03) //still take 2% damage while you have energy
@@ -3297,9 +3306,11 @@ const level = {
} else {
powerUps.spawnStartingPowerUps(2095 + 15 * (Math.random() - 0.5), -2070 - 125);
}
- powerUps.spawn(2095 + 15 * (Math.random() - 0.5), -2070 - 25, "heal", false);
- powerUps.spawn(2095 + 15 * (Math.random() - 0.5), -2070 - 75, "heal", false);
- powerUps.spawn(2095 + 15 * (Math.random() - 0.5), -2070, "research", false);
+ if (simulation.difficultyMode < 5) {
+ powerUps.spawn(2095 + 15 * (Math.random() - 0.5), -2070 - 25, "heal", false);
+ powerUps.spawn(2095 + 15 * (Math.random() - 0.5), -2070 - 75, "heal", false);
+ powerUps.spawn(2095 + 15 * (Math.random() - 0.5), -2070, "research", false); //not on why difficulty
+ }
} else {
requestAnimationFrame(cycle);
}
@@ -8895,7 +8906,7 @@ const level = {
buttonThird.query();
buttonThird.draw();
if (!buttonThird.isUp && !hasSecretButton2) {
- for (var i = 0; i < 4; i++) powerUps.spawn(1614, -3700, "research");
+ for (var i = 0; i < 1; i++) powerUps.spawn(1614, -3700, "research");
hasSecretButton2 = true;
}
if (!buttonSec.isUp) {
diff --git a/js/player.js b/js/player.js
index 71f2576..76a6bb8 100644
--- a/js/player.js
+++ b/js/player.js
@@ -659,11 +659,6 @@ const m = {
},
collisionImmuneCycles: 30,
damage(dmg) {
- // if (tech.isCouplingNoHit) {
- // for (let i = 0, len = tech.tech.length; i < len; i++) {
- // if (tech.tech[i].name === "fine-structure constant") powerUps.ejectTech(i, true)
- // }
- // }
if (tech.isRewindAvoidDeath && m.energy > 0.6 && dmg > 0.01) {
const steps = Math.floor(Math.min(299, 150 * m.energy))
simulation.makeTextLog(`m.rewind(${steps})`)
@@ -677,9 +672,9 @@ const m = {
if (Math.random() < 0.5) b.drone({ x: m.pos.x + 30 * Math.cos(m.angle) + 100 * (Math.random() - 0.5), y: m.pos.y + 30 * Math.sin(m.angle) + 100 * (Math.random() - 0.5) }) //spawn drone
}
}
-
if (tech.isEnergyHealth) {
- m.energy -= dmg
+ dmg *= Math.pow(m.harmReduction(), 0.1) //defense has less effect
+ m.energy -= 0.9 * dmg / Math.sqrt(simulation.healScale) //scale damage with heal reduction difficulty
if (m.energy < 0 || isNaN(m.energy)) { //taking deadly damage
if (tech.isDeathAvoid && powerUps.research.count && !tech.isDeathAvoidedThisLevel) {
tech.isDeathAvoidedThisLevel = true
@@ -738,7 +733,6 @@ const m = {
document.getElementById("dmg").style.transition = "opacity 0s";
document.getElementById("dmg").style.opacity = 0.1 + Math.min(0.6, dmg * 4);
}
-
if (dmg > 0.03) {
m.lastHit = dmg;
if (dmg > 0.06 / m.holdingMassScale) m.drop(); //drop block if holding // m.holdingMassScale = 0.5 for most fields
@@ -1594,7 +1588,19 @@ const m = {
couplingChange(change = 0) {
if (change > 0 && level.onLevel !== -1) simulation.makeTextLog(`m.coupling += ${change}`, 60); //level.onLevel !== -1 means not on lore level
m.coupling += change
- if (m.coupling < 0) m.coupling = 0 //can't go negative
+ if (m.coupling < 0) {
+ //look for coupling power ups on this level and remove them to prevent exploiting tech ejections
+ for (let i = powerUp.length - 1; i > -1; i--) {
+ if (powerUp[i].name === "coupling") {
+ Matter.Composite.remove(engine.world, powerUp[i]);
+ powerUp.splice(i, 1);
+ m.coupling += 0.1
+ if (!(m.coupling < 0)) break
+ }
+ }
+
+ m.coupling = 0 //can't go negative
+ }
// m.setMaxEnergy();
// m.setMaxHealth();
m.setFieldRegen()
@@ -2922,9 +2928,12 @@ const m = {
//not shooting (or using field) enable cloak
if (m.energy < 0.05 && m.fireCDcycle < m.cycle && !input.fire) m.fireCDcycle = m.cycle
if (m.fireCDcycle + 30 < m.cycle && !input.fire) { //automatically cloak if not firing
- if (!m.isCloak) {
+ const drain = 0.1
+ if (!m.isCloak && m.energy > drain) {
+ m.energy -= drain
m.isCloak = true //enter cloak
+
// m.color = {
// hue: 0,
// sat: 0,
diff --git a/js/powerup.js b/js/powerup.js
index fbfb112..53f24af 100644
--- a/js/powerup.js
+++ b/js/powerup.js
@@ -31,6 +31,7 @@ const powerUps = {
time: 16
});
},
+ healGiveMaxEnergy: false, //for tech 1st ionization energy
orb: {
research(num = 1) {
switch (num) {
@@ -98,19 +99,35 @@ const powerUps = {
return text
},
heal(num = 1) {
- switch (num) {
- case 1:
- return `
`
+ if (powerUps.healGiveMaxEnergy) {
+ switch (num) {
+ case 1:
+ return ``
+ }
+ let text = ''
+ for (let i = 0; i < num; i++) {
+ text += ``
+ }
+ text += ' '
+ for (let i = 0; i < num; i++) {
+ text += ' '
+ }
+ return text
+ } else {
+ switch (num) {
+ case 1:
+ return ``
+ }
+ let text = ''
+ for (let i = 0; i < num; i++) {
+ text += ``
+ }
+ text += ' '
+ for (let i = 0; i < num; i++) {
+ text += ' '
+ }
+ return text
}
- let text = ''
- for (let i = 0; i < num; i++) {
- text += ``
- }
- text += ' '
- for (let i = 0; i < num; i++) {
- text += ' '
- }
- return text
},
tech(num = 1) {
return ``
@@ -122,11 +139,11 @@ const powerUps = {
}
let text = ''
for (let i = 0; i < num; i++) {
- text += ``
+ text += ``
}
- text += ' '
+ text += ' '
for (let i = 0; i < num; i++) {
- text += ' '
+ text += ' '
}
return text
},
@@ -452,9 +469,8 @@ const powerUps = {
changeRerolls(amount) {
if (amount !== 0) {
powerUps.research.count += amount
- if (powerUps.research.count < 0) {
- powerUps.research.count = 0
- }
+ // if (powerUps.research.count < 0) powerUps.research.count = 0
+
// else {
// simulation.makeTextLog(`powerUps.research.count += ${amount}`) //
${powerUps.research.count}
// }
@@ -520,11 +536,11 @@ const powerUps = {
name: "heal",
color: "#0eb",
size() {
- return Math.sqrt(0.1 + 0.25) * 40 * (simulation.healScale ** 0.25) * Math.sqrt(tech.largerHeals) * (tech.isFlipFlopOn && tech.isFlipFlopHealth ? Math.sqrt(2) : 1); //(simulation.healScale ** 0.25) gives a smaller radius as heal scale goes down
+ return Math.sqrt(0.1 + 0.25) * 40 * (simulation.healScale ** 0.25) * Math.sqrt(tech.largerHeals * (tech.isHalfHeals ? 0.5 : 1)) * (tech.isFlipFlopOn && tech.isFlipFlopHealth ? Math.sqrt(2) : 1); //(simulation.healScale ** 0.25) gives a smaller radius as heal scale goes down
},
effect() {
- if (!tech.isEnergyHealth && m.alive && !tech.isNoHeals) {
- const 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 (!tech.isEnergyHealth && m.alive) {
+ 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()
// console.log("size = " + this.size, "heal = " + heal)
if (heal > 0) {
const overHeal = m.health + heal * simulation.healScale - m.maxHealth //used with tech.isOverHeal
@@ -547,8 +563,8 @@ const powerUps = {
}
}
}
- if (tech.healGiveMaxEnergy) {
- tech.healMaxEnergyBonus += 0.08 * tech.largerHeals
+ if (powerUps.healGiveMaxEnergy) {
+ tech.healMaxEnergyBonus += 0.08 * tech.largerHeals * (tech.isHalfHeals ? 0.5 : 1)
m.setMaxEnergy();
}
},
@@ -670,7 +686,7 @@ const powerUps = {
}
}
if (tech.isJunkResearch && powerUps.research.currentRerollCount < 3) {
- tech.junkResearchNumber = Math.ceil(3 * Math.random())
+ tech.junkResearchNumber = Math.ceil(4 * Math.random())
text += ` `
for (let i = 0; i < tech.junkResearchNumber; i++) text += ``
text += ` pseudoscience `
@@ -809,7 +825,7 @@ const powerUps = {
}
}
if (tech.isJunkResearch && powerUps.research.currentRerollCount < 3) {
- tech.junkResearchNumber = Math.ceil(3 * Math.random())
+ tech.junkResearchNumber = Math.ceil(4 * Math.random())
text += ` `
for (let i = 0; i < tech.junkResearchNumber; i++) text += ``
text += ` pseudoscience `
@@ -1062,11 +1078,11 @@ const powerUps = {
}
//add in research button or pseudoscience button
if (tech.isJunkResearch && powerUps.research.currentRerollCount < 3) {
- tech.junkResearchNumber = Math.ceil(3 * Math.random())
+ tech.junkResearchNumber = Math.ceil(4 * Math.random())
text += ` `
for (let i = 0; i < tech.junkResearchNumber; i++) text += ``
text += ` pseudoscience `
- } else if (powerUps.research.count) {
+ } else if (powerUps.research.count > 0) {
text += ` `
for (let i = 0, len = Math.min(powerUps.research.count, 30); i < len; i++) text += ``
// text += ` research `
@@ -1094,7 +1110,7 @@ const powerUps = {
},
onPickUp(who) {
powerUps.research.currentRerollCount = 0
- if (tech.isTechDamage && who.name === "tech") m.damage(0.12 + 0.12 * tech.isEnergyHealth)
+ if (tech.isTechDamage && who.name === "tech") m.damage(0.1)
if (tech.isMassEnergy) m.energy += 2;
if (tech.isMineDrop && bullet.length < 150 && Math.random() < 0.6) {
if (tech.isLaserMine && input.down) {
@@ -1205,7 +1221,7 @@ const powerUps = {
}
},
addResearchToLevel() { //add a random power up to a location that has a mob, mostly used to give each level one randomly placed research
- if (mob.length && Math.random() < 0.8) { // 80% chance
+ if (mob.length && Math.random() < 0.5 - 0.3 && simulation.difficultyMode < 5) { //lower chance on why difficulty
const index = Math.floor(Math.random() * mob.length)
powerUps.spawn(mob[index].position.x, mob[index].position.y, "research");
}
@@ -1263,7 +1279,7 @@ const powerUps = {
} else {
return false
}
- } else if (tech.tech[choose].count) {
+ } else if (tech.tech[choose].count && tech.tech[choose].isNonRefundable) {
// simulation.makeTextLog(` ${tech.tech[choose].name} was ejected`, 600) //message about what tech was lost
simulation.makeTextLog(`tech.remove("${tech.tech[choose].name}")`)
@@ -1285,7 +1301,7 @@ const powerUps = {
},
pauseEjectTech(index) {
if ((tech.isPauseEjectTech || simulation.testing) && !simulation.isChoosing && !tech.tech[index].isNonRefundable) {
- if (Math.random() < 0.16 || tech.tech[index].isFromAppliedScience || (tech.tech[index].bonusResearch !== undefined && tech.tech[index].bonusResearch > powerUps.research.count)) {
+ if (Math.random() < 0.2 || tech.tech[index].isFromAppliedScience || (tech.tech[index].bonusResearch !== undefined && tech.tech[index].bonusResearch > powerUps.research.count)) {
tech.removeTech(index)
// powerUps.spawn(m.pos.x + 40 * (Math.random() - 0.5), m.pos.y + 40 * (Math.random() - 0.5), "research", false);
} else {
diff --git a/js/simulation.js b/js/simulation.js
index 9700b7d..70ab980 100644
--- a/js/simulation.js
+++ b/js/simulation.js
@@ -1157,8 +1157,13 @@ const simulation = {
if (!(m.cycle % 420)) { //once every 7 seconds
if (tech.isZeno) {
- m.health *= 0.95 //remove 5%
- m.displayHealth();
+ if (tech.isEnergyHealth) {
+ m.energy *= 0.95
+ } else {
+ m.health *= 0.95 //remove 5%
+ m.displayHealth();
+ }
+
}
if (tech.cyclicImmunity && m.immuneCycle < m.cycle + tech.cyclicImmunity) m.immuneCycle = m.cycle + tech.cyclicImmunity; //player is immune to damage for 60 cycles
diff --git a/js/spawn.js b/js/spawn.js
index b7d2d4d..572f5e0 100644
--- a/js/spawn.js
+++ b/js/spawn.js
@@ -666,8 +666,8 @@ const spawn = {
//when player is inside event horizon
if (Vector.magnitude(Vector.sub(this.position, player.position)) < this.eventHorizon) {
if (m.immuneCycle < m.cycle) {
- if (m.energy > 0) m.energy -= 0.015
- if (m.energy < 0.05 && m.immuneCycle < m.cycle) m.damage(0.0005 * simulation.dmgScale);
+ if (m.energy > 0) m.energy -= 0.02
+ if (m.energy < 0.05 && m.immuneCycle < m.cycle) m.damage(0.0004 * simulation.dmgScale);
}
const angle = Math.atan2(player.position.y - this.position.y, player.position.x - this.position.x);
player.force.x -= 0.0017 * Math.cos(angle) * player.mass * (m.onGround ? 1.7 : 1);
@@ -1317,8 +1317,10 @@ const spawn = {
me.onHit = function() { //run this function on hitting player
if (powerUps.ejectTech()) {
powerUps.ejectGraphic("150, 138, 255");
- powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "ammo");
- powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "research");
+ // powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "ammo");
+ // powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "research");
+ this.accelMag *= 1.4
+ Matter.Body.setDensity(this, this.density * 1.4); //normal is 0.001
}
};
me.onDeath = function() {
@@ -1397,8 +1399,10 @@ const spawn = {
me.onHit = function() { //run this function on hitting player
if (powerUps.ejectTech()) {
powerUps.ejectGraphic("150, 138, 255");
- powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "ammo");
- powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "research");
+ // powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "ammo");
+ // powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "research");
+ this.accelMag *= 1.4
+ Matter.Body.setDensity(this, this.density * 1.4); //normal is 0.001
}
};
me.onDeath = function() {
@@ -1874,8 +1878,8 @@ const spawn = {
//when player is inside event horizon
if (Vector.magnitude(Vector.sub(this.position, player.position)) < eventHorizon) {
if (m.immuneCycle < m.cycle) {
- if (m.energy > 0) m.energy -= 0.004
- if (m.energy < 0.1) m.damage(0.00015 * simulation.dmgScale);
+ if (m.energy > 0) m.energy -= 0.005
+ if (m.energy < 0.1) m.damage(0.0001 * simulation.dmgScale);
}
const angle = Math.atan2(player.position.y - this.position.y, player.position.x - this.position.x);
player.force.x -= 0.00125 * player.mass * Math.cos(angle) * (m.onGround ? 1.8 : 1);
@@ -2056,8 +2060,8 @@ const spawn = {
//when player is inside event horizon
if (Vector.magnitude(Vector.sub(this.position, player.position)) < eventHorizon) {
if (m.immuneCycle < m.cycle) {
- if (m.energy > 0) m.energy -= 0.006
- if (m.energy < 0.1) m.damage(0.0002 * simulation.dmgScale);
+ if (m.energy > 0) m.energy -= 0.008
+ if (m.energy < 0.1) m.damage(0.00015 * simulation.dmgScale);
}
const angle = Math.atan2(player.position.y - this.position.y, player.position.x - this.position.x);
player.force.x -= 0.0013 * Math.cos(angle) * player.mass * (m.onGround ? 1.7 : 1);
@@ -3284,9 +3288,9 @@ const spawn = {
mobs.spawn(x, y, 5, 50, "rgb(0,235,255)"); //"rgb(221,102,119)"
let me = mob[mob.length - 1];
Matter.Body.rotate(me, Math.PI * 0.1);
- Matter.Body.setDensity(me, 0.003); //extra dense //normal is 0.001 //makes effective life much larger
+ Matter.Body.setDensity(me, 0.002); //extra dense //normal is 0.001 //makes effective life much larger
me.isBoss = true;
- me.damageReduction = 0.04 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1)
+ me.damageReduction = 0.03 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1)
me.frictionStatic = 0;
me.friction = 0;
@@ -3300,7 +3304,7 @@ const spawn = {
me.grenadeDelay = 100
}
me.pulseRadius = 1.5 * Math.min(550, 200 + simulation.difficulty * 2)
- me.delay = 30 + 35 * simulation.CDScale;
+ me.delay = 35 + 35 * simulation.CDScale;
me.nextBlinkCycle = me.delay;
spawn.shield(me, x, y, 1);
me.onDamage = function() {
@@ -6029,7 +6033,7 @@ const spawn = {
this.cycle++
if (this.seePlayer.recall && ((this.cycle % 15) === 0)) {
if (this.canFire) {
- if (this.cycle > 120) {
+ if (this.cycle > 100) {
this.cycle = 0
this.canFire = false
// Matter.Body.setAngularVelocity(this, 0.1)
diff --git a/js/tech.js b/js/tech.js
index fd5e269..12b3d8b 100644
--- a/js/tech.js
+++ b/js/tech.js
@@ -150,6 +150,7 @@ const tech = {
}
if (tech.tech[index].isLost) tech.tech[index].isLost = false; //give specific tech
+ if (tech.isBanish && tech.tech[index].isBanished) tech.tech[index].isBanished = false //stops the bug where you can't gets stacks of tech you take with decoherence, I think
tech.tech[index].effect(); //give specific tech
tech.tech[index].count++
tech.totalCount++ //used in power up randomization
@@ -218,7 +219,6 @@ const tech = {
if (tech.isAnthropicDamage && tech.isDeathAvoidedThisLevel) dmg *= 2.3703599
if (tech.isDupDamage) dmg *= 1 + Math.min(1, tech.duplicationChance())
if (tech.isDamageForGuns) dmg *= 1 + 0.13 * b.inventory.length
- if (tech.isLowHealthDmg) dmg *= 1 + Math.max(0, 1 - m.health) * 0.5
if (tech.isOneGun && b.inventory.length < 2) dmg *= 1.25
if (tech.isAcidDmg && m.health > 1) dmg *= 1.35;
if (tech.isRerollDamage) dmg *= 1 + 0.038 * powerUps.research.count
@@ -233,10 +233,11 @@ const tech = {
if (tech.isAxion && tech.isHarmMACHO) dmg *= 2 - m.harmReduction()
if (tech.isHarmDamage && m.lastHarmCycle + 600 > m.cycle) dmg *= 3;
if (tech.lastHitDamage && m.lastHit) dmg *= 1 + tech.lastHitDamage * m.lastHit * (2 - m.harmReduction()) // if (!simulation.paused) m.lastHit = 0
+ if (tech.isLowHealthDmg) dmg *= 1 + Math.max(0, 1 - (tech.isEnergyHealth ? m.energy : m.health))
return dmg
},
duplicationChance() {
- return Math.max(0, (tech.isPowerUpsVanish ? 0.12 : 0) + (tech.isStimulatedEmission ? 0.15 : 0) + tech.cancelCount * 0.045 + tech.duplicateChance + 0.05 * tech.isExtraGunField + m.duplicateChance + tech.fieldDuplicate + tech.cloakDuplication + (tech.isAnthropicTech && tech.isDeathAvoidedThisLevel ? 0.5 : 0) + tech.isQuantumEraserDuplication * (1 - 0.016 * (simulation.difficultyMode ** 2))) // + (m.fieldMode === 0 || m.fieldMode === 9) * 0.03 * m.coupling)
+ return Math.max(0, (tech.isPowerUpsVanish ? 0.12 : 0) + (tech.isStimulatedEmission ? 0.15 : 0) + tech.cancelCount * 0.044 + tech.duplicateChance + 0.05 * tech.isExtraGunField + m.duplicateChance + tech.fieldDuplicate + tech.cloakDuplication + (tech.isAnthropicTech && tech.isDeathAvoidedThisLevel ? 0.5 : 0) + tech.isQuantumEraserDuplication * (1 - 0.016 * (simulation.difficultyMode ** 2))) // + (m.fieldMode === 0 || m.fieldMode === 9) * 0.03 * m.coupling)
},
isScaleMobsWithDuplication: false,
maxDuplicationEvent() {
@@ -307,7 +308,9 @@ const tech = {
},
{
name: "ad hoc",
- description: `for each gun in your inventory
spawn a ${powerUps.orb.heal()}, ${powerUps.orb.research(1)}, field, ${powerUps.orb.ammo(1)}, or tech`,
+ descriptionFunction() {
+ return `for each gun in your inventory
spawn a ${powerUps.orb.heal()}, ${powerUps.orb.research(1)}, field, ${powerUps.orb.ammo(1)}, or tech`
+ },
maxCount: 1, //random power up
count: 0,
frequency: 1,
@@ -319,13 +322,13 @@ const tech = {
requires: "NOT EXPERIMENT MODE, at least 2 guns",
effect() {
for (let i = 0; i < b.inventory.length; i++) {
- if (Math.random() < 0.2) {
+ if (Math.random() < 1 / 5) {
powerUps.spawn(m.pos.x + 10 * Math.random(), m.pos.y + 10 * Math.random(), "tech");
- } else if (Math.random() < 0.25) {
+ } else if (Math.random() < 1 / 4) {
powerUps.spawn(m.pos.x + 10 * Math.random(), m.pos.y + 10 * Math.random(), "field");
- } else if (Math.random() < 0.33) {
+ } else if (Math.random() < 1 / 3) {
powerUps.spawn(m.pos.x + 10 * Math.random(), m.pos.y + 10 * Math.random(), "heal");
- } else if (Math.random() < 0.5) {
+ } else if (Math.random() < 1 / 2) {
powerUps.spawn(m.pos.x + 10 * Math.random(), m.pos.y + 10 * Math.random(), "ammo");
} else {
powerUps.spawn(m.pos.x + 10 * Math.random(), m.pos.y + 10 * Math.random(), "research");
@@ -437,10 +440,8 @@ const tech = {
count: 0,
frequency: 1,
frequencyDefault: 1,
- allowed() {
- return !tech.isEnergyHealth
- },
- requires: "not mass-energy",
+ allowed() { return true },
+ requires: "",
effect() {
tech.isFirstOrder = true
setTimeout(function() {
@@ -614,10 +615,8 @@ const tech = {
count: 0,
frequency: 1,
frequencyDefault: 1,
- allowed() {
- return !tech.isEnergyHealth //(tech.crouchAmmoCount || tech.isCrouchRegen) &&
- },
- requires: "not mass-energy",
+ allowed() { return true },
+ requires: "",
effect() {
tech.isTurret = true
},
@@ -720,10 +719,8 @@ const tech = {
count: 0,
frequency: 1,
frequencyDefault: 1,
- allowed() {
- return !tech.isEnergyHealth
- },
- requires: "not mass-energy equivalence",
+ allowed() { return true },
+ requires: "",
effect() {
tech.isSpeedHarm = true //max at speed = 40
},
@@ -933,7 +930,9 @@ const tech = {
},
{
name: "bubble fusion",
- description: `after destroying a mob's natural shield
spawn 1-2 ${powerUps.orb.heal()}, ${powerUps.orb.ammo()}, or ${powerUps.orb.research(1)}`,
+ descriptionFunction() {
+ return `after destroying a mob's natural shield
spawn 1-2 ${powerUps.orb.heal()}, ${powerUps.orb.ammo()}, or ${powerUps.orb.research(1)}`
+ },
maxCount: 1,
count: 0,
frequency: 1,
@@ -995,9 +994,9 @@ const tech = {
frequency: 1,
frequencyDefault: 1,
allowed() {
- return !tech.isEnergyHealth && !tech.isRewindField
+ return !tech.isRewindField
},
- requires: "not mass-energy, retrocausality",
+ requires: "not retrocausality",
effect() {
tech.isNoFireDefense = true
},
@@ -1445,7 +1444,7 @@ const tech = {
frequencyDefault: 2,
isBotTech: true,
allowed() {
- return b.totalBots() > 1 && !tech.isEnergyHealth
+ return b.totalBots() > 1
},
requires: "at least 2 bots",
effect() {
@@ -1710,7 +1709,9 @@ const tech = {
// },
{
name: "buckling",
- description: `if a block you threw kills a mob
spawn either ${powerUps.orb.heal()}, ${powerUps.orb.ammo()}, or ${powerUps.orb.research(1)}`,
+ descriptionFunction() {
+ return `if a block you threw kills a mob
spawn either ${powerUps.orb.heal()}, ${powerUps.orb.ammo()}, or ${powerUps.orb.research(1)}`
+ },
maxCount: 1,
count: 0,
frequency: 3,
@@ -1766,8 +1767,8 @@ const tech = {
description: "if flip-flop is OFF
become invulnerable to your next collision",
maxCount: 1,
count: 0,
- frequency: 4,
- frequencyDefault: 4,
+ frequency: 3,
+ frequencyDefault: 3,
allowed() {
return tech.isFlipFlop
},
@@ -1781,15 +1782,17 @@ const tech = {
},
{
name: "shape-memory alloy",
- description: `if flip-flop is ON
+400 maximum health and +100% ${powerUps.orb.heal()} effect`,
+ descriptionFunction() {
+ return `if flip-flop is ON
+400 maximum health and +100% ${powerUps.orb.heal()} effect`
+ },
maxCount: 1,
count: 0,
- frequency: 4,
- frequencyDefault: 4,
+ frequency: 3,
+ frequencyDefault: 3,
allowed() {
- return tech.isFlipFlop && !tech.isEnergyHealth
+ return tech.isFlipFlop
},
- requires: "flip-flop, not mass-energy equivalence",
+ requires: "flip-flop",
effect() {
tech.isFlipFlopHealth = true;
m.setMaxHealth();
@@ -1875,8 +1878,8 @@ const tech = {
description: "if ON
+55.5% damage",
maxCount: 1,
count: 0,
- frequency: 4,
- frequencyDefault: 4,
+ frequency: 3,
+ frequencyDefault: 3,
allowed() {
return tech.isFlipFlop || tech.isRelay
},
@@ -1893,8 +1896,8 @@ const tech = {
description: "if ON +7 power up choices
if OFF -1 power up choices",
maxCount: 1,
count: 0,
- frequency: 4,
- frequencyDefault: 4,
+ frequency: 3,
+ frequencyDefault: 3,
allowed() {
return (tech.isFlipFlop || tech.isRelay) && !tech.isDeterminism
},
@@ -1911,8 +1914,8 @@ const tech = {
description: "if ON generate +20 energy per second
if OFF drain -1 energy per second",
maxCount: 1,
count: 0,
- frequency: 4,
- frequencyDefault: 4,
+ frequency: 3,
+ frequencyDefault: 3,
allowed() {
return tech.isFlipFlop || tech.isRelay
},
@@ -1933,8 +1936,8 @@ const tech = {
},
maxCount: 1,
count: 0,
- frequency: 4,
- frequencyDefault: 4,
+ frequency: 3,
+ frequencyDefault: 3,
bonus: 5, //coupling given
allowed() {
return tech.isFlipFlop || tech.isRelay
@@ -2024,8 +2027,8 @@ const tech = {
description: "if relay switch is ON
+300 maximum energy",
maxCount: 1,
count: 0,
- frequency: 4,
- frequencyDefault: 4,
+ frequency: 3,
+ frequencyDefault: 3,
allowed() {
return tech.isRelay
},
@@ -2044,8 +2047,8 @@ const tech = {
description: "if relay switch is ON
condense 4-13 ice IX crystals per second",
maxCount: 9,
count: 0,
- frequency: 4,
- frequencyDefault: 4,
+ frequency: 3,
+ frequencyDefault: 3,
allowed() {
return tech.isRelay
},
@@ -2100,10 +2103,8 @@ const tech = {
count: 0,
frequency: 1,
frequencyDefault: 1,
- allowed() {
- return !tech.isEnergyHealth
- },
- requires: "not mass-energy",
+ allowed() { return true },
+ requires: "",
effect() {
tech.isMACHO = true; //this harm reduction comes from the particle toggling tech.isHarmMACHO
spawn.MACHO()
@@ -2159,10 +2160,8 @@ const tech = {
count: 0,
frequency: 1,
frequencyDefault: 1,
- allowed() {
- return !tech.isEnergyHealth
- },
- requires: "not mass-energy",
+ allowed() { return true },
+ requires: "",
effect() {
tech.isHarmArmor = true;
},
@@ -2179,9 +2178,9 @@ const tech = {
frequency: 1,
frequencyDefault: 1,
allowed() {
- return m.maxEnergy > 0.99 && m.fieldUpgrades[m.fieldMode].name !== "standing wave" && !tech.isEnergyHealth && !tech.isRewindField //&& !tech.isRewindGun
+ return m.maxEnergy > 0.99 && m.fieldUpgrades[m.fieldMode].name !== "standing wave" && !tech.isRewindField && !tech.isEnergyHealth
},
- requires: "not standing wave, mass-energy, max energy reduction, retrocausality",
+ requires: "not standing wave, max energy reduction, retrocausality, mass-energy",
effect() {
tech.isRewindAvoidDeath = true;
},
@@ -2250,15 +2249,15 @@ const tech = {
{
name: "mass-energy equivalence",
// description: "energy protects you instead of health
√ of defense reduction reduces max energy",
- description: "energy protects you instead of health
defense provides no benefit",
+ description: "energy protects you instead of health
exponentially reduced defense (x^0.1)",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
- return !tech.isZeno && !tech.isNoHeals && !tech.isPiezo && !tech.isRewindAvoidDeath && !tech.isMutualism //&& !tech.isAmmoFromHealth && !tech.isRewindGun
+ return !tech.isPiezo && !tech.isRewindAvoidDeath && !tech.isAnnihilation //&& !tech.isAmmoFromHealth && !tech.isRewindGun
},
- requires: "not Zeno, ergodicity, piezoelectricity, CPT, mutualism",
+ requires: "not piezoelectricity, CPT, annihilation",
effect() {
m.health = 0
document.getElementById("health").style.display = "none"
@@ -2287,7 +2286,7 @@ const tech = {
// description: `after you collect ${powerUps.orb.heal()}
+${0.1 * tech.largerHeals} maximum energy`,
// descriptionFunction: `convert current and future ${powerUps.orb.heal()} into
give +${10 * tech.largerHeals} maximum energy`,
descriptionFunction() {
- return `convert current and future ${powerUps.orb.heal()} into
give +${8 * tech.largerHeals} maximum energy`
+ return `convert current and future into
give +${8 * tech.largerHeals} maximum energy`
},
maxCount: 1,
count: 0,
@@ -2298,14 +2297,14 @@ const tech = {
},
requires: "mass-energy equivalence",
effect() {
- tech.healGiveMaxEnergy = true; //tech.healMaxEnergyBonus given from heal power up
+ powerUps.healGiveMaxEnergy = true; //tech.healMaxEnergyBonus given from heal power up
powerUps.heal.color = "#ff0" //"#0ae"
for (let i = 0; i < powerUp.length; i++) { //find active heal power ups and adjust color live
if (powerUp[i].name === "heal") powerUp[i].color = powerUps.heal.color
}
},
remove() {
- tech.healGiveMaxEnergy = false;
+ powerUps.healGiveMaxEnergy = false;
// tech.healMaxEnergyBonus = 0
powerUps.heal.color = "#0eb"
for (let i = 0; i < powerUp.length; i++) { //find active heal power ups and adjust color live
@@ -2557,10 +2556,8 @@ const tech = {
frequency: 1,
frequencyDefault: 1,
isHealTech: true,
- allowed() {
- return !tech.isEnergyHealth
- },
- requires: "not mass-energy equivalence",
+ allowed() { return true },
+ requires: "",
effect() {
tech.isHealthRecovery = true;
},
@@ -2598,10 +2595,8 @@ const tech = {
count: 0,
frequency: 1,
frequencyDefault: 1,
- allowed() {
- return !tech.isEnergyHealth
- },
- requires: "not mass-energy",
+ allowed() { return true },
+ requires: "",
effect() {
tech.isHarmReduceNoKill = true;
},
@@ -2611,14 +2606,17 @@ const tech = {
},
{
name: "Zeno's paradox",
- description: "+85% defense
–5% of current health every 5 seconds",
+ descriptionFunction() {
+ return `+85% defense
–5% of current ${tech.isEnergyHealth ? "energy": "health"} every 5 seconds`
+ },
+ // description: "+85% defense
–5% of current health every 5 seconds",
// description: "every 5 seconds remove 1/10 of your health
reduce defense by 90%",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
- allowed() { return !tech.isEnergyHealth },
- requires: "not mass-energy",
+ allowed() { return true },
+ requires: "",
effect() {
tech.isZeno = true;
},
@@ -2628,7 +2626,9 @@ const tech = {
},
{
name: "negative feedback",
- description: `for each health below 100
+0.5% damage`,
+ descriptionFunction() {
+ return `for each ${tech.isEnergyHealth ? "energy": "health"} below 100
+0.7% damage (${(100*Math.max(0, 1 - (tech.isEnergyHealth ? m.energy : m.health))).toFixed(0)}%)`
+ },
maxCount: 1,
count: 0,
frequency: 1,
@@ -2652,9 +2652,9 @@ const tech = {
frequency: 1,
frequencyDefault: 1,
allowed() {
- return (m.health < 0.6 || build.isExperimentSelection) && !tech.isEnergyHealth
+ return m.health < 0.6 || build.isExperimentSelection
},
- requires: "health below 60, not mass-energy",
+ requires: "health below 60",
effect() {
tech.isLowHealthDefense = true;
},
@@ -2662,34 +2662,19 @@ const tech = {
tech.isLowHealthDefense = false;
}
},
- // {
- // name: "overshoot", //annoying to code because you'd have to update fire rate too often
- // descriptionFunction() { return `for each ${tech.isEnergyHealth ? "energy" : "health"} below 100
+2% fire rate` },
- // maxCount: 1,
- // count: 0,
- // frequency: 1,
- // frequencyDefault: 1,
- // allowed() {
- // return m.health < 0.5 || build.isExperimentSelection
- // },
- // requires: "health below 60",
- // effect() {
- // tech.isLowHealthFireRate = true;
- // },
- // remove() {
- // tech.isLowHealthFireRate = false;
- // }
- // },
{
name: "antiscience",
- description: "+90% damage
–12 health after picking up a tech",
+ descriptionFunction() {
+ return `+66% damage
–10 ${tech.isEnergyHealth ? "energy": "health"} after picking up a tech`
+ },
+ // description: "+66% damage
–10 health after picking up a tech",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() { return true },
requires: "",
- damage: 1.9,
+ damage: 1.66,
effect() {
tech.damage *= this.damage
tech.isTechDamage = true;
@@ -2724,10 +2709,8 @@ const tech = {
count: 0,
frequency: 1,
frequencyDefault: 1,
- allowed() {
- return !tech.isEnergyHealth
- },
- requires: "not mass-energy equivalence",
+ allowed() { return true },
+ requires: "",
effect() {
tech.isFallingDamage = true;
m.setMaxHealth();
@@ -2740,15 +2723,15 @@ const tech = {
},
{
name: "quenching",
- description: `after over healing from ${powerUps.orb.heal()}
gain max health and lose current health`,
+ descriptionFunction() {
+ return `after over healing from ${powerUps.orb.heal()}
gain max health and lose current health`
+ },
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
- allowed() {
- return !tech.isEnergyHealth && !tech.isNoHeals
- },
- requires: "not mass-energy equivalence, ergodicity",
+ allowed() { return true },
+ requires: "",
effect() {
tech.isOverHeal = true;
},
@@ -2758,16 +2741,16 @@ const tech = {
},
{
name: "negative entropy",
- description: `at the start of each level
for every 29 missing health spawn ${powerUps.orb.heal()}`,
+ descriptionFunction() {
+ return `at the start of each level
for every 33% missing ${tech.isEnergyHealth ? "energy": "health"} spawn ${powerUps.orb.heal()}`
+ },
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
isHealTech: true,
- allowed() {
- return !tech.isNoHeals
- },
- requires: "not ergodicity",
+ allowed() { return true },
+ requires: "",
effect() {
tech.isHealLowHealth = true;
},
@@ -2777,16 +2760,18 @@ const tech = {
},
{
name: "adiabatic healing",
- description: `${powerUps.orb.heal()} are 100% more effective
+5% JUNK to tech pool`,
+ descriptionFunction() {
+ return `${powerUps.orb.heal()} have +100% effect
+5% JUNK to tech pool`
+ },
maxCount: 3,
count: 0,
frequency: 1,
frequencyDefault: 1,
isHealTech: true,
allowed() {
- return ((m.health / m.maxHealth) < 0.7 || build.isExperimentSelection) && !tech.isNoHeals
+ return (m.health / m.maxHealth) < 0.7 || build.isExperimentSelection
},
- requires: "under 70% health, not ergodicity",
+ requires: "under 70% health",
effect() {
tech.largerHeals++;
for (let i = 0; i < powerUp.length; i++) {
@@ -2816,18 +2801,55 @@ const tech = {
}
}
},
+ {
+ name: "ergodicity",
+ descriptionFunction() {
+ return `${powerUps.orb.heal()} have -50% effect
+66% damage`
+ },
+ maxCount: 1,
+ count: 0,
+ frequency: 1,
+ frequencyDefault: 1,
+ allowed() { return true },
+ requires: "",
+ damage: 1.66,
+ effect() {
+ tech.damage *= this.damage
+ tech.isHalfHeals = true;
+ for (let i = 0; i < powerUp.length; i++) {
+ if (powerUp[i].name === "heal") {
+ const scale = Math.sqrt(0.5)
+ powerUp[i].size *= scale
+ Matter.Body.scale(powerUp[i], scale, scale); //grow
+ }
+ }
+ },
+ remove() {
+ if (this.count) {
+ tech.damage /= this.damage
+ for (let i = 0; i < powerUp.length; i++) {
+ if (powerUp[i].name === "heal") {
+ const scale = 1 / Math.sqrt(0.5)
+ powerUp[i].size *= scale
+ Matter.Body.scale(powerUp[i], scale, scale); //grow
+ }
+ }
+ }
+ tech.isHalfHeals = false;
+ }
+ },
{
name: "enthalpy",
- description: `doing damage has a chance to spawn ${powerUps.orb.heal(1)}
–10% defense`,
+ descriptionFunction() {
+ return `doing damage has a chance to spawn ${powerUps.orb.heal(1)}
–10% defense`
+ },
maxCount: 9,
count: 0,
frequency: 1,
frequencyDefault: 1,
isHealTech: true,
- allowed() {
- return !tech.isNoHeals
- },
- requires: "not ergodicity",
+ allowed() { return true },
+ requires: "",
effect() {
tech.healthDrain += 0.02;
},
@@ -2835,40 +2857,11 @@ const tech = {
tech.healthDrain = 0;
}
},
- {
- name: "ergodicity",
- description: `+91% damage
${powerUps.orb.heal()} have no effect`,
- maxCount: 1,
- count: 0,
- frequency: 1,
- frequencyDefault: 1,
- allowed() {
- return !tech.isEnergyHealth && !tech.healthDrain
- },
- requires: "not mass-energy, enthalpy",
- damage: 1.91,
- effect() {
- tech.damage *= this.damage
- tech.isNoHeals = true;
- powerUps.heal.color = "#abb"
- for (let i = 0; i < powerUp.length; i++) { //find active heal power ups and adjust color live
- if (powerUp[i].name === "heal") powerUp[i].color = powerUps.heal.color
- }
- },
- remove() {
- if (this.count) {
- tech.damage /= this.damage
- powerUps.heal.color = "#0eb"
- for (let i = 0; i < powerUp.length; i++) { //find active heal power ups and adjust color live
- if (powerUp[i].name === "heal") powerUp[i].color = powerUps.heal.color
- }
- }
- tech.isNoHeals = false;
- }
- },
{
name: "maintenance",
- description: `double the frequency of finding healing tech
spawn ${powerUps.orb.heal(13)}`,
+ descriptionFunction() {
+ return `double the frequency of finding healing tech
spawn ${powerUps.orb.heal(13)}`
+ },
maxCount: 1,
count: 0,
frequency: 1,
@@ -2893,7 +2886,9 @@ const tech = {
powerUps.research.changeRerolls(0)
}, 1000);
},
- description: `once per level, instead of dying
use ${powerUps.orb.research(1)} and spawn ${powerUps.orb.heal(5)}`,
+ descriptionFunction() {
+ return `once per level, instead of dying
use ${powerUps.orb.research(1)} and spawn ${powerUps.orb.heal(5)}`
+ },
maxCount: 1,
count: 0,
frequency: 1,
@@ -3011,7 +3006,7 @@ const tech = {
{
name: "Ψ(t) collapse",
link: `Ψ(t) collapse`,
- description: `after you research enter an alternate reality
spawn ${powerUps.orb.research(17)}`,
+ description: `after you research enter an alternate reality
spawn ${powerUps.orb.research(16)}`,
maxCount: 1,
count: 0,
frequency: 1,
@@ -3020,7 +3015,7 @@ const tech = {
return !tech.isSwitchReality && !tech.isCollisionRealitySwitch && !tech.isJunkResearch
},
requires: "not many-worlds, Hilbert space, pseudoscience",
- bonusResearch: 17,
+ bonusResearch: 16,
effect() {
tech.isResearchReality = true;
for (let i = 0; i < this.bonusResearch; i++) powerUps.spawn(m.pos.x + Math.random() * 60, m.pos.y + Math.random() * 60, "research", false);
@@ -3032,7 +3027,7 @@ const tech = {
},
{
name: "decoherence",
- description: `tech options you don't choose won't reoccur
spawn ${powerUps.orb.research(7)}`,
+ description: `tech options you don't choose won't reoccur
spawn ${powerUps.orb.research(6)}`,
maxCount: 1,
count: 0,
frequency: 1,
@@ -3041,7 +3036,7 @@ const tech = {
return !tech.isSuperDeterminism
},
requires: "not superdeterminism",
- bonusResearch: 7,
+ bonusResearch: 6,
effect() {
tech.isBanish = true
for (let i = 0; i < this.bonusResearch; i++) powerUps.spawn(m.pos.x + 40 * (Math.random() - 0.5), m.pos.y + 40 * (Math.random() - 0.5), "research", false);
@@ -3136,7 +3131,7 @@ const tech = {
},
{
name: "pseudoscience",
- description: "when selecting a power up, research 3 times
for free, but add 1-3% JUNK to the tech pool",
+ description: "when selecting a power up, research 3 times
for free, but add 1-4% JUNK to the tech pool",
maxCount: 1,
count: 0,
frequency: 1,
@@ -3193,7 +3188,7 @@ const tech = {
},
{
name: "emergence",
- description: "tech, fields, and guns have +2 choices
+4% JUNK to tech pool",
+ description: "tech, fields, and guns have +2 choices
+3% JUNK to tech pool",
maxCount: 9,
count: 0,
frequency: 1,
@@ -3204,7 +3199,7 @@ const tech = {
requires: "not determinism",
effect() {
tech.extraChoices += 2;
- this.refundAmount += tech.addJunkTechToPool(0.04)
+ this.refundAmount += tech.addJunkTechToPool(0.03)
},
refundAmount: 0,
remove() {
@@ -3218,7 +3213,7 @@ const tech = {
{
name: "path integral",
link: `path integral`,
- description: "your next tech choice
presents every possible option",
+ description: "your next tech choice has all possible options
+5% JUNK to tech pool",
maxCount: 1,
count: 0,
frequency: 1,
@@ -3230,9 +3225,15 @@ const tech = {
effect() {
tech.tooManyTechChoices = 1
// for (let i = 0; i < this.bonusResearch; i++) powerUps.spawn(m.pos.x + 40 * (Math.random() - 0.5), m.pos.y + 40 * (Math.random() - 0.5), "research", false);
+ this.refundAmount += tech.addJunkTechToPool(0.05)
},
+ refundAmount: 0,
remove() {
tech.tooManyTechChoices = 0
+ if (this.count > 0 && this.refundAmount > 0) {
+ tech.removeJunkTechFromPool(this.refundAmount)
+ this.refundAmount = 0
+ }
}
},
{
@@ -3254,7 +3255,7 @@ const tech = {
for (let i = 0; i < 5; i++) powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "tech");
},
remove() {
- tech.isDeterminism = false;
+ if (!this.count) tech.isDeterminism = false;
}
},
{
@@ -3262,8 +3263,8 @@ const tech = {
description: `spawn 5 tech
you have no cancel and ${powerUps.orb.research(1)} no longer spawn`,
maxCount: 1,
count: 0,
- frequency: 4,
- frequencyDefault: 4,
+ frequency: 3,
+ frequencyDefault: 3,
isBadRandomOption: true,
isNonRefundable: true,
allowed() {
@@ -3299,7 +3300,7 @@ const tech = {
},
{
name: "abiogenesis",
- description: `use ${powerUps.orb.research(4)} (or 49% JUNK to the tech pool if you can't) to add a 2nd boss to each level`,
+ // description: `use ${powerUps.orb.research(4)}(or 49% JUNK to the tech pool if you can't) to add a 2nd boss to each level`,
description: `as a level begins spawn a 2nd boss using ${powerUps.orb.research(4)}
(+49% JUNK to the tech pool if you can't pay)`,
maxCount: 1,
count: 0,
@@ -3418,7 +3419,7 @@ const tech = {
},
{
name: "paradigm shift",
- description: `clicking tech while paused ejects them
16% chance to remove without ejecting`,
+ description: `clicking tech while paused ejects them
20% chance to remove without ejecting`,
maxCount: 1,
count: 0,
frequency: 1,
@@ -3553,19 +3554,15 @@ const tech = {
isNonRefundable: true,
allowed: () => true,
requires: "",
- // allowed() { return !build.isExperimentSelection },
- // requires: "NOT EXPERIMENT MODE",
value: 60,
effect() {
tech.isCouplingNoHit = true
powerUps.spawnDelay("coupling", this.value)
},
remove() {
- // if (this.count) {
- // m.couplingChange(-this.value)
- // } else {
- // this.maxCount = 1 //reset only take this once per game
- // }
+ if (this.count) {
+ m.couplingChange(-this.value)
+ }
tech.isCouplingNoHit = false
}
},
@@ -3591,7 +3588,9 @@ const tech = {
},
{
name: "commodities exchange",
- description: `clicking × to cancel a field, tech, or gun
spawns 5-10 ${powerUps.orb.heal()}, ${powerUps.orb.ammo()}, or ${powerUps.orb.research(1)}`,
+ descriptionFunction() {
+ return `clicking × to cancel a field, tech, or gun
spawns 5-10 ${powerUps.orb.heal()}, ${powerUps.orb.ammo()}, or ${powerUps.orb.research(1)}`
+ },
maxCount: 1,
count: 0,
frequency: 1,
@@ -3628,7 +3627,10 @@ const tech = {
},
{
name: "futures exchange",
- description: "clicking × to cancel a field, tech, or gun
gives +4.5% power up duplication chance",
+ description: "clicking × to cancel a field, tech, or gun
gives +4.4% power up duplication chance",
+ // descriptionFunction() {
+ // return `clicking × to cancel a field, tech, or gun
gives +${4.9 - 0.15*simulation.difficultyMode}% power up duplication chance`
+ // },
maxCount: 1,
count: 0,
frequency: 1,
@@ -3756,8 +3758,8 @@ const tech = {
description: `when you reach 100% duplication
spawn 11 bosses with 100% more durability`,
maxCount: 1,
count: 0,
- frequency: 6,
- frequencyDefault: 6,
+ frequency: 3,
+ frequencyDefault: 3,
isNonRefundable: true,
allowed() {
return tech.duplicationChance() > 0.5
@@ -3927,8 +3929,10 @@ const tech = {
}
},
remove() {
- for (let i = 0, len = tech.tech.length; i < len; i++) {
- if (tech.tech[i].count > 0 && tech.tech[i].frequency > 1) tech.tech[i].frequency /= 10
+ if (this.count) {
+ for (let i = 0, len = tech.tech.length; i < len; i++) {
+ if (tech.tech[i].count > 0 && tech.tech[i].frequency > 1) tech.tech[i].frequency /= 10
+ }
}
}
},
@@ -4027,7 +4031,7 @@ const tech = {
frequency: 2,
frequencyDefault: 2,
allowed() {
- return ((tech.haveGunCheck("nail gun") && !tech.nailInstantFireRate && !tech.nailRecoil) || (tech.haveGunCheck("shotgun") && !tech.isNailShot && !tech.isFoamShot && !tech.isSporeWorm && !tech.isSporeFlea)) && !tech.isRivets && !tech.isIncendiary && !tech.isIceCrystals && !tech.isIceShot
+ return ((tech.haveGunCheck("nail gun") && !tech.nailInstantFireRate && !tech.nailRecoil && !tech.isRicochet) || (tech.haveGunCheck("shotgun") && !tech.isNailShot && !tech.isFoamShot && !tech.isSporeWorm && !tech.isSporeFlea)) && !tech.isRivets && !tech.isIncendiary && !tech.isIceCrystals && !tech.isIceShot
},
requires: "nail gun, shotgun, not ice crystal, rivets, rotary cannon, or pneumatic, incendiary, nail-shot, rivets, foam-shot, worm-shot, ice-shot",
effect() {
@@ -4066,7 +4070,7 @@ const tech = {
frequency: 2,
frequencyDefault: 2,
allowed() {
- return ((tech.haveGunCheck("nail gun") && !tech.nailInstantFireRate) || (tech.haveGunCheck("shotgun") && !tech.isNailShot && !tech.isFoamShot && !tech.isSporeWorm && !tech.isSporeFlea)) && !tech.isNeedles && !tech.isIceCrystals && !tech.isIceShot
+ return ((tech.haveGunCheck("nail gun") && !tech.nailInstantFireRate && !tech.isRicochet) || (tech.haveGunCheck("shotgun") && !tech.isNailShot && !tech.isFoamShot && !tech.isSporeWorm && !tech.isSporeFlea)) && !tech.isNeedles && !tech.isIceCrystals && !tech.isIceShot
},
requires: "nail gun, shotgun, not ice crystal, needles, or pneumatic actuator",
effect() {
@@ -5122,9 +5126,9 @@ const tech = {
frequency: 2,
frequencyDefault: 2,
allowed() {
- return !tech.isSmartRadius && !tech.isExplodeRadio && tech.hasExplosiveDamageCheck() && !tech.isEnergyHealth
+ return !tech.isSmartRadius && !tech.isExplodeRadio && tech.hasExplosiveDamageCheck()
},
- requires: "an explosive damage source, not iridium-192, mass-energy",
+ requires: "an explosive damage source, not iridium-192",
effect() {
tech.isImmuneExplosion = true;
},
@@ -5541,9 +5545,9 @@ const tech = {
frequency: 2,
frequencyDefault: 2,
allowed() {
- return (tech.haveGunCheck("spores") || tech.sporesOnDeath > 0 || (m.fieldUpgrades[m.fieldMode].name === "molecular assembler" && simulation.molecularMode === 0)) && !tech.isEnergyHealth || tech.isSporeWorm || tech.isSporeFlea
+ return (tech.haveGunCheck("spores") || tech.sporesOnDeath > 0 || (m.fieldUpgrades[m.fieldMode].name === "molecular assembler" && simulation.molecularMode === 0)) || tech.isSporeWorm || tech.isSporeFlea
},
- requires: "spores, not mass-energy",
+ requires: "spores",
effect() {
tech.isMutualism = true
},
@@ -6814,25 +6818,31 @@ const tech = {
tech.isBlockRadiation = false;
}
},
- // {
- // name: "triple point",
- // description: "deflecting condenses ice IX crystals",
- // isFieldTech: true,
- // maxCount: 9,
- // count: 0,
- // frequency: 2,
- // frequencyDefault: 2,
- // allowed() {
- // return m.fieldUpgrades[m.fieldMode].name === "standing wave" || m.fieldUpgrades[m.fieldMode].name === "perfect diamagnetism"
- // },
- // requires: "standing wave, perfect diamagnetism",
- // effect() {
- // tech.blockingIce++
- // },
- // remove() {
- // tech.blockingIce = 0;
- // }
- // },
+ {
+ name: "triple point",
+ descriptionFunction() {
+ return `+1.5 second ice IX freeze effect
spawn ${powerUps.orb.coupling(10)} that each give +0.1 coupling
${ m.couplingDescription(1)} ${m.fieldMode === 0 ? "" : "per coupling"}`
+ },
+ isFieldTech: true,
+ maxCount: 3,
+ count: 0,
+ frequency: 2,
+ frequencyDefault: 2,
+ allowed() {
+ return m.fieldUpgrades[m.fieldMode].name === "standing wave" || m.fieldUpgrades[m.fieldMode].name === "perfect diamagnetism"
+ },
+ requires: "standing wave, perfect diamagnetism",
+ effect() {
+ tech.iceIXFreezeTime += 90
+ powerUps.spawnDelay("coupling", 10)
+ },
+ remove() {
+ tech.iceIXFreezeTime = 150
+ if (this.count) {
+ m.couplingChange(-this.count)
+ }
+ }
+ },
{
name: "flux pinning",
description: "after deflecting a mob
it is stunned for up to 4 seconds",
@@ -6900,9 +6910,9 @@ const tech = {
frequency: 3,
frequencyDefault: 3,
allowed() {
- return (m.fieldUpgrades[m.fieldMode].name === "pilot wave" || m.fieldUpgrades[m.fieldMode].name === "perfect diamagnetism" || m.fieldUpgrades[m.fieldMode].name === "negative mass") && (build.isExperimentSelection || powerUps.research.count > 3) && !tech.isEnergyHealth
+ return (m.fieldUpgrades[m.fieldMode].name === "pilot wave" || m.fieldUpgrades[m.fieldMode].name === "perfect diamagnetism" || m.fieldUpgrades[m.fieldMode].name === "negative mass") && (build.isExperimentSelection || powerUps.research.count > 3)
},
- requires: "perfect diamagnetism, negative mass, pilot wave, not mass energy",
+ requires: "perfect diamagnetism, negative mass, pilot wave",
effect() {
tech.isFieldHarmReduction = true
for (let i = 0; i < 2; i++) {
@@ -6962,9 +6972,9 @@ const tech = {
frequency: 2,
frequencyDefault: 2,
allowed() {
- return m.fieldUpgrades[m.fieldMode].name === "negative mass" && !tech.isEnergyHealth
+ return m.fieldUpgrades[m.fieldMode].name === "negative mass"
},
- requires: "negative mass, not mass-energy",
+ requires: "negative mass",
effect() {
tech.isNeutronium = true
tech.baseFx *= 0.8
@@ -6990,9 +7000,9 @@ const tech = {
frequency: 2,
frequencyDefault: 2,
allowed() {
- return m.fieldUpgrades[m.fieldMode].name === "negative mass"
+ return m.fieldUpgrades[m.fieldMode].name === "negative mass" && !tech.isEnergyHealth
},
- requires: "negative mass",
+ requires: "negative mass, not mass-energy",
effect() {
tech.isAnnihilation = true
},
@@ -7286,9 +7296,9 @@ const tech = {
frequency: 2,
frequencyDefault: 2,
allowed() {
- return (m.fieldUpgrades[m.fieldMode].name === "plasma torch" || m.fieldUpgrades[m.fieldMode].name === "molecular assembler" || m.fieldUpgrades[m.fieldMode].name === "perfect diamagnetism" || m.fieldUpgrades[m.fieldMode].name === "pilot wave") && !tech.isEnergyHealth
+ return (m.fieldUpgrades[m.fieldMode].name === "plasma torch" || m.fieldUpgrades[m.fieldMode].name === "molecular assembler" || m.fieldUpgrades[m.fieldMode].name === "perfect diamagnetism" || m.fieldUpgrades[m.fieldMode].name === "pilot wave")
},
- requires: "molecular assembler, plasma torch, perfect diamagnetism, pilot wave, not mass-energy",
+ requires: "molecular assembler, plasma torch, perfect diamagnetism, pilot wave",
effect() {
tech.isHarmReduce = true
},
@@ -7448,9 +7458,9 @@ const tech = {
frequency: 1,
frequencyDefault: 1,
allowed() {
- return m.fieldUpgrades[m.fieldMode].name === "time dilation" && !m.isShipMode && !tech.isRewindAvoidDeath && !tech.isEnergyHealth && !tech.isTimeSkip
+ return m.fieldUpgrades[m.fieldMode].name === "time dilation" && !m.isShipMode && !tech.isRewindAvoidDeath && !tech.isTimeSkip
},
- requires: "time dilation, not CPT symmetry, mass-energy",
+ requires: "time dilation, not CPT symmetry",
effect() {
tech.isRewindField = true;
m.fieldUpgrades[m.fieldMode].set()
@@ -7580,7 +7590,6 @@ const tech = {
{
name: "symbiosis",
descriptionFunction() { return `after a boss dies spawn a tech, ${powerUps.orb.ammo(1)}, ${powerUps.orb.research(1)}, and ${powerUps.orb.heal(1)}
after a mob dies –0.5 maximum ${tech.isEnergyHealth ? "energy" : "health"}` },
- // description: `after a boss dies spawn a tech, ${powerUps.orb.ammo(1)}, ${powerUps.orb.research(1)}, and ${powerUps.orb.heal(1)}
after a mob dies –0.5 maximum health`,
isFieldTech: true,
maxCount: 1,
count: 0,
@@ -7643,7 +7652,7 @@ const tech = {
{
name: "dazzler",
link: `dazzler`,
- description: "after decloaking stun nearby mobs
for –15 energy",
+ description: "after decloaking stun nearby mobs
and drain –15 energy",
isFieldTech: true,
maxCount: 1,
count: 0,
@@ -7733,7 +7742,7 @@ const tech = {
},
{
name: "WIMPs",
- description: `at the end of each level spawn ${powerUps.orb.research(5)}
and a dangerous particle that slowly chases you`,
+ description: `at the end of each level spawn ${powerUps.orb.research(4)}
and a dangerous particle that slowly chases you`,
isFieldTech: true,
maxCount: 9,
count: 0,
@@ -7746,7 +7755,7 @@ const tech = {
effect() {
tech.wimpCount++
spawn.WIMP()
- for (let j = 0, len = 5; j < len; j++) powerUps.spawn(level.exit.x + 100 * (Math.random() - 0.5), level.exit.y - 100 + 100 * (Math.random() - 0.5), "research", false)
+ for (let j = 0, len = 4; j < len; j++) powerUps.spawn(level.exit.x + 100 * (Math.random() - 0.5), level.exit.y - 100 + 100 * (Math.random() - 0.5), "research", false)
},
remove() {
tech.wimpCount = 0
@@ -8084,23 +8093,23 @@ const tech = {
//************************************************** JUNK
//************************************************** tech
//**************************************************
- {
- name: "junk",
- description: "",
- maxCount: 9,
- count: 0,
- frequency: 0,
- isNonRefundable: true,
- isJunk: true,
- allowed() {
- return true
- },
- requires: "",
- effect() {
+ // {
+ // name: "junk",
+ // description: "",
+ // maxCount: 9,
+ // count: 0,
+ // frequency: 0,
+ // isNonRefundable: true,
+ // isJunk: true,
+ // allowed() {
+ // return true
+ // },
+ // requires: "",
+ // effect() {
- },
- remove() {}
- },
+ // },
+ // remove() {}
+ // },
{
name: "swap meet",
description: "normal tech become JUNK
and JUNK become normal tech",
@@ -8427,12 +8436,8 @@ const tech = {
isJunk: true,
allowed: () => true,
requires: "",
- effect() {
-
- },
- remove() {
-
- }
+ effect() {},
+ remove() {}
},
{
name: "brainstorm",
@@ -8874,16 +8879,16 @@ const tech = {
},
{
name: "hidden variable",
- description: `spawn ${powerUps.orb.heal(20)}
but hide your health bar`,
+ descriptionFunction() {
+ return `spawn ${powerUps.orb.heal(20)}
but hide your health bar`
+ },
maxCount: 1,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
- allowed() {
- return !tech.isEnergyHealth
- },
- requires: "not mass-energy",
+ allowed() { return true },
+ requires: "",
effect() {
document.getElementById("health").style.display = "none"
document.getElementById("health-bg").style.display = "none"
@@ -10008,10 +10013,7 @@ const tech = {
},
requires: "at least 4 research",
effect() {
- const dist = 10 * powerUps.research.count + 100
- for (let i = 0; i < powerUps.research.count; i++) {
- powerUps.directSpawn(m.pos.x + dist * (Math.random() - 0.5), m.pos.y + dist * (Math.random() - 0.5), "research");
- }
+ powerUps.spawnDelay("research", powerUps.research.count);
powerUps.research.count = 0
},
remove() {}
@@ -10058,28 +10060,6 @@ const tech = {
},
remove() {}
},
- {
- name: "JUNKie", //just crashes the game
- description: "all junk",
- maxCount: 1,
- count: 0,
- frequency: 1,
- frequencyDefault: 1,
- isNonRefundable: true,
- isJunk: true,
- allowed() { return true },
- requires: "",
- effect() {
-
- for (let i = 0, len = tech.tech.length; i < len; i++) {
- if (tech.tech[i].isJunk && tech.tech[i].count < tech.tech[i].maxCount) tech.tech[i].effect()
- }
-
- },
- remove() {
- tech.tooManyTechChoices = 0
- }
- },
{
name: "rule 30",
maxCount: 1,
@@ -10105,6 +10085,7 @@ const tech = {
if (!state[a] && !state[b] && !state[c]) return false; //FFF => F
},
id: 0,
+ researchSpawned: 0,
descriptionFunction() {
const loop = () => {
if ((simulation.paused || simulation.isChoosing) && m.alive && !build.isExperimentSelection) { //&& (!simulation.isChoosing || this.count === 0)
@@ -10116,7 +10097,10 @@ const tech = {
b.push(this.rule(this.state[this.state.length - 1], this.state[this.state.length - 1].length - 2, this.state[this.state.length - 1].length - 1, 0)); //right edge wrap around
this.state.push(b)
if (document.getElementById(`cellular-rule-id${this.id}`)) document.getElementById(`cellular-rule-id${this.id}`).innerHTML = this.outputText() //convert to squares and send HTML
- if (this.count && this.state.length < 150 && !(this.state.length % 10)) powerUps.spawn(m.pos.x - 50 + 100 * (Math.random() - 0.5), m.pos.y + 100 * (Math.random() - 0.5), "research");
+ if (this.count && this.researchSpawned < 12 && !(this.state.length % 10)) {
+ this.researchSpawned++
+ powerUps.spawn(m.pos.x - 50 + 100 * (Math.random() - 0.5), m.pos.y + 100 * (Math.random() - 0.5), "research");
+ }
setTimeout(() => { loop() }, 300);
}
}
@@ -10166,8 +10150,8 @@ const tech = {
if (!state[a] && !state[b] && !state[c]) return false; //FFF => F
},
id: 90,
+ researchSpawned: 0,
descriptionFunction() {
- // this.link = `${this.name}`
const loop = () => {
if ((simulation.paused || simulation.isChoosing) && m.alive && !build.isExperimentSelection) { //&& (!simulation.isChoosing || this.count === 0)
let b = []; //produce next row
@@ -10178,7 +10162,10 @@ const tech = {
b.push(this.rule(this.state[this.state.length - 1], this.state[this.state.length - 1].length - 2, this.state[this.state.length - 1].length - 1, 0)); //right edge wrap around
this.state.push(b)
if (document.getElementById(`cellular-rule-id${this.id}`)) document.getElementById(`cellular-rule-id${this.id}`).innerHTML = this.outputText() //convert to squares and send HTML
- if (this.count && this.state.length < 150 && !(this.state.length % 10)) powerUps.spawn(m.pos.x - 50 + 100 * (Math.random() - 0.5), m.pos.y + 100 * (Math.random() - 0.5), "research");
+ if (this.count && this.researchSpawned < 12 && !(this.state.length % 10)) {
+ this.researchSpawned++
+ powerUps.spawn(m.pos.x - 50 + 100 * (Math.random() - 0.5), m.pos.y + 100 * (Math.random() - 0.5), "research");
+ }
setTimeout(() => { loop() }, 300);
}
}
@@ -10373,13 +10360,38 @@ const tech = {
description: `this`,
maxCount: 1,
count: 0,
- frequency: 3,
- frequencyDefault: 3,
+ frequency: 2,
+ frequencyDefault: 2,
isLore: true,
// isExperimentHide: true,
allowed() { return !build.isExperimentSelection },
requires: "NOT EXPERIMENT MODE",
effect() {
+ if (localSettings.loreCount > lore.conversation.length - 1) { //reward for people done with lore chapters (or on the final chapter)
+ for (let i = mob.length - 1; i > -1; i--) { //replace mobs with starters
+ if (!mob[i].isBoss && mob[i].isDropPowerUp && mob[i].alive) {
+ spawn.starter(mob[i].position.x, mob[i].position.y)
+ mob[i].leaveBody = false
+ mob[i].isDropPowerUp = false
+ mob[i].death()
+
+ //spawn a random power up
+ // if (Math.random() < 1 / 5) {
+ // powerUps.spawn(mob[i].position.x, mob[i].position.y, "research")
+ // } else
+ if (Math.random() < 1 / 4) {
+ powerUps.spawn(mob[i].position.x, mob[i].position.y, "ammo")
+ } else if (Math.random() < 1 / 3) {
+ powerUps.spawn(mob[i].position.x, mob[i].position.y, "heal")
+ } else if (Math.random() < 1 / 2) {
+ powerUps.spawn(mob[i].position.x, mob[i].position.y, "boost")
+ } else {
+ powerUps.spawn(mob[i].position.x, mob[i].position.y, "coupling")
+ }
+ }
+ }
+ }
+
setTimeout(() => { //a short delay, I can't remember why
lore.techCount++
if (lore.techCount === lore.techGoal) {
@@ -10563,7 +10575,7 @@ const tech = {
isIntangible: null,
isCloakStun: null,
bonusEnergy: null,
- healGiveMaxEnergy: null,
+ // healGiveMaxEnergy: null,
healMaxEnergyBonus: 0, //not null
aimDamage: null,
isNoFireDefense: null,
@@ -10646,7 +10658,7 @@ const tech = {
isFoamAttract: null,
droneCycleReduction: null,
droneEnergyReduction: null,
- isNoHeals: null,
+ isHalfHeals: null,
isAlwaysFire: null,
isDroneRespawn: null,
deathSpawns: null,
diff --git a/style.css b/style.css
index 99f6c0c..0b03218 100644
--- a/style.css
+++ b/style.css
@@ -180,6 +180,7 @@ summary {
visibility: hidden;
opacity: 0;
transition: opacity 0.25s linear;
+
}
#choose-grid {
@@ -193,18 +194,20 @@ summary {
border-radius: 8px;
z-index: 12;
background-color: #444;
- grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
- grid-auto-rows: minmax(auto, auto);
+ grid-template-columns: repeat(auto-fit, 400px);
+ /* grid-template-columns: repeat(auto-fit, minmax(360px, 450px)); */
+ /* grid-auto-rows: minmax(auto, auto); */
+ /* grid-auto-rows: 1; */
font-size: 1.3em;
- /* box-shadow: 0px 0px 40px 20px rgba(255, 255, 255, 0.25); */
+ /* box-shadow: 0px 0px 10px 5px rgba(0, 0, 0, 0.25); */
display: grid;
- /* none; */
visibility: hidden;
opacity: 0;
transition: opacity 0.25s linear;
align-content: start;
max-height: 100vh;
overflow: auto;
+
}
.choose-grid-module {
@@ -813,6 +816,16 @@ summary {
opacity: 0.85;
margin-bottom: -3px;
}
+.heal-circle-energy {
+ width: 14px;
+ height: 14px;
+ border-radius: 50%;
+ display: inline-block;
+ background-color: #ff0;
+ border: 0.5px #000 solid;
+ opacity: 0.85;
+ margin-bottom: -3px;
+}
.coupling-circle {
width: 10px;
diff --git a/todo.txt b/todo.txt
index a2f259b..2493448 100644
--- a/todo.txt
+++ b/todo.txt
@@ -1,26 +1,48 @@
******************************************************** NEXT PATCH **************************************************
+mass-energy is compatible with more tech
+ defense works with mass-energy, but is exponentially reduced (~10%)
+ damage taken scales with difficulty based heal reduction
+ 1.3x dmg level 5 hard, 2x dmg level 13 why
+ergodicity: 91->66% damage, no heals -> 1/2 size heals
+negative feedback 0.5% -> 1% damage per missing health
+negative entropy spawn heals for 33% missing health not 33 flat missing health
+ this means it caps at 3 health per level
+tech - iceIX freeze effect lasts 2 seconds longer, spawn 10 coupling
+ perfect diamagnetism, standing wave
+research is less common
+path integral comes with 5% JUNK
+there are fewer starting power ups on why difficulty
+
+bug fixes:
+ fixed the text overflow issue on small screens
+ decoherence: if you get a tech that is banished it stops being banished
+ you can now have negative research
*********************************************************** TODO *****************************************************
-bug? i'm pretty sure the quest is given at 6 but the field spawns at 7
+make movement more valuable on the finalBoss
+
+JUNK tech description that changes similar to cards in inscription
+ that changes based on mouse position
+ can you tell if mouse is over card?
+
+tech that encourages gun swapping
+ a field tech: molecular assembler, pilot wave, negative mass?
+ something similar to applied science, but also spawn a gun?
+ a bonus for each time a mob dies with a different active gun each level
+ +damage on that level
+ ammo, heals, research?
-deflecting coupling effect should be not fun
- make ice IX more fun
- faster speed, shorter duration
- trade bremstralung for iceIX?
-
-make duplication less effective on why difficulty
- scale the numbers in the tech
+tech that gives permanent buff when ejected
+ buff: coupling, damage?
+ how to tell if it is ejected in the remove code?
tech - buff MACHO range, effect, move speed?
-tech - iceIX freeze effect lasts much longer, spawn 10 coupling
- for perfect diamagnatism
-
PWA?
https://developer.mozilla.org/en-US/docs/Web/Progressive_web_apps
https://codeburst.io/how-to-easily-turn-your-static-website-to-a-progressive-web-app-pwa-b0af08da9693