diff --git a/.DS_Store b/.DS_Store index 8fb1b13..b958507 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/js/engine.js b/js/engine.js index fba3d95..a1993d4 100644 --- a/js/engine.js +++ b/js/engine.js @@ -190,7 +190,7 @@ function collisionChecks(event) { let dmg = 0.075 * b.dmgScale * v * obj.mass * tech.throwChargeRate; if (mob[k].isShielded) dmg *= 0.6 mob[k].damage(dmg, true); - if (tech.isBlockPowerUps && !mob[k].alive && mob[k].isDropPowerUp) { + if (tech.isBlockPowerUps && !mob[k].alive && mob[k].isDropPowerUp && m.throwCycle > m.cycle) { let type = tech.isEnergyNoAmmo ? "heal" : "ammo" if (Math.random() < 0.4) { type = "heal" diff --git a/js/level.js b/js/level.js index 2a84532..675806f 100644 --- a/js/level.js +++ b/js/level.js @@ -15,12 +15,12 @@ const level = { // level.difficultyIncrease(30) // simulation.zoomScale = 1000; // simulation.setZoom(); - m.setField("pilot wave") + // m.setField("pilot wave") // b.giveGuns("wave beam") // b.giveGuns("laser") // tech.isExplodeRadio = true // tech.giveTech("pulse") - tech.giveTech("potential well") + // tech.giveTech("potential well") // for (let i = 0; i < 3; i++) tech.giveTech("packet length") // for (let i = 0; i < 3; i++) tech.giveTech("propagation") // for (let i = 0; i < 3; i++) tech.giveTech("bound state") diff --git a/js/player.js b/js/player.js index c3a10c2..c3de7f0 100644 --- a/js/player.js +++ b/js/player.js @@ -937,6 +937,7 @@ const m = { holdingTarget: null, timeSkipLastCycle: 0, // these values are set on reset by setHoldDefaults() + blockingRecoil: 4, grabPowerUpRange2: 0, isFieldActive: false, fieldRange: 155, @@ -978,6 +979,7 @@ const m = { m.duplicateChance = 0 powerUps.setDo(); m.grabPowerUpRange2 = 156000; + m.blockingRecoil = 4; m.fieldRange = 155; m.fieldFire = false; m.fieldCDcycle = 0; @@ -1174,6 +1176,7 @@ const m = { } m.throwCharge = 0; + m.throwCycle = m.cycle + 180 //used to detect if a block was thrown in the last 3 seconds Matter.Body.setVelocity(m.holdingTarget, { x: player.velocity.x * 0.5 + Math.cos(m.angle) * speed, y: player.velocity.y * 0.5 + Math.sin(m.angle) * speed @@ -1310,13 +1313,13 @@ const m = { }); if (m.crouch) { Matter.Body.setVelocity(player, { - x: player.velocity.x + 0.4 * unit.x * massRoot, - y: player.velocity.y + 0.4 * unit.y * massRoot + x: player.velocity.x + 0.1 * m.blockingRecoil * unit.x * massRoot, + y: player.velocity.y + 0.1 * m.blockingRecoil * unit.y * massRoot }); } else { Matter.Body.setVelocity(player, { - x: player.velocity.x + 5 * unit.x * massRoot, - y: player.velocity.y + 5 * unit.y * massRoot + x: player.velocity.x + m.blockingRecoil * unit.x * massRoot, + y: player.velocity.y + m.blockingRecoil * unit.y * massRoot }); } } else { @@ -1488,11 +1491,12 @@ const m = { }, { name: "standing wave harmonics", - description: "3 oscillating shields are permanently active
blocking drains energy with no cool down
reduce harm by 25%", + description: "3 oscillating shields are permanently active
blocking drains energy with no cool down
reduce harm and blocking recoil by 25%", effect: () => { // m.fieldHarmReduction = 0.80; m.fieldBlockCD = 0; m.fieldHarmReduction = 0.75; + m.blockingRecoil = 1 //4 is normal m.fieldRange = 175 + 175 * 0.25 * tech.frequencyResonance m.fieldShieldingScale = Math.pow(0.5, tech.frequencyResonance) m.hold = function() { @@ -2306,7 +2310,7 @@ const m = { for (let i = 0, len = body.length; i < len; ++i) { if (Vector.magnitude(Vector.sub(body[i].position, m.fieldPosition)) < m.fieldRadius && !body[i].isNotHoldable) { - const DRAIN = speed * body[i].mass * 0.00001 * (1 + m.energy * m.energy) //drain more energy when you have more energy + const DRAIN = speed * body[i].mass * 0.000013 // * (1 + m.energy * m.energy) //drain more energy when you have more energy if (m.energy > DRAIN) { m.energy -= DRAIN; Matter.Body.setVelocity(body[i], velocity); //give block mouse velocity @@ -2983,7 +2987,7 @@ const m = { let dmg = 0.05 * b.dmgScale * v * obj.mass * tech.throwChargeRate; if (mob[k].isShielded) dmg *= 0.35 mob[k].damage(dmg, true); - if (tech.isBlockPowerUps && !mob[k].alive && mob[k].isDropPowerUp) { + if (tech.isBlockPowerUps && !mob[k].alive && mob[k].isDropPowerUp && m.throwCycle > m.cycle) { let type = tech.isEnergyNoAmmo ? "heal" : "ammo" if (Math.random() < 0.4) { type = "heal" diff --git a/js/spawn.js b/js/spawn.js index 257c14a..3c98b28 100644 --- a/js/spawn.js +++ b/js/spawn.js @@ -10,8 +10,8 @@ const spawn = { "stabber", "stabber", "launcher", "launcher", "springer", "springer", - "sucker", "sucker", "pulsar", "pulsar", + "sucker", "chaser", "sniper", "spinner", diff --git a/js/tech.js b/js/tech.js index c6eed95..dc4872d 100644 --- a/js/tech.js +++ b/js/tech.js @@ -84,6 +84,8 @@ if (options.length > 0) { let newTech = options[Math.floor(Math.random() * options.length)] tech.giveTech(newTech) + simulation.makeTextLog(`tech.giveTech("${tech.tech[newTech].name}") //random tech`); + } } else { if (isNaN(index)) { //find index by name @@ -98,6 +100,7 @@ if (!found) return //if name not found don't give any tech } if (tech.isMetaAnalysis && tech.tech[index].isJunk) { + simulation.makeTextLog(`//tech: meta-analysis replaced junk tech with random tech`); tech.giveTech('random') for (let i = 0; i < 2; i++) powerUps.spawn(m.pos.x + 10 * Math.random(), m.pos.y + 10 * Math.random(), "research"); return @@ -1480,7 +1483,7 @@ }, { name: "restitution", - description: "mobs killed by collisions with blocks
spawn a heal, ammo, or research", + description: "if a block you threw kills a mob
spawn a heal, ammo, or research", maxCount: 1, count: 0, frequency: 4, @@ -3115,7 +3118,7 @@ const index = powerUps.tech.choiceLog[powerUps.tech.choiceLog.length - i - 1] if (index !== powerUps.lastTechIndex && tech.tech[index].count < tech.tech[index].maxCount && tech.tech[index].allowed() && tech.tech[index].name !== "backward induction") { tech.giveTech(index) - simulation.makeTextLog(`tech.giveTech("${tech.tech[index].name}") // backward induction`); + simulation.makeTextLog(`tech.giveTech("${tech.tech[index].name}") //backward induction`); } } }, @@ -3922,7 +3925,7 @@ }, { name: "water shielding", - description: "increase neutron bomb's range by 20%
player is immune to its harmful effects", + description: "increase neutron bomb's range by 20%
you are immune to its harmful effects", isGunTech: true, maxCount: 1, count: 0, @@ -4067,7 +4070,7 @@ }, { name: "diplochory", - description: "spores use the player for dispersal
until they locate a viable host", + description: "spores use you for dispersal
until they locate a viable host", isGunTech: true, maxCount: 1, count: 0, diff --git a/style.css b/style.css index f1e5ad3..76d4158 100644 --- a/style.css +++ b/style.css @@ -165,7 +165,7 @@ summary { z-index: 12; background-color: #444; display: none; - grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); + grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); grid-auto-rows: minmax(auto, auto); font-size: 1.3em; /* box-shadow: 0px 0px 40px 20px rgba(255, 255, 255, 0.25); */ @@ -200,7 +200,7 @@ summary { margin: 0px; display: none; - grid-template-columns: 316px; + grid-template-columns: 320px; /* grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); */ grid-auto-rows: minmax(auto, auto); grid-gap: 0px; @@ -239,7 +239,7 @@ summary { background-color: var(--build-bg-color); display: none; - grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); + grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); grid-auto-flow: row; grid-auto-rows: minmax(auto, auto); grid-gap: 0px; diff --git a/todo.txt b/todo.txt index a5d746f..ad1005d 100644 --- a/todo.txt +++ b/todo.txt @@ -1,13 +1,10 @@ ******************************************************** NEXT PATCH ******************************************************** -pilot is back to it's previous speed, and spawning at mouse -pilot wave uses 50% less energy when you are low on energy, but it uses more energy then normal when you have more energy -pilot wave tech - lost: time crystals, Lorentz transformation, annihilation - gained: degenerate matter - 60% harm reduction while field is active -tech: potential well - blocks in pilot wave drift into the center of the field with a much higher force - this lets you hold larger blocks and flick them much faster +pilot wave energy is back to it's old energy settings +tech: restitution - now only triggers power ups from blocks thrown by the player + (this makes pilot wave and naturally falling blocks not spawn power ups. flywheel will work if a block was thrown in the last 3 seconds) +standing wave harmonic has reduced blocking recoil ******************************************************** BUGS ******************************************************** @@ -25,8 +22,6 @@ tech: strange attractor before at least 1 other tech crashed on this https://landgreen.github.io/sidescroller/index.html?&gun0=rail%20gun&tech1=mass%20driver&tech2=restitution&tech3=flywheel&tech4=Pauli%20exclusion&tech5=mass-energy%20equivalence&tech6=1st%20ionization%20energy&tech7=electrolytes&tech8=negative%20feedback&tech9=entropy%20exchange&tech10=anthropic%20principle&tech11=renormalization&tech12=Bayesian%20statistics&tech13=bubble%20fusion&tech14=replication&tech15=replication&tech16=futures%20exchange&tech17=commodities%20exchange&tech18=correlated%20damage&tech19=parthenogenesis&tech21=cardinality&tech22=half-wave%20rectifier&tech23=pair%20production&tech24=Lorentz%20transformation&tech25=time%20crystals&tech26=undefined&tech27=undefined&tech28=undefined&tech29=undefined&tech30=undefined&tech31=undefined&tech32=undefined&field=pilot%20wave&difficulty=6 -increase the width on the grid by a few pixels so that very small screens or people with odd fonts don't goto a new line - you have to press z once to get copy to work for simulation.enableConstructMode() sometimes not sure how to reproduce, but it happens often on the first draw @@ -55,9 +50,11 @@ is there a way to check if the player is stuck inside the map or block ******************************************************** TODO ******************************************************** +pause should show the last in game console message + Make ice crystal + rivet gun/needle gun launch freezing rivets/needles with increased energy drain -WIMPS are cool, but the 2-3 research isn't enough incentive +WIMPS are cool, but the 2-3 research isn't enough incentive? tech: pilot wave is projected from the player, not the mouse give pilot wave a buff?