diff --git a/.DS_Store b/.DS_Store index a8cc3c5..c3946eb 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/js/bullet.js b/js/bullet.js index ede78cd..73b8760 100644 --- a/js/bullet.js +++ b/js/bullet.js @@ -4123,11 +4123,20 @@ const b = { y: mob[i].position.y, radius: Math.log(2 * damage + 1.1) * 40, 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) { const SUB = Vector.sub(body[i].position, m.pos) const DISTANCE = Vector.magnitude(SUB) diff --git a/js/player.js b/js/player.js index 91aba68..3c691ec 100644 --- a/js/player.js +++ b/js/player.js @@ -310,7 +310,7 @@ 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].isLore) { + if (tech.tech[i].count > 0 && !tech.tech[i].isLore) { if (tech.tech[i].isJunk) { tech.tech[i].frequency = 0 } else if (tech.tech[i].frequencyDefault) { diff --git a/js/powerup.js b/js/powerup.js index a9a67a9..40e4874 100644 --- a/js/powerup.js +++ b/js/powerup.js @@ -2,6 +2,7 @@ let powerUp = []; const powerUps = { totalPowerUps: 0, //used for tech that count power ups at the end of a level + lastTechIndex: null, choose(type, index) { if (type === "gun") { b.giveGuns(index) @@ -15,6 +16,7 @@ const powerUps = { m.setField(index) simulation.makeTextLog(`m.setField("${m.fieldUpgrades[m.fieldMode].name}")`); } else if (type === "tech") { + powerUps.lastTechIndex = index tech.giveTech(index) simulation.makeTextLog(`tech.giveTech("${tech.tech[index].name}")`); } @@ -61,7 +63,7 @@ const powerUps = { 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); } document.getElementById("choose-grid").style.display = "none" diff --git a/js/tech.js b/js/tech.js index 6223873..f4230f2 100644 --- a/js/tech.js +++ b/js/tech.js @@ -344,6 +344,7 @@ count: 0, frequency: 2, isNonRefundable: true, + isBadRandomOption: true, allowed() { return tech.isAmmoForGun }, @@ -2154,6 +2155,7 @@ frequency: 1, frequencyDefault: 1, isNonRefundable: true, + isBadRandomOption: true, allowed() { return ((m.health / m.maxHealth) < 0.7 || build.isExperimentSelection) && !tech.isNoHeals }, @@ -2321,7 +2323,7 @@ count: 0, frequency: 2, allowed() { - return powerUps.research.count === 0 && !tech.manyWorlds + return powerUps.research.count === 0 && !tech.isAnsatz }, requires: "no research", effect() { @@ -2345,10 +2347,10 @@ }, requires: "not superdeterminism or Ψ(t) collapse, no research", effect: () => { - tech.manyWorlds = true; + tech.isAnsatz = true; }, remove() { - tech.manyWorlds = false; + tech.isAnsatz = false; } }, { name: "Bayesian statistics", @@ -2588,6 +2590,7 @@ frequency: 1, frequencyDefault: 1, isNonRefundable: true, + isBadRandomOption: true, allowed() { return (tech.totalCount > 3) && !tech.isSuperDeterminism }, @@ -2618,6 +2621,7 @@ frequency: 1, frequencyDefault: 1, isNonRefundable: true, + isBadRandomOption: true, allowed() { return (tech.totalCount > 3) && !tech.isSuperDeterminism && tech.duplicationChance() > 0 }, @@ -2635,6 +2639,7 @@ frequency: 1, frequencyDefault: 1, isNonRefundable: true, + isBadRandomOption: true, allowed() { return !tech.isSuperDeterminism && tech.duplicationChance() > 0 && powerUps.research.count > 1 }, @@ -2693,6 +2698,7 @@ frequency: 1, frequencyDefault: 1, isNonRefundable: true, + isBadRandomOption: true, allowed() { return !tech.isSuperDeterminism }, @@ -2732,7 +2738,34 @@ if (tech.tech[i].count > 0 && tech.tech[i].frequency > 1) tech.tech[i].frequency /= 100 } } - }, { + }, + + { + name: "backward induction", + description: "gain all the tech options you didn't choose
from your previous tech 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", description: "tech, fields, and guns have 5 choices", maxCount: 1, @@ -2778,7 +2811,7 @@ frequencyDefault: 8, isBadRandomOption: true, allowed() { - return tech.isDeterminism && !tech.manyWorlds && !tech.isGunSwitchField + return tech.isDeterminism && !tech.isAnsatz && !tech.isGunSwitchField }, requires: "determinism, not unified field theory", effect: () => { @@ -2829,12 +2862,20 @@ tech.isNoHeals = true; level.difficultyDecrease(simulation.difficultyMode * 2) simulation.makeTextLog(`simulation.difficultyMode -= 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() { - tech.isNoHeals = false; - if (this.count > 0) { - level.difficultyIncrease(simulation.difficultyMode * 2) + if (tech.isNoHeals) { + powerUps.heal.color = "#0eb" + 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", 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() 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, isSlowFPS: null, isNeutronStun: null, - manyWorlds: null, + isAnsatz: null, isDamageFromBulletCount: null, isLaserDiode: null, isNailShot: null, diff --git a/todo.txt b/todo.txt index 778b0cf..0e2b018 100644 --- a/todo.txt +++ b/todo.txt @@ -1,11 +1,8 @@ ******************************************************** NEXT PATCH ******************************************************** -some tech is now only 50% likely to show up - I choose about 25 tech that don't effect game play as much, and dropped them down to 50% frequency +more bug fixes (many worlds, disintegrated armament) -reset on experiment menu should now clear power ups and bullets - -fixed bug with no heals +tech: backward induction - gain all the tech options you didn't choose from your previous tech selection menu ******************************************************** BUGS ******************************************************** @@ -38,6 +35,15 @@ fix door.isOpen actually meaning isClosed? ******************************************************** 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 normally 2, but synergy with cardinality - 4, and 0 with determinism frequency to 1