diff --git a/.DS_Store b/.DS_Store index c6d0dca..6747dd1 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/js/bullet.js b/js/bullet.js index 96df8c2..a3237a3 100644 --- a/js/bullet.js +++ b/js/bullet.js @@ -1908,12 +1908,11 @@ const b = { } } }, - iceIX(speed = 0, spread = 2 * Math.PI) { + iceIX(speed = 0, dir = m.angle + Math.PI * 2 * Math.random(), where = { x: m.pos.x + 30 * Math.cos(m.angle), y: m.pos.y + 30 * Math.sin(m.angle) }) { const me = bullet.length; const THRUST = 0.004 - const dir = m.angle + spread * (Math.random() - 0.5); const RADIUS = 18 - bullet[me] = Bodies.polygon(m.pos.x + 30 * Math.cos(m.angle), m.pos.y + 30 * Math.sin(m.angle), 3, RADIUS, { + bullet[me] = Bodies.polygon(where.x, where.y, 3, RADIUS, { angle: dir - Math.PI, inertia: Infinity, friction: 0, diff --git a/js/level.js b/js/level.js index 4e47e2b..fc1aaed 100644 --- a/js/level.js +++ b/js/level.js @@ -1106,8 +1106,8 @@ const level = { spawn.mapRect(6700, -1800, 800, 2600); //right wall spawn.mapRect(level.exit.x, level.exit.y + 20, 100, 100); //exit bump - // simulation.difficulty = 30 - // spawn.starter(1900, -500, 200) //big boy + // simulation.difficulty = 30 + spawn.starter(1900, -500, 100) //big boy // spawn.grower(1900, -500) // spawn.pulsarBoss(1900, -500) // spawn.shooterBoss(1900, -500) @@ -1119,7 +1119,7 @@ const level = { // spawn.sniper(1800, -120) // spawn.streamBoss(1600, -500) // spawn.orbitalBoss(1600, -500) - spawn.cellBossCulture(1600, -500) + // spawn.cellBossCulture(1600, -500) // spawn.shieldingBoss(1600, -500) // spawn.beamer(1200, -500) // spawn.shield(mob[mob.length - 1], 1800, -120, 1); diff --git a/js/mob.js b/js/mob.js index 19091a6..5e3eba0 100644 --- a/js/mob.js +++ b/js/mob.js @@ -70,7 +70,7 @@ const mobs = { who.isSlowed = true; who.status.push({ effect() { - const speedCap = 3 + const speedCap = 2 const drag = 0.95 Matter.Body.setVelocity(who, { x: Math.min(speedCap, who.velocity.x) * drag, @@ -1067,7 +1067,7 @@ const mobs = { const len = Math.min(25, Math.floor(2 + this.mass * (0.5 + 0.5 * Math.random()))) for (let i = 0; i < len; i++) b.spore(this.position) } else if (tech.isExplodeMob) { - b.explosion(this.position, Math.min(600, Math.sqrt(this.mass + 2.75) * 55)) + b.explosion(this.position, Math.min(600, Math.sqrt(this.mass + 1.5) * (22 + 60 * Math.random()))) } else if (tech.nailsDeathMob) { b.targetedNail(this.position, tech.nailsDeathMob, 39 + 6 * Math.random()) } diff --git a/js/player.js b/js/player.js index b844610..4c5fcd0 100644 --- a/js/player.js +++ b/js/player.js @@ -1266,8 +1266,14 @@ const m = { if (m.energy > fieldBlockCost * 0.2) { //shield needs at least some of the cost to block m.energy -= fieldBlockCost if (m.energy < 0) m.energy = 0; - // if (m.energy > m.maxEnergy) m.energy = m.maxEnergy; - + m.fieldCDcycle = m.cycle + m.fieldBlockCD; + if (tech.blockingIce) { + if (m.fieldShieldingScale) { + for (let i = 0; i < fieldBlockCost * 35 * tech.blockingIce; i++) b.iceIX(3, m.angle + Math.random() - 0.5, m.pos) + } else { + for (let i = 0; i < tech.blockingIce; i++) b.iceIX(10, m.angle + Math.random() - 0.5, m.pos) + } + } if (tech.blockDmg) { who.damage(tech.blockDmg * b.dmgScale) //draw electricity @@ -1299,7 +1305,6 @@ const m = { x: player.velocity.x - (15 * unit.x) / massRoot, y: player.velocity.y - (15 * unit.y) / massRoot }); - m.fieldCDcycle = m.cycle + m.fieldBlockCD; if (m.crouch) { Matter.Body.setVelocity(player, { x: player.velocity.x + 0.4 * unit.x * massRoot, @@ -1340,12 +1345,9 @@ const m = { } } }, - pushMobs360(range = m.fieldRange * 0.75) { // find mobs in range in any direction + pushMobs360(range) { // find mobs in range in any direction for (let i = 0, len = mob.length; i < len; ++i) { - if ( - Vector.magnitude(Vector.sub(mob[i].position, m.pos)) < range && - Matter.Query.ray(map, mob[i].position, m.pos).length === 0 - ) { + if (Vector.magnitude(Vector.sub(mob[i].position, m.pos)) - mob[i].radius < range && Matter.Query.ray(map, mob[i].position, m.pos).length === 0) { mob[i].locatePlayer(); m.pushMass(mob[i]); } @@ -1483,11 +1485,11 @@ const m = { }, { name: "standing wave harmonics", - description: "3 oscillating shields are permanently active
blocking drains energy with no cool down
reduce harm by 20%", + description: "3 oscillating shields are permanently active
blocking drains energy with no cool down
reduce harm by 25%", effect: () => { // m.fieldHarmReduction = 0.80; m.fieldBlockCD = 0; - m.fieldHarmReduction = 0.8; + m.fieldHarmReduction = 0.75; m.fieldRange = 175 + 175 * 0.25 * tech.frequencyResonance m.fieldShieldingScale = Math.pow(0.5, tech.frequencyResonance) m.hold = function() { @@ -1508,7 +1510,7 @@ const m = { const fieldRange2 = (0.63 + 0.37 * Math.sin(m.cycle / 37)) * m.fieldRange const fieldRange3 = (0.65 + 0.35 * Math.sin(m.cycle / 47)) * m.fieldRange const netfieldRange = Math.max(fieldRange1, fieldRange2, fieldRange3) - ctx.fillStyle = "rgba(110,170,200," + (0.04 + m.energy * (0.12 + 0.13 * Math.random())) + ")"; + ctx.fillStyle = "rgba(110,170,200," + Math.min(0.73, (0.04 + m.energy * (0.11 + 0.13 * Math.random()))) + ")"; ctx.beginPath(); ctx.arc(m.pos.x, m.pos.y, fieldRange1, 0, 2 * Math.PI); ctx.fill(); @@ -1528,9 +1530,10 @@ const m = { { name: "perfect diamagnetism", // description: "gain energy when blocking
no recoil when blocking", - description: "blocking does not drain energy
blocking has no cool down and less recoil
attract power ups from far away", + description: "blocking does not drain energy
blocking has less recoil
attract power ups from far away", effect: () => { m.fieldShieldingScale = 0; + m.fieldBlockCD = 4; m.grabPowerUpRange2 = 10000000 m.hold = function() { const wave = Math.sin(m.cycle * 0.022); @@ -1676,7 +1679,6 @@ const m = { m.isFieldActive = true; //used with tech.isHarmReduce m.airSpeedLimit = 400 // 7* player.mass * player.mass m.FxAir = 0.005 - // m.pushMobs360(); //repulse mobs // for (let i = 0, len = mob.length; i < len; ++i) { @@ -1736,7 +1738,7 @@ const m = { }); } if (tech.isFreezeMobs) { - const ICE_DRAIN = 0.0005 + const ICE_DRAIN = 0.0002 for (let i = 0, len = mob.length; i < len; i++) { if (((mob[i].distanceToPlayer() + mob[i].radius) < this.fieldDrawRadius) && !mob[i].shield && !mob[i].isShielded) { if (m.energy > ICE_DRAIN * 2) { diff --git a/js/powerup.js b/js/powerup.js index 2feccec..b42fd14 100644 --- a/js/powerup.js +++ b/js/powerup.js @@ -266,7 +266,7 @@ const powerUps = { if (powerUps.research.count) { text += `
` for (let i = 0, len = Math.min(powerUps.research.count, 30); i < len; i++) text += `
` - text += `
research
` + text += `  research` } //(${powerUps.research.count}) // text += `
${simulation.SVGrightMouse} activate the shield with the right mouse
fields shield you from damage
and let you pick up and throw blocks
` @@ -373,8 +373,24 @@ const powerUps = { if (powerUps.research.count) { text += `
` - for (let i = 0, len = Math.min(powerUps.research.count, 30); i < len; i++) text += `
` - text += `
research
` + for (let i = 0, len = Math.min(powerUps.research.count, 30); i < len; i++) text += `
` + text += `  research` + + + // text += ` + //
+ // + //
+ //
+ //
+ //   research
` + + // text += `
+ // + //
+ //
+ //
+ //         ${tech.tech[choose].name} ${isCount}
${tech.tech[choose].description}
` } document.getElementById("choose-grid").innerHTML = text @@ -460,7 +476,7 @@ const powerUps = { if (powerUps.research.count) { text += `
` for (let i = 0, len = Math.min(powerUps.research.count, 30); i < len; i++) text += `
` - text += `
research
` + text += `  research` } // console.log(powerUps.gun.choiceLog) // console.log(choice1, choice2, choice3) diff --git a/js/tech.js b/js/tech.js index 8918adb..4d97b4e 100644 --- a/js/tech.js +++ b/js/tech.js @@ -678,7 +678,7 @@ count: 0, frequency: 2, allowed() { - return m.fieldUpgrades[m.fieldMode].name === "nano-scale manufacturing" || tech.haveGunCheck("spores") || tech.haveGunCheck("drones") || tech.haveGunCheck("missiles") || tech.haveGunCheck("foam") || tech.haveGunCheck("wave beam") || tech.isNeutronBomb || tech.isIceField || tech.relayIce + return m.fieldUpgrades[m.fieldMode].name === "nano-scale manufacturing" || tech.haveGunCheck("spores") || tech.haveGunCheck("drones") || tech.haveGunCheck("missiles") || tech.haveGunCheck("foam") || tech.haveGunCheck("wave beam") || tech.isNeutronBomb || tech.isIceField || tech.relayIce || tech.blockingIce > 1 }, requires: "drones, spores, missiles, foam, wave beam, neutron bomb, ice IX", effect() { @@ -1690,7 +1690,7 @@ count: 0, frequency: 2, allowed() { - return tech.isStunField || tech.isPulseStun || tech.oneSuperBall || tech.isHarmFreeze || tech.isIceField || tech.relayIce || tech.isIceCrystals || tech.isSporeFreeze || tech.isAoESlow || tech.isFreezeMobs || tech.isCloakStun || tech.orbitBotCount > 1 || tech.isWormholeDamage + return tech.isStunField || tech.isPulseStun || tech.oneSuperBall || tech.isHarmFreeze || tech.isIceField || tech.relayIce || tech.isIceCrystals || tech.isSporeFreeze || tech.isAoESlow || tech.isFreezeMobs || tech.isCloakStun || tech.orbitBotCount > 1 || tech.isWormholeDamage || tech.blockingIce > 1 }, requires: "a freezing or stunning effect", effect() { @@ -1707,7 +1707,7 @@ count: 0, frequency: 2, allowed() { - return tech.isIceCrystals || tech.isSporeFreeze || tech.isIceField || tech.relayIce + return tech.isIceCrystals || tech.isSporeFreeze || tech.isIceField || tech.relayIce || tech.blockingIce > 1 }, requires: "a localized freeze effect", effect() { @@ -2915,7 +2915,7 @@ isNonRefundable: true, isBadRandomOption: true, allowed() { - return powerUps.tech.choiceLog.length > 5 && !tech.isDeterminism + return powerUps.tech.choiceLog.length > 10 && !tech.isDeterminism }, requires: "rejected an option in the last tech selection", effect: () => { @@ -4363,16 +4363,16 @@ //************************************************** tech //************************************************** { - name: "bremsstrahlung radiation", + name: "bremsstrahlung", description: "blocking with standing wave harmonics
does damage to mobs", isFieldTech: true, maxCount: 9, count: 0, frequency: 2, allowed() { - return m.fieldUpgrades[m.fieldMode].name === "standing wave harmonics" + return m.fieldUpgrades[m.fieldMode].name === "standing wave harmonics" || m.fieldUpgrades[m.fieldMode].name === "perfect diamagnetism" }, - requires: "standing wave harmonics", + requires: "standing wave harmonics, perfect diamagnetism", effect() { tech.blockDmg += 1.25 //if you change this value also update the for loop in the electricity graphics in m.pushMass }, @@ -4380,6 +4380,24 @@ tech.blockDmg = 0; } }, + { + name: "triple point", + description: "the pressure from blocking is used
to condense ice IX crystals", + isFieldTech: true, + maxCount: 9, + count: 0, + frequency: 2, + allowed() { + return m.fieldUpgrades[m.fieldMode].name === "standing wave harmonics" || m.fieldUpgrades[m.fieldMode].name === "perfect diamagnetism" + }, + requires: "standing wave harmonics, perfect diamagnetism", + effect() { + tech.blockingIce++ + }, + remove() { + tech.blockingIce = 0; + } + }, { name: "frequency resonance", description: "standing wave harmonics shield is retuned
increase size and blocking efficiency by 50%", @@ -4648,7 +4666,7 @@ count: 0, frequency: 2, allowed() { - return tech.isIceField || tech.relayIce + return tech.isIceField || tech.relayIce || tech.blockingIce }, requires: "ice IX", effect() { @@ -6433,5 +6451,6 @@ isAlwaysFire: null, isDroneRespawn: null, deathSpawns: null, - isMobBlockFling: null + isMobBlockFling: null, + blockingIce: null } \ No newline at end of file diff --git a/style.css b/style.css index fa78e6d..f1e5ad3 100644 --- a/style.css +++ b/style.css @@ -568,19 +568,19 @@ summary { /* text-decoration: underline; */ } -.color-bot { - /* background-color: #eee; */ - /* color: #555; */ - /* letter-spacing: -1.5px; */ - /* text-transform: uppercase; */ - /* font-variant: all-caps; */ - /* text-decoration: underline solid; */ - /* border: 1px solid #000; */ - /* padding: 10px; */ - /* border-radius: 10%; */ - /* font-family: Lucida Console, Courier, monospace; */ - /* color: #777; */ -} +/* .color-bot { */ +/* background-color: #eee; */ +/* color: #555; */ +/* letter-spacing: -1.5px; */ +/* text-transform: uppercase; */ +/* font-variant: all-caps; */ +/* text-decoration: underline solid; */ +/* border: 1px solid #000; */ +/* padding: 10px; */ +/* border-radius: 10%; */ +/* font-family: Lucida Console, Courier, monospace; */ +/* color: #777; */ +/* } */ .color-cloaked { opacity: 0.25; @@ -679,7 +679,7 @@ summary { } .junk { - background: hsl(254, 44%, 75%); + background-color: hsl(254, 44%, 75%); border-radius: 25%; /* animation: 3s linear infinite alternate pulse; */ } @@ -705,13 +705,13 @@ summary { } */ .field { - background: #0cf; + background-color: #0cf; } .tech { /* background: rgb(116, 102, 238); */ /* background: hsl(253, 57%, 52%); */ - background: hsl(255, 100%, 71%); + background-color: hsl(255, 100%, 71%); /* background: hsl(282, 100%, 64%); */ } @@ -720,16 +720,16 @@ summary { } */ .gun { - background: rgb(0, 80, 218); + background-color: rgb(0, 80, 218); } .heal { - background: #0d9; + background-color: #0d9; } .research { /* #f84 #f99*/ - background: #f7b; + background-color: #f7b; } .research-select { diff --git a/todo.txt b/todo.txt index 7b3acc6..d44425f 100644 --- a/todo.txt +++ b/todo.txt @@ -1,12 +1,12 @@ ******************************************************** NEXT PATCH ******************************************************** -diffraction grating only gains 1 extra beam, but no longer gets a damage reduction - also the beam split is wider than before +perfect diamagnetism now has a 1/12 of a second cooldown after blocking (1/2 other fields) +perfect diamagnetism can get bremsstrahlung now -needle move twice as fast (was 50, now is 100) - and they are 50% longer and 25% thinner - damage was improved about 20% - delay between each needle in a volley is slightly longer +standing wave harmonic field blocks now block large mobs more reliably + +tech: triple point - blocking makes iceIX crystals + unlocked with: standing wave harmonic field or perfect diamagnetism ******************************************************** BUGS ******************************************************** @@ -38,9 +38,7 @@ fix door.isOpen actually meaning isClosed? ******************************************************** TODO ******************************************************** -make some bullets move super fast, but do collisions checks in .do() - check for hitting mobs or map with fractional velocity - if velocity is above 40ish +tech: pressing the gun switch keys instead cycles through bot upgrades, switching all of your bots accordingly import the procedural level generation from one of the older versions of the game as one single level