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)
This commit is contained in:
landgreen
2021-05-14 05:16:47 -07:00
parent 39c9b08b2e
commit 33ed7dddfa
8 changed files with 35 additions and 39 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@@ -1947,7 +1947,7 @@ const b = {
mobs.statusSlow(who, 180) mobs.statusSlow(who, 180)
this.endCycle = simulation.cycle this.endCycle = simulation.cycle
// if (tech.isHeavyWater) mobs.statusDoT(who, 0.15, 300) // if (tech.isHeavyWater) mobs.statusDoT(who, 0.15, 300)
if (tech.iceEnergy && !who.shield && !who.isShielded && who.isDropPowerUp && who.alive) { if (tech.iceEnergy && !who.shield && !who.isShielded && who.isDropPowerUp && who.alive && m.immuneCycle < m.cycle) {
setTimeout(function() { setTimeout(function() {
if (!who.alive) { if (!who.alive) {
m.energy += tech.iceEnergy * 0.8 m.energy += tech.iceEnergy * 0.8
@@ -2497,7 +2497,7 @@ const b = {
//check for damage //check for damage
if (!m.isBodiesAsleep) { if (!m.isBodiesAsleep) {
if (!((m.cycle + this.phase) % 30)) { //twice a second if (!((m.cycle + this.phase) % 30)) { //twice a second
if (Vector.magnitude(Vector.sub(this.position, player.position)) < 250) { //give energy if (Vector.magnitude(Vector.sub(this.position, player.position)) < 250 && m.immuneCycle < m.cycle) { //give energy
Matter.Body.setAngularVelocity(this, this.spin) Matter.Body.setAngularVelocity(this, this.spin)
if (this.isUpgraded) { if (this.isUpgraded) {
m.energy += 0.11 m.energy += 0.11
@@ -4164,7 +4164,7 @@ const b = {
} }
if (tech.isCapacitor) { if (tech.isCapacitor) {
if (m.energy > 0.16 || tech.isRailEnergyGain) { if ((m.energy > 0.16 || tech.isRailEnergyGain) && m.immuneCycle < m.cycle) {
m.energy += 0.16 * (tech.isRailEnergyGain ? 6 : -1) m.energy += 0.16 * (tech.isRailEnergyGain ? 6 : -1)
m.fireCDcycle = m.cycle + Math.floor(30 * b.fireCD); m.fireCDcycle = m.cycle + Math.floor(30 * b.fireCD);
const me = bullet.length; 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 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) this.charge = this.charge * smoothRate + 1 * (1 - smoothRate)
if (tech.isRailEnergyGain) { 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 { } else {
m.energy -= (this.charge - previousCharge) * 0.33 //energy drain is proportional to charge gained, but doesn't stop normal m.fieldRegen m.energy -= (this.charge - previousCharge) * 0.33 //energy drain is proportional to charge gained, but doesn't stop normal m.fieldRegen
} }

View File

@@ -15,7 +15,7 @@ const level = {
// level.difficultyIncrease(30) // level.difficultyIncrease(30)
// simulation.zoomScale = 1000; // simulation.zoomScale = 1000;
// simulation.setZoom(); // simulation.setZoom();
// m.setField("metamaterial cloaking") // m.setField("pilot wave")
// b.giveGuns("wave beam") // b.giveGuns("wave beam")
// b.giveGuns("laser") // b.giveGuns("laser")
// tech.isExplodeRadio = true // tech.isExplodeRadio = true
@@ -103,9 +103,6 @@ const level = {
m.switchWorlds() m.switchWorlds()
simulation.trails() 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, "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) { if (tech.isHealLowHealth) {
const len = Math.floor((m.maxHealth - m.health) / 0.5) const len = Math.floor((m.maxHealth - m.health) / 0.5)

View File

@@ -1018,7 +1018,7 @@ const mobs = {
if (this.isBoss) dmg *= 0.25 if (this.isBoss) dmg *= 0.25
//energy and heal drain should be calculated after damage boosts //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) { if (tech.healthDrain && dmg !== Infinity && this.isDropPowerUp) {
m.addHealth(Math.min(this.health, dmg) * tech.healthDrain) m.addHealth(Math.min(this.health, dmg) * tech.healthDrain)

View File

@@ -2238,10 +2238,14 @@ const m = {
if (!m.fieldOn) { // if field was off, and it starting up, teleport to new mouse location if (!m.fieldOn) { // if field was off, and it starting up, teleport to new mouse location
m.fieldOn = true; m.fieldOn = true;
m.fieldPosition = { //smooth the mouse position m.fieldPosition = { //smooth the mouse position, set to starting at player
x: simulation.mouseInGame.x, x: m.pos.x,
y: simulation.mouseInGame.y 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 m.lastFieldPosition = { //used to find velocity of field changes
x: m.fieldPosition.x, x: m.fieldPosition.x,
y: m.fieldPosition.y y: m.fieldPosition.y
@@ -2251,7 +2255,7 @@ const m = {
x: m.fieldPosition.x, x: m.fieldPosition.x,
y: m.fieldPosition.y y: m.fieldPosition.y
} }
const smooth = isInMap ? 0.985 : 0.96; const smooth = isInMap ? 0.985 : 0.97;
m.fieldPosition = { //smooth the mouse position m.fieldPosition = { //smooth the mouse position
x: m.fieldPosition.x * smooth + simulation.mouseInGame.x * (1 - smooth), x: m.fieldPosition.x * smooth + simulation.mouseInGame.x * (1 - smooth),
y: m.fieldPosition.y * smooth + simulation.mouseInGame.y * (1 - smooth), y: m.fieldPosition.y * smooth + simulation.mouseInGame.y * (1 - smooth),

View File

@@ -791,7 +791,7 @@ const simulation = {
if (!(simulation.cycle % 60) && !m.isBodiesAsleep) { //once a second if (!(simulation.cycle % 60) && !m.isBodiesAsleep) { //once a second
//energy overfill //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 (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) { if (tech.isFlipFlopOn) {
m.energy += 0.22; m.energy += 0.22;
} else { } else {

View File

@@ -303,7 +303,7 @@
frequency: 2, frequency: 2,
isNonRefundable: true, isNonRefundable: true,
// isExperimentHide: true, // isExperimentHide: true,
// isBadRandomOption: true, isBadRandomOption: true,
allowed() { allowed() {
return !tech.isSuperDeterminism return !tech.isSuperDeterminism
}, },
@@ -2533,7 +2533,7 @@
}, },
{ {
name: "many-worlds", name: "many-worlds",
description: "each <strong>level</strong> is an <strong>alternate reality</strong>, where you<br>find a <strong class='color-m'>tech</strong>, <strong class='color-h'>heal</strong>, <strong class='color-g'>ammo</strong>, and <strong class='color-r'>research</strong>", description: "each <strong>level</strong> is an <strong>alternate reality</strong>, where you<br>find a <strong class='color-m'>tech</strong> at the start of each level",
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 1, frequency: 1,
@@ -2701,7 +2701,7 @@
for (let i = 0, len = tech.tech.length; i < len; i++) { // spawn new tech power ups 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.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 if (tech.isSuperDeterminism) count -= 4 //remove the bonus tech
tech.setupAllTech(); // remove all tech tech.setupAllTech(); // remove all tech
@@ -2770,7 +2770,7 @@
}, },
{ {
name: "replication", name: "replication",
description: "<strong>7.5%</strong> chance to <strong class='color-dup'>duplicate</strong> spawned <strong>power ups</strong><br>add <strong>12</strong> <strong class='color-j'>JUNK</strong> <strong class='color-m'>tech</strong> to the potential pool", description: "<strong>8%</strong> chance to <strong class='color-dup'>duplicate</strong> spawned <strong>power ups</strong><br>add <strong>14</strong> <strong class='color-j'>JUNK</strong> <strong class='color-m'>tech</strong> to the potential pool",
maxCount: 9, maxCount: 9,
count: 0, count: 0,
frequency: 1, frequency: 1,
@@ -2780,14 +2780,14 @@
}, },
requires: "below 100% duplication chance", requires: "below 100% duplication chance",
effect() { effect() {
tech.duplicateChance += 0.075 tech.duplicateChance += 0.08
powerUps.setDo(); //needed after adjusting duplication chance powerUps.setDo(); //needed after adjusting duplication chance
tech.addJunkTechToPool(12) tech.addJunkTechToPool(14)
}, },
remove() { remove() {
tech.duplicateChance = 0 tech.duplicateChance = 0
powerUps.setDo(); //needed after adjusting duplication chance 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 if (tech.isDeterminism) num = 1
for (let i = 0; i < num; i++) { for (let i = 0; i < num; i++) {
const index = powerUps.tech.choiceLog[powerUps.tech.choiceLog.length - i - 1] 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) tech.giveTech(index)
simulation.makeTextLog(`<span class='color-var'>tech</span>.giveTech("<span class='color-text'>${tech.tech[index].name}</span>") <em>// backward induction</em>`); simulation.makeTextLog(`<span class='color-var'>tech</span>.giveTech("<span class='color-text'>${tech.tech[index].name}</span>") <em>// backward induction</em>`);
} }
@@ -3140,7 +3140,7 @@
}, },
{ {
name: "determinism", name: "determinism",
description: "spawn <strong>6</strong> <strong class='color-m'>tech</strong>, but you have <strong>no cancel</strong><br>and <strong>1 choice</strong> for <strong class='color-m'>tech</strong>, <strong class='color-f'>fields</strong>, and <strong class='color-g'>guns</strong>", description: "spawn <strong>5</strong> <strong class='color-m'>tech</strong>, but you have <strong>no cancel</strong><br>and <strong>1 choice</strong> for <strong class='color-m'>tech</strong>, <strong class='color-f'>fields</strong>, and <strong class='color-g'>guns</strong>",
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 1, frequency: 1,
@@ -3153,13 +3153,12 @@
effect: () => { effect: () => {
tech.isDeterminism = true; tech.isDeterminism = true;
//if you change the number spawned also change it in Born rule //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() { remove() {
if (tech.isDeterminism) { if (tech.isDeterminism) {
tech.isDeterminism = false; tech.isDeterminism = false;
for (let i = 0; i < 5; i++) powerUps.removeRandomTech()
for (let i = 0; i < 6; i++) powerUps.removeRandomTech()
} }
} }
}, },

View File

@@ -1,15 +1,15 @@
******************************************************** NEXT PATCH ******************************************************** ******************************************************** 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 pilot wave follows the mouse a bit slower
spawn 2-3 research at the end of each level (I think this is actually a buff, because blocks stay in the field better)
experimental mode : WIMPS chase you 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 tech: many worlds, now only spawns 1 tech
also there are some text directions on how to enter endless mode (press T after you win) (use to spawn a heal, ammo, research too)
tech removed: 1-body problem
******************************************************** BUGS ******************************************************** ******************************************************** BUGS ********************************************************
@@ -27,10 +27,6 @@ tech: strange attractor before at least 1 other tech
crashed on this 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 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 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 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 let the player use research more like money
spend it to do things 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 tech: use the ability for power ups to have custom code
attracted to player 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 get 1% damage permanent
turned into drones turned into drones
nail-gun, or .... nail-gun, or ....
1s after being fired your bullets turn: 1s after being fired your bullets turn:
towards the nearest mob towards the nearest mob