unified field theory
unified field theory doesn't require research to cycle fields game resets after beating final boss (in 20s)
This commit is contained in:
@@ -2211,7 +2211,7 @@ const b = {
|
||||
bullet[me].dmg = tech.isNailRadiation ? 0 : dmg
|
||||
bullet[me].beforeDmg = function(who) { //beforeDmg is rewritten with ice crystal tech
|
||||
if (tech.isNailRadiation) mobs.statusDoT(who, dmg * (tech.isFastRadiation ? 2.6 : 0.65), tech.isSlowRadiation ? 240 : (tech.isFastRadiation ? 30 : 120)) // one tick every 30 cycles
|
||||
if (tech.isNailCrit && !who.shield && Vector.dot(Vector.normalise(Vector.sub(who.position, this.position)), Vector.normalise(this.velocity)) > 0.97) {
|
||||
if (tech.isNailCrit && !who.shield && Vector.dot(Vector.normalise(Vector.sub(who.position, this.position)), Vector.normalise(this.velocity)) > 0.975) {
|
||||
b.explosion(this.position, 150 + 30 * Math.random()); //makes bullet do explosive damage at end
|
||||
}
|
||||
};
|
||||
@@ -2922,7 +2922,7 @@ const b = {
|
||||
}
|
||||
}
|
||||
if (!immune) {
|
||||
if (tech.isNailCrit && !who.shield && Vector.dot(Vector.normalise(Vector.sub(who.position, this.position)), Vector.normalise(this.velocity)) > 0.97) {
|
||||
if (tech.isNailCrit && !who.shield && Vector.dot(Vector.normalise(Vector.sub(who.position, this.position)), Vector.normalise(this.velocity)) > 0.975) {
|
||||
b.explosion(this.position, 220 + 30 * Math.random()); //makes bullet do explosive damage at end
|
||||
}
|
||||
this.immuneList.push(who.id)
|
||||
@@ -2984,7 +2984,7 @@ const b = {
|
||||
});
|
||||
bullet[me].endCycle = simulation.cycle + 180
|
||||
bullet[me].beforeDmg = function(who) { //beforeDmg is rewritten with ice crystal tech
|
||||
if (tech.isNailCrit && !who.shield && Vector.dot(Vector.normalise(Vector.sub(who.position, this.position)), Vector.normalise(this.velocity)) > 0.97) {
|
||||
if (tech.isNailCrit && !who.shield && Vector.dot(Vector.normalise(Vector.sub(who.position, this.position)), Vector.normalise(this.velocity)) > 0.975) {
|
||||
b.explosion(this.position, 300 + 30 * Math.random()); //makes bullet do explosive damage at end
|
||||
}
|
||||
if (tech.isNailRadiation) mobs.statusDoT(who, 7 * (tech.isFastRadiation ? 12 : 0.3), tech.isSlowRadiation ? 240 : (tech.isFastRadiation ? 30 : 120)) // one tick every 30 cycles
|
||||
@@ -3036,7 +3036,7 @@ const b = {
|
||||
if (tech.isIceCrystals) {
|
||||
bullet[bullet.length - 1].beforeDmg = function(who) {
|
||||
mobs.statusSlow(who, 30)
|
||||
if (tech.isNailCrit && !who.shield && Vector.dot(Vector.normalise(Vector.sub(who.position, this.position)), Vector.normalise(this.velocity)) > 0.97) {
|
||||
if (tech.isNailCrit && !who.shield && Vector.dot(Vector.normalise(Vector.sub(who.position, this.position)), Vector.normalise(this.velocity)) > 0.975) {
|
||||
b.explosion(this.position, 150 + 30 * Math.random()); //makes bullet do explosive damage at end
|
||||
}
|
||||
};
|
||||
|
||||
@@ -232,7 +232,7 @@ const build = {
|
||||
</span>
|
||||
${tech.tech[i].name} ${isCount}</div>${tech.tech[i].description}</div></div>`
|
||||
} else if (tech.tech[i].isLore) {
|
||||
text += `<div class="pause-grid-module"><div class="grid-title"><div class="circle-grid lore"></div> ${tech.tech[i].name} ${isCount}</div>${tech.tech[i].description}</div></div>`
|
||||
text += `<div class="pause-grid-module"><div class="grid-title lore-text"><div class="circle-grid lore"></div> ${tech.tech[i].name} ${isCount}</div>${tech.tech[i].description}</div></div>`
|
||||
} else {
|
||||
text += `<div class="pause-grid-module"><div class="grid-title"><div class="circle-grid tech"></div> ${tech.tech[i].name} ${isCount}</div>${tech.tech[i].description}</div></div>`
|
||||
}
|
||||
|
||||
17
js/level.js
17
js/level.js
@@ -52,8 +52,9 @@ const level = {
|
||||
// level.stronghold() //fan level
|
||||
|
||||
// for (let i = 0; i < 150; i++) tech.addLoreTechToPool();
|
||||
// powerUps.directSpawn(simulation.mouseInGame.x, simulation.mouseInGame.y, "tech");
|
||||
// tech.giveTech("undefined")
|
||||
// lore.techCount = 1
|
||||
// lore.techCount = 10
|
||||
// localSettings.loreCount = 1;
|
||||
// simulation.isCheating = true;
|
||||
// localSettings.loreCount = undefined;
|
||||
@@ -376,12 +377,12 @@ const level = {
|
||||
powerUps.spawn(3350, -75, "ammo");
|
||||
powerUps.spawn(3925, -50, "ammo");
|
||||
powerUps.spawn(4550, -75, "ammo");
|
||||
powerUps.spawn(5225, -50, "ammo");
|
||||
powerUps.spawn(5475, -350, "ammo");
|
||||
powerUps.spawn(5625, -350, "ammo");
|
||||
powerUps.spawn(5575, -425, "ammo");
|
||||
powerUps.spawn(5550, -400, "ammo");
|
||||
powerUps.spawn(5575, -425, "ammo");
|
||||
powerUps.spawn(5025, -50, "ammo");
|
||||
powerUps.spawn(4975, -350, "ammo");
|
||||
powerUps.spawn(5125, -350, "ammo");
|
||||
powerUps.spawn(5075, -425, "ammo");
|
||||
powerUps.spawn(5050, -400, "ammo");
|
||||
powerUps.spawn(5075, -425, "ammo");
|
||||
|
||||
spawn.mapRect(-1950, 0, 8200, 1800); //ground
|
||||
spawn.mapRect(-1950, -1500, 1800, 1900); //left wall
|
||||
@@ -396,7 +397,7 @@ const level = {
|
||||
spawn.mapRect(5400, -300, 400, 400); //right wall
|
||||
spawn.mapRect(5700, -3300, 1800, 5100); //right wall
|
||||
spawn.mapRect(level.exit.x, level.exit.y + 20, 100, 100); //exit bump
|
||||
|
||||
spawn.mapRect(5425, -650, 375, 450); //blocking exit
|
||||
},
|
||||
gauntlet() {
|
||||
level.bossKilled = true; //if there is no boss this needs to be true to increase levels
|
||||
|
||||
@@ -897,7 +897,7 @@ const m = {
|
||||
m.calculateFieldThreshold(); //run calculateFieldThreshold after setting fieldArc, used for powerUp grab and mobPush with lookingAt(mob)
|
||||
m.isBodiesAsleep = true;
|
||||
m.wakeCheck();
|
||||
m.setMaxEnergy();
|
||||
// m.setMaxEnergy();
|
||||
m.hole = {
|
||||
isOn: false,
|
||||
isReady: true,
|
||||
|
||||
@@ -327,7 +327,7 @@ const powerUps = {
|
||||
${tech.tech[choose].name} ${isCount}</div>${tech.tech[choose].description}</div></div>`
|
||||
|
||||
} else if (tech.tech[choose].isLore) {
|
||||
text += `<div class="choose-grid-module" onclick="powerUps.choose('tech',${choose})"><div class="grid-title"><div class="circle-grid lore"></div> ${tech.tech[choose].name} ${isCount}</div>${tech.tech[choose].description}</div>`
|
||||
text += `<div class="choose-grid-module" onclick="powerUps.choose('tech',${choose})"><div class="grid-title lore-text"><div class="circle-grid lore"></div> ${tech.tech[choose].name} ${isCount}</div>${tech.tech[choose].description}</div>`
|
||||
} else {
|
||||
text += `<div class="choose-grid-module" onclick="powerUps.choose('tech',${choose})"><div class="grid-title"><div class="circle-grid tech"></div> ${tech.tech[choose].name} ${isCount}</div>${tech.tech[choose].description}</div>`
|
||||
}
|
||||
|
||||
@@ -358,13 +358,7 @@ const simulation = {
|
||||
}
|
||||
},
|
||||
switchGun() {
|
||||
if (tech.isCrouchAmmo) tech.isCrouchAmmo = 1 //this prevents hacking the tech by switching guns
|
||||
b.activeGun = b.inventory[b.inventoryGun];
|
||||
simulation.updateGunHUD();
|
||||
simulation.boldActiveGunHUD();
|
||||
// m.drop();
|
||||
if (tech.isGunSwitchField && powerUps.research.count > 0) {
|
||||
powerUps.research.changeRerolls(-1)
|
||||
if (tech.isGunSwitchField) {
|
||||
const energy = m.energy
|
||||
m.setField((m.fieldMode === m.fieldUpgrades.length - 1) ? 1 : m.fieldMode + 1) //cycle to next field
|
||||
m.energy = energy //field swap sets energy to max, this undoes that
|
||||
@@ -373,14 +367,17 @@ const simulation = {
|
||||
for (let i = tech.tech.length - 1; i > 0; i--) {
|
||||
if (tech.tech[i].name === "unified field theory") {
|
||||
const index = (m.fieldMode === m.fieldUpgrades.length - 1) ? 1 : m.fieldMode + 1
|
||||
tech.tech[i].description = `after switching <strong>guns</strong><br>use a <strong class='color-r'>research</strong> to cycle your <strong class='color-f'>field</strong>
|
||||
tech.tech[i].description = `switching <strong class='color-g'>guns</strong> also cycles your <strong class='color-f'>field</strong>
|
||||
<br>(next <strong class='color-f'>field</strong>: ${m.fieldUpgrades[index].name})`
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
if (tech.isCrouchAmmo) tech.isCrouchAmmo = 1 //this prevents hacking the tech by switching guns
|
||||
b.activeGun = b.inventory[b.inventoryGun];
|
||||
simulation.updateGunHUD();
|
||||
simulation.boldActiveGunHUD();
|
||||
// m.drop();
|
||||
},
|
||||
zoom: null,
|
||||
zoomScale: 1000,
|
||||
@@ -587,6 +584,7 @@ const simulation = {
|
||||
m.holdingTarget = null
|
||||
|
||||
//set to default field
|
||||
m.setMaxEnergy();
|
||||
m.fieldMode = 0;
|
||||
// simulation.makeTextLog(`${simulation.SVGrightMouse}<strong style='font-size:30px;'> ${m.fieldUpgrades[m.fieldMode].name}</strong><br><span class='faded'></span><br>${m.fieldUpgrades[m.fieldMode].description}`, 600);
|
||||
// simulation.makeTextLog(`
|
||||
|
||||
21
js/spawn.js
21
js/spawn.js
@@ -99,11 +99,32 @@ const spawn = {
|
||||
// spawn.shield(me, x, y, 1);
|
||||
me.onDeath = function() {
|
||||
//add lore level as next level if player took lore tech earlier in the game
|
||||
simulation.makeTextLog(`simulation.end()`);
|
||||
|
||||
if (lore.techCount > 9 && !simulation.isCheating) {
|
||||
level.levels.push("null")
|
||||
level.exit.x = 5500;
|
||||
level.exit.y = -330;
|
||||
simulation.makeTextLog(`level.levels.push("null")`) // <br>${powerUps.research.count}
|
||||
|
||||
//remove block map element
|
||||
Matter.World.remove(engine.world, map[map.length - 1]);
|
||||
map.splice(map.length - 1, 1);
|
||||
simulation.draw.setPaths(); //redraw map draw path
|
||||
} else {
|
||||
//reset game
|
||||
let delay = 1000
|
||||
for (let i = 20; i > 0; i--) {
|
||||
setTimeout(function() {
|
||||
simulation.makeTextLog(`delay = ${i*1000}`);
|
||||
}, delay);
|
||||
delay += 1000
|
||||
}
|
||||
delay += 1000
|
||||
setTimeout(function() {
|
||||
simulation.makeTextLog(`World.clear(engine.world)`);
|
||||
setTimeout(function() { m.death() }, 1000);
|
||||
}, delay);
|
||||
}
|
||||
//ramp up damage
|
||||
for (let i = 0; i < 3; i++) level.difficultyIncrease(simulation.difficultyMode)
|
||||
|
||||
74
js/tech.js
74
js/tech.js
@@ -120,7 +120,7 @@ const tech = {
|
||||
},
|
||||
tech: [{
|
||||
name: "integrated armament",
|
||||
description: "increase <strong class='color-d'>damage</strong> by <strong>25%</strong><br>your inventory can only hold <strong>1 gun</strong>",
|
||||
description: "increase <strong class='color-d'>damage</strong> by <strong>25%</strong><br>your inventory can only hold 1 <strong class='color-g'>gun</strong>",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
allowed() {
|
||||
@@ -243,7 +243,7 @@ const tech = {
|
||||
},
|
||||
{
|
||||
name: "logistics",
|
||||
description: "<strong class='color-g'>ammo</strong> power ups give <strong>200%</strong> <strong class='color-g'>ammo</strong><br>but <strong class='color-g'>ammo</strong> is only added to your <strong>current gun</strong>",
|
||||
description: "<strong class='color-g'>ammo</strong> power ups give <strong>200%</strong> <strong class='color-g'>ammo</strong><br>but <strong class='color-g'>ammo</strong> is only added to your current <strong class='color-g'>gun</strong>",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
allowed() {
|
||||
@@ -1893,6 +1893,38 @@ const tech = {
|
||||
tech.isMineDrop = false;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "unified field theory",
|
||||
description: "",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
allowed() {
|
||||
return (b.inventory.length > 1) || build.isExperimentSelection && !tech.isSuperDeterminism
|
||||
},
|
||||
requires: "at least 2 guns, not superdeterminism",
|
||||
effect() {
|
||||
tech.isGunSwitchField = true;
|
||||
for (let i = tech.tech.length - 1; i > 0; i--) {
|
||||
if (tech.tech[i].name === "unified field theory") {
|
||||
const index = (m.fieldMode === m.fieldUpgrades.length - 1) ? 1 : m.fieldMode + 1
|
||||
tech.tech[i].description = `switching <strong class='color-g'>guns</strong> also cycles your <strong class='color-f'>field</strong>
|
||||
<br>(next <strong class='color-f'>field</strong>: ${m.fieldUpgrades[index].name})`
|
||||
break
|
||||
}
|
||||
}
|
||||
},
|
||||
remove() {
|
||||
tech.isGunSwitchField = false;
|
||||
for (let i = tech.tech.length - 1; i > 0; i--) {
|
||||
if (tech.tech[i].name === "unified field theory") {
|
||||
const index = (m.fieldMode === m.fieldUpgrades.length - 1) ? 1 : m.fieldMode + 1
|
||||
tech.tech[i].description = `switching <strong class='color-g'>guns</strong> also cycles your <strong class='color-f'>field</strong>
|
||||
<br>(next <strong class='color-f'>field</strong>: ${m.fieldUpgrades[index].name})`
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "cardinality",
|
||||
description: "<strong class='color-m'>tech</strong>, <strong class='color-f'>fields</strong>, and <strong class='color-g'>guns</strong> have <strong>5</strong> <strong>choices</strong>",
|
||||
@@ -1936,9 +1968,9 @@ const tech = {
|
||||
count: 0,
|
||||
isNonRefundable: true,
|
||||
allowed() {
|
||||
return tech.isDeterminism && !tech.manyWorlds
|
||||
return tech.isDeterminism && !tech.manyWorlds && !tech.isGunSwitchField
|
||||
},
|
||||
requires: "determinism",
|
||||
requires: "determinism, not unified field theory",
|
||||
effect: () => {
|
||||
tech.isSuperDeterminism = true;
|
||||
for (let i = 0; i < 7; i++) { //if you change the six also change it in Born rule
|
||||
@@ -1985,36 +2017,6 @@ const tech = {
|
||||
tech.manyWorlds = false;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "unified field theory",
|
||||
description: "after switching <strong>guns</strong><br>use a <strong class='color-r'>research</strong> to cycle your <strong class='color-f'>field</strong>",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
allowed() {
|
||||
return (powerUps.research.count > 1 && b.inventory.length > 1) || build.isExperimentSelection
|
||||
},
|
||||
requires: "at least 2 guns, and 2 research",
|
||||
effect() {
|
||||
tech.isGunSwitchField = true;
|
||||
for (let i = tech.tech.length - 1; i > 0; i--) {
|
||||
if (tech.tech[i].name === "unified field theory") {
|
||||
const index = (m.fieldMode === m.fieldUpgrades.length - 1) ? 1 : m.fieldMode + 1
|
||||
tech.tech[i].description = `after switching <strong>guns</strong><br>use a <strong class='color-r'>research</strong> to cycle your <strong class='color-f'>field</strong>
|
||||
<br>(next <strong class='color-f'>field</strong>: ${m.fieldUpgrades[index].name})`
|
||||
break
|
||||
}
|
||||
}
|
||||
},
|
||||
remove() {
|
||||
tech.isGunSwitchField = false;
|
||||
for (let i = tech.tech.length - 1; i > 0; i--) {
|
||||
if (tech.tech[i].name === "unified field theory") {
|
||||
tech.tech[i].description = "after switching <strong>guns</strong><br>use a <strong class='color-r'>research</strong> to cycle your <strong class='color-f'>field</strong>"
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
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>",
|
||||
@@ -2042,9 +2044,7 @@ const tech = {
|
||||
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);
|
||||
}
|
||||
for (let i = 0; i < 4; i++) powerUps.spawn(m.pos.x, m.pos.y, "research", false);
|
||||
},
|
||||
remove() {
|
||||
tech.isBanish = false
|
||||
|
||||
Reference in New Issue
Block a user