m.switchworlds()

This commit is contained in:
landgreen
2021-02-21 06:14:11 -08:00
parent 10b5616460
commit 6fdbc0ea7e
10 changed files with 278 additions and 257 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@@ -2457,19 +2457,16 @@ const b = {
this.force = Vector.mult(Vector.normalise(Vector.sub(m.pos, this.position)), this.mass * this.acceleration)
} else { //close to player
Matter.Body.setVelocity(this, Vector.add(Vector.mult(this.velocity, 0.90), Vector.mult(player.velocity, 0.17))); //add player's velocity
if (this.lastLookCycle < simulation.cycle && !m.isCloak) {
this.lastLookCycle = simulation.cycle + (this.isUpgraded ? 13 : 80)
let target
this.lastLookCycle = simulation.cycle + (this.isUpgraded ? 15 : 80)
for (let i = 0, len = mob.length; i < len; i++) {
const dist = Vector.magnitudeSquared(Vector.sub(this.position, mob[i].position));
if (dist < 3000000 && //1400*1400
Matter.Query.ray(map, this.position, mob[i].position).length === 0 &&
Matter.Query.ray(body, this.position, mob[i].position).length === 0 &&
!mob[i].isShielded) {
target = Vector.add(mob[i].position, Vector.mult(mob[i].velocity, Math.sqrt(dist) / 60))
const SPEED = 50
const unit = Vector.normalise(Vector.sub(target, this.position))
const SPEED = 45
const unit = Vector.normalise(Vector.sub(Vector.add(mob[i].position, Vector.mult(mob[i].velocity, Math.sqrt(dist) / 60)), this.position))
b.nail(this.position, Vector.mult(unit, SPEED), 0.4)
this.force = Vector.mult(unit, -0.01 * this.mass)
break;
@@ -2577,7 +2574,7 @@ const b = {
const radius = 6 + 7 * Math.random()
const SPEED = 29 - radius * 0.5; //(m.crouch ? 32 : 20) - radius * 0.7;
const velocity = Vector.mult(Vector.normalise(Vector.sub(target, this.position)), SPEED)
b.foam(this.position, velocity, radius + 8 * this.isUpgraded)
b.foam(this.position, velocity, radius + 7 * this.isUpgraded)
break;
}
}
@@ -2690,7 +2687,7 @@ const b = {
lookFrequency: 43 + Math.floor(7 * Math.random()) - 10 * tech.isBoomBotUpgrade,
acceleration: 0.005 * (1 + 0.5 * Math.random()),
attackAcceleration: 0.012 + 0.005 * tech.isBoomBotUpgrade,
range: 500 * (1 + 0.1 * Math.random()) + 400 * tech.isBoomBotUpgrade,
range: 500 * (1 + 0.1 * Math.random()) + 300 * tech.isBoomBotUpgrade,
endCycle: Infinity,
classType: "bullet",
collisionFilter: {

View File

@@ -300,6 +300,7 @@ const build = {
if (!tech.tech[i].isExperimentHide) {
if (tech.tech[i].allowed() || isAllowed || tech.tech[i].count > 0) {
const isCount = tech.tech[i].count > 1 ? `(${tech.tech[i].count}x)` : "";
if (tech.tech[i].isFieldTech) {
techID.innerHTML = ` <div class="grid-title">
<span style="position:relative;">
@@ -321,6 +322,8 @@ const build = {
} else if (tech.tech[i].isJunk) {
// text += `<div class="pause-grid-module"><div class="grid-title"><div class="circle-grid junk"></div> &nbsp; ${tech.tech[i].name} ${isCount}</div>${tech.tech[i].description}</div></div>`
techID.innerHTML = `<div class="grid-title"><div class="circle-grid junk"></div> &nbsp; ${tech.tech[i].name} ${isCount}</div>${tech.tech[i].description}</div>`
} else if (tech.tech[i].isExperimentalMode) {
techID.innerHTML = `${tech.tech[i].description}</div>`
} else {
techID.innerHTML = `<div class="grid-title"><div class="circle-grid tech"></div> &nbsp; ${tech.tech[i].name} ${isCount}</div>${tech.tech[i].description}</div>`
}
@@ -385,12 +388,14 @@ const build = {
for (let i = 0, len = tech.tech.length; i < len; i++) {
if (!tech.tech[i].isExperimentHide) {
if (!tech.tech[i].allowed()) { // || tech.tech[i].name === "+1 cardinality") { //|| tech.tech[i].name === "leveraged investment"
text += `<div id="tech-${i}" class="experiment-grid-module experiment-grid-disabled"><div class="grid-title">${tech.tech[i].name}</div><span style="color:#666;">requires: ${tech.tech[i].requires}</span></div>`
// } else if (tech.tech[i].count > 1) {
// text += `<div id="tech-${i}" class="experiment-grid-module" onclick="build.choosePowerUp(this,${i},'tech')"><div class="grid-title"><div class="circle-grid tech"></div> &nbsp; ${tech.tech[i].name} (${tech.tech[i].count}x)</div> ${tech.tech[i].description}</div>`
if (tech.tech[i].allowed()) { // || tech.tech[i].name === "+1 cardinality") { //|| tech.tech[i].name === "leveraged investment"
if (tech.tech[i].isExperimentalMode) {
text += `<div id="tech-${i}" class="experiment-grid-module" onclick="build.choosePowerUp(this,${i},'tech')">${tech.tech[i].description}</div>`
} else {
text += `<div id="tech-${i}" class="experiment-grid-module" onclick="build.choosePowerUp(this,${i},'tech')"><div class="grid-title"><div class="circle-grid tech"></div> &nbsp; ${tech.tech[i].name}</div> ${tech.tech[i].description}</div>`
}
} else {
text += `<div id="tech-${i}" class="experiment-grid-module" onclick="build.choosePowerUp(this,${i},'tech')"><div class="grid-title"><div class="circle-grid tech"></div> &nbsp; ${tech.tech[i].name}</div> ${tech.tech[i].description}</div>`
text += `<div id="tech-${i}" class="experiment-grid-module experiment-grid-disabled"><div class="grid-title">${tech.tech[i].name}</div><span style="color:#666;">requires: ${tech.tech[i].requires}</span></div>`
}
}
}

View File

@@ -113,6 +113,7 @@ const level = {
if (tech.isSwitchReality) {
simulation.makeTextLog(`simulation.amplitude <span class='color-symbol'>=</span> ${Math.random()}`);
m.switchWorlds()
simulation.trails()
for (let i = 0; i < 2; i++) powerUps.spawn(m.pos.x + Math.random() * 10, m.pos.y + Math.random() * 10, "tech", false);
}
},
@@ -1098,7 +1099,8 @@ const level = {
// spawn.streamBoss(1600, -500)
// spawn.cellBossCulture(1600, -500)
// spawn.cellBossCulture(1600, -500)
spawn.orbitalBoss(1600, -500)
// simulation.difficulty = 66
// spawn.orbitalBoss(1600, -500)
// spawn.beamer(1200, -500)
// spawn.shield(mob[mob.length - 1], 1800, -120, 1);
@@ -1436,62 +1438,7 @@ const level = {
spawn.wireHead();
}
} else {
// const say = []
// if (localSettings.runCount > 200) { //experienced
// say.push(
// "I've been here before...",
// "How many times have I done this?",
// )
// } else if (localSettings.runCount < 20) { //new
// say.push(
// "Am I still alive?",
// "And I'm back here again...",
// "Is this another simulation?",
// "I'm alive...",
// "Last time was a simulation. Is this one a simulation too?",
// )
// }
// if (simulation.difficultyMode < 4 && localSettings.levelsClearedLastGame > 10) { //too easy
// say.push(
// "That felt too easy.<br>Maybe I should increase the difficulty of the simulation.",
// "That was fun, but maybe I should increase the difficulty of the simulation.",
// "I should increase the difficulty of the simulation, that didn't feel realistic.",
// )
// } else if (simulation.difficultyMode > 3 && localSettings.levelsClearedLastGame > 10) { //great run on a hard or why
// say.push(
// "What do I do after I escape?",
// "I'm almost ready to stop these simulations and actually escape.",
// "I think I'm getting closer to something, but what?",
// "I'm getting stronger.",
// "What happens after I escape?",
// "I found a good combination of technology last time."
// )
// } else { //resolve
// say.push(
// "I'll try some different techs this time.",
// "I've got to escape.",
// "I'll find a way out.",
// "I keep forgetting that these are just simulated escapes."
// )
// }
// simulation.makeTextLog(say[Math.floor(say.length * Math.random())], 1000)
const swapPeriod = 150
const len = 30
for (let i = 0; i < len; i++) {
setTimeout(function() {
simulation.wipe = function() { //set wipe to have trails
ctx.fillStyle = `rgba(221,221,221,${i*i*0.0005 +0.0025})`;
ctx.fillRect(0, 0, canvas.width, canvas.height);
}
}, (i) * swapPeriod);
}
setTimeout(function() {
simulation.wipe = function() { //set wipe to normal
ctx.clearRect(0, 0, canvas.width, canvas.height);
}
}, len * swapPeriod);
simulation.trails()
}
}
powerUps.spawnStartingPowerUps(2300, -150);

View File

@@ -310,7 +310,11 @@ const m = {
//remove all tech and count current tech total
let totalTech = 0;
for (let i = 0, len = tech.tech.length; i < len; i++) {
if (!tech.tech[i].isNonRefundable && tech.tech[i].name !== "quantum immortality" && tech.tech[i].name !== "many-worlds") {
if (
!tech.tech[i].isNonRefundable &&
tech.tech[i].name !== "many-worlds" &&
tech.tech[i].name !== "perturbation theory"
) {
totalTech += tech.tech[i].count
tech.tech[i].remove();
tech.tech[i].isLost = false
@@ -323,6 +327,11 @@ const m = {
tech.addLoreTechToPool();
tech.armorFromPowerUps = 0;
tech.totalCount = 0;
const randomBotCount = b.totalBots()
b.zeroBotCount()
//remove all bullets, respawn bots
for (let i = 0; i < bullet.length; ++i) Matter.World.remove(engine.world, bullet[i]);
bullet = [];
//randomize health
m.health = 0.7 + Math.random()
@@ -332,16 +341,11 @@ const m = {
//randomize field
m.setField(Math.ceil(Math.random() * (m.fieldUpgrades.length - 1)))
//track how ammo/ ammoPack count
//track ammo/ ammoPack count
let ammoCount = 0
for (let i = 0, len = b.inventory.length; i < len; i++) {
if (b.guns[b.inventory[i]].ammo !== Infinity) ammoCount += b.guns[b.inventory[i]].ammo / b.guns[b.inventory[i]].ammoPack
}
//remove all bullets
for (let i = 0; i < bullet.length; ++i) Matter.World.remove(engine.world, bullet[i]);
bullet = [];
//removes guns and ammo
b.inventory = [];
b.activeGun = null;
@@ -353,7 +357,7 @@ const m = {
//give random guns
for (let i = 0; i < totalGuns; i++) b.giveGuns()
//randomize ammo based on ammo/ammopack count
//randomize ammo based on ammo/ammoPack count
for (let i = 0, len = b.inventory.length; i < len; i++) {
if (b.guns[b.inventory[i]].ammo !== Infinity) b.guns[b.inventory[i]].ammo = Math.max(0, Math.floor(ammoCount / b.inventory.length * b.guns[b.inventory[i]].ammoPack * (1.05 + 0.5 * (Math.random() - 0.5))))
}
@@ -364,18 +368,19 @@ const m = {
let options = [];
for (let i = 0, len = tech.tech.length; i < len; i++) {
if (tech.tech[i].count < tech.tech[i].maxCount &&
!tech.tech[i].isNonRefundable &&
tech.tech[i].name !== "quantum immortality" &&
tech.tech[i].name !== "many-worlds" &&
tech.tech[i].name !== "Born rule" &&
tech.tech[i].name !== "determinism" &&
tech.tech[i].allowed()
) options.push(i);
!tech.tech[i].isBadRandomOption &&
tech.tech[i].allowed() &&
(!tech.tech[i].isJunk || Math.random() < 0.25)) options.push(i);
// !tech.tech[i].isNonRefundable &&
// tech.tech[i].name !== "quantum immortality" &&
// tech.tech[i].name !== "many-worlds" &&
// tech.tech[i].name !== "perturbation theory" &&
}
//add a new tech from options pool
if (options.length > 0) tech.giveTech(options[Math.floor(Math.random() * options.length)])
}
b.respawnBots();
for (let i = 0; i < randomBotCount; i++) b.randomBot()
simulation.makeGunHUD(); //update gun HUD
simulation.updateTechHUD();
simulation.isTextLogOpen = true;
@@ -384,9 +389,9 @@ const m = {
if (tech.isImmortal) { //if player has the immortality buff, spawn on the same level with randomized damage
//remove immortality tech
for (let i = 0; i < tech.tech.length; i++) {
if (tech.tech[i].name === "quantum immortality") tech.removeTech(i)
}
// for (let i = 0; i < tech.tech.length; i++) {
// if (tech.tech[i].name === "quantum immortality") tech.removeTech(i)
// }
simulation.wipe = function() { //set wipe to have trails
ctx.fillStyle = "rgba(255,255,255,0)";
@@ -483,7 +488,7 @@ const m = {
harmReduction() {
let dmg = 1
dmg *= m.fieldHarmReduction
if (tech.isImmortal) dmg *= 0.84
if (tech.isHarmReduceAfterKill) dmg *= (m.lastKillCycle + 300 > m.cycle) ? 0.33 : 1.33
if (tech.healthDrain) dmg *= 1 + 2.667 * tech.healthDrain //tech.healthDrain = 0.03 at one stack //cause more damage
if (tech.squirrelFx !== 1) dmg *= 1 + (tech.squirrelFx - 1) / 5 //cause more damage

View File

@@ -111,6 +111,11 @@ const powerUps = {
document.getElementById("tech-anthropic").innerHTML = `-${powerUps.research.count}`
}
if (tech.renormalization && Math.random() < 0.37 && amount < 0) powerUps.spawn(m.pos.x, m.pos.y, "research");
if (tech.isResearchReality && amount < 0) {
m.switchWorlds()
simulation.trails()
simulation.makeTextLog(`simulation.amplitude <span class='color-symbol'>=</span> ${Math.random()}`);
}
if (tech.isRerollHaste) {
if (powerUps.research.count === 0) {
tech.researchHaste = 0.66;

View File

@@ -444,6 +444,24 @@ const simulation = {
restoreCamera() {
ctx.restore();
},
trails() {
const swapPeriod = 150
const len = 30
for (let i = 0; i < len; i++) {
setTimeout(function() {
simulation.wipe = function() { //set wipe to have trails
ctx.fillStyle = `rgba(221,221,221,${i*i*0.0005 +0.0025})`;
ctx.fillRect(0, 0, canvas.width, canvas.height);
}
}, (i) * swapPeriod);
}
setTimeout(function() {
simulation.wipe = function() { //set wipe to normal
ctx.clearRect(0, 0, canvas.width, canvas.height);
}
}, len * swapPeriod);
},
wipe() {
ctx.clearRect(0, 0, canvas.width, canvas.height);
},

View File

@@ -2726,7 +2726,7 @@ const spawn = {
me.seeAtDistance2 = 2000000;
me.accelMag = Math.floor(10 * (Math.random() + 4.5)) * 0.00001 * simulation.accelScale;
me.frictionAir = 0.005;
me.accelMag = 0.00017 * simulation.accelScale;
me.accelMag = 0.00016 * simulation.accelScale;
me.memory = Infinity;
me.collisionFilter.mask = cat.player | cat.bullet
spawn.shield(me, x, y, 1);

View File

@@ -768,7 +768,7 @@
},
{
name: "nail-bot upgrade",
description: "<strong>convert</strong> all your permanent bots to <strong>nail-bots</strong><br><strong>500%</strong> increased nail-bot <strong>fire rate</strong>",
description: "<strong>convert</strong> all your bots to <strong>nail-bots</strong><br><strong>500%</strong> increased nail-bot <strong>fire rate</strong>",
maxCount: 1,
count: 0,
allowed() {
@@ -809,7 +809,7 @@
},
{
name: "foam-bot upgrade",
description: "<strong>convert</strong> all your permanent bots to <strong>foam-bots</strong><br><strong>250%</strong> increased foam-bot <strong>size</strong> and <strong>fire rate</strong>",
description: "<strong>convert</strong> all your bots to <strong>foam-bots</strong><br><strong>250%</strong> increased foam <strong>size</strong> and <strong>fire rate</strong>",
maxCount: 1,
count: 0,
allowed() {
@@ -850,7 +850,7 @@
},
{
name: "boom-bot upgrade",
description: "<strong>convert</strong> all your permanent bots to <strong>boom-bots</strong><br><strong>250%</strong> increased <strong class='color-e'>explosion</strong> <strong class='color-d'>damage</strong> and size",
description: "<strong>convert</strong> all your bots to <strong>boom-bots</strong><br><strong>250%</strong> increased <strong class='color-e'>explosion</strong> <strong class='color-d'>damage</strong> and size",
maxCount: 1,
count: 0,
allowed() {
@@ -891,7 +891,7 @@
},
{
name: "laser-bot upgrade",
description: "<strong>convert</strong> all your permanent bots to <strong>laser-bots</strong><br><strong>400%</strong> increased <strong>laser-bot</strong> <strong class='color-laser'>laser</strong> <strong class='color-d'>damage</strong>",
description: "<strong>convert</strong> all your bots to <strong>laser-bots</strong><br><strong>400%</strong> increased <strong>laser-bot</strong> <strong class='color-laser'>laser</strong> <strong class='color-d'>damage</strong>",
maxCount: 1,
count: 0,
allowed() {
@@ -932,7 +932,7 @@
},
{
name: "orbital-bot upgrade",
description: "<strong>convert</strong> all your permanent bots to <strong>orbital-bots</strong><br>increase <strong class='color-d'>damage</strong> by <strong>200%</strong> and <strong>radius</strong> by <strong>30%</strong>",
description: "<strong>convert</strong> all your bots to <strong>orbital-bots</strong><br>increase <strong class='color-d'>damage</strong> by <strong>200%</strong> and <strong>radius</strong> by <strong>30%</strong>",
maxCount: 1,
count: 0,
allowed() {
@@ -983,7 +983,7 @@
},
{
name: "dynamo-bot upgrade",
description: "<strong>convert</strong> your permanent bots to <strong>dynamo-bots</strong><br>dynamo-bots <strong>regen</strong> <strong>24</strong> <strong class='color-f'>energy</strong> per second",
description: "<strong>convert</strong> your bots to <strong>dynamo-bots</strong><br>dynamo-bots <strong>regen</strong> <strong>24</strong> <strong class='color-f'>energy</strong> per second",
maxCount: 1,
count: 0,
allowed() {
@@ -1060,6 +1060,7 @@
count: 0,
isNonRefundable: true,
isExperimentHide: true,
isBadRandomOption: true,
allowed() {
return b.totalBots() > 3
},
@@ -1809,16 +1810,16 @@
},
{
name: "quantum immortality",
description: "after <strong>dying</strong>, continue in an <strong>alternate reality</strong><br>spawn <strong>4</strong> <strong class='color-r'>research</strong>",
description: "after <strong>dying</strong>, continue in an <strong>alternate reality</strong><br>reduce <strong class='color-harm'>harm</strong> by <strong>16%</strong>", //spawn <strong>4</strong> <strong class='color-r'>research</strong>
maxCount: 1,
count: 0,
allowed() {
return powerUps.research.count > 1 || build.isExperimentSelection
return !tech.isSwitchReality && !tech.isResearchReality
},
requires: "at least 2 research",
requires: "not many-worlds, perturbation theory",
effect() {
tech.isImmortal = true;
for (let i = 0; i < 4; i++) powerUps.spawn(m.pos.x + Math.random() * 10, m.pos.y + Math.random() * 10, "research", false);
// for (let i = 0; i < 4; i++) powerUps.spawn(m.pos.x + Math.random() * 10, m.pos.y + Math.random() * 10, "research", false);
},
remove() {
tech.isImmortal = false;
@@ -1826,13 +1827,13 @@
},
{
name: "many-worlds",
description: "on each new <strong>level</strong> enter an <strong>alternate reality</strong><br> find <strong>2</strong> <strong class='color-m'>tech</strong> power ups in that reality",
description: "each new <strong>level</strong> is an <strong>alternate reality</strong><br> find <strong>2</strong> <strong class='color-m'>tech</strong> power ups in that reality",
maxCount: 1,
count: 0,
allowed() {
return tech.isImmortal
return !tech.isImmortal && !tech.isResearchReality
},
requires: "quantum immortality",
requires: "not quantum immortality, perturbation theory",
effect() {
tech.isSwitchReality = true;
},
@@ -1840,6 +1841,157 @@
tech.isSwitchReality = false;
}
},
{
name: "decoherence",
description: "enter an <strong>alternate reality</strong> after you <strong class='color-r'>research</strong><br>spawn <strong>9</strong> <strong class='color-r'>research</strong> immediately",
maxCount: 1,
count: 0,
allowed() {
return !tech.isImmortal && !tech.isSwitchReality
},
requires: "not quantum immortality, many-worlds",
effect() {
tech.isResearchReality = true;
for (let i = 0; i < 9; i++) powerUps.spawn(m.pos.x + Math.random() * 10, m.pos.y + Math.random() * 10, "research", false);
},
remove() {
tech.isResearchReality = false;
}
},
{
name: "renormalization",
description: "using a <strong class='color-r'>research</strong> for <strong>any</strong> purpose<br>has a <strong>37%</strong> chance to spawn a <strong class='color-r'>research</strong>",
maxCount: 1,
count: 0,
allowed() {
return (powerUps.research.count > 1 || build.isExperimentSelection) && !tech.isSuperDeterminism && !tech.isRerollHaste
},
requires: "not superdeterminism or Ψ(t) collapse<br>at least 2 research",
effect() {
tech.renormalization = true;
},
remove() {
tech.renormalization = false;
}
},
{
name: "erase",
description: "<strong class='color-r'>researched</strong> or <strong>canceled</strong> <strong class='color-m'>tech</strong> won't <strong>reoccur</strong> <br>spawn <strong>5</strong> <strong class='color-r'>research</strong>",
maxCount: 1,
count: 0,
allowed() {
return (powerUps.research.count > 2 || build.isExperimentSelection) && !tech.isDeterminism
},
requires: "not determinism, at least 3 research",
effect() {
tech.isBanish = true
for (let i = 0; i < 5; i++) powerUps.spawn(m.pos.x, m.pos.y, "research", false);
},
remove() {
tech.isBanish = false
powerUps.tech.banishLog = [] //reset banish log
}
},
{
name: "Ψ(t) collapse",
description: "<strong>66%</strong> decreased <strong><em>delay</em></strong> after firing<br>when you have no <strong class='color-r'>research</strong> in your inventory",
maxCount: 1,
count: 0,
allowed() {
return powerUps.research.count === 0 && !tech.manyWorlds
},
requires: "no research",
effect() {
tech.isRerollHaste = true;
tech.researchHaste = 0.33;
b.setFireCD();
},
remove() {
tech.isRerollHaste = false;
tech.researchHaste = 1;
b.setFireCD();
}
},
{
name: "ansatz",
description: "after choosing a <strong class='color-f'>field</strong>, <strong class='color-m'>tech</strong>, or <strong class='color-g'>gun</strong><br>if you have no <strong class='color-r'>research</strong> spawn <strong>2</strong>",
maxCount: 1,
count: 0,
allowed() {
return powerUps.research.count === 0 && !tech.isSuperDeterminism && !tech.isRerollHaste
},
requires: "not superdeterminism or Ψ(t) collapse<br>no research",
effect: () => {
tech.manyWorlds = true;
},
remove() {
tech.manyWorlds = false;
}
},
{
name: "Bayesian statistics",
description: "increase <strong class='color-d'>damage</strong> by <strong>3.9%</strong><br>for each <strong class='color-r'>research</strong> in your inventory",
maxCount: 1,
count: 0,
allowed() {
return powerUps.research.count > 4 || build.isExperimentSelection
},
requires: "at least 5 research",
effect() {
tech.isRerollDamage = true;
},
remove() {
tech.isRerollDamage = false;
}
},
{
name: "Born rule",
description: "<strong>remove</strong> all current <strong class='color-m'>tech</strong><br>spawn new <strong class='color-m'>tech</strong> to replace them",
maxCount: 1,
count: 0,
// isNonRefundable: true,
isBadRandomOption: true,
isExperimentHide: true,
allowed() {
return (tech.totalCount > 6)
},
requires: "more than 6 tech",
effect: () => {
//remove active bullets //to get rid of bots
for (let i = 0; i < bullet.length; ++i) Matter.World.remove(engine.world, bullet[i]);
bullet = [];
let count = 0 //count tech
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 -= 3 //remove the bonus tech
if (tech.isSuperDeterminism) count -= 2 //remove the bonus tech
tech.setupAllTech(); // remove all tech
tech.addLoreTechToPool();
for (let i = 0; i < count; i++) { // spawn new tech power ups
powerUps.spawn(m.pos.x, m.pos.y, "tech");
}
//have state is checked in m.death()
},
remove() {}
},
{
name: "perpetual research",
description: "find <strong>1</strong> <strong class='color-r'>research</strong> at the start of each <strong>level</strong>",
maxCount: 1,
count: 0,
allowed() {
return !tech.isSuperDeterminism && !tech.isPerpetualHeal && !tech.isPerpetualAmmo && !tech.isPerpetualStun
},
requires: "only 1 perpetual effect, not superdeterminism",
effect() {
tech.isPerpetualReroll = true
},
remove() {
tech.isPerpetualReroll = false
}
},
{
name: "bubble fusion",
description: "after destroying a mob's <strong>shield</strong><br>spawn <strong>1-2</strong> <strong class='color-h'>heals</strong>, <strong class='color-g'>ammo</strong>, or <strong class='color-r'>research</strong>",
@@ -2133,6 +2285,7 @@
maxCount: 1,
count: 0,
isNonRefundable: true,
isBadRandomOption: true,
allowed() {
return !tech.isExtraChoice && !tech.isCancelDuplication && !tech.isCancelRerolls
},
@@ -2152,6 +2305,7 @@
maxCount: 1,
count: 0,
isNonRefundable: true,
isBadRandomOption: true,
allowed() {
return tech.isDeterminism && !tech.manyWorlds && !tech.isGunSwitchField
},
@@ -2166,139 +2320,6 @@
tech.isSuperDeterminism = false;
}
},
{
name: "Ψ(t) collapse",
description: "<strong>66%</strong> decreased <strong><em>delay</em></strong> after firing<br>when you have no <strong class='color-r'>research</strong> in your inventory",
maxCount: 1,
count: 0,
allowed() {
return powerUps.research.count === 0 && !tech.manyWorlds
},
requires: "no research",
effect() {
tech.isRerollHaste = true;
tech.researchHaste = 0.33;
b.setFireCD();
},
remove() {
tech.isRerollHaste = false;
tech.researchHaste = 1;
b.setFireCD();
}
},
{
name: "ansatz",
description: "after choosing a <strong class='color-f'>field</strong>, <strong class='color-m'>tech</strong>, or <strong class='color-g'>gun</strong><br>if you have no <strong class='color-r'>research</strong> spawn <strong>2</strong>",
maxCount: 1,
count: 0,
allowed() {
return powerUps.research.count === 0 && !tech.isSuperDeterminism && !tech.isRerollHaste
},
requires: "not superdeterminism or Ψ(t) collapse<br>no research",
effect: () => {
tech.manyWorlds = true;
},
remove() {
tech.manyWorlds = false;
}
},
{
name: "renormalization",
description: "using a <strong class='color-r'>research</strong> for <strong>any</strong> purpose<br>has a <strong>37%</strong> chance to spawn a <strong class='color-r'>research</strong>",
maxCount: 1,
count: 0,
allowed() {
return (powerUps.research.count > 1 || build.isExperimentSelection) && !tech.isSuperDeterminism && !tech.isRerollHaste
},
requires: "not superdeterminism or Ψ(t) collapse<br>at least 2 research",
effect() {
tech.renormalization = true;
},
remove() {
tech.renormalization = false;
}
},
{
name: "erase",
description: "<strong class='color-r'>researched</strong> or <strong>canceled</strong> <strong class='color-m'>tech</strong> won't <strong>reoccur</strong> <br>spawn <strong>4</strong> <strong class='color-r'>research</strong>",
maxCount: 1,
count: 0,
allowed() {
return (powerUps.research.count > 2 || build.isExperimentSelection) && !tech.isDeterminism
},
requires: "not determinism, at least 3 research",
effect() {
tech.isBanish = true
for (let i = 0; i < 4; i++) powerUps.spawn(m.pos.x, m.pos.y, "research", false);
},
remove() {
tech.isBanish = false
powerUps.tech.banishLog = [] //reset banish log
}
},
{
name: "Bayesian statistics",
description: "increase <strong class='color-d'>damage</strong> by <strong>3.9%</strong><br>for each <strong class='color-r'>research</strong> in your inventory",
maxCount: 1,
count: 0,
allowed() {
return powerUps.research.count > 4 || build.isExperimentSelection
},
requires: "at least 5 research",
effect() {
tech.isRerollDamage = true;
},
remove() {
tech.isRerollDamage = false;
}
},
{
name: "Born rule",
description: "<strong>remove</strong> all current <strong class='color-m'>tech</strong><br>spawn new <strong class='color-m'>tech</strong> to replace them",
maxCount: 1,
count: 0,
// isNonRefundable: true,
isExperimentHide: true,
allowed() {
return (tech.totalCount > 6)
},
requires: "more than 6 tech",
effect: () => {
//remove active bullets //to get rid of bots
for (let i = 0; i < bullet.length; ++i) Matter.World.remove(engine.world, bullet[i]);
bullet = [];
let count = 0 //count tech
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 -= 3 //remove the bonus tech
if (tech.isSuperDeterminism) count -= 2 //remove the bonus tech
tech.setupAllTech(); // remove all tech
tech.addLoreTechToPool();
for (let i = 0; i < count; i++) { // spawn new tech power ups
powerUps.spawn(m.pos.x, m.pos.y, "tech");
}
//have state is checked in m.death()
},
remove() {}
},
{
name: "perpetual research",
description: "find <strong>1</strong> <strong class='color-r'>research</strong> at the start of each <strong>level</strong>",
maxCount: 1,
count: 0,
allowed() {
return !tech.isSuperDeterminism && !tech.isPerpetualHeal && !tech.isPerpetualAmmo && !tech.isPerpetualStun
},
requires: "only 1 perpetual effect, not superdeterminism",
effect() {
tech.isPerpetualReroll = true
},
remove() {
tech.isPerpetualReroll = false
}
},
//**************************************************
//************************************************** gun
//************************************************** tech
@@ -3718,7 +3739,7 @@
},
{
name: "bot prototypes",
description: "use <strong>nano-scale manufacturing</strong> to <strong>upgrade</strong><br>all <strong class='color-bot'>bots</strong> of a random type and <strong>build</strong> <strong>2</strong> of that <strong class='color-bot'>bot</strong>",
description: "use <strong>nano-scale manufacturing</strong> to <strong>upgrade</strong><br>all <strong class='color-bot'>bots</strong> to a random type and <strong>build</strong> <strong>2</strong> of that <strong class='color-bot'>bot</strong>",
isFieldTech: true,
maxCount: 1,
count: 0,
@@ -4052,7 +4073,7 @@
}
},
{
name: "phase decoherence",
name: "boson composite",
description: "<strong>intangible</strong> to blocks and mobs while <strong class='color-cloaked'>cloaked</strong><br>passing through <strong>mobs</strong> drains your <strong class='color-f'>energy</strong>",
isFieldTech: true,
maxCount: 1,
@@ -4185,6 +4206,7 @@
count: 0,
isNonRefundable: true,
isExperimentHide: true,
isBadRandomOption: true,
allowed() {
return true
},
@@ -4202,6 +4224,7 @@
count: 0,
isNonRefundable: true,
isExperimentHide: true,
isBadRandomOption: true,
allowed() {
return !tech.isEnergyNoAmmo
},
@@ -4219,6 +4242,7 @@
count: 0,
isNonRefundable: true,
isExperimentHide: true,
isBadRandomOption: true,
allowed() {
return !tech.isSuperDeterminism
},
@@ -4236,6 +4260,7 @@
count: 0,
isNonRefundable: true,
isExperimentHide: true,
isBadRandomOption: true,
allowed() {
return !tech.isSuperDeterminism
},
@@ -4253,6 +4278,7 @@
count: 0,
isNonRefundable: true,
isExperimentHide: true,
isBadRandomOption: true,
allowed() {
return !tech.isSuperDeterminism
},
@@ -4265,12 +4291,14 @@
},
{
name: "ship",
description: "<strong>experimental mode:</strong> fly around with no legs",
description: "<strong>experimental mode:</strong> fly around with no legs<br>aim by rotating with keyboard",
maxCount: 1,
count: 0,
isNonRefundable: true,
isBadRandomOption: true,
isExperimentalMode: true,
allowed() {
return !m.isShipMode && m.fieldUpgrades[m.fieldMode].name !== "negative mass field" && build.isExperimentSelection
return build.isExperimentSelection && !m.isShipMode && m.fieldUpgrades[m.fieldMode].name !== "negative mass field"
},
requires: "",
effect() {
@@ -4278,6 +4306,26 @@
},
remove() {}
},
{
name: "quantum leap",
description: "<strong>experimental mode:</strong> every 20 seconds<br>become an alternate version of yourself",
maxCount: 1,
count: 0,
isNonRefundable: true,
isBadRandomOption: true,
isExperimentalMode: true,
allowed() {
return build.isExperimentSelection
},
requires: "",
effect() {
setInterval(() => {
m.switchWorlds()
simulation.trails()
}, 20000); //every 20 sections
},
remove() {}
},
],
addLoreTechToPool() { //adds lore tech to tech pool
if (!simulation.isCheating) {
@@ -4330,7 +4378,7 @@
// remove() {}
// },
{
name: "sliders",
name: "quantum leap",
description: "become an alternate version of yourself<br>every <strong>20</strong> seconds",
maxCount: 1,
count: 0,
@@ -4345,6 +4393,7 @@
effect() {
setInterval(() => {
m.switchWorlds()
simulation.trails()
}, 20000); //every 30 sections
},
remove() {}
@@ -5306,5 +5355,6 @@
foamFutureFire: null,
isDamageAfterKill: null,
isHarmReduceAfterKill: null,
isSwitchReality: null
isSwitchReality: null,
isResearchReality: null
}

View File

@@ -1,14 +1,11 @@
******************************************************** NEXT PATCH ********************************************************
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
tech: decoherence - switch realities after you research, spawn 9 research power ups
******************************************************** BUGS ********************************************************
ship mode can old exit a level in the top part of the exit
use the floor of portal sensor on the player? to unstuck player
(only once on my computer) once every 7 second check isn't running code
@@ -339,10 +336,6 @@ redblobgames.com/articles/visibility
https://github.com/Silverwolf90/2d-visibility/tree/master/src
could apply to explosions, neutron bomb, player LOS
possible names for tech
holonomy - parallel transport of a vector leads to movement (applies to curved space)
Hypergolic - A hypergolic propellant combination used in a rocket engine is one whose components spontaneously ignite when they come into contact with each other.
have a mob apply a positive status effect on other mobs,
heal?
make it yellow
@@ -369,10 +362,11 @@ n-gon outreach ideas
******************************************************** LORE ********************************************************
cool names for tech
strange loop, perturbation theory
voice singing with pitch?
possible names for tech
strange loop
perturbation theory
holonomy - parallel transport of a vector leads to movement (applies to curved space)
hypergolic - A hypergolic propellant combination used in a rocket engine is one whose components spontaneously ignite when they come into contact with each other.
chapter 1: bot can hear audio and learns testing mode