diff --git a/.DS_Store b/.DS_Store index fe1ba07..fabd69a 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/js/bullet.js b/js/bullet.js index b4af594..4af4d32 100644 --- a/js/bullet.js +++ b/js/bullet.js @@ -767,12 +767,14 @@ const b = { // }, fireworks(where, size) { //can occur after grenades detonate const cycle = () => { - if (simulation.paused || m.isBodiesAsleep) { requestAnimationFrame(cycle) } else { - count++ - if (count < 110 && m.alive) requestAnimationFrame(cycle); - if (!(count % 10)) { - const unit = Vector.rotate({ x: 1, y: 0 }, 6.28 * Math.random()) - b.explosion(Vector.add(where, Vector.mult(unit, size * (count * 0.01 + 0.02 * Math.random()))), size * (0.4 + Math.random() * 0.35), `hsla(${360*Math.random()},100%,66%,0.6)`); //makes bullet do explosive damage at end + if (m.alive) { + if (simulation.paused || m.isBodiesAsleep) { requestAnimationFrame(cycle) } else { + count++ + if (count < 110) requestAnimationFrame(cycle); + if (!(count % 10)) { + const unit = Vector.rotate({ x: 1, y: 0 }, 6.28 * Math.random()) + b.explosion(Vector.add(where, Vector.mult(unit, size * (count * 0.01 + 0.02 * Math.random()))), size * (0.4 + Math.random() * 0.35), `hsla(${360*Math.random()},100%,66%,0.6)`); //makes bullet do explosive damage at end + } } } } @@ -782,12 +784,14 @@ const b = { starburst(where, size) { //can occur after grenades detonate const color = `hsla(${360*Math.random()},100%,66%,0.6)` const cycle = () => { - if (simulation.paused || m.isBodiesAsleep) { requestAnimationFrame(cycle) } else { - count++ - if (count < 21 && m.alive) requestAnimationFrame(cycle); - if (count % 2) { - const unit = Vector.rotate({ x: 1, y: 0 }, curl * 6.28 * count / 18 + off) - b.explosion(Vector.add(where, Vector.mult(unit, size * 0.75)), size * 0.7, color); //makes bullet do explosive damage at end + if (m.alive) { + if (simulation.paused || m.isBodiesAsleep) { requestAnimationFrame(cycle) } else { + count++ + if (count < 21) requestAnimationFrame(cycle); + if (count % 2) { + const unit = Vector.rotate({ x: 1, y: 0 }, curl * 6.28 * count / 18 + off) + b.explosion(Vector.add(where, Vector.mult(unit, size * 0.75)), size * 0.7, color); //makes bullet do explosive damage at end + } } } } @@ -800,27 +804,29 @@ const b = { // size *= b.explosionRange() const range = size * Math.sqrt(b.explosionRange()) const cycle = () => { - if (simulation.paused || m.isBodiesAsleep) { requestAnimationFrame(cycle) } else { - if (count < 30 && m.alive) requestAnimationFrame(cycle); - if (count === 0) { - const color = `hsla(${360*Math.random()},100%,66%,0.6)` - b.explosion(where, size * 0.8, color); - } - if (count === 8) { - const color = `hsla(${360*Math.random()},100%,66%,0.6)` - for (let i = 0, len = 6; i < len; i++) { - const unit = Vector.rotate({ x: 1, y: 0 }, 6.28 * i / len) - b.explosion(Vector.add(where, Vector.mult(unit, 1.2 * range)), size * 0.6, color); //makes bullet do explosive damage at end + if (m.alive) { + if (simulation.paused || m.isBodiesAsleep) { requestAnimationFrame(cycle) } else { + if (count < 30 && m.alive) requestAnimationFrame(cycle); + if (count === 0) { + const color = `hsla(${360*Math.random()},100%,66%,0.6)` + b.explosion(where, size * 0.8, color); } - } - if (count === 16) { - const color = `hsla(${360*Math.random()},100%,66%,0.6)` - for (let i = 0, len = 10; i < len; i++) { - const unit = Vector.rotate({ x: 1, y: 0 }, 6.28 * i / len) - b.explosion(Vector.add(where, Vector.mult(unit, 1.75 * range)), size * 0.45, color); //makes bullet do explosive damage at end + if (count === 8) { + const color = `hsla(${360*Math.random()},100%,66%,0.6)` + for (let i = 0, len = 6; i < len; i++) { + const unit = Vector.rotate({ x: 1, y: 0 }, 6.28 * i / len) + b.explosion(Vector.add(where, Vector.mult(unit, 1.2 * range)), size * 0.6, color); //makes bullet do explosive damage at end + } } + if (count === 16) { + const color = `hsla(${360*Math.random()},100%,66%,0.6)` + for (let i = 0, len = 10; i < len; i++) { + const unit = Vector.rotate({ x: 1, y: 0 }, 6.28 * i / len) + b.explosion(Vector.add(where, Vector.mult(unit, 1.75 * range)), size * 0.45, color); //makes bullet do explosive damage at end + } + } + count++ } - count++ } } let count = 0 @@ -6167,7 +6173,7 @@ const b = { name: "foam", //8 description: "spray bubbly foam that sticks to mobs
slows mobs and does damage over time", ammo: 0, - ammoPack: 24, + ammoPack: 24, //set in froth flotation have: false, charge: 0, isDischarge: false, @@ -6208,7 +6214,7 @@ const b = { ctx.fill(); if (this.isDischarge && m.cycle % 2) { - this.charge-- + this.charge -= 0.75 const spread = (input.down ? 0.04 : 0.5) * (Math.random() - 0.5) const radius = 5 + 8 * Math.random() + (tech.isAmmoFoamSize && this.ammo < 300) * 12 const SPEED = (input.down ? 1.2 : 1) * 10 - radius * 0.4 + Math.min(5, Math.sqrt(this.charge)); diff --git a/js/level.js b/js/level.js index 93c7754..954eef4 100644 --- a/js/level.js +++ b/js/level.js @@ -23,7 +23,7 @@ const level = { // tech.giveTech("flame test") // tech.giveTech("pyrotechnics") // for (let i = 0; i < 10; i++) tech.giveTech("replication") - // tech.giveTech("acetone peroxide") + // tech.giveTech("eternalism") // for (let i = 0; i < 10; i++) tech.giveTech("ammonium nitrate") // for (let i = 0; i < 10; i++) powerUps.directSpawn(450, -50, "tech"); // for (let i = 0; i < 10; i++) powerUps.directSpawn(450, -50, "research"); @@ -41,6 +41,8 @@ const level = { // simulation.enableConstructMode() //used to build maps in testing mode // level.temple(); // level.testing(); //not in rotation, used for testing + // spawn.slashBoss(1900, -500) + if (simulation.isTraining) { level.walk(); } else { level.intro(); } //normal starting level ************************************************ // powerUps.research.changeRerolls(3000) // for (let i = 0; i < 30; i++) powerUps.spawn(player.position.x + Math.random() * 50, player.position.y - Math.random() * 50, "tech", false); @@ -2652,7 +2654,7 @@ const level = { // spawn.slashBoss(1900, -500) // spawn.launcherBoss(3200, -500) // spawn.laserTargetingBoss(1700, -500) - spawn.powerUpBoss(1900, -500) + // spawn.powerUpBoss(1900, -500) // spawn.powerUpBossBaby(3200, -500) // spawn.snakeBoss(1700, -500) // spawn.streamBoss(3200, -500) @@ -2758,7 +2760,7 @@ const level = { if (Math.random() < 0.33) { for (let i = 0, len = scale * 0.1; i < len; ++i) spawn.bounceBoss(1487 + 200 * i, -1525, 80, false); //spawn 1-2 at difficulty 15 } else if (Math.random() < 0.5) { - for (let i = 0, len = scale * 0.17; i < len; ++i) spawn.sprayBoss(1487 + 200 * i, -1525, 30, false) //spawn 2-3 at difficulty 15 + for (let i = 0, len = scale * 0.16; i < len; ++i) spawn.sprayBoss(1487 + 200 * i, -1525, 30, false) //spawn 2-3 at difficulty 15 } else { for (let i = 0, len = scale * 0.23; i < len; ++i) spawn.mineBoss(1487 + 200 * i, -1525, 50, false); //spawn 3-4 at difficulty 15 } diff --git a/js/powerup.js b/js/powerup.js index a2a7228..b8b5de0 100644 --- a/js/powerup.js +++ b/js/powerup.js @@ -237,6 +237,7 @@ const powerUps = { } }, choose(type, index) { + console.log('choose') if (type === "gun") { b.giveGuns(index) let text = `b.giveGuns("${b.guns[index].name}")` @@ -248,9 +249,7 @@ const powerUps = { } else if (type === "field") { m.setField(index) } else if (type === "tech") { - setTimeout(() => { - powerUps.lastTechIndex = index - }, 10); + setTimeout(() => { powerUps.lastTechIndex = index }, 10); simulation.makeTextLog(`tech.giveTech("${tech.tech[index].name}")`); tech.giveTech(index) } @@ -280,8 +279,16 @@ const powerUps = { if (!simulation.paused) { if (tech.isNoDraftPause) { - // powerUps.spawn(m.pos.x, m.pos.y, "ammo"); - document.getElementById("choose-grid").style.opacity = "0.7" + + const cycle = () => { + m.fireCDcycle = m.cycle + 5; //fire cooldown + if (simulation.isChoosing && m.alive) requestAnimationFrame(cycle) + } + + requestAnimationFrame(cycle); + + + document.getElementById("choose-grid").style.opacity = "0.8" } else { simulation.paused = true; document.getElementById("choose-grid").style.opacity = "1" diff --git a/js/spawn.js b/js/spawn.js index 1cc99fd..7a22cc6 100644 --- a/js/spawn.js +++ b/js/spawn.js @@ -3556,8 +3556,8 @@ const spawn = { let me = mob[mob.length - 1]; me.isBoss = true; me.inertia = Infinity; //no rotation - me.burstFireFreq = 18 + Math.floor(14 * simulation.CDScale) - me.burstTotalPhases = 3 + Math.floor(2 / simulation.CDScale) + me.burstFireFreq = 22 + Math.floor(15 * simulation.CDScale) + me.burstTotalPhases = 3.5 + Math.floor(1.5 / simulation.CDScale) me.frictionStatic = 0; me.friction = 0; me.frictionAir = 0; @@ -3605,8 +3605,8 @@ const spawn = { if (this.speed < 0.01) { Matter.Body.setVelocity(this, Vector.mult(Vector.normalise(Vector.sub(player.position, this.position)), 0.1)); } else { - if (Math.abs(this.velocity.y) < 13) Matter.Body.setVelocity(this, { x: this.velocity.x, y: this.velocity.y * 1.07 }); - if (Math.abs(this.velocity.x) < 10) Matter.Body.setVelocity(this, { x: this.velocity.x * 1.07, y: this.velocity.y }); + if (Math.abs(this.velocity.y) < 12) Matter.Body.setVelocity(this, { x: this.velocity.x, y: this.velocity.y * 1.07 }); + if (Math.abs(this.velocity.x) < 9) Matter.Body.setVelocity(this, { x: this.velocity.x * 1.07, y: this.velocity.y }); } } me.burstFire = function() { @@ -3640,8 +3640,8 @@ const spawn = { if (this.phaseCycle > -1) { Matter.Body.rotate(this, 0.02) for (let i = 0, len = this.vertices.length; i < len; i++) { //fire a bullet from each vertex - spawn.sniperBullet(this.vertices[i].x, this.vertices[i].y, 8, 4); - const velocity = Vector.mult(Vector.normalise(Vector.sub(this.position, this.vertices[i])), -20) + spawn.sniperBullet(this.vertices[i].x, this.vertices[i].y, 6, 4); + const velocity = Vector.mult(Vector.normalise(Vector.sub(this.position, this.vertices[i])), -17) Matter.Body.setVelocity(mob[mob.length - 1], { x: velocity.x, y: velocity.y @@ -3929,9 +3929,9 @@ const spawn = { me.damageReduction = 0.1 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1) me.startingDamageReduction = me.damageReduction me.isInvulnerable = false - me.frictionAir = 0.01 + me.frictionAir = 0.02 me.seeAtDistance2 = 1000000; - me.accelMag = 0.001 + 0.0003 * simulation.accelScale; + me.accelMag = 0.0004 + 0.00015 * simulation.accelScale; Matter.Body.setDensity(me, 0.0005); //normal is 0.001 me.collisionFilter.mask = cat.bullet | cat.player | cat.body | cat.map me.memory = Infinity; @@ -3939,7 +3939,7 @@ const spawn = { me.lockedOn = null; me.torqueMagnitude = 0.00024 * me.inertia * (Math.random() > 0.5 ? -1 : 1); - me.delay = 60 + 60 * simulation.CDScale; + me.delay = 70 + 70 * simulation.CDScale; me.cd = 0; me.swordRadius = 0; me.swordVertex = 1 diff --git a/js/tech.js b/js/tech.js index ed6e33e..f570c90 100644 --- a/js/tech.js +++ b/js/tech.js @@ -602,9 +602,9 @@ const tech = { frequency: 1, frequencyDefault: 1, allowed() { - return !tech.isAmmoFromHealth + return !tech.isAmmoFromHealth && !tech.isEnergyNoAmmo }, - requires: "not catabolism", + requires: "not catabolism, ideal gas law", effect() { tech.isEnergyNoAmmo = true; }, @@ -913,7 +913,7 @@ const tech = { { name: "zoospore vector", link: `zoospore vector`, - description: "mobs produce spores when they die
11% chance", + description: "mobs produce spores when they die
10% chance", maxCount: 9, count: 0, frequency: 1, @@ -923,7 +923,7 @@ const tech = { }, requires: "no other mob death tech", effect() { - tech.sporesOnDeath += 0.11; + tech.sporesOnDeath += 0.1; // if (tech.isSporeWorm) { // for (let i = 0; i < 4; i++) b.worm(m.pos) // } else { @@ -5657,7 +5657,7 @@ const tech = { }, { name: "surface tension", - description: "foam bubbles have improved adhesion which
does 41% more damage per second", + description: "foam bubbles have improved adhesion which
does 41% more damage", isGunTech: true, maxCount: 9, count: 0, @@ -5676,7 +5676,7 @@ const tech = { }, { name: "foam fractionation", - description: "foam gun bubbles are 100% larger
when you have below 300 foam", + description: "foam gun bubbles are 100% larger
when you have below 300 ammo", isGunTech: true, maxCount: 1, count: 0, @@ -5693,6 +5693,33 @@ const tech = { tech.isAmmoFoamSize = false; } }, + { + name: "ideal gas law", + description: `flush away all of your current foam ammo
gain 1200% more foam ammo from ${powerUps.orb.ammo(1)}`, + isGunTech: true, + maxCount: 1, + count: 0, + frequency: 2, + frequencyDefault: 2, + allowed() { + return tech.haveGunCheck("foam") && !tech.isEnergyNoAmmo + }, + requires: "foam, not exciton", + ammoLost: 0, + effect() { + b.guns[8].ammoPack = b.guns[8].ammoPack * 12; + this.ammoLost = b.guns[8].ammo + b.guns[8].ammo = 0 + simulation.updateGunHUD() + }, + remove() { + if (this.count) { + b.guns[8].ammoPack = 24 + b.guns[8].ammo += this.ammoLost + simulation.updateGunHUD() + } + } + }, { name: "pressure vessel", description: "the foam gun builds up pressure as you fire
that discharges foam after firing", @@ -10187,5 +10214,5 @@ const tech = { foamDamage: null, isClusterExplode: null, isCircleExplode: null, - isPetalsExplode: null + isPetalsExplode: null, } \ No newline at end of file diff --git a/todo.txt b/todo.txt index 8fa9723..71f4bab 100644 --- a/todo.txt +++ b/todo.txt @@ -1,34 +1,16 @@ ******************************************************** NEXT PATCH ************************************************** -grenade now has 3 fireworks options, you can only have 1 at a time - flame test, fireworks, pyrotechnics -implosion has been removed -controlled explosion 3->4 research +ideal gas law - lose all your current foam ammo; foam gun gets 1200% more ammo from ammo power ups +pressure vessel - has 25% more charges produced as you hold -base matter wave moves 20% faster -gun science renamed ordnance +slashBoss is a bit slower and has a bit longer between slashes +reactor SprayBoss: slower to fire, slower to move, smaller bullets, fewer in number + just a tiny nerf though bug fixes ******************************************************** TODO ******************************************************** -buff early matter wave without phonon - -more fireworks themed grenade tech - shooting star - fire a series of explosions higher and higher up, also increase radius with height - -tech - neutron bombs deal 100% more damage, but finishes detonating much faster -tech - neutron bombs will explode into a small iridum explosion after it expires - -tech: damage mobs in your last 10 seconds of history - field tech? - time dilation? - -tech: eternalism - don't pause time during draft - bugs? - requirements change after draft is generated - check for requirements onclick and give random tech if not met? - tech expansion: should also make other fields do things how to make the description work change description based on your current field?