diff --git a/.DS_Store b/.DS_Store index c7f9d51..101dc6e 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/js/bullet.js b/js/bullet.js index 7c702aa..1789b7e 100644 --- a/js/bullet.js +++ b/js/bullet.js @@ -2211,7 +2211,7 @@ const b = { bullet[me].dmg = tech.isNailRadiation ? 0 : dmg bullet[me].beforeDmg = function(who) { //beforeDmg is rewritten with ice crystal tech if (tech.isNailRadiation) mobs.statusDoT(who, dmg * (tech.isFastRadiation ? 2.6 : 0.65), tech.isSlowRadiation ? 240 : (tech.isFastRadiation ? 30 : 120)) // one tick every 30 cycles - if (tech.isNailCrit && !who.shield && Vector.dot(Vector.normalise(Vector.sub(who.position, this.position)), Vector.normalise(this.velocity)) > 0.97) { + if (tech.isNailCrit && !who.shield && Vector.dot(Vector.normalise(Vector.sub(who.position, this.position)), Vector.normalise(this.velocity)) > 0.975) { b.explosion(this.position, 150 + 30 * Math.random()); //makes bullet do explosive damage at end } }; @@ -2922,7 +2922,7 @@ const b = { } } if (!immune) { - if (tech.isNailCrit && !who.shield && Vector.dot(Vector.normalise(Vector.sub(who.position, this.position)), Vector.normalise(this.velocity)) > 0.97) { + if (tech.isNailCrit && !who.shield && Vector.dot(Vector.normalise(Vector.sub(who.position, this.position)), Vector.normalise(this.velocity)) > 0.975) { b.explosion(this.position, 220 + 30 * Math.random()); //makes bullet do explosive damage at end } this.immuneList.push(who.id) @@ -2984,7 +2984,7 @@ const b = { }); bullet[me].endCycle = simulation.cycle + 180 bullet[me].beforeDmg = function(who) { //beforeDmg is rewritten with ice crystal tech - if (tech.isNailCrit && !who.shield && Vector.dot(Vector.normalise(Vector.sub(who.position, this.position)), Vector.normalise(this.velocity)) > 0.97) { + if (tech.isNailCrit && !who.shield && Vector.dot(Vector.normalise(Vector.sub(who.position, this.position)), Vector.normalise(this.velocity)) > 0.975) { b.explosion(this.position, 300 + 30 * Math.random()); //makes bullet do explosive damage at end } if (tech.isNailRadiation) mobs.statusDoT(who, 7 * (tech.isFastRadiation ? 12 : 0.3), tech.isSlowRadiation ? 240 : (tech.isFastRadiation ? 30 : 120)) // one tick every 30 cycles @@ -3036,7 +3036,7 @@ const b = { if (tech.isIceCrystals) { bullet[bullet.length - 1].beforeDmg = function(who) { mobs.statusSlow(who, 30) - if (tech.isNailCrit && !who.shield && Vector.dot(Vector.normalise(Vector.sub(who.position, this.position)), Vector.normalise(this.velocity)) > 0.97) { + if (tech.isNailCrit && !who.shield && Vector.dot(Vector.normalise(Vector.sub(who.position, this.position)), Vector.normalise(this.velocity)) > 0.975) { b.explosion(this.position, 150 + 30 * Math.random()); //makes bullet do explosive damage at end } }; diff --git a/js/index.js b/js/index.js index 3a21b89..4a8fdef 100644 --- a/js/index.js +++ b/js/index.js @@ -232,7 +232,7 @@ const build = {         ${tech.tech[i].name} ${isCount}${tech.tech[i].description}` } else if (tech.tech[i].isLore) { - text += `
  ${tech.tech[i].name} ${isCount}
${tech.tech[i].description}
` + text += `
  ${tech.tech[i].name} ${isCount}
${tech.tech[i].description}
` } else { text += `
  ${tech.tech[i].name} ${isCount}
${tech.tech[i].description}
` } diff --git a/js/level.js b/js/level.js index 69b0457..e9f25be 100644 --- a/js/level.js +++ b/js/level.js @@ -52,8 +52,9 @@ const level = { // level.stronghold() //fan level // for (let i = 0; i < 150; i++) tech.addLoreTechToPool(); + // powerUps.directSpawn(simulation.mouseInGame.x, simulation.mouseInGame.y, "tech"); // tech.giveTech("undefined") - // lore.techCount = 1 + // lore.techCount = 10 // localSettings.loreCount = 1; // simulation.isCheating = true; // localSettings.loreCount = undefined; @@ -376,12 +377,12 @@ const level = { powerUps.spawn(3350, -75, "ammo"); powerUps.spawn(3925, -50, "ammo"); powerUps.spawn(4550, -75, "ammo"); - powerUps.spawn(5225, -50, "ammo"); - powerUps.spawn(5475, -350, "ammo"); - powerUps.spawn(5625, -350, "ammo"); - powerUps.spawn(5575, -425, "ammo"); - powerUps.spawn(5550, -400, "ammo"); - powerUps.spawn(5575, -425, "ammo"); + powerUps.spawn(5025, -50, "ammo"); + powerUps.spawn(4975, -350, "ammo"); + powerUps.spawn(5125, -350, "ammo"); + powerUps.spawn(5075, -425, "ammo"); + powerUps.spawn(5050, -400, "ammo"); + powerUps.spawn(5075, -425, "ammo"); spawn.mapRect(-1950, 0, 8200, 1800); //ground spawn.mapRect(-1950, -1500, 1800, 1900); //left wall @@ -396,7 +397,7 @@ const level = { spawn.mapRect(5400, -300, 400, 400); //right wall spawn.mapRect(5700, -3300, 1800, 5100); //right wall spawn.mapRect(level.exit.x, level.exit.y + 20, 100, 100); //exit bump - + spawn.mapRect(5425, -650, 375, 450); //blocking exit }, gauntlet() { level.bossKilled = true; //if there is no boss this needs to be true to increase levels diff --git a/js/player.js b/js/player.js index c599fa7..6162488 100644 --- a/js/player.js +++ b/js/player.js @@ -897,7 +897,7 @@ const m = { m.calculateFieldThreshold(); //run calculateFieldThreshold after setting fieldArc, used for powerUp grab and mobPush with lookingAt(mob) m.isBodiesAsleep = true; m.wakeCheck(); - m.setMaxEnergy(); + // m.setMaxEnergy(); m.hole = { isOn: false, isReady: true, diff --git a/js/powerup.js b/js/powerup.js index 540a49d..3165279 100644 --- a/js/powerup.js +++ b/js/powerup.js @@ -327,7 +327,7 @@ const powerUps = {         ${tech.tech[choose].name} ${isCount}${tech.tech[choose].description}` } else if (tech.tech[choose].isLore) { - text += `
  ${tech.tech[choose].name} ${isCount}
${tech.tech[choose].description}
` + text += `
  ${tech.tech[choose].name} ${isCount}
${tech.tech[choose].description}
` } else { text += `
  ${tech.tech[choose].name} ${isCount}
${tech.tech[choose].description}
` } diff --git a/js/simulation.js b/js/simulation.js index dc7f807..4bd0387 100644 --- a/js/simulation.js +++ b/js/simulation.js @@ -358,13 +358,7 @@ const simulation = { } }, switchGun() { - if (tech.isCrouchAmmo) tech.isCrouchAmmo = 1 //this prevents hacking the tech by switching guns - b.activeGun = b.inventory[b.inventoryGun]; - simulation.updateGunHUD(); - simulation.boldActiveGunHUD(); - // m.drop(); - if (tech.isGunSwitchField && powerUps.research.count > 0) { - powerUps.research.changeRerolls(-1) + if (tech.isGunSwitchField) { const energy = m.energy m.setField((m.fieldMode === m.fieldUpgrades.length - 1) ? 1 : m.fieldMode + 1) //cycle to next field m.energy = energy //field swap sets energy to max, this undoes that @@ -373,14 +367,17 @@ const simulation = { for (let i = tech.tech.length - 1; i > 0; i--) { if (tech.tech[i].name === "unified field theory") { const index = (m.fieldMode === m.fieldUpgrades.length - 1) ? 1 : m.fieldMode + 1 - tech.tech[i].description = `after switching guns
use a research to cycle your field + tech.tech[i].description = `switching guns also cycles your field
(next field: ${m.fieldUpgrades[index].name})` break } } - - } + if (tech.isCrouchAmmo) tech.isCrouchAmmo = 1 //this prevents hacking the tech by switching guns + b.activeGun = b.inventory[b.inventoryGun]; + simulation.updateGunHUD(); + simulation.boldActiveGunHUD(); + // m.drop(); }, zoom: null, zoomScale: 1000, @@ -587,6 +584,7 @@ const simulation = { m.holdingTarget = null //set to default field + m.setMaxEnergy(); m.fieldMode = 0; // simulation.makeTextLog(`${simulation.SVGrightMouse} ${m.fieldUpgrades[m.fieldMode].name}

${m.fieldUpgrades[m.fieldMode].description}`, 600); // simulation.makeTextLog(` diff --git a/js/spawn.js b/js/spawn.js index 51ded9f..59824f7 100644 --- a/js/spawn.js +++ b/js/spawn.js @@ -99,11 +99,32 @@ const spawn = { // spawn.shield(me, x, y, 1); me.onDeath = function() { //add lore level as next level if player took lore tech earlier in the game + simulation.makeTextLog(`simulation.end()`); + if (lore.techCount > 9 && !simulation.isCheating) { level.levels.push("null") level.exit.x = 5500; level.exit.y = -330; simulation.makeTextLog(`level.levels.push("null")`) //
${powerUps.research.count} + + //remove block map element + Matter.World.remove(engine.world, map[map.length - 1]); + map.splice(map.length - 1, 1); + simulation.draw.setPaths(); //redraw map draw path + } else { + //reset game + let delay = 1000 + for (let i = 20; i > 0; i--) { + setTimeout(function() { + simulation.makeTextLog(`delay = ${i*1000}`); + }, delay); + delay += 1000 + } + delay += 1000 + setTimeout(function() { + simulation.makeTextLog(`World.clear(engine.world)`); + setTimeout(function() { m.death() }, 1000); + }, delay); } //ramp up damage for (let i = 0; i < 3; i++) level.difficultyIncrease(simulation.difficultyMode) diff --git a/js/tech.js b/js/tech.js index 14a3e91..e0ef900 100644 --- a/js/tech.js +++ b/js/tech.js @@ -120,7 +120,7 @@ const tech = { }, tech: [{ name: "integrated armament", - description: "increase damage by 25%
your inventory can only hold 1 gun", + description: "increase damage by 25%
your inventory can only hold 1 gun", maxCount: 1, count: 0, allowed() { @@ -243,7 +243,7 @@ const tech = { }, { name: "logistics", - description: "ammo power ups give 200% ammo
but ammo is only added to your current gun", + description: "ammo power ups give 200% ammo
but ammo is only added to your current gun", maxCount: 1, count: 0, allowed() { @@ -1893,6 +1893,38 @@ const tech = { tech.isMineDrop = false; } }, + { + name: "unified field theory", + description: "", + maxCount: 1, + count: 0, + allowed() { + return (b.inventory.length > 1) || build.isExperimentSelection && !tech.isSuperDeterminism + }, + requires: "at least 2 guns, not superdeterminism", + effect() { + tech.isGunSwitchField = true; + for (let i = tech.tech.length - 1; i > 0; i--) { + if (tech.tech[i].name === "unified field theory") { + const index = (m.fieldMode === m.fieldUpgrades.length - 1) ? 1 : m.fieldMode + 1 + tech.tech[i].description = `switching guns also cycles your field +
(next field: ${m.fieldUpgrades[index].name})` + break + } + } + }, + remove() { + tech.isGunSwitchField = false; + for (let i = tech.tech.length - 1; i > 0; i--) { + if (tech.tech[i].name === "unified field theory") { + const index = (m.fieldMode === m.fieldUpgrades.length - 1) ? 1 : m.fieldMode + 1 + tech.tech[i].description = `switching guns also cycles your field +
(next field: ${m.fieldUpgrades[index].name})` + break + } + } + } + }, { name: "cardinality", description: "tech, fields, and guns have 5 choices", @@ -1936,9 +1968,9 @@ const tech = { count: 0, isNonRefundable: true, allowed() { - return tech.isDeterminism && !tech.manyWorlds + return tech.isDeterminism && !tech.manyWorlds && !tech.isGunSwitchField }, - requires: "determinism", + requires: "determinism, not unified field theory", effect: () => { tech.isSuperDeterminism = true; for (let i = 0; i < 7; i++) { //if you change the six also change it in Born rule @@ -1985,36 +2017,6 @@ const tech = { tech.manyWorlds = false; } }, - { - name: "unified field theory", - description: "after switching guns
use a research to cycle your field", - maxCount: 1, - count: 0, - allowed() { - return (powerUps.research.count > 1 && b.inventory.length > 1) || build.isExperimentSelection - }, - requires: "at least 2 guns, and 2 research", - effect() { - tech.isGunSwitchField = true; - for (let i = tech.tech.length - 1; i > 0; i--) { - if (tech.tech[i].name === "unified field theory") { - const index = (m.fieldMode === m.fieldUpgrades.length - 1) ? 1 : m.fieldMode + 1 - tech.tech[i].description = `after switching guns
use a research to cycle your field -
(next field: ${m.fieldUpgrades[index].name})` - break - } - } - }, - remove() { - tech.isGunSwitchField = false; - for (let i = tech.tech.length - 1; i > 0; i--) { - if (tech.tech[i].name === "unified field theory") { - tech.tech[i].description = "after switching guns
use a research to cycle your field" - break - } - } - } - }, { name: "renormalization", description: "using a research for any purpose
has a 37% chance to spawn a research", @@ -2042,9 +2044,7 @@ const tech = { requires: "not determinism, at least 3 research", effect() { tech.isBanish = true - for (let i = 0; i < 4; i++) { - powerUps.spawn(m.pos.x, m.pos.y, "research", false); - } + for (let i = 0; i < 4; i++) powerUps.spawn(m.pos.x, m.pos.y, "research", false); }, remove() { tech.isBanish = false diff --git a/style.css b/style.css index 074760d..2303170 100644 --- a/style.css +++ b/style.css @@ -664,55 +664,6 @@ summary { float: right; } -.lore { - animation: bgColor 6s linear infinite; -} - -@keyframes bgColor { - 0% { - background-color: rgb(255, 0, 0) - } - - 10% { - background-color: rgb(255, 154, 0) - } - - 20% { - background-color: rgb(208, 222, 33) - } - - 30% { - background-color: rgb(79, 220, 74) - } - - 40% { - background-color: rgb(63, 218, 216) - } - - 50% { - background-color: rgb(47, 201, 226) - } - - 60% { - background-color: rgb(28, 127, 238) - } - - 70% { - background-color: rgb(95, 21, 242) - } - - 80% { - background-color: rgb(186, 12, 248) - } - - 90% { - background-color: rgb(251, 7, 217) - } - - 100% { - background-color: rgba(255, 0, 0) - } -} .box { padding: 3px 8px 3px 8px; @@ -737,6 +688,107 @@ summary { text-align: right; } +.lore { + animation: bgColor 3.5s linear infinite; +} + +.lore-text { + animation: textColor 3s linear infinite; +} + +@keyframes bgColor { + 0% { + background-color: rgb(63, 218, 216) + } + + 10% { + background-color: rgb(47, 201, 226) + } + + 20% { + background-color: rgb(28, 127, 238) + } + + 30% { + background-color: rgb(95, 21, 242) + } + + 40% { + background-color: rgb(186, 12, 248) + } + + 50% { + background-color: rgb(251, 7, 217) + } + + 60% { + background-color: rgba(255, 0, 0) + } + + 70% { + background-color: rgb(255, 0, 0) + } + + 80% { + background-color: rgb(255, 154, 0) + } + + 90% { + background-color: rgb(208, 222, 33) + } + + 100% { + background-color: rgb(79, 220, 74) + } +} + +@keyframes textColor { + 0% { + color: rgb(63, 218, 216) + } + + 10% { + color: rgb(47, 201, 226) + } + + 20% { + color: rgb(28, 127, 238) + } + + 30% { + color: rgb(95, 21, 242) + } + + 40% { + color: rgb(186, 12, 248) + } + + 50% { + color: rgb(251, 7, 217) + } + + 60% { + color: rgba(255, 0, 0) + } + + 70% { + color: rgb(255, 0, 0) + } + + 80% { + color: rgb(255, 154, 0) + } + + 90% { + color: rgb(208, 222, 33) + } + + 100% { + color: rgb(79, 220, 74) + } +} + + /* #console { font-family: monospace; font-size: 1.5em; diff --git a/todo.txt b/todo.txt index 96e9d5b..96d01ea 100644 --- a/todo.txt +++ b/todo.txt @@ -1,10 +1,8 @@ ******************************************************** NEXT PATCH ******************************************************** -iridium-192: now has a wider explosions range and no knock back -nail gun: irradiated nails do about 33% more damage over 2 seconds -nail gun rivet fire rate is 10% slower -nail gun: needles do 10% less damage, but they fire 10% faster -needle tech: ceramic needles - needles pierce shields +unified field theory doesn't require research to cycle fields + +game resets after beating final boss (in 20s) ******************************************************** BUGS ******************************************************** @@ -36,9 +34,6 @@ give undefined tech different effects at different localSettings.loreCount value 3. 1/1: reduce max energy and take more harm 4. 1/1: add 5? more levels -tech needles: can pass through shields - or just do extra damage - lore add console command for unlocking testing mode rename ? @@ -52,7 +47,6 @@ mechanic: use gun swap as an active ability push away nearby mobs, but drain energy produce ammo, but take 1 damage rewind, still uses energy - cycle to next field, uses a reroll bot: ice blast, long CD AOE freeze @@ -400,8 +394,11 @@ chapter 5: no need to fight? what is special about the null level why can the player hear the scientists in there? the wires are the direct unprocessed input to the player's neural net - maybe... player must make a choice? fight or friend? - + maybe... player must make a choice? + keep fighting + exit the simulation + enter real world + enter console command to close tab?