diff --git a/.DS_Store b/.DS_Store
index 4aa648e..65fe6c8 100644
Binary files a/.DS_Store and b/.DS_Store differ
diff --git a/js/bullet.js b/js/bullet.js
index e96b75b..18e860f 100644
--- a/js/bullet.js
+++ b/js/bullet.js
@@ -271,7 +271,7 @@ const b = {
setFireCD() {
b.fireCDscale = tech.fireRate * tech.slowFire * tech.researchHaste * tech.aimDamage
if (tech.isFastTime) b.fireCDscale *= 0.5
- if (tech.isFireRateForGuns) b.fireCDscale *= Math.pow(0.82, b.inventory.length)
+ if (tech.isFireRateForGuns) b.fireCDscale *= Math.pow(0.8, b.inventory.length)
if (tech.isFireMoveLock) b.fireCDscale *= 0.5
},
fireAttributes(dir, rotate = true) {
diff --git a/js/level.js b/js/level.js
index ab8e02f..fc20023 100644
--- a/js/level.js
+++ b/js/level.js
@@ -17,7 +17,7 @@ const level = {
if (level.levelsCleared === 0) { //this code only runs on the first level
// simulation.isHorizontalFlipped = true
// m.setField("metamaterial cloaking")
- // b.giveGuns("missiles")
+ // b.giveGuns("laser")
// tech.giveTech("scrap-bot manufacturing")
// tech.giveTech("dynamo-bot upgrade")
// tech.giveTech("time crystals")
@@ -35,9 +35,9 @@ const level = {
// tech.giveTech("extruder")
// m.immuneCycle = Infinity //you can't take damage
- // level.difficultyIncrease(1) //30 is near max on hard //60 is near max on why
+ // level.difficultyIncrease(15) //30 is near max on hard //60 is near max on why
// simulation.enableConstructMode() //used to build maps in testing mode
- // level.reactor();
+ // level.pavilion();
// level.testing(); //not in rotation, used for testing
if (simulation.isTraining) { level.walk(); } else { level.intro(); } //normal starting level ************************************************
// powerUps.research.changeRerolls(3000)
@@ -49,11 +49,8 @@ const level = {
// if (localSettings.isAllowed) localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage
// level.onLevel = -1 //this sets level.levels[level.onLevel] = undefined which is required to run the conversation
// level.null()
-
// lore.unlockTesting();
// tech.giveTech("tinker"); //show junk tech in experiment mode
- // tech.giveRandomJUNK()
- // tech.giveRandomJUNK()
} else {
spawn.setSpawnList(); //picks a couple mobs types for a themed random mob spawns
// spawn.pickList = ["focuser", "focuser"]
@@ -237,7 +234,6 @@ const level = {
Math.initialSeed = String(document.getElementById("seed").value)
Math.seed = Math.abs(Math.hash(Math.initialSeed)) //update randomizer seed in case the player changed it
}
-
if (simulation.isTraining) {
level.levels = level.trainingLevels.slice(0) //copy array, not by just by assignment
} else {
@@ -2760,7 +2756,7 @@ const level = {
doorIn.isClosing = false
doorOut.isClosing = false
powerUps.spawnBossPowerUp(2900, -100)
- powerUps.spawn(2900, -200, "tech")
+ powerUps.spawn(3050, -200, "tech")
}
}
};
diff --git a/js/player.js b/js/player.js
index 6314461..97b1985 100644
--- a/js/player.js
+++ b/js/player.js
@@ -524,7 +524,7 @@ const m = {
if (tech.isSlowFPS) dmg *= 0.8
if (tech.isHarmReduce && input.field && m.fieldCDcycle < m.cycle) dmg *= 0.34
if (tech.isNeutronium && input.field && m.fieldCDcycle < m.cycle) dmg *= 0.1
- if (tech.isBotArmor) dmg *= 0.93 ** b.totalBots()
+ if (tech.isBotArmor) dmg *= 0.94 ** b.totalBots()
if (tech.isHarmArmor && m.lastHarmCycle + 600 > m.cycle) dmg *= 0.33;
if (tech.isNoFireDefense && m.cycle > m.fireCDcycle + 120) dmg *= 0.3
if (tech.energyRegen === 0) dmg *= 0.34
@@ -971,7 +971,7 @@ const m = {
}
},
setMaxEnergy() {
- m.maxEnergy = (tech.isMaxEnergyTech ? 0.5 : 1) + tech.bonusEnergy + tech.healMaxEnergyBonus + tech.harmonicEnergy + 2 * tech.isGroundState + 3 * tech.isRelay * tech.isFlipFlopOn * tech.isRelayEnergy + 0.5 * (m.fieldUpgrades[m.fieldMode].name === "standing wave")
+ m.maxEnergy = (tech.isMaxEnergyTech ? 0.5 : 1) + tech.bonusEnergy + tech.healMaxEnergyBonus + tech.harmonicEnergy + 2 * tech.isGroundState + 3 * tech.isRelay * tech.isFlipFlopOn * tech.isRelayEnergy + 0.6 * (m.fieldUpgrades[m.fieldMode].name === "standing wave")
simulation.makeTextLog(`m.maxEnergy = ${(m.maxEnergy.toFixed(2))}`)
},
fieldMeterColor: "#0cf",
@@ -1527,7 +1527,7 @@ const m = {
},
{
name: "standing wave",
- description: "3 oscillating shields are permanently active
deflecting protects you in every direction
increase your max energy by 50", //drains energy //deflecting has 50% less recoil
+ description: "3 oscillating shields are permanently active
deflecting protects you in every direction
increase your max energy by 60", //drains energy //deflecting has 50% less recoil
drainCD: 0,
effect: () => {
m.fieldBlockCD = 0;
@@ -1536,9 +1536,9 @@ const m = {
m.fieldShieldingScale = 1.3 * Math.pow(0.6, (tech.harmonics - 2))
m.harmonic3Phase = () => { //normal standard 3 different 2-d circles
- const fieldRange1 = (0.7 + 0.3 * Math.sin(m.cycle / 23)) * m.fieldRange * m.harmonicRadius
- const fieldRange2 = (0.63 + 0.37 * Math.sin(m.cycle / 37)) * m.fieldRange * m.harmonicRadius
- const fieldRange3 = (0.65 + 0.35 * Math.sin(m.cycle / 47)) * m.fieldRange * m.harmonicRadius
+ const fieldRange1 = (0.75 + 0.3 * Math.sin(m.cycle / 23)) * m.fieldRange * m.harmonicRadius
+ const fieldRange2 = (0.68 + 0.37 * Math.sin(m.cycle / 37)) * m.fieldRange * m.harmonicRadius
+ const fieldRange3 = (0.7 + 0.35 * Math.sin(m.cycle / 47)) * m.fieldRange * m.harmonicRadius
const netfieldRange = Math.max(fieldRange1, fieldRange2, fieldRange3)
ctx.fillStyle = "rgba(110,170,200," + Math.min(0.73, (0.04 + m.energy * (0.11 + 0.13 * Math.random()))) + ")";
ctx.beginPath();
@@ -2125,7 +2125,7 @@ const m = {
},
fire() {
this.isAttached = false;
- const speed = 7 //scale with mass?
+ const speed = 10 //scale with mass?
Matter.Body.setVelocity(this, {
x: player.velocity.x * 0.4 + speed * Math.cos(m.angle),
y: speed * Math.sin(m.angle)
diff --git a/js/simulation.js b/js/simulation.js
index c9d9ca0..c7740c7 100644
--- a/js/simulation.js
+++ b/js/simulation.js
@@ -722,7 +722,7 @@ const simulation = {
//set to default field
tech.healMaxEnergyBonus = 0
- m.setMaxEnergy();
+ // m.setMaxEnergy();
m.energy = 0
m.immuneCycle = 0;
// simulation.makeTextLog(`${simulation.SVGrightMouse} ${m.fieldUpgrades[m.fieldMode].name}
${m.fieldUpgrades[m.fieldMode].description}`, 600);
diff --git a/js/tech.js b/js/tech.js
index 1de7985..d2f32d7 100644
--- a/js/tech.js
+++ b/js/tech.js
@@ -233,7 +233,7 @@ const tech = {
if (tech.isLowEnergyDamage) dmg *= 1 + 0.7 * Math.max(0, 1 - m.energy)
if (tech.isMaxEnergyTech) dmg *= 1.5
if (tech.isEnergyNoAmmo) dmg *= 1.88
- if (tech.isDamageForGuns) dmg *= 1 + 0.12 * b.inventory.length
+ if (tech.isDamageForGuns) dmg *= 1 + 0.13 * b.inventory.length
if (tech.isLowHealthDmg) dmg *= 1 + Math.max(0, 1 - m.health) * 0.5
if (tech.isHarmDamage && m.lastHarmCycle + 600 > m.cycle) dmg *= 3;
if (tech.isEnergyLoss) dmg *= 1.55;
@@ -250,7 +250,7 @@ const tech = {
return dmg * tech.slowFire * tech.aimDamage
},
duplicationChance() {
- return Math.max(0, (tech.isPowerUpsVanish ? 0.12 : 0) + (tech.isStimulatedEmission ? 0.15 : 0) + tech.cancelCount * 0.043 + tech.duplicateChance + m.duplicateChance + tech.fieldDuplicate + tech.cloakDuplication + (tech.isAnthropicTech && tech.isDeathAvoidedThisLevel ? 0.5 : 0))
+ return Math.max(0, (tech.isPowerUpsVanish ? 0.12 : 0) + (tech.isStimulatedEmission ? 0.15 : 0) + tech.cancelCount * 0.045 + tech.duplicateChance + m.duplicateChance + tech.fieldDuplicate + tech.cloakDuplication + (tech.isAnthropicTech && tech.isDeathAvoidedThisLevel ? 0.5 : 0))
},
isScaleMobsWithDuplication: false,
maxDuplicationEvent() {
@@ -437,7 +437,7 @@ const tech = {
},
{
name: "generalist",
- description: "spawn 8 guns, but you can't switch guns
guns cycle automatically with each new level",
+ description: "spawn 7 guns, but you can't switch guns
guns cycle automatically with each new level",
maxCount: 1,
count: 0,
frequency: 1,
@@ -445,14 +445,15 @@ const tech = {
isNonRefundable: true,
isBadRandomOption: true,
allowed() {
- return b.inventory.length < b.guns.length - 5 //(tech.isDamageForGuns || tech.isFireRateForGuns) &&
+ return b.inventory.length < b.guns.length - 5 && b.inventory.length > 1 //(tech.isDamageForGuns || tech.isFireRateForGuns) &&
},
- requires: "less than 7 guns",
+ requires: "at least 2 guns, at least 5 unclaimed guns",
effect() {
tech.isGunCycle = true;
- for (let i = 0; i < 8; i++) powerUps.spawn(m.pos.x + 10 * Math.random(), m.pos.y + 10 * Math.random(), "gun");
+ for (let i = 0; i < 7; i++) powerUps.spawn(m.pos.x + 10 * Math.random(), m.pos.y + 10 * Math.random(), "gun");
},
remove() {
+ tech.isGunCycle = false;
// if (tech.isGunCycle) {
// for (let i = 0; i < 8; i++) {
// if (b.inventory.length) b.removeGun(b.guns[b.inventory[b.inventory.length - 1]].name) //remove your last gun
@@ -466,7 +467,7 @@ const tech = {
// descriptionFunction() {
// return `increase damage by ${14 * b.inventory.length}%
14% for each gun in your inventory`
// },
- description: "increase damage by 12%
for each gun in your inventory",
+ description: "increase damage by 13%
for each gun in your inventory",
maxCount: 1,
count: 0,
frequency: 1,
@@ -484,7 +485,7 @@ const tech = {
},
{
name: "active cooling",
- description: "18% decreased delay after firing
for each gun in your inventory",
+ description: "20% decreased delay after firing
for each gun in your inventory",
maxCount: 1,
count: 0,
frequency: 1,
@@ -1437,7 +1438,7 @@ const tech = {
},
{
name: "perimeter defense",
- description: "reduce harm by 7%
for each of your permanent bots",
+ description: "reduce harm by 6%
for each of your permanent bots",
maxCount: 1,
count: 0,
frequency: 2,
@@ -2880,7 +2881,7 @@ const tech = {
},
{
name: "decoherence",
- description: `researched or canceled tech won't reoccur
spawn ${powerUps.orb.research(9)}`,
+ description: `researched or canceled tech won't reoccur
spawn ${powerUps.orb.research(7)}`,
maxCount: 1,
count: 0,
frequency: 1,
@@ -2889,7 +2890,7 @@ const tech = {
return !tech.isSuperDeterminism
},
requires: "not superdeterminism",
- bonusResearch: 9,
+ bonusResearch: 7,
effect() {
tech.isBanish = true
for (let i = 0; i < this.bonusResearch; i++) powerUps.spawn(m.pos.x + 40 * (Math.random() - 0.5), m.pos.y + 40 * (Math.random() - 0.5), "research", false);
@@ -3128,28 +3129,46 @@ const tech = {
},
{
name: "unified field theory",
- description: `spawn ${powerUps.orb.research(6)}and when paused
clicking the field box switches your field`,
- // description: `in the pause menu, change your field
by clicking on your field's box`,
+ description: `clicking the field box when paused cycles your field
triple the frequency of finding field tech`,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
- return true
+ return !tech.isSuperDeterminism
},
- requires: "",
- bonusResearch: 6,
+ requires: "not superdeterminism",
effect() {
tech.isPauseSwitchField = true;
- for (let i = 0; i < this.bonusResearch; 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, len = tech.tech.length; i < len; i++) {
+ if (tech.tech[i].isFieldTech) tech.tech[i].frequency *= 3
+ }
},
remove() {
- if (tech.isPauseSwitchField) {
- tech.isPauseSwitchField = false;
- powerUps.research.changeRerolls(-this.bonusResearch)
+ tech.isPauseSwitchField = false;
+ if (this.count > 1) {
+ for (let i = 0, len = tech.tech.length; i < len; i++) {
+ if (tech.tech[i].isFieldTech) tech.tech[i].frequency /= 3
+ }
}
}
},
+
+
+ // for (let i = 0, len = tech.tech.length; i < len; i++) {
+ // if (tech.tech[i].isFieldTech) tech.tech[i].frequency *= 3
+ // }
+ // },
+ // remove() {
+ // // powerUps.research.changeRerolls(-6)
+ // // if (this.count > 1) {
+ // // for (let i = 0, len = tech.tech.length; i < len; i++) {
+ // // if (tech.tech[i].isFieldTech) tech.tech[i].frequency /= 3
+ // // }
+ // // }
+
+
+
{
name: "paradigm shift",
description: `clicking tech while paused ejects them
10% chance to convert that tech into ${powerUps.orb.research(1)}`,
@@ -3207,7 +3226,7 @@ const tech = {
},
{
name: "meta-analysis",
- description: `if you choose a JUNK tech you instead get a
random normal tech and ${powerUps.orb.research(3)}`,
+ description: `if you choose a JUNK tech you instead get a
random normal tech and ${powerUps.orb.research(1)}`,
maxCount: 1,
count: 0,
frequency: 1,
@@ -3314,7 +3333,7 @@ const tech = {
},
{
name: "futures exchange",
- description: "clicking × to cancel a field, tech, or gun
adds 4.3% power up duplication chance",
+ description: "clicking × to cancel a field, tech, or gun
adds 4.5% power up duplication chance",
maxCount: 1,
count: 0,
frequency: 1,
@@ -3597,35 +3616,6 @@ const tech = {
},
remove() {}
},
- {
- name: "tensor field",
- description: `triple the frequency of finding field tech
spawn a field and ${powerUps.orb.research(7)}`,
- maxCount: 1,
- count: 0,
- frequency: 1,
- frequencyDefault: 1,
- isNonRefundable: true,
- isBadRandomOption: true,
- allowed() {
- return !tech.isSuperDeterminism
- },
- requires: "not superdeterminism",
- effect() {
- powerUps.spawn(m.pos.x, m.pos.y, "field");
- for (let i = 0; i < 7; 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, len = tech.tech.length; i < len; i++) {
- if (tech.tech[i].isFieldTech) tech.tech[i].frequency *= 3
- }
- },
- remove() {
- // powerUps.research.changeRerolls(-6)
- // if (this.count > 1) {
- // for (let i = 0, len = tech.tech.length; i < len; i++) {
- // if (tech.tech[i].isFieldTech) tech.tech[i].frequency /= 3
- // }
- // }
- }
- },
{
name: "reinforcement learning",
description: "increase the frequency of finding copies of
your current recursive tech by 1000%",
@@ -5875,8 +5865,7 @@ const tech = {
},
requires: "laser gun, not pulse",
effect() {
- tech.isStuckOn = true
-
+ let techGiven = 0
for (let j = 0; j < 3; j++) {
const names = ["laser diode", "free-electron laser", "relativistic momentum", "specular reflection", "diffraction grating", "diffuse beam", "output coupler", "slow light"]
//convert names into indexes
@@ -5901,8 +5890,24 @@ const tech = {
const index = options[Math.floor(Math.random() * options.length)]
simulation.makeTextLog(`tech.giveTech("${tech.tech[index].name}") //optical amplifier`);
tech.giveTech(index)
+ techGiven++
}
}
+ if (techGiven > 0) {
+ tech.isStuckOn = true
+ } else {
+ simulation.makeTextLog(`0 tech found //optical amplifier`);
+ const loop = () => {
+ if (!simulation.paused && m.alive) {
+ for (let i = 0; i < tech.tech.length; i++) {
+ if (tech.tech[i].name === this.name) powerUps.ejectTech(i)
+ }
+ return
+ }
+ requestAnimationFrame(loop);
+ }
+ requestAnimationFrame(loop);
+ }
},
remove() {
tech.isStuckOn = false
@@ -7791,41 +7796,6 @@ const tech = {
},
remove() {}
},
- {
- name: "density",
- description: `blocks are 10 times less dense`,
- maxCount: 1,
- count: 0,
- frequency: 0,
- isNonRefundable: true,
- isJunk: true,
- allowed() { return true },
- requires: "",
- effect() {
- for (let i = 0; i < body.length; i++) Matter.Body.setDensity(body[i], 0.0001) //set current blocks to low density
-
- level.addToWorld = () => {
- for (let i = 0; i < body.length; i++) {
- if (body[i] !== m.holdingTarget && !body[i].isNoSetCollision) {
- body[i].collisionFilter.category = cat.body;
- body[i].collisionFilter.mask = cat.player | cat.map | cat.body | cat.bullet | cat.mob | cat.mobBullet
- }
- Matter.Body.setDensity(body[i], 0.0001) //THIS IS THE ONLY ADDED LINE OF CODE
- body[i].classType = "body";
- Composite.add(engine.world, body[i]); //add to world
- }
- for (let i = 0; i < map.length; i++) {
- map[i].collisionFilter.category = cat.map;
- map[i].collisionFilter.mask = cat.player | cat.map | cat.body | cat.bullet | cat.powerUp | cat.mob | cat.mobBullet;
- Matter.Body.setStatic(map[i], true); //make static
- Composite.add(engine.world, map[i]); //add to world
- }
- }
- },
- remove() {
- if (this.count) m.look = m.lookDefault
- }
- },
{
name: "palantír",
description: `see far away lands`,
diff --git a/todo.txt b/todo.txt
index 4897601..bebd6b4 100644
--- a/todo.txt
+++ b/todo.txt
@@ -1,37 +1,28 @@
******************************************************** NEXT PATCH **************************************************
-reactor
- you can skip the fight, by not pressing the button and exiting
- sprayBoss spray mode is now triggered by health loss, it fires a bit slower
- power ups now spawn high up, but some fall off the edges
- bonus Bosses can now spawn on reactor
+generalist now requires 2 guns to unlock
+ active cooling 18->20% fire speed increase per gun
+ arsenal 12->13% damage increase per gun
+futures exchange 4.3->4.5% duplication on cancel
+perimeter defense 7->6% harm reduction per bot
+unified field theory no longer gets bonus rerolls, instead it triples the frequency of field tech
+ removed tensor field
+meta-analysis gives 3->1 research after choosing JUNK
+
+plasma ball moves faster 7->10
bug fixes
+JUNK tech density removed
+ it was causing the NaN bug
******************************************************** TODO ********************************************************
+
+nonrefundable tech don't display, this is confusing
+ maybe they can show up but greyed out or something
+
make player collisions with mobs do no harm while standing wave is active
-Mobs bypass the [shrinking thing] on pavilion
- either make this for all mobs or remove it
- mobs only ignore it before it has been touched and returned
-
-fix issues with rotor
- maybe fixes NaN
- vats, sewers
- replace with code powered spinner
-
-portal:
- convert graphics to bitmaps
- this seems to clip the edges
- issues with
- the end
- platformer
- player doesn't fling fast enough, unless arrows are held
- player can't stand on blocks
- but they can jump on blocks
-
-
bring back:
the old phase decoherence field
make cloak only active on input.field down