From 9a973718933b5377662360a5db9813f7d9707505 Mon Sep 17 00:00:00 2001 From: landgreen Date: Mon, 4 Jan 2021 18:32:56 -0800 Subject: [PATCH] laser push tech: relativistic momentum - laser beams push mobs away --- js/bullet.js | 56 +++- js/level.js | 2 +- js/spawn.js | 2 +- js/tech.js | 824 ++++++++++++++++++++++++++------------------------- style.css | 8 + todo.txt | 20 +- 6 files changed, 480 insertions(+), 432 deletions(-) diff --git a/js/bullet.js b/js/bullet.js index 396693e..24b3b12 100644 --- a/js/bullet.js +++ b/js/bullet.js @@ -1125,7 +1125,7 @@ const b = { }, whereEnd = { x: where.x + 3000 * Math.cos(mech.angle), y: where.y + 3000 * Math.sin(mech.angle) - }, dmg = tech.laserDamage, reflections = tech.laserReflections, isThickBeam = false) { + }, dmg = tech.laserDamage, reflections = tech.laserReflections, isThickBeam = false, push = 1) { const reflectivity = 1 - 1 / (reflections * 1.5) let damage = b.dmgScale * dmg let best = { @@ -1211,6 +1211,21 @@ const b = { color: "rgba(255,0,0,0.5)", time: simulation.drawTime }); + + if (tech.isLaserPush) { //push mobs away + console.log(-0.003 * Math.min(4, best.who.mass), dmg) + const index = path.length - 1 + // const force = Vector.mult(Vector.normalise(Vector.sub(path[Math.max(0, index - 1)], path[index])), -0.003 * Math.min(4, best.who.mass)) + // const push = -0.004 / (1 + tech.beamSplitter + tech.wideLaser + tech.historyLaser) + // console.log(push) + const force = Vector.mult(Vector.normalise(Vector.sub(path[index], path[Math.max(0, index - 1)])), 0.004 * push * Math.min(4, best.who.mass)) + Matter.Body.applyForce(best.who, path[index], force) + // Matter.Body.setVelocity(best.who, { //friction + // x: best.who.velocity.x * 0.7, + // y: best.who.velocity.y * 0.7 + // }); + } + } // ctx.fillStyle = color; //draw mob damage circle // ctx.beginPath(); @@ -2224,7 +2239,14 @@ const b = { //hit target with laser if (this.lockedOn && this.lockedOn.alive && mech.energy > this.drainThreshold) { mech.energy -= tech.laserFieldDrain * tech.isLaserDiode - b.laser(this.vertices[0], this.lockedOn.position, b.dmgScale * (0.38 * tech.laserDamage + this.isUpgraded * 0.21)) //tech.laserDamage = 0.16 + b.laser(this.vertices[0], this.lockedOn.position, b.dmgScale * (0.38 * tech.laserDamage + this.isUpgraded * 0.21), tech.laserReflections, false, 0.4) //tech.laserDamage = 0.16 + // laser(where = { + // x: mech.pos.x + 20 * Math.cos(mech.angle), + // y: mech.pos.y + 20 * Math.sin(mech.angle) + // }, whereEnd = { + // x: where.x + 3000 * Math.cos(mech.angle), + // y: where.y + 3000 * Math.sin(mech.angle) + // }, dmg = tech.laserDamage, reflections = tech.laserReflections, isThickBeam = false, push = 1) { } } }) @@ -3908,7 +3930,7 @@ const b = { }, { name: "laser", - description: "emit a beam of collimated coherent light
drains energy instead of ammunition", + description: "emit a beam of collimated coherent light
drains energy instead of ammunition", ammo: 0, ammoPack: Infinity, have: false, @@ -3938,6 +3960,14 @@ const b = { b.laser(); } }, + + // laser(where = { + // x: mech.pos.x + 20 * Math.cos(mech.angle), + // y: mech.pos.y + 20 * Math.sin(mech.angle) + // }, whereEnd = { + // x: where.x + 3000 * Math.cos(mech.angle), + // y: where.y + 3000 * Math.sin(mech.angle) + // }, dmg = tech.laserDamage, reflections = tech.laserReflections, isThickBeam = false, push = 1) { fireSplit() { if (mech.energy < tech.laserFieldDrain) { mech.fireCDcycle = mech.cycle + 100; // cool down if out of energy @@ -3945,7 +3975,9 @@ const b = { mech.fireCDcycle = mech.cycle mech.energy -= mech.fieldRegen + tech.laserFieldDrain * tech.isLaserDiode const divergence = mech.crouch ? 0.15 : 0.2 - let dmg = tech.laserDamage * Math.pow(0.9, tech.beamSplitter) //Math.pow(0.9, tech.laserDamage) + const scale = Math.pow(0.9, tech.beamSplitter) + const pushScale = scale * scale + let dmg = tech.laserDamage * scale //Math.pow(0.9, tech.laserDamage) const where = { x: mech.pos.x + 20 * Math.cos(mech.angle), y: mech.pos.y + 20 * Math.sin(mech.angle) @@ -3953,16 +3985,16 @@ const b = { b.laser(where, { x: where.x + 3000 * Math.cos(mech.angle), y: where.y + 3000 * Math.sin(mech.angle) - }, dmg) + }, dmg, tech.laserReflections, false, pushScale) for (let i = 1; i < 1 + tech.beamSplitter; i++) { b.laser(where, { x: where.x + 3000 * Math.cos(mech.angle + i * divergence), y: where.y + 3000 * Math.sin(mech.angle + i * divergence) - }, dmg) + }, dmg, tech.laserReflections, false, pushScale) b.laser(where, { x: where.x + 3000 * Math.cos(mech.angle - i * divergence), y: where.y + 3000 * Math.sin(mech.angle - i * divergence) - }, dmg) + }, dmg, tech.laserReflections, false, pushScale) } } }, @@ -3985,7 +4017,7 @@ const b = { b.laser(where, { x: where.x + 3000 * Math.cos(angle), y: where.y + 3000 * Math.sin(angle) - }, dmg, 0, true) + }, dmg, 0, true, 0.4) for (let i = 1; i < tech.wideLaser; i++) { let whereOff = Vector.add(where, { x: i * off * Math.cos(angle + Math.PI / 2), @@ -3994,7 +4026,7 @@ const b = { b.laser(whereOff, { x: whereOff.x + 3000 * Math.cos(angle), y: whereOff.y + 3000 * Math.sin(angle) - }, dmg, 0, true) + }, dmg, 0, true, 0.4) whereOff = Vector.add(where, { x: i * off * Math.cos(angle - Math.PI / 2), y: i * off * Math.sin(angle - Math.PI / 2) @@ -4002,7 +4034,7 @@ const b = { b.laser(whereOff, { x: whereOff.x + 3000 * Math.cos(angle), y: whereOff.y + 3000 * Math.sin(angle) - }, dmg, 0, true) + }, dmg, 0, true, 0.4) } ctx.stroke(); ctx.globalAlpha = 1; @@ -4039,7 +4071,7 @@ const b = { }, { x: mech.pos.x + 3000 * Math.cos(mech.angle), y: mech.pos.y + 3000 * Math.sin(mech.angle) - }, dmg, 0, true); + }, dmg, 0, true, 0.3); for (let i = 1; i < len; i++) { const history = mech.history[(mech.cycle - i * spacing) % 600] b.laser({ @@ -4048,7 +4080,7 @@ const b = { }, { x: history.position.x + 3000 * Math.cos(history.angle), y: history.position.y + 3000 * Math.sin(history.angle) - mech.yPosDifference - }, dmg, 0, true); + }, dmg, 0, true, 0.3); } ctx.stroke(); } diff --git a/js/level.js b/js/level.js index c055199..bffb92a 100644 --- a/js/level.js +++ b/js/level.js @@ -17,7 +17,7 @@ const level = { // simulation.zoomScale = 1000; // simulation.setZoom(); // mech.setField("plasma torch") - // b.giveGuns("missiles") + b.giveGuns("laser") // tech.isMineSentry = true // tech.giveTech("foam fractionation") // tech.giveTech("missile-bot") diff --git a/js/spawn.js b/js/spawn.js index b74dca5..fff0eb5 100644 --- a/js/spawn.js +++ b/js/spawn.js @@ -2269,7 +2269,7 @@ const spawn = { this.explode(this.mass * 20); }; Matter.Body.setDensity(me, 0.000015); //normal is 0.001 - me.timeLeft = 420 * (0.8 + 0.4 * Math.random()); + me.timeLeft = 420 //* (0.8 + 0.4 * Math.random()); me.accelMag = 0.00017 * simulation.accelScale; //* (0.8 + 0.4 * Math.random()) me.frictionAir = 0.01 //* (0.8 + 0.4 * Math.random()); me.restitution = 0.5; diff --git a/js/tech.js b/js/tech.js index 6333617..eb22479 100644 --- a/js/tech.js +++ b/js/tech.js @@ -81,7 +81,7 @@ const tech = { if (tech.isLowEnergyDamage) dmg *= 1 + Math.max(0, 1 - mech.energy) * 0.5 if (tech.isMaxEnergyTech) dmg *= 1.4 if (tech.isEnergyNoAmmo) dmg *= 1.5 - if (tech.isDamageForGuns) dmg *= 1 + 0.07 * b.inventory.length + if (tech.isDamageForGuns) dmg *= 1 + 0.1 * b.inventory.length if (tech.isLowHealthDmg) dmg *= 1 + 0.6 * Math.max(0, 1 - mech.health) if (tech.isHarmDamage && mech.lastHarmCycle + 600 > mech.cycle) dmg *= 3; if (tech.isEnergyLoss) dmg *= 1.5; @@ -103,120 +103,6 @@ const tech = { return tech.foamBotCount + tech.nailBotCount + tech.laserBotCount + tech.boomBotCount + tech.orbitBotCount + tech.plasmaBotCount + tech.missileBotCount }, tech: [{ - name: "electrolytes", - description: "increase damage by 1%
for every 9 stored energy", - maxCount: 1, - count: 0, - allowed() { - return mech.maxEnergy > 1 || tech.isEnergyRecovery || tech.isPiezo || tech.energySiphon > 0 - }, - requires: "increased energy regen or max energy", - effect: () => { - tech.isEnergyDamage = true - }, - remove() { - tech.isEnergyDamage = false; - } - }, - { - name: "exciton-lattice", - description: `increase damage by 50%, but
ammo will no longer spawn`, - maxCount: 1, - count: 0, - allowed() { - return (tech.haveGunCheck("nail gun") && tech.isIceCrystals) || tech.haveGunCheck("laser") || mech.fieldUpgrades[mech.fieldMode].name === "plasma torch" || mech.fieldUpgrades[mech.fieldMode].name === "nano-scale manufacturing" || mech.fieldUpgrades[mech.fieldMode].name === "pilot wave" - }, - requires: "energy based damage", - effect() { - tech.isEnergyNoAmmo = true; - }, - remove() { - tech.isEnergyNoAmmo = false; - } - }, - { - name: "exothermic process", - description: "increase damage by 50%
if a mob dies drain energy by 25%", - maxCount: 1, - count: 0, - allowed() { - return !tech.isEnergyHealth - }, - requires: "not mass-energy equivalence", - effect() { - tech.isEnergyLoss = true; - }, - remove() { - tech.isEnergyLoss = false; - } - }, - { - name: "heat engine", - description: `increase damage by 40%, but
reduce maximum energy by 50`, - maxCount: 1, - count: 0, - allowed() { - return tech.isEnergyLoss && mech.maxEnergy < 1.1 && !tech.isMissileField && !tech.isSporeField && !tech.isRewindAvoidDeath - }, - requires: "exothermic process, not max energy increase, CPT, missile or spore nano-scale", - effect() { - tech.isMaxEnergyTech = true; - mech.setMaxEnergy() - }, - remove() { - tech.isMaxEnergyTech = false; - mech.setMaxEnergy() - } - }, - { - name: "Gibbs free energy", - description: `increase damage by 5%
for every 10 energy below 100`, - maxCount: 1, - count: 0, - allowed() { - return tech.isEnergyLoss && mech.maxEnergy < 1.1 - }, - requires: "exothermic process, not max energy increase", - effect() { - tech.isLowEnergyDamage = true; - }, - remove() { - tech.isLowEnergyDamage = false; - } - }, - { - name: "rest frame", - description: "increase damage by 25%
when not moving", - maxCount: 6, - count: 0, - allowed() { - return mech.Fx === 0.016 - }, - requires: "base movement speed", - effect: () => { - tech.restDamage += 0.25 - }, - remove() { - tech.restDamage = 1; - } - }, - { - name: "kinetic bombardment", - description: "increase damage by up to 33%
at a distance of 40 steps from the target", - maxCount: 1, - count: 0, - allowed() { - return true - }, - requires: "", - effect() { - tech.isFarAwayDmg = true; //used in mob.damage() - }, - remove() { - tech.isFarAwayDmg = false; - } - }, - { name: "integrated armament", description: "increase damage by 25%
your inventory can only hold 1 gun", maxCount: 1, @@ -232,9 +118,35 @@ const tech = { tech.isOneGun = false; } }, + { + name: "entanglement", + nameInfo: "", + addNameInfo() { + setTimeout(function() { + simulation.boldActiveGunHUD(); + }, 1000); + }, + description: "while your first gun is equipped
reduce harm by 13% for each of your guns", + maxCount: 1, + count: 0, + allowed() { + return b.inventory.length > 1 && !tech.isEnergyHealth + }, + requires: "at least 2 guns", + effect() { + tech.isEntanglement = true + setTimeout(function() { + simulation.boldActiveGunHUD(); + }, 1000); + + }, + remove() { + tech.isEntanglement = false; + } + }, { name: "arsenal", - description: "increase damage by 7%
for each gun in your inventory", + description: "increase damage by 10%
for each gun in your inventory", maxCount: 1, count: 0, allowed() { @@ -250,7 +162,7 @@ const tech = { }, { name: "generalist", - description: "spawn 5 guns, but you can't switch guns
guns cycle automatically with each new level", + description: "spawn 6 guns, but you can't switch guns
guns cycle automatically with each new level", maxCount: 1, count: 0, isNonRefundable: true, @@ -260,7 +172,7 @@ const tech = { requires: "arsenal", effect() { tech.isGunCycle = true; - for (let i = 0; i < 5; i++) { + for (let i = 0; i < 6; i++) { powerUps.spawn(mech.pos.x, mech.pos.y, "gun"); } }, @@ -269,103 +181,101 @@ const tech = { } }, { - name: "fluoroantimonic acid", - description: "increase damage by 40%
when your health is above 100", + name: "logistics", + description: "ammo power ups give 200% ammo
but ammo is only added to your current gun", maxCount: 1, count: 0, allowed() { - return mech.maxHealth > 1; + return !tech.isEnergyNoAmmo }, - requires: "health above 100", + requires: "not exciton-lattice", effect() { - tech.isAcidDmg = true; + tech.isAmmoForGun = true; }, remove() { - tech.isAcidDmg = false; + tech.isAmmoForGun = false; } }, { - name: "negative feedback", - description: "increase damage by 6%
for every 10 health below 100", + name: "supply chain", + description: "double your current ammo for all guns", + maxCount: 9, + count: 0, + isNonRefundable: true, + allowed() { + return tech.isAmmoForGun + }, + requires: "logistics", + effect() { + for (let i = 0; i < b.guns.length; i++) { + if (b.guns[i].have) b.guns[i].ammo = Math.floor(2 * b.guns[i].ammo) + } + simulation.makeGunHUD(); + }, + remove() {} + }, + { + name: "catabolism", + description: "when you fire while out of ammo
gain 3 ammo, but lose 5 health", maxCount: 1, count: 0, allowed() { - return mech.health < 0.6 || build.isCustomSelection + return !tech.isEnergyHealth && !tech.isEnergyNoAmmo }, - requires: "health below 60", - effect() { - tech.isLowHealthDmg = true; //used in mob.damage() + requires: "not mass-energy equivalence
not exciton-lattice", + effect: () => { + tech.isAmmoFromHealth = true; }, remove() { - tech.isLowHealthDmg = false; + tech.isAmmoFromHealth = false; } }, { - name: "radiative equilibrium", - description: "for 10 seconds after receiving harm
increase damage by 200%", + name: "perpetual ammo", + description: "find 2 ammo at the start of each level", maxCount: 1, count: 0, allowed() { - return mech.harmReduction() < 1 + return !tech.isPerpetualReroll && !tech.isPerpetualHeal && !tech.isPerpetualReroll && !tech.isPerpetualStun && !tech.isEnergyNoAmmo }, - requires: "some harm reduction", + requires: "only 1 perpetual effect, not exciton lattice", effect() { - tech.isHarmDamage = true; + tech.isPerpetualAmmo = true }, remove() { - tech.isHarmDamage = false; + tech.isPerpetualAmmo = false } }, { - name: "correlated damage", - description: "your chance to duplicate power ups
increases your damage by the same percent", + name: "desublimated ammunition", + description: "use 50% less ammo when crouching", maxCount: 1, count: 0, allowed() { - return tech.duplicationChance() > 0 + return true }, - requires: "some duplication chance", + requires: "", effect() { - tech.isDupDamage = true; + tech.isCrouchAmmo = true }, remove() { - tech.isDupDamage = false; + tech.isCrouchAmmo = false; } }, { - name: "perturbation theory", - description: "increase damage by 3.5%
for each research in your inventory", + name: "gun turret", + description: "reduce harm by 50% when crouching", maxCount: 1, count: 0, allowed() { - return powerUps.research.research > 4 || build.isCustomSelection + return tech.isCrouchAmmo && !tech.isEnergyHealth }, - requires: "at least 5 research", + requires: "desublimated ammunition
not mass-energy equivalence", effect() { - tech.isRerollDamage = true; + tech.isTurret = true }, remove() { - tech.isRerollDamage = false; - } - }, - { - name: "Ψ(t) collapse", - description: "66% decreased delay after firing
when you have no research in your inventory", - maxCount: 1, - count: 0, - allowed() { - return powerUps.research.research === 0 && !tech.manyWorlds - }, - requires: "no research", - effect() { - tech.isRerollHaste = true; - tech.researchHaste = 0.33; - b.setFireCD(); - }, - remove() { - tech.isRerollHaste = false; - tech.researchHaste = 1; - b.setFireCD(); + tech.isTurret = false; } }, { @@ -403,22 +313,6 @@ const tech = { b.setFireCD(); } }, - { - name: "mass driver", - description: "increase block collision damage by 100%
charge throws more quickly for less energy", - maxCount: 1, - count: 0, - allowed() { - return mech.fieldUpgrades[mech.fieldMode].name !== "wormhole" - }, - requires: "not wormhole", - effect() { - tech.throwChargeRate = 2 - }, - remove() { - tech.throwChargeRate = 1 - } - }, { name: "ammonium nitrate", description: "increase explosive damage by 20%
increase explosive radius by 20%", @@ -500,27 +394,6 @@ const tech = { tech.isExplodeMob = false; } }, - { - name: "reaction inhibitor", - description: "mobs spawn with 11% less health", - maxCount: 3, - count: 0, - allowed() { - return tech.nailsDeathMob || tech.sporesOnDeath || tech.isExplodeMob || tech.isBotSpawner - }, - requires: "any mob death tech", - effect: () => { - tech.mobSpawnWithHealth *= 0.89 - - //set all mobs at full health to 0.85 - for (let i = 0; i < mob.length; i++) { - if (mob.health > tech.mobSpawnWithHealth) mob.health = tech.mobSpawnWithHealth - } - }, - remove() { - tech.mobSpawnWithHealth = 1; - } - }, { name: "zoospore vector", description: "mobs produce spores when they die
9% chance", @@ -556,6 +429,59 @@ const tech = { tech.nailsDeathMob = 0; } }, + { + name: "reaction inhibitor", + description: "mobs spawn with 11% less health", + maxCount: 3, + count: 0, + allowed() { + return tech.nailsDeathMob || tech.sporesOnDeath || tech.isExplodeMob || tech.isBotSpawner + }, + requires: "any mob death tech", + effect: () => { + tech.mobSpawnWithHealth *= 0.89 + + //set all mobs at full health to 0.85 + for (let i = 0; i < mob.length; i++) { + if (mob.health > tech.mobSpawnWithHealth) mob.health = tech.mobSpawnWithHealth + } + }, + remove() { + tech.mobSpawnWithHealth = 1; + } + }, + { + name: "decorrelation", + description: "reduce harm by 40%
after not using your gun or field for 2 seconds", + maxCount: 1, + count: 0, + allowed() { + return (tech.totalBots() > 1 || tech.haveGunCheck("drones") || tech.haveGunCheck("mine") || tech.haveGunCheck("spores") || mech.fieldUpgrades[mech.fieldMode].name === "nano-scale manufacturing") && !tech.isEnergyHealth + }, + requires: "drones, spores, mines, or bots", + effect() { + tech.isNoFireDefense = true + }, + remove() { + tech.isNoFireDefense = false + } + }, + { + name: "anticorrelation", + description: "increase damage by 66%
after not using your gun or field for 2 seconds", + maxCount: 1, + count: 0, + allowed() { + return tech.isNoFireDefense + }, + requires: "decorrelation", + effect() { + tech.isNoFireDamage = true + }, + remove() { + tech.isNoFireDamage = false + } + }, { name: "scrap bots", description: "20% chance to build a bot after killing a mob
the bot lasts for about 20 seconds", @@ -691,7 +617,7 @@ const tech = { }, { name: "laser-bot", - description: "a bot uses energy to emit a laser
targeting nearby mobs", + description: "a bot uses energy to emit a laser
targeting nearby mobs", maxCount: 9, count: 0, allowed() { @@ -708,7 +634,7 @@ const tech = { }, { name: "laser-bot upgrade", - description: "350% increased laser damage
applies to all current and future laser-bots", + description: "350% increased laser damage
applies to all current and future laser-bots", maxCount: 1, count: 0, allowed() { @@ -872,6 +798,38 @@ const tech = { }, remove() {} }, + { + name: "rest frame", + description: "increase damage by 25%
when not moving", + maxCount: 6, + count: 0, + allowed() { + return mech.Fx === 0.016 + }, + requires: "base movement speed", + effect: () => { + tech.restDamage += 0.25 + }, + remove() { + tech.restDamage = 1; + } + }, + { + name: "kinetic bombardment", + description: "increase damage by up to 33%
at a distance of 40 steps from the target", + maxCount: 1, + count: 0, + allowed() { + return true + }, + requires: "", + effect() { + tech.isFarAwayDmg = true; //used in mob.damage() + }, + remove() { + tech.isFarAwayDmg = false; + } + }, { name: "squirrel-cage rotor", description: "move and jump about 25% faster", @@ -925,35 +883,51 @@ const tech = { } }, { - name: "decorrelation", - description: "reduce harm by 40%
after not using your gun or field for 2 seconds", + name: "mass driver", + description: "increase block collision damage by 100%
charge throws more quickly for less energy", maxCount: 1, count: 0, allowed() { - return (tech.totalBots() > 1 || tech.haveGunCheck("drones") || tech.haveGunCheck("mine") || tech.haveGunCheck("spores") || mech.fieldUpgrades[mech.fieldMode].name === "nano-scale manufacturing") && !tech.isEnergyHealth + return mech.fieldUpgrades[mech.fieldMode].name !== "wormhole" }, - requires: "drones, spores, mines, or bots", + requires: "not wormhole", effect() { - tech.isNoFireDefense = true + tech.throwChargeRate = 2 }, remove() { - tech.isNoFireDefense = false + tech.throwChargeRate = 1 } }, { - name: "anticorrelation", - description: "increase damage by 66%
after not using your gun or field for 2 seconds", + name: "perpetual stun", + description: "stun all mobs for up to 8 seconds
at the start of each level", maxCount: 1, count: 0, allowed() { - return tech.isNoFireDefense + return !tech.isPerpetualReroll && !tech.isPerpetualHeal && !tech.isPerpetualAmmo }, - requires: "decorrelation", + requires: "only 1 perpetual effect", effect() { - tech.isNoFireDamage = true + tech.isPerpetualStun = true }, remove() { - tech.isNoFireDamage = false + tech.isPerpetualStun = false + } + }, + { + name: "osmoprotectant", + description: `collisions with stunned or frozen mobs
cause you no harm`, + maxCount: 1, + count: 0, + allowed() { + return tech.isStunField || tech.isPulseStun || tech.oneSuperBall || tech.isHarmFreeze || tech.isIceField || tech.isIceCrystals || tech.isSporeFreeze || tech.isAoESlow || tech.isFreezeMobs || tech.isCloakStun || tech.orbitBotCount > 1 || tech.isWormholeDamage + }, + requires: "a freezing or stunning effect", + effect() { + tech.isFreezeHarmImmune = true; + }, + remove() { + tech.isFreezeHarmImmune = false; } }, { @@ -973,32 +947,6 @@ const tech = { tech.collisionImmuneCycles = 25; } }, - { - name: "entanglement", - nameInfo: "", - addNameInfo() { - setTimeout(function() { - simulation.boldActiveGunHUD(); - }, 1000); - }, - description: "while your first gun is equipped
reduce harm by 13% for each of your guns", - maxCount: 1, - count: 0, - allowed() { - return b.inventory.length > 1 && !tech.isEnergyHealth - }, - requires: "at least 2 guns", - effect() { - tech.isEntanglement = true - setTimeout(function() { - simulation.boldActiveGunHUD(); - }, 1000); - - }, - remove() { - tech.isEntanglement = false; - } - }, { name: "ablative drones", description: "rebuild your broken parts as drones
chance to occur after receiving harm", @@ -1035,19 +983,19 @@ const tech = { } }, { - name: "clock gating", - description: `slow time by 50% after receiving harm
reduce harm by 15%`, + name: "radiative equilibrium", + description: "for 10 seconds after receiving harm
increase damage by 200%", maxCount: 1, count: 0, allowed() { - return simulation.fpsCapDefault > 45 && !tech.isRailTimeSlow + return mech.harmReduction() < 1 }, - requires: "FPS above 45", + requires: "some harm reduction", effect() { - tech.isSlowFPS = true; + tech.isHarmDamage = true; }, remove() { - tech.isSlowFPS = false; + tech.isHarmDamage = false; } }, { @@ -1068,19 +1016,19 @@ const tech = { }, { - name: "osmoprotectant", - description: `collisions with stunned or frozen mobs
cause you no harm`, + name: "clock gating", + description: `slow time by 50% after receiving harm
reduce harm by 15%`, maxCount: 1, count: 0, allowed() { - return tech.isStunField || tech.isPulseStun || tech.oneSuperBall || tech.isHarmFreeze || tech.isIceField || tech.isIceCrystals || tech.isSporeFreeze || tech.isAoESlow || tech.isFreezeMobs || tech.isCloakStun || tech.orbitBotCount > 1 || tech.isWormholeDamage + return simulation.fpsCapDefault > 45 && !tech.isRailTimeSlow }, - requires: "a freezing or stunning effect", + requires: "FPS above 45", effect() { - tech.isFreezeHarmImmune = true; + tech.isSlowFPS = true; }, remove() { - tech.isFreezeHarmImmune = false; + tech.isSlowFPS = false; } }, { @@ -1168,11 +1116,11 @@ const tech = { }, { name: "mass-energy equivalence", - description: "energy protects you instead of health
harm reduction effects provide no benefit", + description: "energy protects you instead of health
harm reduction effects provide no benefit", maxCount: 1, count: 0, allowed() { - return !tech.isEnergyLoss && !tech.isPiezo && !tech.isRewindAvoidDeath && !tech.isRewindGun && !tech.isSpeedHarm && mech.fieldUpgrades[mech.fieldMode].name !== "negative mass field" + return !tech.isEnergyLoss && !tech.isPiezo && !tech.isRewindAvoidDeath && !tech.isRewindGun && !tech.isSpeedHarm && mech.fieldUpgrades[mech.fieldMode].name !== "negative mass field" && !tech.isHealLowHealth }, requires: "not exothermic process, piezoelectricity, CPT, 1st law, negative mass", effect: () => { @@ -1219,6 +1167,88 @@ const tech = { } } }, + { + name: "electrolytes", + description: "increase damage by 1%
for every 9 stored energy", + maxCount: 1, + count: 0, + allowed() { + return mech.maxEnergy > 1 || tech.isEnergyRecovery || tech.isPiezo || tech.energySiphon > 0 + }, + requires: "increased energy regen or max energy", + effect: () => { + tech.isEnergyDamage = true + }, + remove() { + tech.isEnergyDamage = false; + } + }, + { + name: "exciton-lattice", + description: `increase damage by 50%, but
ammo will no longer spawn`, + maxCount: 1, + count: 0, + allowed() { + return (tech.haveGunCheck("nail gun") && tech.isIceCrystals) || tech.haveGunCheck("laser") || mech.fieldUpgrades[mech.fieldMode].name === "plasma torch" || mech.fieldUpgrades[mech.fieldMode].name === "nano-scale manufacturing" || mech.fieldUpgrades[mech.fieldMode].name === "pilot wave" + }, + requires: "energy based damage", + effect() { + tech.isEnergyNoAmmo = true; + }, + remove() { + tech.isEnergyNoAmmo = false; + } + }, + { + name: "exothermic process", + description: "increase damage by 50%
if a mob dies drain energy by 25%", + maxCount: 1, + count: 0, + allowed() { + return !tech.isEnergyHealth + }, + requires: "not mass-energy equivalence", + effect() { + tech.isEnergyLoss = true; + }, + remove() { + tech.isEnergyLoss = false; + } + }, + { + name: "heat engine", + description: `increase damage by 40%, but
reduce maximum energy by 50`, + maxCount: 1, + count: 0, + allowed() { + return tech.isEnergyLoss && mech.maxEnergy < 1.1 && !tech.isMissileField && !tech.isSporeField && !tech.isRewindAvoidDeath + }, + requires: "exothermic process, not max energy increase, CPT, missile or spore nano-scale", + effect() { + tech.isMaxEnergyTech = true; + mech.setMaxEnergy() + }, + remove() { + tech.isMaxEnergyTech = false; + mech.setMaxEnergy() + } + }, + { + name: "Gibbs free energy", + description: `increase damage by 5%
for every 10 energy below 100`, + maxCount: 1, + count: 0, + allowed() { + return tech.isEnergyLoss && mech.maxEnergy < 1.1 + }, + requires: "exothermic process, not max energy increase", + effect() { + tech.isLowEnergyDamage = true; + }, + remove() { + tech.isLowEnergyDamage = false; + } + }, { name: "overcharge", description: "increase your maximum energy by 50", @@ -1303,6 +1333,22 @@ const tech = { tech.isHealthRecovery = false; } }, + { + name: "negative feedback", + description: "increase damage by 6%
for every 10 health below 100", + maxCount: 1, + count: 0, + allowed() { + return mech.health < 0.6 || build.isCustomSelection + }, + requires: "health below 60", + effect() { + tech.isLowHealthDmg = true; //used in mob.damage() + }, + remove() { + tech.isLowHealthDmg = false; + } + }, { name: "entropy exchange", description: "heal for 1% of damage done", @@ -1319,6 +1365,22 @@ const tech = { tech.healthDrain = 0; } }, + { + name: "fluoroantimonic acid", + description: "increase damage by 40%
when your health is above 100", + maxCount: 1, + count: 0, + allowed() { + return mech.maxHealth > 1; + }, + requires: "health above 100", + effect() { + tech.isAcidDmg = true; + }, + remove() { + tech.isAcidDmg = false; + } + }, { name: "supersaturation", description: "increase your maximum health by 50", @@ -1405,6 +1467,22 @@ const tech = { tech.largerHeals = 1; } }, + { + name: "perpetual heals", + description: "find 2 heals at the start of each level", + maxCount: 1, + count: 0, + allowed() { + return !tech.isPerpetualReroll && !tech.isPerpetualAmmo && !tech.isPerpetualStun + }, + requires: "only 1 perpetual effect", + effect() { + tech.isPerpetualHeal = true + }, + remove() { + tech.isPerpetualHeal = false + } + }, { name: "anthropic principle", nameInfo: "", @@ -1413,7 +1491,7 @@ const tech = { powerUps.research.changeRerolls(0) }, 1000); }, - description: "use a research to avoid dying once a level
and spawn 6 heal power ups", + description: "once per level use 1 research to avoid dying
and spawn 6 heal power ups", maxCount: 1, count: 0, allowed() { @@ -1502,6 +1580,22 @@ const tech = { if (tech.duplicationChance() === 0) simulation.draw.powerUp = simulation.draw.powerUpNormal } }, + { + name: "correlated damage", + description: "your chance to duplicate power ups
increases your damage by the same percent", + maxCount: 1, + count: 0, + allowed() { + return tech.duplicationChance() > 0 + }, + requires: "some duplication chance", + effect() { + tech.isDupDamage = true; + }, + remove() { + tech.isDupDamage = false; + } + }, { name: "futures exchange", description: "clicking × to cancel a field, tech, or gun
adds 3.5% power up duplication chance", @@ -1636,88 +1730,6 @@ const tech = { tech.isMineDrop = false; } }, - { - name: "logistics", - description: "ammo power ups give 200% ammo
but ammo is only added to your current gun", - maxCount: 1, - count: 0, - allowed() { - return !tech.isEnergyNoAmmo - }, - requires: "not exciton-lattice", - effect() { - tech.isAmmoForGun = true; - }, - remove() { - tech.isAmmoForGun = false; - } - }, - { - name: "supply chain", - description: "double your current ammo for all guns", - maxCount: 9, - count: 0, - isNonRefundable: true, - allowed() { - return tech.isAmmoForGun - }, - requires: "logistics", - effect() { - for (let i = 0; i < b.guns.length; i++) { - if (b.guns[i].have) b.guns[i].ammo = Math.floor(2 * b.guns[i].ammo) - } - simulation.makeGunHUD(); - }, - remove() {} - }, - { - name: "catabolism", - description: "when you fire while out of ammo
gain 3 ammo, but lose 5 health", - maxCount: 1, - count: 0, - allowed() { - return !tech.isEnergyHealth && !tech.isEnergyNoAmmo - }, - requires: "not mass-energy equivalence
not exciton-lattice", - effect: () => { - tech.isAmmoFromHealth = true; - }, - remove() { - tech.isAmmoFromHealth = false; - } - }, - { - name: "desublimated ammunition", - description: "use 50% less ammo when crouching", - maxCount: 1, - count: 0, - allowed() { - return true - }, - requires: "", - effect() { - tech.isCrouchAmmo = true - }, - remove() { - tech.isCrouchAmmo = false; - } - }, - { - name: "gun turret", - description: "reduce harm by 50% when crouching", - maxCount: 1, - count: 0, - allowed() { - return tech.isCrouchAmmo && !tech.isEnergyHealth - }, - requires: "desublimated ammunition
not mass-energy equivalence", - effect() { - tech.isTurret = true - }, - remove() { - tech.isTurret = false; - } - }, { name: "cardinality", description: "tech, fields, and guns have 5 choices", @@ -1774,6 +1786,26 @@ const tech = { tech.isSuperDeterminism = false; } }, + { + name: "Ψ(t) collapse", + description: "66% decreased delay after firing
when you have no research in your inventory", + maxCount: 1, + count: 0, + allowed() { + return powerUps.research.research === 0 && !tech.manyWorlds + }, + requires: "no research", + effect() { + tech.isRerollHaste = true; + tech.researchHaste = 0.33; + b.setFireCD(); + }, + remove() { + tech.isRerollHaste = false; + tech.researchHaste = 1; + b.setFireCD(); + } + }, { name: "many-worlds", description: "after choosing a field, tech, or gun
if you have no research spawn 2", @@ -1826,6 +1858,22 @@ const tech = { powerUps.tech.banishLog = [] //reset banish log } }, + { + name: "perturbation theory", + description: "increase damage by 3.5%
for each research in your inventory", + maxCount: 1, + count: 0, + allowed() { + return powerUps.research.research > 4 || build.isCustomSelection + }, + requires: "at least 5 research", + effect() { + tech.isRerollDamage = true; + }, + remove() { + tech.isRerollDamage = false; + } + }, { name: "Born rule", description: "remove all current tech
spawn new tech to replace them", @@ -1872,54 +1920,6 @@ const tech = { tech.isPerpetualReroll = false } }, - { - name: "perpetual heals", - description: "find 2 heals at the start of each level", - maxCount: 1, - count: 0, - allowed() { - return !tech.isPerpetualReroll && !tech.isPerpetualAmmo && !tech.isPerpetualStun - }, - requires: "only 1 perpetual effect", - effect() { - tech.isPerpetualHeal = true - }, - remove() { - tech.isPerpetualHeal = false - } - }, - { - name: "perpetual ammo", - description: "find 2 ammo at the start of each level", - maxCount: 1, - count: 0, - allowed() { - return !tech.isPerpetualReroll && !tech.isPerpetualHeal && !tech.isPerpetualReroll && !tech.isPerpetualStun && !tech.isEnergyNoAmmo - }, - requires: "only 1 perpetual effect, not exciton lattice", - effect() { - tech.isPerpetualAmmo = true - }, - remove() { - tech.isPerpetualAmmo = false - } - }, - { - name: "perpetual stun", - description: "stun all mobs for up to 8 seconds
at the start of each level", - maxCount: 1, - count: 0, - allowed() { - return !tech.isPerpetualReroll && !tech.isPerpetualHeal && !tech.isPerpetualAmmo - }, - requires: "only 1 perpetual effect", - effect() { - tech.isPerpetualStun = true - }, - remove() { - tech.isPerpetualStun = false - } - }, //************************************************** //************************************************** gun //************************************************** tech @@ -2609,7 +2609,7 @@ const tech = { }, { name: "laser-mines", - description: "mines hover in place until mobs get in range
mines use energy to emit 3 unaimed lasers", + description: "mines hover in place until mobs get in range
mines use energy to emit 3 unaimed lasers", isGunTech: true, maxCount: 1, count: 0, @@ -2650,7 +2650,7 @@ const tech = { allowed() { return (tech.haveGunCheck("mine") && !tech.isMineAmmoBack && !tech.isLaserMine) || tech.isMineDrop }, - requires: "mine, not mine reclamation, not laser-mines", + requires: "mines, not mine reclamation, laser-mines", effect() { tech.isMineSentry = true; }, @@ -2763,7 +2763,7 @@ const tech = { }, { name: "mutualism", - description: "increase spore damage by 100%
spores borrow 0.5 health until they die", + description: "increase spore damage by 100%
spores borrow 0.5 health until they die", isGunTech: true, maxCount: 1, count: 0, @@ -2950,7 +2950,7 @@ const tech = { }, { name: "laser diodes", - description: "all lasers drain 37% less energy
effects laser-gun, laser-bot, and laser-mines", + description: "all lasers drain 37% less energy
effects laser-gun, laser-bot, and laser-mines", isGunTech: true, maxCount: 1, count: 0, @@ -2965,9 +2965,27 @@ const tech = { tech.isLaserDiode = 1; } }, + { + name: "relativistic momentum", + description: "all lasers push mobs away
effects laser-gun, laser-bot, and laser-mines", + isGunTech: true, + maxCount: 1, + count: 0, + allowed() { + return tech.haveGunCheck("laser") || tech.laserBotCount > 1 + }, + requires: "laser", + effect() { + tech.isLaserPush = true; + }, + remove() { + tech.isLaserPush = false; + } + }, + { name: "specular reflection", - description: "increase damage and energy drain by 50%
and +1 reflection for all lasers (gun, bot, mine)", + description: "increase damage and energy drain by 50%
and +1 reflection for all lasers (gun, bot, mine)", isGunTech: true, maxCount: 9, count: 0, @@ -2988,7 +3006,7 @@ const tech = { }, { name: "diffraction grating", - description: `your laser gains 2 diverging beams
decrease individual beam damage by 10%`, + description: `your laser gains 2 diverging beams
decrease individual beam damage by 10%`, isGunTech: true, maxCount: 9, count: 0, @@ -3011,7 +3029,7 @@ const tech = { }, { name: "diffuse beam", - description: "laser beam is wider and doesn't reflect
increase full beam damage by 175%", + description: "laser beam is wider and doesn't reflect
increase full beam damage by 175%", isGunTech: true, maxCount: 1, count: 0, @@ -3036,7 +3054,7 @@ const tech = { }, { name: "output coupler", - description: "widen diffuse laser beam by 40%
increase full beam damage by 40%", + description: "widen diffuse laser beam by 40%
increase full beam damage by 40%", isGunTech: true, maxCount: 1, count: 0, @@ -3063,7 +3081,7 @@ const tech = { }, { name: "slow light propagation", - description: "laser beam is spread into your recent past
increase total beam damage by 300%", + description: "laser beam is spread into your recent past
increase total beam damage by 300%", isGunTech: true, maxCount: 9, count: 0, @@ -3088,7 +3106,7 @@ const tech = { }, { name: "pulse", - description: "convert 25% of your energy into a pulsed laser
that instantly initiates a fusion explosion", + description: "use 25% of your energy in a pulsed laser
that instantly initiates a fusion explosion", isGunTech: true, maxCount: 1, count: 0, @@ -3111,7 +3129,7 @@ const tech = { }, { name: "shock wave", - description: "mobs caught in pulse's explosion are stunned
for up to 2 seconds", + description: "mobs caught in pulse's explosion are stunned
for up to 2 seconds", isGunTech: true, maxCount: 1, count: 0, @@ -3128,7 +3146,7 @@ const tech = { }, { name: "neocognitron", - description: "pulse automatically aims at a nearby mob
50% decreased delay after firing", + description: "pulse automatically aims at a nearby mob
50% decreased delay after firing", isGunTech: true, maxCount: 1, count: 0, diff --git a/style.css b/style.css index 506210b..3a1a290 100644 --- a/style.css +++ b/style.css @@ -543,6 +543,14 @@ summary { letter-spacing: 1px; } +.color-laser { + color: #f02; + /* text-shadow: 0px 0px 2px rgba(255, 0, 119, 0.3); */ + /* text-shadow: 0px 0px 1.5px rgba(0, 0, 0, 1), 0px 0px 5px rgba(255, 0, 0, 1); */ + font-weight: 100; + letter-spacing: -0.8px; +} + .color-plasma { color: #c0e; letter-spacing: 1px; diff --git a/todo.txt b/todo.txt index 9978dfa..142173f 100644 --- a/todo.txt +++ b/todo.txt @@ -1,16 +1,6 @@ ******************************************************** NEXT PATCH ******************************************************** -reroll renamed -> research - -spore damage increased 25% - -ice IX has it's damage buffed by 50%, and freeze effect lasts 2s (up from 1s) -ice IX is no longer a gun - but you can still get it for nano-scale field (and it's pretty strong) -tech: heavy water was removed - -tech: correlated damage - duplication chance also gives % damage -(also added some minor nerfs to other duplication tech for balance) +tech: relativistic momentum - laser beams push mobs away ******************************************************** BUGS ******************************************************** @@ -48,9 +38,9 @@ tech: dodge chance for cloaking, harmonic fields, also pilot wave set to 100% harm reduction randomly if (Math.random() < 0.2) damage *= 0; -rename - health > integrity, unity - heal > also integrity, unity +rename ? + health -> integrity, unity + heal -> also integrity, unity in game console set highlighting rules @@ -79,7 +69,7 @@ mob ability bombs/bullets that suck in player tech where you can't stop firing, how to code? -tech: laser beams push like plasma torch pushes with directional force +tech: translational invariance - laser beams push like plasma torch pushes with directional force mechanic: technological dead end - add tech to the tech pool with a dumb effect don't show up in custom?