many worlds renamed to ansatz
new tech many-worlds: at the start of each new level switch realities

removed tech: electroactive polymers - convert bots to the same type on weapon swap
all bot upgrades convert current bots to the upgraded type
  only one bot upgrade allowed
This commit is contained in:
landgreen
2021-02-20 16:37:32 -08:00
parent c085b30af4
commit 10b5616460
9 changed files with 365 additions and 268 deletions

View File

@@ -20,7 +20,7 @@ const level = {
// tech.isExplodeRadio = true
// for (let i = 0; i < 1; i++) tech.giveTech("dynamo-bot")
// tech.giveTech("supercritical fission")
// tech.giveTech("CPT reversal")
// tech.giveTech("micro-extruder")
// tech.giveTech("causality bombs")
// tech.giveTech("cardinality")
// tech.giveTech("Bayesian statistics")
@@ -110,6 +110,11 @@ const level = {
if (b.inventoryGun > b.inventory.length - 1) b.inventoryGun = 0;
simulation.switchGun();
}
if (tech.isSwitchReality) {
simulation.makeTextLog(`simulation.amplitude <span class='color-symbol'>=</span> ${Math.random()}`);
m.switchWorlds()
for (let i = 0; i < 2; i++) powerUps.spawn(m.pos.x + Math.random() * 10, m.pos.y + Math.random() * 10, "tech", false);
}
},
custom() {},
customTopLayer() {},
@@ -2503,13 +2508,14 @@ const level = {
spawn.randomMob(1725, 125, 0.5);
if (simulation.difficulty > 3) {
if (Math.random() < 0.1) { // tether ball
const index = mob.length
spawn.tetherBoss(4250, 0)
cons[cons.length] = Constraint.create({
pointA: {
x: 4250,
y: -675
},
bodyB: mob[mob.length - 1],
bodyB: mob[index],
stiffness: 0.00007
});
World.add(engine.world, cons[cons.length - 1]);