From 33ed7dddfa9a6a9577eec1c5623da0caf8ce9e77 Mon Sep 17 00:00:00 2001 From: landgreen Date: Fri, 14 May 2021 05:16:47 -0700 Subject: [PATCH] pilot wave is a bit slower spammable methods of energy generation no longer work while immune to damage rail-gun, flip-flop, dynamo-bots, ice-IX, energy siphon pilot wave follows the mouse a bit slower (I think this is actually a buff, because blocks stay in the field better) a newly clicked pilot wave now begins at the player, not the mouse (this is just because it looks cool) tech: many worlds, now only spawns 1 tech (use to spawn a heal, ammo, research too) --- .DS_Store | Bin 6148 -> 6148 bytes js/bullet.js | 8 ++++---- js/level.js | 5 +---- js/mob.js | 2 +- js/player.js | 12 ++++++++---- js/simulation.js | 2 +- js/tech.js | 23 +++++++++++------------ todo.txt | 22 +++++++++------------- 8 files changed, 35 insertions(+), 39 deletions(-) diff --git a/.DS_Store b/.DS_Store index 67ba9fe8e629a8e8841c728eb754586e7523937e..dabf20889d1d1491f8492c70921e64ce62f5b125 100644 GIT binary patch delta 14 VcmZoMXffEJ&CIxBvkvnO5db7)1ik 0.16 || tech.isRailEnergyGain) { + if ((m.energy > 0.16 || tech.isRailEnergyGain) && m.immuneCycle < m.cycle) { m.energy += 0.16 * (tech.isRailEnergyGain ? 6 : -1) m.fireCDcycle = m.cycle + Math.floor(30 * b.fireCD); const me = bullet.length; @@ -4345,7 +4345,7 @@ const b = { let smoothRate = 0.98 * (m.crouch ? 0.99 : 1) * (0.98 + 0.02 * b.fireCD) //small b.fireCD = faster shots, b.fireCD=1 = normal shot, big b.fireCD = slower chot this.charge = this.charge * smoothRate + 1 * (1 - smoothRate) if (tech.isRailEnergyGain) { - m.energy += (this.charge - previousCharge) * 2 //energy drain is proportional to charge gained, but doesn't stop normal m.fieldRegen + if (m.immuneCycle < m.cycle) m.energy += (this.charge - previousCharge) * 2 //energy drain is proportional to charge gained, but doesn't stop normal m.fieldRegen } else { m.energy -= (this.charge - previousCharge) * 0.33 //energy drain is proportional to charge gained, but doesn't stop normal m.fieldRegen } diff --git a/js/level.js b/js/level.js index 3082250..e17d00c 100644 --- a/js/level.js +++ b/js/level.js @@ -15,7 +15,7 @@ const level = { // level.difficultyIncrease(30) // simulation.zoomScale = 1000; // simulation.setZoom(); - // m.setField("metamaterial cloaking") + // m.setField("pilot wave") // b.giveGuns("wave beam") // b.giveGuns("laser") // tech.isExplodeRadio = true @@ -103,9 +103,6 @@ const level = { m.switchWorlds() simulation.trails() powerUps.spawn(player.position.x + Math.random() * 50, player.position.y - Math.random() * 50, "tech", false); - powerUps.spawn(player.position.x + Math.random() * 50, player.position.y - Math.random() * 50, "heal", false); - powerUps.spawn(player.position.x + Math.random() * 50, player.position.y - Math.random() * 50, "ammo", false); - powerUps.spawn(player.position.x + Math.random() * 50, player.position.y - Math.random() * 50, "research", false); } if (tech.isHealLowHealth) { const len = Math.floor((m.maxHealth - m.health) / 0.5) diff --git a/js/mob.js b/js/mob.js index dafd5b2..38889a1 100644 --- a/js/mob.js +++ b/js/mob.js @@ -1018,7 +1018,7 @@ const mobs = { if (this.isBoss) dmg *= 0.25 //energy and heal drain should be calculated after damage boosts - if (tech.energySiphon && dmg !== Infinity && this.isDropPowerUp) m.energy += Math.min(this.health, dmg) * tech.energySiphon + if (tech.energySiphon && dmg !== Infinity && this.isDropPowerUp && m.immuneCycle < m.cycle) m.energy += Math.min(this.health, dmg) * tech.energySiphon if (tech.healthDrain && dmg !== Infinity && this.isDropPowerUp) { m.addHealth(Math.min(this.health, dmg) * tech.healthDrain) diff --git a/js/player.js b/js/player.js index 4c29af5..1a2dfcf 100644 --- a/js/player.js +++ b/js/player.js @@ -2238,10 +2238,14 @@ const m = { if (!m.fieldOn) { // if field was off, and it starting up, teleport to new mouse location m.fieldOn = true; - m.fieldPosition = { //smooth the mouse position - x: simulation.mouseInGame.x, - y: simulation.mouseInGame.y + m.fieldPosition = { //smooth the mouse position, set to starting at player + x: m.pos.x, + y: m.pos.y } + // m.fieldPosition = { //smooth the mouse position + // x: simulation.mouseInGame.x, + // y: simulation.mouseInGame.y + // } m.lastFieldPosition = { //used to find velocity of field changes x: m.fieldPosition.x, y: m.fieldPosition.y @@ -2251,7 +2255,7 @@ const m = { x: m.fieldPosition.x, y: m.fieldPosition.y } - const smooth = isInMap ? 0.985 : 0.96; + const smooth = isInMap ? 0.985 : 0.97; m.fieldPosition = { //smooth the mouse position x: m.fieldPosition.x * smooth + simulation.mouseInGame.x * (1 - smooth), y: m.fieldPosition.y * smooth + simulation.mouseInGame.y * (1 - smooth), diff --git a/js/simulation.js b/js/simulation.js index 0a267b8..5f91368 100644 --- a/js/simulation.js +++ b/js/simulation.js @@ -791,7 +791,7 @@ const simulation = { if (!(simulation.cycle % 60) && !m.isBodiesAsleep) { //once a second //energy overfill if (m.energy > m.maxEnergy) m.energy = m.maxEnergy + (m.energy - m.maxEnergy) * tech.overfillDrain //every second energy above max energy loses 25% - if (tech.isFlipFlopEnergy) { + if (tech.isFlipFlopEnergy && m.immuneCycle < m.cycle) { if (tech.isFlipFlopOn) { m.energy += 0.22; } else { diff --git a/js/tech.js b/js/tech.js index a8da14f..516b608 100644 --- a/js/tech.js +++ b/js/tech.js @@ -303,7 +303,7 @@ frequency: 2, isNonRefundable: true, // isExperimentHide: true, - // isBadRandomOption: true, + isBadRandomOption: true, allowed() { return !tech.isSuperDeterminism }, @@ -2533,7 +2533,7 @@ }, { name: "many-worlds", - description: "each level is an alternate reality, where you
find a tech, heal, ammo, and research", + description: "each level is an alternate reality, where you
find a tech at the start of each level", maxCount: 1, count: 0, frequency: 1, @@ -2701,7 +2701,7 @@ for (let i = 0, len = tech.tech.length; i < len; i++) { // spawn new tech power ups if (!tech.tech[i].isNonRefundable) count += tech.tech[i].count } - if (tech.isDeterminism) count -= 5 //remove the bonus tech + if (tech.isDeterminism) count -= 4 //remove the bonus tech if (tech.isSuperDeterminism) count -= 4 //remove the bonus tech tech.setupAllTech(); // remove all tech @@ -2770,7 +2770,7 @@ }, { name: "replication", - description: "7.5% chance to duplicate spawned power ups
add 12 JUNK tech to the potential pool", + description: "8% chance to duplicate spawned power ups
add 14 JUNK tech to the potential pool", maxCount: 9, count: 0, frequency: 1, @@ -2780,14 +2780,14 @@ }, requires: "below 100% duplication chance", effect() { - tech.duplicateChance += 0.075 + tech.duplicateChance += 0.08 powerUps.setDo(); //needed after adjusting duplication chance - tech.addJunkTechToPool(12) + tech.addJunkTechToPool(14) }, remove() { tech.duplicateChance = 0 powerUps.setDo(); //needed after adjusting duplication chance - if (this.count > 1) tech.removeJunkTechFromPool(12) + if (this.count > 1) tech.removeJunkTechFromPool(14) } }, { @@ -3113,7 +3113,7 @@ if (tech.isDeterminism) num = 1 for (let i = 0; i < num; i++) { 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()) { + 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`); } @@ -3140,7 +3140,7 @@ }, { name: "determinism", - description: "spawn 6 tech, but you have no cancel
and 1 choice for tech, fields, and guns", + description: "spawn 5 tech, but you have no cancel
and 1 choice for tech, fields, and guns", maxCount: 1, count: 0, frequency: 1, @@ -3153,13 +3153,12 @@ effect: () => { tech.isDeterminism = true; //if you change the number spawned also change it in Born rule - for (let i = 0; i < 6; i++) powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "tech"); + for (let i = 0; i < 5; i++) powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "tech"); }, remove() { if (tech.isDeterminism) { tech.isDeterminism = false; - - for (let i = 0; i < 6; i++) powerUps.removeRandomTech() + for (let i = 0; i < 5; i++) powerUps.removeRandomTech() } } }, diff --git a/todo.txt b/todo.txt index 1b05ca8..3a888e5 100644 --- a/todo.txt +++ b/todo.txt @@ -1,15 +1,15 @@ ******************************************************** NEXT PATCH ******************************************************** -ice-IX does 15% more damage +spammable methods of energy generation no longer work while immune to damage + rail-gun, flip-flop, dynamo-bots, ice-IX, energy siphon -tech: WIMPs - an indestructible harmful particle slowly chases you - spawn 2-3 research at the end of each level -experimental mode : WIMPS chase you +pilot wave follows the mouse a bit slower + (I think this is actually a buff, because blocks stay in the field better) +a newly clicked pilot wave now begins at the player, not the mouse + (this is just because it looks cool) -beating the final boss looks a bit less like death and a bit more like winning - also there are some text directions on how to enter endless mode (press T after you win) - -tech removed: 1-body problem +tech: many worlds, now only spawns 1 tech + (use to spawn a heal, ammo, research too) ******************************************************** BUGS ******************************************************** @@ -27,10 +27,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 -(once) CPT gun only rewound 0.25 seconds - after a randomize run (non-unitary) - had enough energy - 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 @@ -66,6 +62,7 @@ tech: MACHO - spawn a mob like WIMP that follows you and gives you a bonus let the player use research more like money spend it to do things + buff some special tech and add a research cost tech: use the ability for power ups to have custom code attracted to player @@ -79,7 +76,6 @@ tech: picking up heal power ups when at full health does harm equal to the heal get 1% damage permanent turned into drones - nail-gun, or .... 1s after being fired your bullets turn: towards the nearest mob