backward induction
more bug fixes (many worlds, disintegrated armament) tech: backward induction - gain all the tech options you didn't choose from your previous tech selection menu
This commit is contained in:
11
js/bullet.js
11
js/bullet.js
@@ -4123,11 +4123,20 @@ const b = {
|
|||||||
y: mob[i].position.y,
|
y: mob[i].position.y,
|
||||||
radius: Math.log(2 * damage + 1.1) * 40,
|
radius: Math.log(2 * damage + 1.1) * 40,
|
||||||
color: "rgba(100,0,200,0.25)",
|
color: "rgba(100,0,200,0.25)",
|
||||||
time: simulation.drawTime
|
time: simulation.drawTime * 2
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (tech.isRailAreaDamage) {
|
||||||
|
simulation.drawList.push({ //add dmg to draw queue
|
||||||
|
x: m.pos.x,
|
||||||
|
y: m.pos.y,
|
||||||
|
radius: range,
|
||||||
|
color: "rgba(100,0,200,0.04)",
|
||||||
|
time: simulation.drawTime
|
||||||
|
});
|
||||||
|
}
|
||||||
for (let i = 0, len = body.length; i < len; ++i) {
|
for (let i = 0, len = body.length; i < len; ++i) {
|
||||||
const SUB = Vector.sub(body[i].position, m.pos)
|
const SUB = Vector.sub(body[i].position, m.pos)
|
||||||
const DISTANCE = Vector.magnitude(SUB)
|
const DISTANCE = Vector.magnitude(SUB)
|
||||||
|
|||||||
@@ -310,7 +310,7 @@ const m = {
|
|||||||
//remove all tech and count current tech total
|
//remove all tech and count current tech total
|
||||||
let totalTech = 0;
|
let totalTech = 0;
|
||||||
for (let i = 0, len = tech.tech.length; i < len; i++) {
|
for (let i = 0, len = tech.tech.length; i < len; i++) {
|
||||||
if (!tech.tech[i].isLore) {
|
if (tech.tech[i].count > 0 && !tech.tech[i].isLore) {
|
||||||
if (tech.tech[i].isJunk) {
|
if (tech.tech[i].isJunk) {
|
||||||
tech.tech[i].frequency = 0
|
tech.tech[i].frequency = 0
|
||||||
} else if (tech.tech[i].frequencyDefault) {
|
} else if (tech.tech[i].frequencyDefault) {
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ let powerUp = [];
|
|||||||
|
|
||||||
const powerUps = {
|
const powerUps = {
|
||||||
totalPowerUps: 0, //used for tech that count power ups at the end of a level
|
totalPowerUps: 0, //used for tech that count power ups at the end of a level
|
||||||
|
lastTechIndex: null,
|
||||||
choose(type, index) {
|
choose(type, index) {
|
||||||
if (type === "gun") {
|
if (type === "gun") {
|
||||||
b.giveGuns(index)
|
b.giveGuns(index)
|
||||||
@@ -15,6 +16,7 @@ const powerUps = {
|
|||||||
m.setField(index)
|
m.setField(index)
|
||||||
simulation.makeTextLog(`<span class='color-var'>m</span>.setField("<span class='color-text'>${m.fieldUpgrades[m.fieldMode].name}</span>")`);
|
simulation.makeTextLog(`<span class='color-var'>m</span>.setField("<span class='color-text'>${m.fieldUpgrades[m.fieldMode].name}</span>")`);
|
||||||
} else if (type === "tech") {
|
} else if (type === "tech") {
|
||||||
|
powerUps.lastTechIndex = index
|
||||||
tech.giveTech(index)
|
tech.giveTech(index)
|
||||||
simulation.makeTextLog(`<span class='color-var'>tech</span>.giveTech("<span class='color-text'>${tech.tech[index].name}</span>")`);
|
simulation.makeTextLog(`<span class='color-var'>tech</span>.giveTech("<span class='color-text'>${tech.tech[index].name}</span>")`);
|
||||||
}
|
}
|
||||||
@@ -61,7 +63,7 @@ const powerUps = {
|
|||||||
simulation.makeTextLog(`powerUps.tech.length: ${Math.max(0,powerUps.tech.lastTotalChoices - powerUps.tech.banishLog.length)}`)
|
simulation.makeTextLog(`powerUps.tech.length: ${Math.max(0,powerUps.tech.lastTotalChoices - powerUps.tech.banishLog.length)}`)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (tech.manyWorlds && powerUps.research.count === 0) {
|
if (tech.isAnsatz && powerUps.research.count === 0) {
|
||||||
for (let i = 0; i < 2; i++) powerUps.spawn(m.pos.x + 40 * (Math.random() - 0.5), m.pos.y + 40 * (Math.random() - 0.5), "research", false);
|
for (let i = 0; i < 2; i++) powerUps.spawn(m.pos.x + 40 * (Math.random() - 0.5), m.pos.y + 40 * (Math.random() - 0.5), "research", false);
|
||||||
}
|
}
|
||||||
document.getElementById("choose-grid").style.display = "none"
|
document.getElementById("choose-grid").style.display = "none"
|
||||||
|
|||||||
61
js/tech.js
61
js/tech.js
@@ -344,6 +344,7 @@
|
|||||||
count: 0,
|
count: 0,
|
||||||
frequency: 2,
|
frequency: 2,
|
||||||
isNonRefundable: true,
|
isNonRefundable: true,
|
||||||
|
isBadRandomOption: true,
|
||||||
allowed() {
|
allowed() {
|
||||||
return tech.isAmmoForGun
|
return tech.isAmmoForGun
|
||||||
},
|
},
|
||||||
@@ -2154,6 +2155,7 @@
|
|||||||
frequency: 1,
|
frequency: 1,
|
||||||
frequencyDefault: 1,
|
frequencyDefault: 1,
|
||||||
isNonRefundable: true,
|
isNonRefundable: true,
|
||||||
|
isBadRandomOption: true,
|
||||||
allowed() {
|
allowed() {
|
||||||
return ((m.health / m.maxHealth) < 0.7 || build.isExperimentSelection) && !tech.isNoHeals
|
return ((m.health / m.maxHealth) < 0.7 || build.isExperimentSelection) && !tech.isNoHeals
|
||||||
},
|
},
|
||||||
@@ -2321,7 +2323,7 @@
|
|||||||
count: 0,
|
count: 0,
|
||||||
frequency: 2,
|
frequency: 2,
|
||||||
allowed() {
|
allowed() {
|
||||||
return powerUps.research.count === 0 && !tech.manyWorlds
|
return powerUps.research.count === 0 && !tech.isAnsatz
|
||||||
},
|
},
|
||||||
requires: "no research",
|
requires: "no research",
|
||||||
effect() {
|
effect() {
|
||||||
@@ -2345,10 +2347,10 @@
|
|||||||
},
|
},
|
||||||
requires: "not superdeterminism or Ψ(t) collapse, no research",
|
requires: "not superdeterminism or Ψ(t) collapse, no research",
|
||||||
effect: () => {
|
effect: () => {
|
||||||
tech.manyWorlds = true;
|
tech.isAnsatz = true;
|
||||||
},
|
},
|
||||||
remove() {
|
remove() {
|
||||||
tech.manyWorlds = false;
|
tech.isAnsatz = false;
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
name: "Bayesian statistics",
|
name: "Bayesian statistics",
|
||||||
@@ -2588,6 +2590,7 @@
|
|||||||
frequency: 1,
|
frequency: 1,
|
||||||
frequencyDefault: 1,
|
frequencyDefault: 1,
|
||||||
isNonRefundable: true,
|
isNonRefundable: true,
|
||||||
|
isBadRandomOption: true,
|
||||||
allowed() {
|
allowed() {
|
||||||
return (tech.totalCount > 3) && !tech.isSuperDeterminism
|
return (tech.totalCount > 3) && !tech.isSuperDeterminism
|
||||||
},
|
},
|
||||||
@@ -2618,6 +2621,7 @@
|
|||||||
frequency: 1,
|
frequency: 1,
|
||||||
frequencyDefault: 1,
|
frequencyDefault: 1,
|
||||||
isNonRefundable: true,
|
isNonRefundable: true,
|
||||||
|
isBadRandomOption: true,
|
||||||
allowed() {
|
allowed() {
|
||||||
return (tech.totalCount > 3) && !tech.isSuperDeterminism && tech.duplicationChance() > 0
|
return (tech.totalCount > 3) && !tech.isSuperDeterminism && tech.duplicationChance() > 0
|
||||||
},
|
},
|
||||||
@@ -2635,6 +2639,7 @@
|
|||||||
frequency: 1,
|
frequency: 1,
|
||||||
frequencyDefault: 1,
|
frequencyDefault: 1,
|
||||||
isNonRefundable: true,
|
isNonRefundable: true,
|
||||||
|
isBadRandomOption: true,
|
||||||
allowed() {
|
allowed() {
|
||||||
return !tech.isSuperDeterminism && tech.duplicationChance() > 0 && powerUps.research.count > 1
|
return !tech.isSuperDeterminism && tech.duplicationChance() > 0 && powerUps.research.count > 1
|
||||||
},
|
},
|
||||||
@@ -2693,6 +2698,7 @@
|
|||||||
frequency: 1,
|
frequency: 1,
|
||||||
frequencyDefault: 1,
|
frequencyDefault: 1,
|
||||||
isNonRefundable: true,
|
isNonRefundable: true,
|
||||||
|
isBadRandomOption: true,
|
||||||
allowed() {
|
allowed() {
|
||||||
return !tech.isSuperDeterminism
|
return !tech.isSuperDeterminism
|
||||||
},
|
},
|
||||||
@@ -2732,7 +2738,34 @@
|
|||||||
if (tech.tech[i].count > 0 && tech.tech[i].frequency > 1) tech.tech[i].frequency /= 100
|
if (tech.tech[i].count > 0 && tech.tech[i].frequency > 1) tech.tech[i].frequency /= 100
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, {
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name: "backward induction",
|
||||||
|
description: "gain all the <strong class='color-m'>tech</strong> <strong>options</strong> you didn't <strong>choose</strong><br>from your previous <strong class='color-m'>tech</strong> selection",
|
||||||
|
maxCount: 1,
|
||||||
|
count: 0,
|
||||||
|
frequency: 1,
|
||||||
|
isNonRefundable: true,
|
||||||
|
isBadRandomOption: true,
|
||||||
|
allowed() {
|
||||||
|
return powerUps.tech.choiceLog.length > 5 && !tech.isDeterminism
|
||||||
|
},
|
||||||
|
requires: "rejected an option in the last tech selection",
|
||||||
|
effect: () => {
|
||||||
|
let num = 3
|
||||||
|
if (tech.isExtraChoice) num = 5
|
||||||
|
if (tech.isDeterminism) num = 1
|
||||||
|
for (let i = powerUps.tech.choiceLog.length - 1 - num; i > powerUps.tech.choiceLog.length - 1 - num * 2; i--) {
|
||||||
|
const index = powerUps.tech.choiceLog[i]
|
||||||
|
if (powerUps.tech.choiceLog[i] !== powerUps.lastTechIndex && tech.tech[index].count < tech.tech[index].maxCount && tech.tech[index].allowed()) {
|
||||||
|
tech.giveTech(index)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
remove() {}
|
||||||
|
},
|
||||||
|
{
|
||||||
name: "cardinality",
|
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>",
|
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>",
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
@@ -2778,7 +2811,7 @@
|
|||||||
frequencyDefault: 8,
|
frequencyDefault: 8,
|
||||||
isBadRandomOption: true,
|
isBadRandomOption: true,
|
||||||
allowed() {
|
allowed() {
|
||||||
return tech.isDeterminism && !tech.manyWorlds && !tech.isGunSwitchField
|
return tech.isDeterminism && !tech.isAnsatz && !tech.isGunSwitchField
|
||||||
},
|
},
|
||||||
requires: "determinism, not unified field theory",
|
requires: "determinism, not unified field theory",
|
||||||
effect: () => {
|
effect: () => {
|
||||||
@@ -2829,12 +2862,20 @@
|
|||||||
tech.isNoHeals = true;
|
tech.isNoHeals = true;
|
||||||
level.difficultyDecrease(simulation.difficultyMode * 2)
|
level.difficultyDecrease(simulation.difficultyMode * 2)
|
||||||
simulation.makeTextLog(`simulation.difficultyMode <span class='color-symbol'>-=</span> 2`)
|
simulation.makeTextLog(`simulation.difficultyMode <span class='color-symbol'>-=</span> 2`)
|
||||||
|
powerUps.heal.color = "#abb"
|
||||||
|
for (let i = 0; i < powerUp.length; i++) { //find active heal power ups and adjust color live
|
||||||
|
if (powerUp[i].name === "heal") powerUp[i].color = powerUps.heal.color
|
||||||
|
}
|
||||||
},
|
},
|
||||||
remove() {
|
remove() {
|
||||||
tech.isNoHeals = false;
|
if (tech.isNoHeals) {
|
||||||
if (this.count > 0) {
|
powerUps.heal.color = "#0eb"
|
||||||
level.difficultyIncrease(simulation.difficultyMode * 2)
|
for (let i = 0; i < powerUp.length; i++) { //find active heal power ups and adjust color live
|
||||||
|
if (powerUp[i].name === "heal") powerUp[i].color = powerUps.heal.color
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
tech.isNoHeals = false;
|
||||||
|
if (this.count > 0) level.difficultyIncrease(simulation.difficultyMode * 2)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//**************************************************
|
//**************************************************
|
||||||
@@ -4768,7 +4809,7 @@
|
|||||||
},
|
},
|
||||||
requires: "at least 1 gun",
|
requires: "at least 1 gun",
|
||||||
effect() {
|
effect() {
|
||||||
if (b.activeGun && b.inventory.length > 0) b.removeGun(b.guns[b.activeGun].name)
|
if (b.inventory.length > 0) b.removeGun(b.guns[b.activeGun].name)
|
||||||
simulation.makeGunHUD()
|
simulation.makeGunHUD()
|
||||||
powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "gun");
|
powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "gun");
|
||||||
},
|
},
|
||||||
@@ -5783,7 +5824,7 @@
|
|||||||
nailsDeathMob: null,
|
nailsDeathMob: null,
|
||||||
isSlowFPS: null,
|
isSlowFPS: null,
|
||||||
isNeutronStun: null,
|
isNeutronStun: null,
|
||||||
manyWorlds: null,
|
isAnsatz: null,
|
||||||
isDamageFromBulletCount: null,
|
isDamageFromBulletCount: null,
|
||||||
isLaserDiode: null,
|
isLaserDiode: null,
|
||||||
isNailShot: null,
|
isNailShot: null,
|
||||||
|
|||||||
16
todo.txt
16
todo.txt
@@ -1,11 +1,8 @@
|
|||||||
******************************************************** NEXT PATCH ********************************************************
|
******************************************************** NEXT PATCH ********************************************************
|
||||||
|
|
||||||
some tech is now only 50% likely to show up
|
more bug fixes (many worlds, disintegrated armament)
|
||||||
I choose about 25 tech that don't effect game play as much, and dropped them down to 50% frequency
|
|
||||||
|
|
||||||
reset on experiment menu should now clear power ups and bullets
|
tech: backward induction - gain all the tech options you didn't choose from your previous tech selection menu
|
||||||
|
|
||||||
fixed bug with no heals
|
|
||||||
|
|
||||||
******************************************************** BUGS ********************************************************
|
******************************************************** BUGS ********************************************************
|
||||||
|
|
||||||
@@ -38,6 +35,15 @@ fix door.isOpen actually meaning isClosed?
|
|||||||
|
|
||||||
******************************************************** TODO ********************************************************
|
******************************************************** TODO ********************************************************
|
||||||
|
|
||||||
|
change the color of heals for ergodicity
|
||||||
|
|
||||||
|
look into improving mouse lag with pointer lock?
|
||||||
|
https://developer.mozilla.org/en-US/docs/Web/API/Pointer_Lock_API
|
||||||
|
https://www.vsynctester.com/game.html
|
||||||
|
https://news.ycombinator.com/item?id=26530272
|
||||||
|
|
||||||
|
clarify dielectric polarization text / graphics
|
||||||
|
|
||||||
tech - gain all the tech you didn't take on the last selection menu
|
tech - gain all the tech you didn't take on the last selection menu
|
||||||
normally 2, but synergy with cardinality - 4, and 0 with determinism
|
normally 2, but synergy with cardinality - 4, and 0 with determinism
|
||||||
frequency to 1
|
frequency to 1
|
||||||
|
|||||||
Reference in New Issue
Block a user