From 3560bf7365f4d28a9fd0ffe792b4d4e6ee9f4aa8 Mon Sep 17 00:00:00 2001 From: landgreen Date: Fri, 11 Jun 2021 04:43:34 -0700 Subject: [PATCH] inertial mass historyBoss has a much smaller damage radius, but it does 2x more damage also history boss has updated graphics no the dotted lines on the player isn't a bug inertial mass - negative mass field is larger and you accelerate faster also moves blocks horizontally while the field is active junk tech - hide your health bar, spawn 30 health bug fixes --- .DS_Store | Bin 6148 -> 6148 bytes js/engine.js | 2 +- js/level.js | 112 ++++++++++++++++++++++---------------------- js/player.js | 129 +++++++++++++++++++++++++++++---------------------- js/spawn.js | 44 ++++++++++++------ js/tech.js | 75 +++++++++++++++++++----------- todo.txt | 23 +++++---- 7 files changed, 221 insertions(+), 164 deletions(-) diff --git a/.DS_Store b/.DS_Store index fca212dbec401bf4d5beb8dc1c6be99100787176..2a571effa03a254c2621f5bf9733d5efd5b27f0c 100644 GIT binary patch delta 21 ccmZoMXffEJ#mwX)JXwd?k8#81YUWN607M%GE&u=k delta 21 ccmZoMXffEJ#mr 0.34 * m.maxEnergy) { - m.energy -= 0.33 * m.maxEnergy + m.energy -= 0.33 * Math.max(m.maxEnergy, m.energy) //0.33 * m.energy m.immuneCycle = 0; //player doesn't go immune to collision damage mob[k].death(); simulation.drawList.push({ //add dmg to draw queue diff --git a/js/level.js b/js/level.js index a67103f..166ccf7 100644 --- a/js/level.js +++ b/js/level.js @@ -15,7 +15,7 @@ const level = { // simulation.zoomScale = 1000; // simulation.setZoom(); // simulation.enableConstructMode() //used to build maps in testing mode - // m.setField("plasma torch") + // m.setField("negative mass field") // for (let i = 0; i < 9; i++) tech.giveTech("spherical harmonics") // b.giveGuns("laser") // tech.isExplodeRadio = true @@ -29,6 +29,7 @@ const level = { // tech.giveTech("attract") // level.difficultyIncrease(30) // simulation.isHorizontalFlipped = true + // tech.isFlyFaster = true level.intro(); //starting level // level.testing(); //not in rotation, used for testing @@ -1169,8 +1170,8 @@ const level = { // spawn.starter(1900, -500, 200) //big boy // spawn.grower(1900, -500) // spawn.pulsarBoss(1900, -500) - spawn.shooterBoss(1900, -500) - // spawn.launcherBoss(1200, -500) + // spawn.shooterBoss(1900, -500) + spawn.historyBoss(1200, -500) // spawn.laserTargetingBoss(1600, -400) // spawn.striker(1600, -500) // spawn.laserTargetingBoss(1700, -120) @@ -1180,7 +1181,7 @@ const level = { // spawn.orbitalBoss(1600, -500) // spawn.cellBossCulture(1600, -500) // spawn.shieldingBoss(1600, -500) - spawn.laser(1200, -500) + // spawn.laser(1200, -500) // spawn.shield(mob[mob.length - 1], 1800, -120, 1); // spawn.nodeGroup(1200, -500, "pulsar") @@ -5709,7 +5710,7 @@ const level = { portal2[2].draw() } }, - "n-gon"() { // Made by Oranger on Discord + "n-gon"() { //make by Oranger let needGravity = []; let s = { //mech statue x: -200, @@ -5723,8 +5724,8 @@ const level = { k: { //knee x: -30.96, //-17.38 y: 58.34, //70.49 - x2: -33.96, //x - 3 - y2: 58.34 //same as y + //x2: -33.96, //x - 3 + //y2: 58.34 //same as y }, f: { //foot x: 0, @@ -5736,7 +5737,8 @@ const level = { lineColorLight: "#aaa" //#4a4a4a } const boost1 = level.boost(2550, 1500, 1700) - const boost2 = level.boost(-3400, -2050, 3000) + const boost2 = level.boost(-3400, -2050, 2100) + level.custom = () => { boost1.query(); boost2.query(); @@ -5749,8 +5751,9 @@ const level = { } ctx.fillStyle = "#444" //light fixtures ctx.fillRect(2350, 995, 40, 10) - ctx.fillRect(2280, -6005, 40, 10) + //ctx.fillRect(2280, -6005, 40, 10) + //statue ctx.save(); ctx.translate(s.x, s.y); //statueLeg is at the bottom, below the enemies but above the NGON function @@ -5773,10 +5776,9 @@ const level = { }; level.customTopLayer = () => { - //boosts //boost chute for lack of a better name ctx.fillStyle = "rgba(60,60,60,0.9)"; - ctx.fillRect(-3451, -5000, 202, 2500); + ctx.fillRect(-3451, -4000, 202, 1500); ctx.fillRect(2499, -170, 202, 1170); ctx.fillStyle = "rgba(0,0,0,0.2)"; @@ -5792,17 +5794,17 @@ const level = { ctx.lineTo(1870, 1500); ctx.lineTo(2360, 1000); ctx.fill(); - ctx.beginPath(); //exit - ctx.moveTo(1600, -6000); - ctx.lineTo(1600, -5000); - ctx.lineTo(3000, -5000); - ctx.lineTo(3000, -6000); - ctx.lineTo(2310, -6000); - ctx.lineTo(2600, -5000); - ctx.lineTo(2000, -5000); - ctx.lineTo(2290, -6000); - ctx.lineTo(1600, -6000); - ctx.fill(); + // ctx.beginPath(); //exit + // ctx.moveTo(1600, -6000); + // ctx.lineTo(1600, -5000); + // ctx.lineTo(3000, -5000); + // ctx.lineTo(3000, -6000); + // ctx.lineTo(2310, -6000); + // ctx.lineTo(2600, -5000); + // ctx.lineTo(2000, -5000); + // ctx.lineTo(2290, -6000); + // ctx.lineTo(1600, -6000); + // ctx.fill(); ctx.fillStyle = "rgba(0,0,0,0.3)"; ctx.fillRect(1600, -1000, 1400, 830); @@ -5810,14 +5812,14 @@ const level = { ctx.fillRect(-1300, -200, 2200, 200); //statue base ctx.fillRect(-800, -400, 1200, 200); ctx.fillRect(-500, -700, 600, 300); - ctx.fillRect(-4000, -6000, 2000, 1000); //left side + //ctx.fillRect(-4000, -6000, 2000, 1000); //left side ctx.fillRect(-4000, -2500, 2000, 2500); }; level.setPosToSpawn(1810, 1450); spawn.mapRect(level.enter.x, level.enter.y + 20, 100, 20); level.exit.x = 2700; - level.exit.y = -5030; + level.exit.y = -4030; spawn.mapRect(level.exit.x, level.exit.y + 20, 100, 20); level.defaultZoom = 3500 simulation.zoomTransition(level.defaultZoom) @@ -5828,13 +5830,13 @@ const level = { spawn.debris(-3200, 0, 1000, 6); //16 debris per level //boundaries - spawn.mapRect(-8000, 1500, 15000, 3000); //base floor - spawn.mapRect(3000, -10000, 4000, 12000); //right barrier - spawn.mapRect(-8000, -10000, 4000, 12000); //left barrier - spawn.mapRect(1600, -10000, 1500, 4000); //upper right wall - spawn.mapRect(-4100, -10000, 2100, 4000); //upper left wall - spawn.mapRect(1600, -5000, 1500, 4000); //lower right wall - spawn.mapRect(-4100, 0, 5600, 1700); //floor + spawn.mapRect(-4100, 1500, 7200, 100); //base floor + spawn.mapRect(3000, -4000, 100, 5600); //right barrier + spawn.mapRect(-4100, -4000, 100, 5600); //left barrier + //spawn.mapRect(1600, -10000, 1500, 4000); //upper right wall + //spawn.mapRect(-4100, -10000, 2100, 4000); //upper left wall + spawn.mapRect(1600, -4000, 1500, 3000); //right wall + spawn.mapRect(-4100, 0, 5600, 1550); //floor //starting room spawn.mapRect(1500, 0, 700, 900); @@ -5852,8 +5854,8 @@ const level = { spawn.mapRect(-2700, -1450, 300, 100); spawn.mapRect(-3100, -1750, 300, 100); spawn.mapRect(-3500, -2050, 300, 100); - spawn.mapRect(-4100, -5000, 650, 2500); //floor 3 - spawn.mapRect(-3250, -5000, 1250, 2500); + spawn.mapRect(-4100, -4000, 650, 1500); //floor 3 + spawn.mapRect(-3250, -4000, 1250, 1500); //statue base spawn.mapRect(-700, -900, 1000, 200); //top @@ -5868,7 +5870,7 @@ const level = { spawn.mapRect(400, -600, 200, 400); spawn.mapRect(400, -300, 500, 100); - hangingNGON(-1900, -5000, 1, 1000, 1, true, { + hangingNGON(-1900, -4000, 1, 1000, 1, false, { density: 0.001, //default density is 0.001 friction: 0.0001, frictionAir: 0.001, @@ -5876,7 +5878,7 @@ const level = { restitution: 0, isNotHoldable: true }); - hangingNGON(1900, -5600, 0.2, 500, 0.0005, false, { + hangingNGON(1900, -4600, 0.2, 300, 0.0005, false, { density: 0.00005, //default density is 0.001 friction: 0.0001, frictionAir: 0.003, @@ -5885,24 +5887,24 @@ const level = { isNotHoldable: true }); - // Never gonna give you up - spawn.bodyRect(-8000, -10100, 15, 100); - // Never gonna let you down - spawn.bodyRect(-7915, -10100, 15, 100); - // Never gonna run around and desert you - body[body.length] = Bodies.polygon(-7950, -10025, 0, 25, { //circle - friction: 0.05, - frictionAir: 0.001 - }); - // Never gonna make you cry - spawn.bodyRect(6985, -10100, 15, 100); - // Never gonna say goodbye - spawn.bodyRect(6900, -10100, 15, 100); - // Never gonna tell a lie and hurt you - body[body.length] = Bodies.polygon(6950, -10025, 0, 25, { //circle - friction: 0.05, - frictionAir: 0.001 - }); + // // Never gonna give you up + // spawn.bodyRect(-8000, -10100, 15, 100); + // // Never gonna let you down + // spawn.bodyRect(-7915, -10100, 15, 100); + // // Never gonna run around and desert you + // body[body.length] = Bodies.polygon(-7950, -10025, 0, 25, { //circle + // friction: 0.05, + // frictionAir: 0.001 + // }); + // // Never gonna make you cry + // spawn.bodyRect(6985, -10100, 15, 100); + // // Never gonna say goodbye + // spawn.bodyRect(6900, -10100, 15, 100); + // // Never gonna tell a lie and hurt you + // body[body.length] = Bodies.polygon(6950, -10025, 0, 25, { //circle + // friction: 0.05, + // frictionAir: 0.001 + // }); //pile of blocks spawn.bodyRect(1920, -400, 200, 400) @@ -5952,7 +5954,7 @@ const level = { //top right spawn.randomGroup(2000, -5700, 0.6); - powerUps.addResearchToLevel() //needs to run after mobs are spawned + powerUps.addRerollToLevel() //needs to run after mobs are spawned let bosses = ["shooterBoss", "launcherBoss", "laserTargetingBoss", "streamBoss", "pulsarBoss", "spawnerBossCulture", "laserBoss"]; let abc = Math.random(); if (simulation.difficulty > 3) { @@ -6075,7 +6077,7 @@ const level = { //- spawn.bodyRect(x + 800 * s, y + 250 * s, 200 * s, 100 * s, 1, properties); - body[body.length - 1].frictionAir = 0.05 + body[body.length - 1].frictionAir = 0.05 //friction to make jump easier addConstraint(x + 900 * s, y - height, 0, -30 * s, stiffness, body[body.length - 1], pin); //g diff --git a/js/player.js b/js/player.js index a8f25b8..555d38d 100644 --- a/js/player.js +++ b/js/player.js @@ -1549,21 +1549,6 @@ const m = { } m.pushMobs360(radius); } - // m.harmonicSameAxis = () => { //several ellipses spinning about the same axis - // const radius = m.fieldRange - // const rotation = simulation.cycle * 0.025 - // const phase = simulation.cycle * 0.031 - // ctx.lineWidth = 1; - // ctx.fillStyle = "rgba(0,0,0,0.25)" - // ctx.strokeStyle = "#000" - // for (let i = 0, len = 4; i < len; i++) { - // ctx.beginPath(); - // ctx.ellipse(m.pos.x, m.pos.y, radius * Math.abs(Math.sin(phase + i / len * Math.PI)), radius, rotation, 0, 2 * Math.PI); - // ctx.fill(); - // ctx.stroke(); - // } - // m.pushMobs360(radius); - // } m.harmonicShield = m.harmonic3Phase m.hold = function() { if (m.isHolding) { @@ -1744,50 +1729,82 @@ const m = { m.lookForPickUp(); const DRAIN = 0.00035 if (m.energy > DRAIN) { - m.airSpeedLimit = 400 // 7* player.mass * player.mass - m.FxAir = 0.005 - - //repulse mobs - // for (let i = 0, len = mob.length; i < len; ++i) { - // sub = Vector.sub(mob[i].position, m.pos); - // dist2 = Vector.magnitudeSquared(sub); - // if (dist2 < this.fieldDrawRadius * this.fieldDrawRadius && mob[i].speed > 6) { - // const force = Vector.mult(Vector.perp(Vector.normalise(sub)), 0.00004 * mob[i].speed * mob[i].mass) - // mob[i].force.x = force.x - // mob[i].force.y = force.y - // } - // } - //look for nearby objects to make zero-g - function zeroG(who, range, mag = 1.06) { - for (let i = 0, len = who.length; i < len; ++i) { - sub = Vector.sub(who[i].position, m.pos); - dist = Vector.magnitude(sub); - if (dist < range) { - who[i].force.y -= who[i].mass * (simulation.g * mag); //add a bit more then standard gravity + if (tech.isFlyFaster) { + //look for nearby objects to make zero-g + function moveThis(who, range, mag = 1.06) { + for (let i = 0, len = who.length; i < len; ++i) { + sub = Vector.sub(who[i].position, m.pos); + dist = Vector.magnitude(sub); + if (dist < range) { + who[i].force.y -= who[i].mass * (simulation.g * mag); //add a bit more then standard gravity + if (input.left) { //blocks move horizontally with the same force as the player + who[i].force.x -= m.FxAir * who[i].mass / 10; // move player left / a + } else if (input.right) { + who[i].force.x += m.FxAir * who[i].mass / 10; //move player right / d + } + //loose attraction to player + // const sub = Vector.sub(m.pos, body[i].position) + // const unit = Vector.mult(Vector.normalise(sub), who[i].mass * 0.0000002 * Vector.magnitude(sub)) + // body[i].force.x += unit.x + // body[i].force.y += unit.y + } } } - } - // zeroG(bullet); //works fine, but not that noticeable and maybe not worth the possible performance hit - // zeroG(mob); //mobs are too irregular to make this work? - - if (input.down) { //down - player.force.y -= 0.5 * player.mass * simulation.g; - this.fieldDrawRadius = this.fieldDrawRadius * 0.97 + 400 * 0.03; - zeroG(powerUp, this.fieldDrawRadius, 0.7); - zeroG(body, this.fieldDrawRadius, 0.7); - } else if (input.up) { //up - m.energy -= 5 * DRAIN; - this.fieldDrawRadius = this.fieldDrawRadius * 0.97 + 850 * 0.03; - player.force.y -= 1.45 * player.mass * simulation.g; - zeroG(powerUp, this.fieldDrawRadius, 1.38); - zeroG(body, this.fieldDrawRadius, 1.38); + //control horizontal acceleration + m.airSpeedLimit = 1000 // 7* player.mass * player.mass + m.FxAir = 0.01 + //control vertical acceleration + if (input.down) { //down + player.force.y += 0.5 * player.mass * simulation.g; + this.fieldDrawRadius = this.fieldDrawRadius * 0.97 + 500 * 0.03; + moveThis(powerUp, this.fieldDrawRadius, 0); + moveThis(body, this.fieldDrawRadius, 0); + } else if (input.up) { //up + m.energy -= 5 * DRAIN; + this.fieldDrawRadius = this.fieldDrawRadius * 0.97 + 1100 * 0.03; + player.force.y -= 2.25 * player.mass * simulation.g; + moveThis(powerUp, this.fieldDrawRadius, 1.8); + moveThis(body, this.fieldDrawRadius, 1.8); + } else { + m.energy -= DRAIN; + this.fieldDrawRadius = this.fieldDrawRadius * 0.97 + 800 * 0.03; + player.force.y -= 1.07 * player.mass * simulation.g; // slow upward drift + moveThis(powerUp, this.fieldDrawRadius); + moveThis(body, this.fieldDrawRadius); + } } else { - m.energy -= DRAIN; - this.fieldDrawRadius = this.fieldDrawRadius * 0.97 + 650 * 0.03; - player.force.y -= 1.07 * player.mass * simulation.g; // slow upward drift - zeroG(powerUp, this.fieldDrawRadius); - zeroG(body, this.fieldDrawRadius); + //look for nearby objects to make zero-g + function verticalForce(who, range, mag = 1.06) { + for (let i = 0, len = who.length; i < len; ++i) { + sub = Vector.sub(who[i].position, m.pos); + dist = Vector.magnitude(sub); + if (dist < range) who[i].force.y -= who[i].mass * (simulation.g * mag); + } + } + //control horizontal acceleration + m.airSpeedLimit = 400 // 7* player.mass * player.mass + m.FxAir = 0.005 + //control vertical acceleration + if (input.down) { //down + player.force.y -= 0.5 * player.mass * simulation.g; + this.fieldDrawRadius = this.fieldDrawRadius * 0.97 + 400 * 0.03; + verticalForce(powerUp, this.fieldDrawRadius, 0.7); + verticalForce(body, this.fieldDrawRadius, 0.7); + } else if (input.up) { //up + m.energy -= 5 * DRAIN; + this.fieldDrawRadius = this.fieldDrawRadius * 0.97 + 850 * 0.03; + player.force.y -= 1.45 * player.mass * simulation.g; + verticalForce(powerUp, this.fieldDrawRadius, 1.38); + verticalForce(body, this.fieldDrawRadius, 1.38); + } else { + m.energy -= DRAIN; + this.fieldDrawRadius = this.fieldDrawRadius * 0.97 + 650 * 0.03; + player.force.y -= 1.07 * player.mass * simulation.g; // slow upward drift + verticalForce(powerUp, this.fieldDrawRadius); + verticalForce(body, this.fieldDrawRadius); + } } + if (m.energy < 0.001) { m.fieldCDcycle = m.cycle + 120; m.energy = 0; @@ -3026,7 +3043,7 @@ const m = { }); if (tech.isAnnihilation && !mob[k].shield && !mob[k].isShielded && !mob[k].isBoss && mob[k].isDropPowerUp && m.energy > 0.34 * m.maxEnergy) { - m.energy -= 0.33 * m.maxEnergy + m.energy -= 0.33 * Math.max(m.maxEnergy, m.energy) m.immuneCycle = 0; //player doesn't go immune to collision damage mob[k].death(); simulation.drawList.push({ //add dmg to draw queue diff --git a/js/spawn.js b/js/spawn.js index 028db52..6551bb6 100644 --- a/js/spawn.js +++ b/js/spawn.js @@ -455,7 +455,7 @@ const spawn = { } const len = (this.totalCycles / 400 + simulation.difficulty / 2 - 30) / 15 for (let i = 0; i < len; i++) { - spawn.randomLevelBoss(-3000 + 2000 * (Math.random() - 0.5), -1100 + 200 * (Math.random() - 0.5)) + spawn.randomLevelBoss(3000 * (simulation.isHorizontalFlipped ? -1 : 1) + 2000 * (Math.random() - 0.5), -1100 + 200 * (Math.random() - 0.5)) } } } @@ -1475,10 +1475,11 @@ const spawn = { mobs.spawn(x, y, 0, radius, "transparent"); let me = mob[mob.length - 1]; Matter.Body.setDensity(me, 0.3); //extra dense //normal is 0.001 - me.laserRange = 550; + me.laserRange = 350; me.seeAtDistance2 = 2000000; + me.isBoss = true; me.showHealthBar = false; //drawn in this.awake - me.delayLimit = 60 + Math.floor(60 * Math.random()); + me.delayLimit = 60 + Math.floor(30 * Math.random()); me.followDelay = 600 - Math.floor(60 * Math.random()) me.stroke = "transparent"; //used for drawGhost me.collisionFilter.mask = cat.bullet | cat.body @@ -1509,11 +1510,11 @@ const spawn = { ctx.lineWidth = 2; ctx.stroke(); - ctx.setLineDash([125 * Math.random(), 125 * Math.random()]); + ctx.setLineDash([125 * Math.random(), 125 * Math.random()]); //the dashed effect is not set back to normal, because it looks neat for how the player is drawn // ctx.lineDashOffset = 6*(simulation.cycle % 215); if (this.distanceToPlayer() < this.laserRange) { - if (m.energy > 0.002) m.energy -= 0.002 - if (m.immuneCycle < m.cycle) m.damage(0.0001 * simulation.dmgScale); + if (m.energy > 0.002) m.energy -= 0.0035 + if (m.immuneCycle < m.cycle) m.damage(0.00025 * simulation.dmgScale); ctx.beginPath(); ctx.moveTo(eye.x, eye.y); ctx.lineTo(m.pos.x, m.pos.y); @@ -1526,16 +1527,31 @@ const spawn = { ctx.fillStyle = "rgba(150,0,255,0.15)"; ctx.fill(); } - ctx.beginPath(); - ctx.arc(this.position.x, this.position.y, this.laserRange * 0.9, 0, 2 * Math.PI); - ctx.strokeStyle = "rgba(150,0,255,0.5)"; + + //several ellipses spinning about the same axis + const rotation = simulation.cycle * 0.015 + const phase = simulation.cycle * 0.021 ctx.lineWidth = 1; - ctx.stroke(); - ctx.setLineDash([]); - ctx.fillStyle = "rgba(150,0,255,0.03)"; - ctx.fill(); + ctx.fillStyle = "rgba(150,0,255,0.1)" + ctx.strokeStyle = "#70f" + for (let i = 0, len = 7; i < len; i++) { + ctx.beginPath(); + ctx.ellipse(this.position.x, this.position.y, this.laserRange * Math.abs(Math.sin(phase + i / len * Math.PI)), this.laserRange, rotation, 0, 2 * Math.PI); + ctx.fill(); + ctx.stroke(); + } + + + // ctx.beginPath(); + // ctx.arc(this.position.x, this.position.y, this.laserRange * 0.9, 0, 2 * Math.PI); + // ctx.strokeStyle = "rgba(150,0,255,0.5)"; + // ctx.lineWidth = 1; + // ctx.stroke(); + // ctx.setLineDash([]); + // ctx.fillStyle = "rgba(150,0,255,0.03)"; + // ctx.fill(); if (!m.isBodiesAsleep && !this.isStunned && !this.isSlowed) { - if (this.followDelay > this.delayLimit) this.followDelay -= 0.2; + if (this.followDelay > this.delayLimit) this.followDelay -= 0.3; let history = m.history[(m.cycle - Math.floor(this.followDelay)) % 600] Matter.Body.setPosition(this, { x: history.position.x, y: history.position.y - history.yOff + 24.2859 }) //bullets move with player } diff --git a/js/tech.js b/js/tech.js index f5433df..1bcea61 100644 --- a/js/tech.js +++ b/js/tech.js @@ -1515,9 +1515,9 @@ count: 0, frequency: 2, allowed() { - return tech.throwChargeRate > 1 || m.fieldUpgrades[m.fieldMode].name === "pilot wave" + return (tech.throwChargeRate > 1 || m.fieldUpgrades[m.fieldMode].name === "pilot wave") && !tech.isBlockExplosion }, - requires: "mass driver or pilot wave", + requires: "mass driver or pilot wave not tokamak", effect() { tech.isBlockBullets = true }, @@ -1551,9 +1551,9 @@ frequency: 3, frequencyDefault: 3, allowed() { - return tech.throwChargeRate > 1 && m.fieldUpgrades[m.fieldMode].name !== "pilot wave" + return (tech.throwChargeRate > 1 || m.fieldUpgrades[m.fieldMode].name === "pilot wave") && !tech.isBlockExplosion }, - requires: "mass driver, not pilot wave", + requires: "mass driver, not pilot wave not tokamak", effect() { tech.isBlockPowerUps = true }, @@ -2034,7 +2034,7 @@ count: 0, frequency: 2, allowed() { - return (tech.iceEnergy || tech.isWormholeEnergy || tech.isPiezo || tech.isRailEnergyGain || tech.energySiphon || tech.isEnergyRecovery || tech.dynamoBotCount || tech.isFlipFlopEnergy) && tech.energyRegen !== 0.004 && !tech.isEnergyHealth + return (tech.iceEnergy || tech.isWormholeEnergy || tech.isPiezo || tech.isRailEnergyGain || tech.energySiphon || tech.isEnergyRecovery || tech.dynamoBotCount || tech.isFlipFlopEnergy || tech.isBlockExplosion) && tech.energyRegen !== 0.004 && !tech.isEnergyHealth }, requires: "a way to regen extra energy, but not time crystals", effect: () => { @@ -2109,7 +2109,7 @@ count: 0, frequency: 2, allowed() { - return m.maxEnergy > 1 || tech.isEnergyRecovery || tech.isPiezo || tech.energySiphon > 0 + return m.maxEnergy > 1 || tech.isEnergyRecovery || tech.isPiezo || tech.energySiphon > 0 || tech.isBlockExplosion }, requires: "increased energy regen or max energy", effect: () => { @@ -2217,7 +2217,7 @@ count: 0, frequency: 2, allowed() { - return tech.isEnergyRecovery || tech.isPiezo || tech.energySiphon > 0 || tech.isRailEnergyGain || tech.isWormholeEnergy || tech.iceEnergy > 0 || tech.isMassEnergy + return tech.isEnergyRecovery || tech.isPiezo || tech.energySiphon > 0 || tech.isRailEnergyGain || tech.isWormholeEnergy || tech.iceEnergy > 0 || tech.isMassEnergy || tech.isBlockExplosion }, requires: "a source of overfilled energy", effect() { @@ -4947,7 +4947,7 @@ }, { name: "annihilation", - description: "touching normal mobs annihilates them
drains 33% of maximum energy", + description: "touching normal mobs annihilates them
drains 33% of your maximum energy", isFieldTech: true, maxCount: 1, count: 0, @@ -4963,6 +4963,24 @@ tech.isAnnihilation = false; } }, + { + name: "inertial mass", + description: "negative mass field is larger and faster
blocks also move horizontally with the field", + isFieldTech: true, + maxCount: 1, + count: 0, + frequency: 2, + allowed() { + return m.fieldUpgrades[m.fieldMode].name === "negative mass field" + }, + requires: "negative mass field", + effect() { + tech.isFlyFaster = true + }, + remove() { + tech.isFlyFaster = false; + } + }, { name: "Bose Einstein condensate", description: "mobs inside your field are frozen
pilot wave, negative mass, time dilation", @@ -5042,7 +5060,7 @@ }, { name: "tokamak", - description: "throwing a block convert it into energy
and a laser pulse explosion cluster", + description: "throwing a block converts it into energy
and a pulsed fusion explosion", isFieldTech: true, maxCount: 1, count: 0, @@ -5481,25 +5499,26 @@ // }, // remove() {} // }, - // { - // name: "WIMP", - // description: "harmful particles slowly chase you", - // maxCount: 1, - // count: 0, - // frequency: 0, - // isExperimentHide: true, - // isJunk: true, - // allowed() { - // return tech.wimpExperiment === 0 - // }, - // requires: "", - // effect() { - // tech.wimpExperiment = 3 - // }, - // remove() { - // tech.wimpExperiment = 0 - // } - // }, + { + name: "hidden variable", + description: "spawn 30 heal power ups
but hide your health bar", + maxCount: 1, + count: 0, + frequency: 0, + isNonRefundable: true, + isExperimentHide: true, + isJunk: true, + allowed() { + return !tech.isEnergyHealth + }, + requires: "not mass-energy", + effect() { + document.getElementById("health").style.display = "none" + document.getElementById("health-bg").style.display = "none" + for (let i = 0; i < 30; i++) powerUps.spawn(m.pos.x + 160 * (Math.random() - 0.5), m.pos.y + 160 * (Math.random() - 0.5), "heal"); + }, + remove() {} + }, { name: "not a bug", description: "initiate a totally safe game crash for 5 seconds", diff --git a/todo.txt b/todo.txt index 37ed81f..d4075bf 100644 --- a/todo.txt +++ b/todo.txt @@ -1,12 +1,6 @@ ******************************************************** NEXT PATCH ******************************************************** -tech: tokamak - instead of throwing a block convert it into energy and a pulse explosion - requires plasma -standing wave field no longer gives 25% harm reduction -standing wave field can now block through walls - -bug fixes ******************************************************** BUGS ******************************************************** @@ -34,10 +28,19 @@ is there a way to check if the player is stuck inside the map or block ******************************************************** TODO ******************************************************** -throwing a block removes the block and fires a pulse with a size that scales with the size of the block - must have a charge above some threshold - plasma field tech - gain 100 energy? +have throw charge scale with fire delay + +in testing mode console log the body you click on + +default negative mass field- move block horizontally? + should this be a tech? + +negative mass field tech - increase flight speed + use the sphere ellipse graphic? + move block horizontally and vertically with player + +throwing a block removes the block and rewinds time 10 seconds (including health and energy) + requires CPT, CPT gun, time dilation field? tech plasma : plasma length increases then decreases as you hold down the field button (like stabbing with a spear) grows to 1.5 longer after 0.3 seconds, then returns to normal length over 1 second, until field is pressed again