From 34b1a029813788ab9488cc1be99329af4bce087b Mon Sep 17 00:00:00 2001 From: landgreen Date: Sun, 24 Oct 2021 18:28:33 -0700 Subject: [PATCH] neutronium tech: neutronium - 90% harm reduce while field is active, 33% slower move speed (requires negative mass field) tech: charmed baryon - 0 cost wormhole, 33% slower move speed harpoon tech: reticulum now always fires extra harpoons even if there are no targets tech.removeTech() method has been improved bug fixes --- .DS_Store | Bin 6148 -> 6148 bytes js/bullet.js | 51 ++++++++++------ js/level.js | 14 ++--- js/player.js | 29 +++++++-- js/powerup.js | 34 +++++------ js/spawn.js | 82 +++++++++++++------------- js/tech.js | 159 +++++++++++++++++++++++++++++++++++++------------- todo.txt | 46 ++++----------- 8 files changed, 250 insertions(+), 165 deletions(-) diff --git a/.DS_Store b/.DS_Store index 6085f67d43a77257aa1d682bea7fc3ef051266d8..8f387a5dc5a4d057bec8af34f978d0cbed948a5c 100644 GIT binary patch delta 22 dcmZoMXffEJ$;>PxTs>Kb*^jYdb2W3P2mnbe22lV2 delta 22 dcmZoMXffEJ$;>SMPkXWsvmfJz&DG4EA^=it2O9tY diff --git a/js/bullet.js b/js/bullet.js index 068f1af..5713296 100644 --- a/js/bullet.js +++ b/js/bullet.js @@ -1133,7 +1133,10 @@ const b = { who.isShielded = false requestAnimationFrame(() => { who.isShielded = true }); } - if (tech.fragments) b.targetedNail(this.vertices[2], tech.fragments * 3) + if (tech.fragments) { + b.targetedNail(this.vertices[2], tech.fragments * 4) + if (!isReturn) this.endCycle = 0; + } if (!who.isBadTarget) { if (isReturn) { this.do = this.returnToPlayer @@ -4049,11 +4052,11 @@ const b = { this.nextFireCycle = m.cycle + CD * b.fireCDscale //predict next fire cycle if the fire button is held down m.fireCDcycle = m.cycle + Math.floor(CD * b.fireCDscale); // cool down - this.baseFire(m.angle + (Math.random() - 0.5) * (input.down ? 0.05 : 0.1) / CD, 43 + 8 * Math.random()) + this.baseFire(m.angle + (Math.random() - 0.5) * (input.down ? 0.1 : 0.13) / CD, 45 + 6 * Math.random()) //very complex recoil system if (m.onGround) { if (input.down) { - const KNOCK = 0.01 + const KNOCK = 0.006 player.force.x -= KNOCK * Math.cos(m.angle) player.force.y -= KNOCK * Math.sin(m.angle) //reduce knock back in vertical direction to stop super jumps Matter.Body.setVelocity(player, { @@ -4061,7 +4064,7 @@ const b = { y: player.velocity.y * 0.5 }); } else { - const KNOCK = 0.05 + const KNOCK = 0.03 player.force.x -= KNOCK * Math.cos(m.angle) player.force.y -= KNOCK * Math.sin(m.angle) //reduce knock back in vertical direction to stop super jumps Matter.Body.setVelocity(player, { @@ -4070,8 +4073,8 @@ const b = { }); } } else { - if (Math.abs(player.velocity.x) < 12) player.force.x -= 0.04 * Math.cos(m.angle) - player.force.y -= 0.01 * Math.sin(m.angle) //reduce knock back in vertical direction to stop super jumps + if (Math.abs(player.velocity.x) < 12) player.force.x -= 0.025 * Math.cos(m.angle) + player.force.y -= 0.006 * Math.sin(m.angle) //reduce knock back in vertical direction to stop super jumps } }, fireNormal() { @@ -4173,7 +4176,7 @@ const b = { fireRecoilRivets() { // m.fireCDcycle = m.cycle + Math.floor((input.down ? 25 : 17) * b.fireCDscale); // cool down if (this.nextFireCycle + 1 < m.cycle) this.startingHoldCycle = m.cycle //reset if not constantly firing - const CD = Math.max(30 - 0.15 * (m.cycle - this.startingHoldCycle), 8) //CD scales with cycles fire is held down + const CD = Math.max(25 - 0.14 * (m.cycle - this.startingHoldCycle), 6) //CD scales with cycles fire is held down this.nextFireCycle = m.cycle + CD * b.fireCDscale //predict next fire cycle if the fire button is held down m.fireCDcycle = m.cycle + Math.floor(CD * b.fireCDscale); // cool down @@ -4219,7 +4222,7 @@ const b = { //very complex recoil system if (m.onGround) { if (input.down) { - const KNOCK = 0.05 + const KNOCK = 0.03 player.force.x -= KNOCK * Math.cos(m.angle) player.force.y -= KNOCK * Math.sin(m.angle) //reduce knock back in vertical direction to stop super jumps Matter.Body.setVelocity(player, { @@ -4227,7 +4230,7 @@ const b = { y: player.velocity.y * 0.4 }); } else { - const KNOCK = 0.15 + const KNOCK = 0.1 player.force.x -= KNOCK * Math.cos(m.angle) player.force.y -= KNOCK * Math.sin(m.angle) //reduce knock back in vertical direction to stop super jumps Matter.Body.setVelocity(player, { @@ -4236,8 +4239,8 @@ const b = { }); } } else { - if (Math.abs(player.velocity.x) < 12) player.force.x -= 0.1 * Math.cos(m.angle) - player.force.y -= 0.03 * Math.sin(m.angle) //reduce knock back in vertical direction to stop super jumps + if (Math.abs(player.velocity.x) < 12) player.force.x -= 0.06 * Math.cos(m.angle) + player.force.y -= 0.02 * Math.sin(m.angle) //reduce knock back in vertical direction to stop super jumps } }, fireInstantFireRate() { @@ -5330,29 +5333,39 @@ const b = { m.fireCDcycle = m.cycle + 50 * b.fireCDscale; // cool down // } } else if (tech.extraHarpoons) { + const harpoons = tech.extraHarpoons + 1 const range = 450 * (tech.isFilament ? 1 + 0.005 * Math.min(110, this.ammo) : 1) let targetCount = 0 for (let i = 0, len = mob.length; i < len; ++i) { if (mob[i].alive && !mob[i].isBadTarget && !mob[i].shield && Matter.Query.ray(map, m.pos, mob[i].position).length === 0) { const dot = Vector.dot(dir, Vector.normalise(Vector.sub(mob[i].position, m.pos))) //the dot product of diff and dir will return how much over lap between the vectors const dist = Vector.magnitude(Vector.sub(where, mob[i].position)) - if (dist < range && dot > 0.7) { //target closest mob that player is looking at and isn't too close to target + if (dist < range && dot > 0.7) { //lower dot product threshold for targeting then if you only have one harpoon //target closest mob that player is looking at and isn't too close to target if (this.ammo > 0) { this.ammo-- b.harpoon(where, mob[i], m.angle, length, true, totalCycles) //Vector.angle(Vector.sub(where, mob[i].position), { x: 0, y: 0 }) targetCount++ - if (targetCount > tech.extraHarpoons) break + if (targetCount > harpoons) break } } } } - if (!targetCount) { - b.harpoon(where, null, m.angle, length, true, totalCycles) //if no target - } else if (targetCount > 0) { - this.ammo++ //make up for the ammo used up in fire() - simulation.updateGunHUD(); + //if more harpoons and no targets left + if (targetCount < harpoons) { + const SPREAD = 0.1 + const num = harpoons - targetCount + let dir = m.angle - SPREAD * (num - 1) / 2; + for (let i = 0; i < num; i++) { + if (this.ammo > 0) { + this.ammo-- + b.harpoon(where, null, dir, length, true, totalCycles) //Vector.angle(Vector.sub(where, mob[i].position), { x: 0, y: 0 }) + dir += SPREAD + } + } } - m.fireCDcycle = m.cycle + 90 //Infinity; // cool down + this.ammo++ //make up for the ammo used up in fire() + simulation.updateGunHUD(); + m.fireCDcycle = m.cycle + 90 // cool down } else { for (let i = 0, len = mob.length; i < len; ++i) { if (mob[i].alive && !mob[i].isBadTarget && Matter.Query.ray(map, m.pos, mob[i].position).length === 0) { diff --git a/js/level.js b/js/level.js index 7eb27f8..d9733d0 100644 --- a/js/level.js +++ b/js/level.js @@ -15,14 +15,14 @@ const level = { // localSettings.levelsClearedLastGame = 10 // level.difficultyIncrease(30) //30 is near max on hard //60 is near max on why // simulation.isHorizontalFlipped = true - // m.setField("plasma torch") - // b.giveGuns("nail gun") + // m.setField("negative mass") + // b.giveGuns("harpoon") // tech.giveTech("rotary cannon") - // tech.giveTech("pneumatic actuator") + // tech.giveTech("fragmentation") // tech.giveTech("rivet gun") // for (let i = 0; i < 2; i++) tech.giveTech("refractory metal") // tech.giveTech("all-stars") - // for (let i = 0; i < 3; i++) tech.giveTech("overcharge") + // for (let i = 0; i < 9; i++) tech.giveTech("reticulum") // for (let i = 0; i < 2; i++) tech.giveTech("laser-bot") // tech.isCancelDuplication = true @@ -2309,14 +2309,14 @@ const level = { spawn.mapRect(5300, -275, 50, 175); spawn.mapRect(5050, -100, 50, 150); spawn.mapRect(4850, -275, 50, 175); - level.difficultyIncrease(40) //30 is near max on hard //60 is near max on why - spawn.starter(1900, -500, 200) //big boy + // level.difficultyIncrease(40) //30 is near max on hard //60 is near max on why + // spawn.starter(1900, -500, 200) //big boy // spawn.blockGroup(1900, -500) // for (let i = 0; i < 10; ++i) spawn.bodyRect(1600 + 5, -500, 30, 40); // spawn.laserBombingBoss(1900, -500) // for (let i = 0; i < 5; i++) spawn.focuser(1900, -500) // spawn.slashBoss(1900, -500) - // spawn.slasher(1900, -500) + spawn.sucker(1900, -500) // spawn.shield(mob[mob.length - 1], 1900, -500, 1); // mob[mob.length - 1].isShielded = true // spawn.growBossCulture(1200, -500) diff --git a/js/player.js b/js/player.js index 69b1336..47e52ec 100644 --- a/js/player.js +++ b/js/player.js @@ -75,8 +75,10 @@ const m = { Fx: 0.016, //run Force on ground // jumpForce: 0.42, setMovement() { - m.Fx = 0.016 * tech.squirrelFx * (tech.isFastTime ? 1.5 : 1); - m.jumpForce = 0.42 * tech.squirrelJump * (tech.isFastTime ? 1.13 : 1) + // m.Fx = 0.08 / mass * tech.squirrelFx + // m.FxAir = 0.4 / mass / mass + m.Fx = tech.baseFx * tech.squirrelFx * (tech.isFastTime ? 1.5 : 1) / player.mass //base player mass is 5 + m.jumpForce = tech.baseJumpForce * tech.squirrelJump * (tech.isFastTime ? 1.13 : 1) / player.mass / player.mass //base player mass is 5 }, FxAir: 0.016, // 0.4/5/5 run Force in Air yOff: 70, @@ -431,6 +433,7 @@ const m = { } simulation.isTextLogOpen = true; simulation.makeTextLog("simulation.amplitude = null"); + tech.isImmortal = false //disable future immortality }, 6 * swapPeriod); } else if (m.alive) { //normal death code here m.alive = false; @@ -504,8 +507,8 @@ const m = { if (tech.isBlockHarm && m.isHolding) dmg *= 0.15 if (tech.isSpeedHarm) dmg *= 1 - Math.min(player.speed * 0.0165, 0.66) if (tech.isSlowFPS) dmg *= 0.8 - // if (tech.isPiezo) dmg *= 0.85 if (tech.isHarmReduce && input.field && m.fieldCDcycle < m.cycle) dmg *= 0.4 + if (tech.isNeutronium && input.field && m.fieldCDcycle < m.cycle) dmg *= 0.1 if (tech.isBotArmor) dmg *= 0.92 ** b.totalBots() if (tech.isHarmArmor && m.lastHarmCycle + 600 > m.cycle) dmg *= 0.33; if (tech.isNoFireDefense && m.cycle > m.fireCDcycle + 120) dmg *= 0.3 @@ -945,6 +948,14 @@ const m = { m.fieldThreshold = Math.cos(m.fieldArc * Math.PI) }, setHoldDefaults() { + if (tech.isFreeWormHole && m.fieldUpgrades[m.fieldMode].name !== "wormhole") { + tech.removeTech("charmed baryon") //neutronum can get player stuck so it has to be removed if player has wrong field + powerUps.directSpawn(m.pos.x, m.pos.y, "tech"); + } + if (tech.isNeutronium && m.fieldUpgrades[m.fieldMode].name !== "negative mass") { + tech.removeTech("neutronium") //neutronum can get player stuck so it has to be removed if player has wrong field + powerUps.directSpawn(m.pos.x, m.pos.y, "tech"); + } if (m.energy < m.maxEnergy) m.energy = m.maxEnergy; m.fieldRegen = tech.energyRegen; //0.001 m.fieldMeterColor = "#0cf" @@ -1038,11 +1049,17 @@ const m = { m.holdingTarget = null; } }, + // setMovement() { + // console.log('hi') + // m.Fx = tech.baseFx * tech.squirrelFx * (tech.isFastTime ? 1.5 : 1); + // m.jumpForce = tech.baseJumpForce * tech.squirrelJump * (tech.isFastTime ? 1.13 : 1) + // }, definePlayerMass(mass = m.defaultMass) { Matter.Body.setMass(player, mass); //reduce air and ground move forces - m.Fx = 0.08 / mass * tech.squirrelFx //base player mass is 5 - m.FxAir = 0.4 / mass / mass //base player mass is 5 + m.setMovement() + // m.Fx = 0.08 / mass * tech.squirrelFx //base player mass is 5 + // m.FxAir = 0.4 / mass / mass //base player mass is 5 //make player stand a bit lower when holding heavy masses m.yOffWhen.stand = Math.max(m.yOffWhen.crouch, Math.min(49, 49 - (mass - 5) * 6)) if (m.onGround && !m.crouch) m.yOffGoal = m.yOffWhen.stand; @@ -2878,7 +2895,7 @@ const m = { ) { const sub = Vector.sub(simulation.mouseInGame, m.pos) const mag = Vector.magnitude(sub) - const drain = 0.06 + 0.006 * Math.sqrt(mag) + const drain = tech.isFreeWormHole ? 0 : 0.06 + 0.006 * Math.sqrt(mag) if (m.energy > drain && mag > 300) { m.energy -= drain m.hole.isReady = false; diff --git a/js/powerup.js b/js/powerup.js index f8f44d0..ba7c022 100644 --- a/js/powerup.js +++ b/js/powerup.js @@ -979,23 +979,23 @@ const powerUps = { m.fieldCDcycle = m.cycle + 30; //disable field so you can't pick up the ejected tech } }, - removeRandomTech() { - const have = [] //find which tech you have - for (let i = 0; i < tech.tech.length; i++) { - if (tech.tech[i].count > 0) have.push(i) - } - if (have.length) { - const choose = have[Math.floor(Math.random() * have.length)] - simulation.makeTextLog(`tech.remove("${tech.tech[choose].name}")`) - const totalRemoved = tech.tech[choose].count - tech.tech[choose].count = 0; - tech.tech[choose].remove(); // remove a random tech form the list of tech you have - tech.tech[choose].isLost = true - simulation.updateTechHUD(); - return totalRemoved - } - return 0 - }, + // removeRandomTech() { + // const have = [] //find which tech you have + // for (let i = 0; i < tech.tech.length; i++) { + // if (tech.tech[i].count > 0) have.push(i) + // } + // if (have.length) { + // const choose = have[Math.floor(Math.random() * have.length)] + // simulation.makeTextLog(`tech.removeTech("${tech.tech[choose].name}")`) + // const totalRemoved = tech.tech[choose].count + // tech.tech[choose].count = 0; + // tech.tech[choose].remove(); // remove a random tech form the list of tech you have + // tech.tech[choose].isLost = true + // simulation.updateTechHUD(); + // return totalRemoved + // } + // return 0 + // }, directSpawn(x, y, target, moving = true, mode = null, size = powerUps[target].size()) { let index = powerUp.length; target = powerUps[target]; diff --git a/js/spawn.js b/js/spawn.js index 2424bb4..3ca43cc 100644 --- a/js/spawn.js +++ b/js/spawn.js @@ -1501,52 +1501,52 @@ const spawn = { // } // } this.checkStatus(); - if (this.seePlayer.recall) { - //eventHorizon waves in and out - const eventHorizon = this.eventHorizon * (0.93 + 0.17 * Math.sin(simulation.cycle * 0.011)) + // if (this.seePlayer.recall) { + //eventHorizon waves in and out + const eventHorizon = this.eventHorizon * (0.93 + 0.17 * Math.sin(simulation.cycle * 0.011)) - //accelerate towards the player - const forceMag = this.accelMag * this.mass; - const angle = Math.atan2(this.seePlayer.position.y - this.position.y, this.seePlayer.position.x - this.position.x); - this.force.x += forceMag * Math.cos(angle); - this.force.y += forceMag * Math.sin(angle); + //accelerate towards the player + const forceMag = this.accelMag * this.mass; + const angle = Math.atan2(this.seePlayer.position.y - this.position.y, this.seePlayer.position.x - this.position.x); + this.force.x += forceMag * Math.cos(angle); + this.force.y += forceMag * Math.sin(angle); - //draw darkness - ctx.beginPath(); - ctx.arc(this.position.x, this.position.y, eventHorizon * 0.25, 0, 2 * Math.PI); - ctx.fillStyle = "rgba(0,0,0,0.9)"; - ctx.fill(); - ctx.beginPath(); - ctx.arc(this.position.x, this.position.y, eventHorizon * 0.55, 0, 2 * Math.PI); - ctx.fillStyle = "rgba(0,0,0,0.5)"; - ctx.fill(); - ctx.beginPath(); - ctx.arc(this.position.x, this.position.y, eventHorizon, 0, 2 * Math.PI); - ctx.fillStyle = "rgba(0,0,0,0.1)"; - ctx.fill(); + //draw darkness + ctx.beginPath(); + ctx.arc(this.position.x, this.position.y, eventHorizon * 0.25, 0, 2 * Math.PI); + ctx.fillStyle = "rgba(0,0,0,0.9)"; + ctx.fill(); + ctx.beginPath(); + ctx.arc(this.position.x, this.position.y, eventHorizon * 0.55, 0, 2 * Math.PI); + ctx.fillStyle = "rgba(0,0,0,0.5)"; + ctx.fill(); + ctx.beginPath(); + ctx.arc(this.position.x, this.position.y, eventHorizon, 0, 2 * Math.PI); + ctx.fillStyle = "rgba(0,0,0,0.1)"; + ctx.fill(); - //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); - } - 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); - player.force.y -= 0.0001 * player.mass * Math.sin(angle); - //draw line to player - ctx.beginPath(); - ctx.moveTo(this.position.x, this.position.y); - ctx.lineTo(m.pos.x, m.pos.y); - ctx.lineWidth = Math.min(60, this.radius * 2); - ctx.strokeStyle = "rgba(0,0,0,0.5)"; - ctx.stroke(); - ctx.beginPath(); - ctx.arc(m.pos.x, m.pos.y, 40, 0, 2 * Math.PI); - ctx.fillStyle = "rgba(0,0,0,0.3)"; - ctx.fill(); + //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); } + 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); + player.force.y -= 0.0001 * player.mass * Math.sin(angle); + //draw line to player + ctx.beginPath(); + ctx.moveTo(this.position.x, this.position.y); + ctx.lineTo(m.pos.x, m.pos.y); + ctx.lineWidth = Math.min(60, this.radius * 2); + ctx.strokeStyle = "rgba(0,0,0,0.5)"; + ctx.stroke(); + ctx.beginPath(); + ctx.arc(m.pos.x, m.pos.y, 40, 0, 2 * Math.PI); + ctx.fillStyle = "rgba(0,0,0,0.3)"; + ctx.fill(); } + // } } }, suckerBoss(x, y, radius = 25) { diff --git a/js/tech.js b/js/tech.js index ce72025..bc51e5e 100644 --- a/js/tech.js +++ b/js/tech.js @@ -29,8 +29,18 @@ tech.totalCount = 0; simulation.updateTechHUD(); }, - removeTech(index) { - if (isNaN(index)) { //find index by name + removeTech(index = 'random') { + if (index === 'random') { + const have = [] //find which tech you have + for (let i = 0; i < tech.tech.length; i++) { + if (tech.tech[i].count > 0 && !tech.tech[i].isNonRefundable) have.push(i) + } + if (have.length) { + index = have[Math.floor(Math.random() * have.length)] + } else { + return 0 //if none found don't remove any tech + } + } else if (isNaN(index)) { //find index by name let found = false; for (let i = 0; i < tech.tech.length; i++) { if (index === tech.tech[i].name) { @@ -39,11 +49,16 @@ break; } } - if (!found) return //if name not found don't remove any tech + if (!found) return 0 //if name not found don't remove any tech } - tech.tech[index].remove(); + const totalRemoved = tech.tech[index].count + simulation.makeTextLog(`tech.removeTech("${tech.tech[index].name}")`) tech.tech[index].count = 0; + tech.tech[index].remove(); simulation.updateTechHUD(); + tech.tech[index].isLost = true + simulation.updateTechHUD(); + return totalRemoved //return the total number of tech removed }, // onclick="tech.removeTechPaused(${i}, this)" //add this to tech elements in pause menu // removeTechPaused(index, who) { @@ -590,7 +605,7 @@ }, { name: "squirrel-cage rotor", - description: "move and jump about 30% faster
take 5% more harm", + description: "move and jump 30% faster
take 5% more harm", maxCount: 9, count: 0, frequency: 2, @@ -3338,7 +3353,7 @@ }, requires: "NOT EXPERIMENT MODE, at least 4 tech, a chance to duplicate power ups, not superdeterminism", effect: () => { - const removeTotal = powerUps.removeRandomTech() + const removeTotal = tech.removeTech() for (let i = 0; i < removeTotal + 1; i++) powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "tech"); }, remove() {} @@ -3529,7 +3544,7 @@ if (tech.isDeterminism) { tech.isDeterminism = false; for (let i = 0; i < 5; i++) { - const numberRemoved = powerUps.removeRandomTech() + const numberRemoved = tech.removeTech() if (numberRemoved === 0) { //if the player didn't remove a power up then remove 1 tech for the map for (let i = 0; i < powerUp.length; i++) { if (powerUp[i].name === "tech") { @@ -3562,7 +3577,9 @@ }, remove() { tech.isSuperDeterminism = false; - for (let i = 0; i < 5; i++) powerUps.removeRandomTech() + if (this.count) { + for (let i = 0; i < 5; i++) tech.removeTech() + } } }, { @@ -5207,7 +5224,7 @@ }, { name: "reticulum", - description: "fire +1 harpoon
when there are multiple targets in range", + description: "fire +1 harpoon, but energy cost
to retract also increases", isGunTech: true, maxCount: 9, count: 0, @@ -5760,22 +5777,31 @@ } }, { - name: "degenerate matter", - description: "reduce harm by 60% while your field is active", + name: "neutronium", + description: `reduce harm by 90% while your field is active
move and jump 33% slower`, isFieldTech: true, maxCount: 1, count: 0, frequency: 2, frequencyDefault: 2, allowed() { - return (m.fieldUpgrades[m.fieldMode].name === "plasma torch" || m.fieldUpgrades[m.fieldMode].name === "perfect diamagnetism" || m.fieldUpgrades[m.fieldMode].name === "pilot wave" || m.fieldUpgrades[m.fieldMode].name === "negative mass") && !tech.isEnergyHealth + return m.fieldUpgrades[m.fieldMode].name === "negative mass" && !tech.isEnergyHealth && !tech.isFreeWormHole }, - requires: "field: perfect, negative mass, pilot wave, plasma, not mass-energy", + requires: "wormhole or negative mass, not mass-energy, charmed baryon", effect() { - tech.isHarmReduce = true + tech.isNeutronium = true + tech.baseFx *= 0.66 + tech.baseJumpForce *= 0.66 + m.setMovement() }, + //also removed in m.setHoldDefaults() if player switches into a bad field remove() { - tech.isHarmReduce = false; + tech.isNeutronium = false + if (!tech.isFreeWormHole) { + tech.baseFx = 0.08 + tech.baseJumpForce = 10.5 + m.setMovement() + } } }, { @@ -6057,6 +6083,25 @@ // tech.isPlasmaRange = 1; // } // }, + { + name: "degenerate matter", + description: "reduce harm by 60% while your field is active", + isFieldTech: true, + maxCount: 1, + count: 0, + frequency: 2, + frequencyDefault: 2, + allowed() { + return (m.fieldUpgrades[m.fieldMode].name === "plasma torch" || m.fieldUpgrades[m.fieldMode].name === "perfect diamagnetism" || m.fieldUpgrades[m.fieldMode].name === "pilot wave") && !tech.isEnergyHealth + }, + requires: "perfect diamagnetism, pilot wave, plasma, not mass-energy", + effect() { + tech.isHarmReduce = true + }, + remove() { + tech.isHarmReduce = false; + } + }, { name: "tokamak", description: "throwing a block converts it into energy
and a pulsed fusion explosion", @@ -6590,6 +6635,34 @@ } } }, + { + name: "charmed baryons", + description: `wormhole field uses no energy
move and jump 33% slower`, + isFieldTech: true, + maxCount: 1, + count: 0, + frequency: 2, + frequencyDefault: 2, + allowed() { + return m.fieldUpgrades[m.fieldMode].name === "wormhole" && !tech.isNeutronium + }, + requires: "wormhole, not neutronium", + effect() { + tech.isFreeWormHole = true + tech.baseFx *= 0.66 + tech.baseJumpForce *= 0.66 + m.setMovement() + }, + //also removed in m.setHoldDefaults() if player switches into a bad field + remove() { + tech.isFreeWormHole = false + if (!tech.isNeutronium) { + tech.baseFx = 0.08 + tech.baseJumpForce = 10.5 + m.setMovement() + } + } + }, //************************************************** //************************************************** experimental //************************************************** modes @@ -7324,30 +7397,30 @@ }, remove() {} }, - { - name: "inverted mouse", - description: "your mouse is scrambled
it's fine, just rotate it 90 degrees", - maxCount: 1, - count: 0, - frequency: 0, - isExperimentHide: true, - isNonRefundable: true, - isJunk: true, - allowed() { - return !m.isShipMode - }, - requires: "not ship", - effect() { - document.body.addEventListener("mousemove", (e) => { - const ratio = window.innerWidth / window.innerHeight - simulation.mouse.x = e.clientY * ratio - simulation.mouse.y = e.clientX / ratio; - }); - }, - remove() { - // m.look = m.lookDefault - } - }, + // { + // name: "inverted mouse", + // description: "your mouse is scrambled
it's fine, just rotate it 90 degrees", + // maxCount: 1, + // count: 0, + // frequency: 0, + // isExperimentHide: true, + // isNonRefundable: true, + // isJunk: true, + // allowed() { + // return !m.isShipMode + // }, + // requires: "not ship", + // effect() { + // document.body.addEventListener("mousemove", (e) => { + // const ratio = window.innerWidth / window.innerHeight + // simulation.mouse.x = e.clientY * ratio + // simulation.mouse.y = e.clientX / ratio; + // }); + // }, + // remove() { + // // m.look = m.lookDefault + // } + // }, { name: "Fourier analysis", description: "your aiming is now controlled by this equation:
2sin(0.0133t) + sin(0.013t) + 0.5sin(0.031t)+ 0.33sin(0.03t)", @@ -7514,7 +7587,7 @@ setInterval(() => { let score = Math.ceil(1000 * Math.random() * Math.random() * Math.random() * Math.random() * Math.random()) simulation.makeTextLog(`simulation.score = ${score.toFixed(0)}`); - }, 1000); //every 10 seconds + }, 10000); //every 10 seconds }, remove() {} }, @@ -8645,5 +8718,9 @@ isRodAreaDamage: null, isForeverDrones: null, isMoreMobs: null, - nailRecoil: null + nailRecoil: null, + baseJumpForce: null, + baseFx: null, + isNeutronium: null, + isFreeWormHole: null } \ No newline at end of file diff --git a/todo.txt b/todo.txt index 8cc7ac5..4a926b3 100644 --- a/todo.txt +++ b/todo.txt @@ -1,14 +1,20 @@ ******************************************************** NEXT PATCH ************************************************** +tech: neutronium - 90% harm reduce while field is active, 33% slower move speed + (requires negative mass field) +tech: charmed baryon - 0 cost wormhole, 33% slower move speed +harpoon tech: reticulum now always fires extra harpoons even if there are no targets -tech: rotary cannon - nail gun (and rivet gun) have increased fire rate, muzzle speed, recoil, and accuracy -experiment -parthenocarpy- spawn about 50% more mobs +tech.removeTech() method has been improved +bug fixes ******************************************************** TODO ******************************************************** -minigun: tech for nail gun - Its ramp-up time must not be removable. Recoil should be intense, enough that the player cannot walk forward quickly while using it. - nail gun gains: accuracy, bullet speed, huge recoil, fire rate - alternative to pnumatic that stops ramp up - maybe try to also apply to rivets? +bug - death while paused crashes game? + +tech: aerodynamic heating - railgun rods super heat the air around it doing AoE damage + +tech rocket jump - jumping produces an explosion at your feet that lets you jump extra high, but does some damage + require electric reactive armor? animate going to next level? door fills in with color that climbs up vertically through the door graphic the longer you stand on door @@ -17,14 +23,6 @@ animate going to next level? Plasma Burner: upgrade for plasma torch, basically just a jet engine. does high damage, but short range, mostly for player movement. maybe reduce gravity to really low then apply a vector away from mouse direction -no passive energy regen, but regen energy after doing damage - tech or just default? - modify conservation of energy tech - -Tech: Schrödinger’s cat (or superposition) -Requires: Metamaterial Cloaking and Dazzler -Upon decloaking, all mobs nearby (same range as Dazzler) are irradiated. Increase energy drain by 15%. - game idea - auto battler with n-gon mob AI and tech name: auto-gon you build a group of mobs and bosses from n-gon @@ -32,30 +30,14 @@ game idea - auto battler with n-gon mob AI and tech similar research and tech system to n-gon some mobs can fire player weapons -junk tech negative air friction on player - -remove foam gun get 2 foam bots and upgrade -need a new way of checking if have gun, that doesn't care if it's not active gun - apply to missile gun? - and 10 drone tech - -tech rocket jump - jumping produces an explosion at your feet that lets you jump extra high, but does some damage - require electric reactive armor? - -harpoon tech: dash - press down and fire to go immune to harm for 1 second and dash forward with your harpoon acting like a lance - after you fire harpoon replace it's this.do() with just being in front of player - harpoon grappling hook - basic effect is working, but needs work before it becomes fun -tech: aerodynamic heating - railgun rods super heat the air around it doing AoE damage - tech: relativistic jets: small particles that shot out from front and back poles and end up in a wide variety of spirals slow trickle when charging and several more when firing Tech: Make player smol - adapt the cloaking graphics to make a flashlight cone visual effect put code in level.do? @@ -64,10 +46,6 @@ be nice if block throwing had a projected path JUNK tech: planetesimals game inside n-gon https://codepen.io/lilgreenland/pen/jrMvaB?editors=0010 -disable zoom progress when paused - -"Interstellar Disturbance": Cosmic String applies to mobs who cross the wormhole's path, even after initial wormholing, but at reduced damage and stun time. - on mouse down wormhole shows a possible wormhole on mouse up the wormhole becomes real make the player get a buff after using wormhole