diff --git a/.DS_Store b/.DS_Store index d1b0483..95a0799 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/index.html b/index.html index a4de16a..df44b6c 100644 --- a/index.html +++ b/index.html @@ -284,7 +284,7 @@ } - + diff --git a/js/bullet.js b/js/bullet.js index 59f3371..ba731dd 100644 --- a/js/bullet.js +++ b/js/bullet.js @@ -3829,6 +3829,9 @@ const b = { if (tech.isNailCrit && !who.shield && Vector.dot(Vector.normalise(Vector.sub(who.position, this.position)), Vector.normalise(this.velocity)) > 0.94) { b.explosion(this.position, 150 + 30 * Math.random()); //makes bullet do explosive damage at end } + if (true && !who.shield && Vector.dot(Vector.normalise(Vector.sub(who.position, this.position)), Vector.normalise(this.velocity)) > 0.94) { + b.targetedNail(this.position, 1, 39 + 6 * Math.random()) + } }; bullet[me].do = function() {}; }, diff --git a/js/engine.js b/js/engine.js index 1612c89..485757d 100644 --- a/js/engine.js +++ b/js/engine.js @@ -258,7 +258,7 @@ function collisionChecks(event) { Events.on(engine, "collisionStart", function(event) { playerOnGroundCheck(event); // playerHeadCheck(event); - if (m.alive) collisionChecks(event); + collisionChecks(event); }); Events.on(engine, "collisionActive", function(event) { playerOnGroundCheck(event); diff --git a/js/index.js b/js/index.js index d155be7..895810a 100644 --- a/js/index.js +++ b/js/index.js @@ -241,24 +241,20 @@ const build = { copy build url
` text += ` -
damage: ${((tech.damageFromTech())).toPrecision(3)} -
difficulty: ${((m.dmgScale)).toPrecision(3)} -
-
+defense: ${(1-m.harmReduction()).toPrecision(3)} -
difficulty: ${(simulation.dmgScale).toPrecision(3)} -
+
damage: ${((tech.damageFromTech())).toPrecision(3)}     difficulty: ${((m.dmgScale)).toPrecision(3)} +
defense: ${(1-m.harmReduction()).toPrecision(3)}     difficulty: ${(simulation.dmgScale).toPrecision(3)} +
fire rate: ${((1-b.fireCDscale)*100).toFixed(b.fireCDscale < 0.1 ? 2 : 0)}% +
duplication: ${(tech.duplicationChance()*100).toFixed(0)}% ${botText} -
health: (${(m.health*100).toFixed(0)} / ${(m.maxHealth*100).toFixed(0)})   energy: (${(m.energy*100).toFixed(0)} / ${(m.maxEnergy*100).toFixed(0)}) +

health: (${(m.health*100).toFixed(0)} / ${(m.maxHealth*100).toFixed(0)})   energy: (${(m.energy*100).toFixed(0)} / ${(m.maxEnergy*100).toFixed(0)})
gun: ${b.activeGun === null || b.activeGun === undefined ? "undefined":b.guns[b.activeGun].name}   ammo: ${b.activeGun === null || b.activeGun === undefined ? "0":b.guns[b.activeGun].ammo} -
fire delay decrease: ${((1-b.fireCDscale)*100).toFixed(b.fireCDscale < 0.1 ? 2 : 0)}% -
duplication chance: ${(tech.duplicationChance()*100).toFixed(0)}% -

tech: ${tech.totalCount}   research: ${powerUps.research.count} -
position: (${player.position.x.toFixed(1)}, ${player.position.y.toFixed(1)})   velocity: (${player.velocity.x.toFixed(1)}, ${player.velocity.y.toFixed(1)}) -
mouse: (${simulation.mouseInGame.x.toFixed(1)}, ${simulation.mouseInGame.y.toFixed(1)})   mass: ${player.mass.toFixed(1)} +
tech: ${tech.totalCount}   research: ${powerUps.research.count}

seed: ${Math.initialSeed}
level: ${level.levels[level.onLevel]} (${level.difficultyText()})   ${m.cycle} cycles
${mob.length} mobs,   ${body.length} blocks,   ${bullet.length} bullets,   ${powerUp.length} power ups +
position: (${player.position.x.toFixed(1)}, ${player.position.y.toFixed(1)})   velocity: (${player.velocity.x.toFixed(1)}, ${player.velocity.y.toFixed(1)}) +
mouse: (${simulation.mouseInGame.x.toFixed(1)}, ${simulation.mouseInGame.y.toFixed(1)})   mass: ${player.mass.toFixed(1)} ${simulation.isCheating ? "

lore disabled": ""} `; for (let i = 0, len = b.inventory.length; i < len; i++) { diff --git a/js/level.js b/js/level.js index 593b963..b6238a5 100644 --- a/js/level.js +++ b/js/level.js @@ -18,10 +18,11 @@ const level = { // simulation.isHorizontalFlipped = true // m.addHealth(Infinity) // m.setField("time dilation") - // b.giveGuns("shotgun") - // tech.giveTech("ice-shot") - // tech.giveTech("MACHO") - // tech.giveTech("clock gating") + // b.giveGuns("nail gun") + // b.giveGuns("mine") + // tech.giveTech("laser-mines") + // tech.giveTech("free-electron laser") + // tech.giveTech("energy conservation") // tech.giveTech("6s half-life") // for (let i = 0; i < 10; i++) tech.giveTech("replication") // tech.giveTech("eternalism") @@ -37,10 +38,10 @@ const level = { // m.immuneCycle = Infinity //you can't take damage // level.difficultyIncrease(30) //30 is near max on hard //60 is near max on why // simulation.enableConstructMode() //used to build maps in testing mode - // level.reservoir(); + // level.perplex(); // spawn.cellBossCulture(1900, -500) - // spawn.snakeBoss(1900, -500) // level.testing(); //not in rotation, used for testing + // spawn.starter(1900, -500) if (simulation.isTraining) { level.walk(); } else { level.intro(); } //normal starting level ************************************************ // powerUps.research.changeRerolls(3000) @@ -7147,7 +7148,7 @@ const level = { spawn.mapRect(-1450, -2700, 900, 50); //5-1 ceiling spawn.mapRect(-925, -2300, 325, 50); //5-1 right floor spawn.mapRect(-1900, -3000, 450, 50); //stair cover - spawn.bodyRect(-1150, -2950, 200, 250); //5-2 block + spawn.bodyRect(-1150, -2950, 150, 250); //5-2 block //top left corner stuff spawn.mapRect(-1900, -2450, 250, 450); // diff --git a/js/mob.js b/js/mob.js index 3f90abf..0d3a501 100644 --- a/js/mob.js +++ b/js/mob.js @@ -1172,17 +1172,7 @@ const mobs = { } if (tech.isBotSpawnerReset) { for (let i = 0, len = bullet.length; i < len; i++) { - if (bullet[i].botType && bullet[i].endCycle !== Infinity) { - bullet[i].endCycle = simulation.cycle + 840 //14 seconds - // //draw a flash on top of bot - // ctx.beginPath(); - // const v = bullet[i].vertices; - // ctx.moveTo(v[0].x, v[0].y); - // for (let i = 1; i < v.length; ++i) ctx.lineTo(v[i].x, v[i].y); - // ctx.lineTo(v[0].x, v[0].y); - // ctx.fillStyle = "#fff" - // ctx.fill(); - } + if (bullet[i].botType && bullet[i].endCycle !== Infinity) bullet[i].endCycle = simulation.cycle + 840 //14 seconds } } if (Math.random() < tech.botSpawner) { @@ -1273,10 +1263,8 @@ const mobs = { removeConsBB() { for (let i = 0, len = consBB.length; i < len; ++i) { if (consBB[i].bodyA === this) { - if (consBB[i].bodyB.shield) { - consBB[i].bodyB.do = function() { - this.death(); - }; + if (consBB[i].bodyB.shield) { //&& !this.shield + consBB[i].bodyB.do = function() { this.death() } } consBB[i].bodyA = consBB[i].bodyB; consBB.splice(i, 1); @@ -1284,9 +1272,7 @@ const mobs = { break; } else if (consBB[i].bodyB === this) { if (consBB[i].bodyA.shield) { - consBB[i].bodyA.do = function() { - this.death(); - }; + consBB[i].bodyA.do = function() { this.death() } } consBB[i].bodyB = consBB[i].bodyA; consBB.splice(i, 1); diff --git a/js/player.js b/js/player.js index f5e23e9..5cc49ac 100644 --- a/js/player.js +++ b/js/player.js @@ -1381,7 +1381,7 @@ const m = { y: player.velocity.y - (15 * unit.y) / massRoot }); if (who.isUnstable) { - if (m.fieldCDcycle < m.cycle + 30) m.fieldCDcycle = m.cycle + 30 + if (m.fieldCDcycle < m.cycle + 30) m.fieldCDcycle = m.cycle + 10 who.death(); } @@ -1767,7 +1767,7 @@ const m = { y: player.velocity.y - (30 * unit.y) / massRoot }); if (mob[i].isUnstable) { - if (m.fieldCDcycle < m.cycle + 10) m.fieldCDcycle = m.cycle + 10 + if (m.fieldCDcycle < m.cycle + 10) m.fieldCDcycle = m.cycle + 6 mob[i].death(); } if (!isFree) { //player knock backs @@ -1864,7 +1864,7 @@ const m = { { name: "negative mass", //
hold blocks as if they have a lower mass - description: "use energy to nullify  gravity
reduce harm by 55%
generate 6 energy per second", + description: "use energy to nullify  gravity
+55% defense
generate 6 energy per second", fieldDrawRadius: 0, effect: () => { m.fieldFire = true; @@ -2525,7 +2525,7 @@ const m = { { name: "time dilation", // description: "use energy to stop time
while time is stopped you can move and fire
and collisions do 50% less harm", - description: "use energy to stop time
move, jump, and fire 25% faster
generate 18 energy per second", + description: "use energy to stop time
+25% movement, jumping, and fire rate
generate 18 energy per second", set() { m.fieldFireRate = 0.75 b.setFireCD(); @@ -3180,7 +3180,7 @@ const m = { { name: "wormhole", //wormholes attract blocks and power ups
- description: "use energy to tunnel through a wormhole
4% chance to duplicate spawned power ups
generate 6 energy per second", //
bullets may also traverse wormholes + description: "use energy to tunnel through a wormhole
+4% chance to duplicate spawned power ups
generate 6 energy per second", //
bullets may also traverse wormholes drain: 0, effect: function() { m.duplicateChance = 0.04 diff --git a/js/tech.js b/js/tech.js index a5a7209..07ef630 100644 --- a/js/tech.js +++ b/js/tech.js @@ -670,7 +670,7 @@ const tech = { }, { name: "Higgs mechanism", - description: "if firing
+50% fire rate and your position is locked", + description: "+50% fire rate
while firing your position is fixed", maxCount: 1, count: 0, frequency: 1, @@ -940,7 +940,7 @@ const tech = { }, { name: "reaction inhibitor", - description: "mobs spawn with –13% health", + description: "after mobs spawn
remove +13% of their durability", //health maxCount: 3, count: 0, frequency: 1, @@ -1890,7 +1890,7 @@ const tech = { }, { name: "freezer burn", - description: "mobs frozen while below 33% health die", + description: "mobs frozen while below 33% durability die", maxCount: 1, count: 0, frequency: 2, @@ -1908,7 +1908,7 @@ const tech = { }, { name: "flash freeze", - description: "mobs frozen while above 66% health
have their health reduced to 66%", + description: "mobs frozen while above 66% durability
have their durability reduced to 66%", maxCount: 1, count: 0, frequency: 2, @@ -1980,7 +1980,7 @@ const tech = { }, { name: "liquid cooling", - description: `after losing health
freeze all mobs for 7 seconds`, + description: `after losing health
freeze all mobs for 7 seconds`, maxCount: 1, count: 0, frequency: 2, @@ -1998,7 +1998,7 @@ const tech = { }, { name: "clock gating", - description: `after losing health slow time by 50%
+20% defense`, + description: `after losing health slow time by 50%
+20% defense`, maxCount: 1, count: 0, frequency: 1, @@ -2057,7 +2057,7 @@ const tech = { }, { name: "ablative drones", - description: "after losing health there is a chance
to rebuild your broken parts as drones", + description: "after losing health there is a chance
to rebuild your broken parts as drones", maxCount: 1, count: 0, frequency: 1, @@ -2114,7 +2114,7 @@ const tech = { { name: "CPT symmetry", // description: "charge, parity, and time invert to undo defense
rewind (1.5—5) seconds for (66—220) energy", - description: "if you have 66 energy after losing health
rewind time for 44 energy per second", + description: "if you have 66 energy after losing health
rewind time for 44 energy per second", maxCount: 1, count: 0, frequency: 1, @@ -2654,7 +2654,7 @@ const tech = { }, { name: "negative entropy", - description: `at the start of each level
for every 26 missing health spawn ${powerUps.orb.heal()}`, + description: `at the start of each level
for every 26 missing health spawn ${powerUps.orb.heal()}`, maxCount: 1, count: 0, frequency: 1, @@ -3504,7 +3504,7 @@ const tech = { }, { name: "apomixis", - description: `when you reach 111% duplication
spawn 11 bosses with 111% more health`, + description: `when you reach 111% duplication
spawn 11 bosses with 111% more durability`, maxCount: 1, count: 0, frequency: 6, @@ -4667,7 +4667,7 @@ const tech = { }, { name: "acetone peroxide", - description: "+70% explosive radius
+50% explosive self damage", + description: "+70% explosive radius
–50% explosive defense", isGunTech: true, maxCount: 1, count: 0, @@ -4706,7 +4706,7 @@ const tech = { }, { name: "controlled explosion", - description: `use ${powerUps.orb.research(4)} to dynamically reduce
all explosive radius to prevent self damage`, + description: `use ${powerUps.orb.research(4)} to dynamically reduce
all explosive radius to prevent health loss`, isGunTech: true, maxCount: 1, count: 0, @@ -4730,7 +4730,7 @@ const tech = { { name: "electric armor", // description: "explosions do no defense
while your energy is above 98%", - description: "instead of causing self damage explosions
drain 12 energy and have more knockback", + description: "instead of causing health loss, explosions
drain 12 energy and have more knockback", isGunTech: true, maxCount: 1, count: 0, @@ -4749,7 +4749,7 @@ const tech = { }, { name: "MIRV", - description: "fire +1 missile and grenade per shot
–12% explosion damage and radius", + description: "fire +1 missile or grenade per shot
–12% explosion damage and radius", isGunTech: true, maxCount: 9, count: 0, @@ -5050,7 +5050,7 @@ const tech = { { name: "mycelial fragmentation", link: `mycelial fragmentation`, - description: "sporangium release 6 more spores
during their growth phase", + description: "during their growth phase
sporangium release +6 spores", isGunTech: true, maxCount: 1, count: 0, @@ -5070,7 +5070,7 @@ const tech = { { name: "tinsellated flagella", link: `tinsellated flagella`, - description: "sporangium release 2 more spores
spores accelerate 50% faster", + description: "sporangium release +2 spores
spores accelerate 50% faster", isGunTech: true, maxCount: 1, count: 0, @@ -5109,7 +5109,7 @@ const tech = { }, { name: "diplochory", - description: "spores use you for dispersal
until they locate a viable host", + description: "if spores can't locate a viable host
they use you for dispersal", isGunTech: true, maxCount: 1, count: 0, @@ -5128,7 +5128,7 @@ const tech = { }, { name: "mutualism", - description: "+150% spore damage
spores borrow 0.5 health until they die", + description: "+150% spore damage
spores borrow 0.5 health until they die", isGunTech: true, maxCount: 1, count: 0, @@ -5245,7 +5245,7 @@ const tech = { { name: "reduced tolerances", link: `reduced tolerances`, - description: `+66% drones per ${powerUps.orb.ammo()} and energy
–40% drone durability`, + description: `+66% drones per ${powerUps.orb.ammo()} and energy
–40% drone duration`, isGunTech: true, maxCount: 3, count: 0, @@ -5334,7 +5334,7 @@ const tech = { }, { name: "axial flux motor", - description: "drones can rush 66% more often
+44% drone collision damage", + description: "+66% drones rush frequency
+44% drone collision damage", isGunTech: true, maxCount: 1, count: 0, @@ -5428,7 +5428,7 @@ const tech = { }, { name: "fault tolerance", - description: "spawn 6 drones that last forever
remove your drone gun", + description: "remove your drone gun
spawn 6 drones that last forever", isGunTech: true, isRemoveGun: true, maxCount: 1, @@ -5593,7 +5593,7 @@ const tech = { }, { name: "foam fractionation", - description: "if you have below 300 ammo
+100% foam gun bubble size", + description: "if you have below 300 ammo
+100% foam gun bubble size", isGunTech: true, maxCount: 1, count: 0, @@ -5639,7 +5639,7 @@ const tech = { }, { name: "pressure vessel", - description: "build up charge while firing foam gun
after firing automatically discharge foam bubbles", + description: "build up charge while firing foam gun
after firing discharge foam bubbles", isGunTech: true, maxCount: 1, count: 0, @@ -5776,7 +5776,7 @@ const tech = { }, { name: "alternator", - description: "–60% harpoon energy drain", + description: "+60% harpoon energy efficiency", isGunTech: true, maxCount: 1, count: 0, @@ -5981,7 +5981,7 @@ const tech = { }, { name: "laser diode", - description: "–30% lasers energy drain
affects laser-gun, laser-bot, laser-mines, pulse", + description: "+30% laser energy efficiency
affects laser-gun, laser-bot, laser-mines, pulse", isGunTech: true, maxCount: 1, count: 0, @@ -6004,7 +6004,7 @@ const tech = { }, { name: "free-electron laser", - description: "+200% laser damage
+250% laser energy drain", + description: "+200% laser damage
–250% laser energy efficiency", isGunTech: true, maxCount: 1, count: 0, @@ -6095,12 +6095,12 @@ const tech = { { name: "diffuse beam", link: `diffuse beam`, - description: "laser beam is wider and doesn't reflect
220% laser damage", + description: "laser beam is wider and doesn't reflect
+220% laser damage", isGunTech: true, maxCount: 1, count: 0, - frequency: 2, - frequencyDefault: 2, + frequency: 3, + frequencyDefault: 3, allowed() { return tech.haveGunCheck("laser") && tech.laserReflections < 3 && !tech.beamSplitter && !tech.isPulseLaser && !tech.historyLaser }, @@ -6124,7 +6124,7 @@ const tech = { }, { name: "output coupler", - description: "+30% laser beam width
30% laser damage", + description: "+30% laser beam width
+30% laser damage", isGunTech: true, maxCount: 9, count: 0, @@ -6441,7 +6441,7 @@ const tech = { }, { name: "radiative equilibrium", - description: "after losing health
+200% damage for 10 seconds", + description: "after losing health
+200% damage for 10 seconds", isFieldTech: true, maxCount: 1, count: 0, diff --git a/style.css b/style.css index f3e1632..2479596 100644 --- a/style.css +++ b/style.css @@ -296,7 +296,7 @@ summary { line-height: 170%; /* border-radius: 6px; */ border: 1px #17263b solid; - background-color: #fff; + background-color: #fafcfd; line-height: 170%; font-size: 0.65em; @@ -454,12 +454,13 @@ summary { } } +/* background on title page */ #fade-out { position: absolute; z-index: 2; width: 100%; height: 100%; - background-color: #e8edf0; + background-color: #e2e9ec; opacity: 1; transition: opacity 3s; pointer-events: none; diff --git a/todo.txt b/todo.txt index 07e27a0..ef894fc 100644 --- a/todo.txt +++ b/todo.txt @@ -1,30 +1,15 @@ ******************************************************** NEXT PATCH ************************************************** -tech: freezer burn - if a mob is frozen while below 33% health, it dies -tech: flash freeze - if a mob is above 66% health it's health is set to 66% -snakeBoss 1st tail mob is larger and farther from boss -parthenogenesis your duplication effects extend to duplicate mobs and bosses -WIMPs do 33% less harm (because they are hard to deal with on reactor) -MACHO 66->60% defense -axion 75%-> 100% of defense added to damage - -full tech wording rewrite (I probably made a few typos) - increase damage by 10% -> +10% damage - 20% fire delay reduction -> +20% fire rate - taking harm -> losing health - 50% harm reduction -> +50% defense - new defense text effect - extra long minus sign - -> – - -bug fixes +updated pause menu and fields descriptions to new wording style *********************************************************** TODO ***************************************************** scrap bots can't move? + only works for nail, foam, laser + might be tricky code? + make a new bot type called scrap bot? -if a nail critical hits, fire a nail at the nearest mob - similar to mob death targeted nail code nail gun needs a small damage buff JUNK tech: Pacifism @@ -40,12 +25,10 @@ mob mechanic: beacon at random if velocity not facing player? -super balls do damage after bouncing? +super balls do more damage after bouncing? how to check for bounce? maybe just increases damage after hitting a mob -put a shield on a shield on a shield ... - dark mode: look at Tinyfolks, 20 minutes till dawn