diff --git a/.gitignore b/.gitignore
index 97e094b..e9de866 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,4 @@
.jsbeautifyrc
.DS_Store
.DS_Store
+.DS_Store
diff --git a/index.html b/index.html
index 5d80878..4d3f67e 100644
--- a/index.html
+++ b/index.html
@@ -41,6 +41,7 @@
+
diff --git a/js/bullet.js b/js/bullet.js
index 8c8e5af..396693e 100644
--- a/js/bullet.js
+++ b/js/bullet.js
@@ -88,7 +88,7 @@ const b = {
},
fireCD: 1,
setFireCD() {
- b.fireCD = tech.fireRate * tech.slowFire * tech.rerollHaste * tech.aimDamage / tech.fastTime
+ b.fireCD = tech.fireRate * tech.slowFire * tech.researchHaste * tech.aimDamage / tech.fastTime
},
fireAttributes(dir, rotate = true) {
if (rotate) {
@@ -1452,14 +1452,14 @@ const b = {
friction: 0,
frictionAir: 0.025,
thrust: (tech.isFastSpores ? 0.001 : 0.0004) * (1 + 0.3 * (Math.random() - 0.5)),
- dmg: tech.isMutualism ? 6 : 3, //2x bonus damage from tech.isMutualism
- lookFrequency: 97 + Math.floor(117 * Math.random()),
+ dmg: tech.isMutualism ? 8 : 4, //2x bonus damage from tech.isMutualism
+ lookFrequency: 100 + Math.floor(117 * Math.random()),
classType: "bullet",
collisionFilter: {
category: cat.bullet,
mask: cat.map | cat.mob | cat.mobBullet | cat.mobShield //no collide with body
},
- endCycle: simulation.cycle + Math.floor((540 + Math.floor(Math.random() * 360)) * tech.isBulletsLastLonger),
+ endCycle: simulation.cycle + Math.floor((600 + Math.floor(Math.random() * 420)) * tech.isBulletsLastLonger),
minDmgSpeed: 0,
playerOffPosition: { //used when following player to keep spores separate
x: 100 * (Math.random() - 0.5),
@@ -1568,8 +1568,8 @@ const b = {
friction: 0,
frictionAir: 0.10,
restitution: 0.3,
- dmg: 0.15, //damage done in addition to the damage from momentum
- lookFrequency: 10 + Math.floor(7 * Math.random()),
+ dmg: 0.29, //damage done in addition to the damage from momentum
+ lookFrequency: 14 + Math.floor(8 * Math.random()),
endCycle: simulation.cycle + 120 * tech.isBulletsLastLonger, //Math.floor((1200 + 420 * Math.random()) * tech.isBulletsLastLonger),
classType: "bullet",
collisionFilter: {
@@ -1580,9 +1580,9 @@ const b = {
lockedOn: null,
isFollowMouse: true,
beforeDmg(who) {
- mobs.statusSlow(who, 60)
+ mobs.statusSlow(who, 120)
this.endCycle = simulation.cycle
- if (tech.isHeavyWater) mobs.statusDoT(who, 0.15, 300)
+ // if (tech.isHeavyWater) mobs.statusDoT(who, 0.15, 300)
if (tech.iceEnergy && !who.shield && !who.isShielded && who.dropPowerUp && who.alive) {
setTimeout(function() {
if (!who.alive) {
@@ -1597,7 +1597,7 @@ const b = {
// this.force.y += this.mass * 0.0002;
//find mob targets
if (!(simulation.cycle % this.lookFrequency)) {
- const scale = 1 - 0.09 / tech.isBulletsLastLonger //0.9 * tech.isBulletsLastLonger;
+ const scale = 1 - 0.08 / tech.isBulletsLastLonger //0.9 * tech.isBulletsLastLonger;
Matter.Body.scale(this, scale, scale);
this.lockedOn = null;
let closeDist = Infinity;
@@ -3535,23 +3535,23 @@ const b = {
}
}
},
- {
- name: "ice IX",
- description: "synthesize short-lived ice crystals
crystals seek out and freeze mobs",
- ammo: 0,
- ammoPack: 64,
- have: false,
- fire() {
- if (mech.crouch) {
- b.iceIX(10, 0.3)
- mech.fireCDcycle = mech.cycle + Math.floor(8 * b.fireCD); // cool down
- } else {
- b.iceIX(2)
- mech.fireCDcycle = mech.cycle + Math.floor(3 * b.fireCD); // cool down
- }
+ // {
+ // name: "ice IX",
+ // description: "synthesize short-lived ice crystals
crystals seek out and freeze mobs",
+ // ammo: 0,
+ // ammoPack: 64,
+ // have: false,
+ // fire() {
+ // if (mech.crouch) {
+ // b.iceIX(10, 0.3)
+ // mech.fireCDcycle = mech.cycle + Math.floor(8 * b.fireCD); // cool down
+ // } else {
+ // b.iceIX(2)
+ // mech.fireCDcycle = mech.cycle + Math.floor(3 * b.fireCD); // cool down
+ // }
- }
- },
+ // }
+ // },
{
name: "foam",
description: "spray bubbly foam that sticks to mobs
slows mobs and does damage over time",
diff --git a/js/index.js b/js/index.js
index 53da326..9257fc8 100644
--- a/js/index.js
+++ b/js/index.js
@@ -186,7 +186,7 @@ const build = {
fire delay decrease: ${((1-b.fireCD)*100).toFixed(0)}%
duplication chance: ${(Math.min(1,tech.duplicationChance())*100).toFixed(0)}%
-
rerolls: ${powerUps.reroll.rerolls}
+
research: ${powerUps.research.research}
health: (${(mech.health*100).toFixed(0)} / ${(mech.maxHealth*100).toFixed(0)}) energy: (${(mech.energy*100).toFixed(0)} / ${(mech.maxEnergy*100).toFixed(0)})
position: (${player.position.x.toFixed(1)}, ${player.position.y.toFixed(1)}) velocity: (${player.velocity.x.toFixed(1)}, ${player.velocity.y.toFixed(1)})
mouse: (${simulation.mouseInGame.x.toFixed(1)}, ${simulation.mouseInGame.y.toFixed(1)}) mass: ${player.mass.toFixed(1)}
@@ -756,7 +756,7 @@ window.addEventListener("keydown", function(event) {
simulation.setZoom();
break
case "`":
- powerUps.directSpawn(simulation.mouseInGame.x, simulation.mouseInGame.y, "reroll");
+ powerUps.directSpawn(simulation.mouseInGame.x, simulation.mouseInGame.y, "research");
break
case "1":
powerUps.directSpawn(simulation.mouseInGame.x, simulation.mouseInGame.y, "heal");
diff --git a/js/level.js b/js/level.js
index 08f9196..c055199 100644
--- a/js/level.js
+++ b/js/level.js
@@ -61,7 +61,7 @@ const level = {
b.respawnBots();
mech.resetHistory();
if (tech.isArmorFromPowerUps) {
- const gain = Math.min(0.04 * powerUps.totalPowerUps, 0.44)
+ const gain = Math.min(0.04 * powerUps.totalPowerUps, 0.40)
tech.armorFromPowerUps += gain
mech.setMaxHealth();
// if (powerUps.totalPowerUps) simulation.makeTextLog(" max health increased by " + (gain * 100).toFixed(0) + "%", 300)
@@ -74,7 +74,7 @@ const level = {
// powerUps.heal.spawn(mech.pos.x + 60 * (Math.random() - 0.5), mech.pos.y + 60 * (Math.random() - 0.5), 50);
}
}
- if (tech.isPerpetualReroll) powerUps.spawn(mech.pos.x + 60 * (Math.random() - 0.5), mech.pos.y + 60 * (Math.random() - 0.5), "reroll", false);
+ if (tech.isPerpetualReroll) powerUps.spawn(mech.pos.x + 60 * (Math.random() - 0.5), mech.pos.y + 60 * (Math.random() - 0.5), "research", false);
if (tech.isPerpetualAmmo) {
powerUps.spawn(mech.pos.x + 60 * (Math.random() - 0.5), mech.pos.y + 60 * (Math.random() - 0.5), "ammo", false);
powerUps.spawn(mech.pos.x + 60 * (Math.random() - 0.5), mech.pos.y + 60 * (Math.random() - 0.5), "ammo", false);
@@ -115,6 +115,20 @@ const level = {
// hazardLaser1.draw();
// hazardLaser2.draw();
+ //draw wires
+ ctx.beginPath();
+ ctx.moveTo(-525, -800);
+ ctx.quadraticCurveTo(-800, -100, -1775, -375);
+
+ ctx.moveTo(-600, -800);
+ ctx.quadraticCurveTo(-800, -200, -1775, -325);
+
+ // ctx.moveTo(-525, -800);
+ // ctx.quadraticCurveTo(-800, -100, -1825, -450);
+
+ ctx.lineWidth = 1;
+ ctx.strokeStyle = "#234";
+ ctx.stroke();
};
level.setPosToSpawn(0, -50); //normal spawn
spawn.mapRect(level.enter.x, level.enter.y + 20, 100, 20);
@@ -145,8 +159,8 @@ const level = {
spawn.mapRect(-2000, -1000, 4000, 200); //ceiling
spawn.mapRect(-2000, -1000, 225, 2000); //left
spawn.mapRect(1800, -1000, 200, 2000); //right
- spawn.mapRect(-500, -5, 25, 50); //edge shelf
- spawn.mapRect(475, -5, 25, 50); //edge shelf
+ spawn.mapRect(-500, -25, 25, 50); //edge shelf
+ spawn.mapRect(475, -25, 25, 50); //edge shelf
// spawn.mapRect(-500, -820, 50, 25); //edge shelf ceiling
// spawn.mapRect(450, -820, 50, 25); //edge shelf ceiling
// spawn.bodyRect(1540, -1110, 300, 25, 0.9);
@@ -196,7 +210,7 @@ const level = {
spawn.mapRect(-250, -700, 1000, 900); // shelf
spawn.mapRect(-250, -1200, 1000, 250); // shelf roof
// powerUps.spawnStartingPowerUps(600, -800);
- // for (let i = 0; i < 50; ++i) powerUps.spawn(550, -800, "reroll", false);
+ // for (let i = 0; i < 50; ++i) powerUps.spawn(550, -800, "research", false);
// powerUps.spawn(350, -800, "gun", false);
function blockDoor(x, y, blockSize = 58) {
diff --git a/js/mob.js b/js/mob.js
index cb7def8..faa2f3d 100644
--- a/js/mob.js
+++ b/js/mob.js
@@ -1058,7 +1058,7 @@ const mobs = {
if (Math.random() < 0.4) {
type = "heal"
} else if (Math.random() < 0.3 && !tech.isSuperDeterminism) {
- type = "reroll"
+ type = "research"
}
for (let i = 0, len = Math.ceil(2 * Math.random()); i < len; i++) {
powerUps.spawn(this.position.x, this.position.y, type);
diff --git a/js/player.js b/js/player.js
index 6205c13..2df41ef 100644
--- a/js/player.js
+++ b/js/player.js
@@ -158,7 +158,7 @@ const mech = {
mech.Vx = player.velocity.x;
mech.Vy = player.velocity.y;
- //tracks the last second of player information
+ //tracks the last 10s of player information
// console.log(mech.history)
mech.history.splice(mech.cycle % 600, 1, {
position: {
@@ -175,7 +175,7 @@ const mech = {
activeGun: b.activeGun
});
// const back = 59 // 59 looks at 1 second ago //29 looks at 1/2 a second ago
- // historyIndex = (mech.cycle - back) % 60
+ // historyIndex = (mech.cycle - back) % 600
},
transSmoothX: 0,
transSmoothY: 0,
@@ -618,11 +618,11 @@ const mech = {
if (tech.isEnergyHealth) {
mech.energy -= dmg;
if (mech.energy < 0 || isNaN(mech.energy)) { //taking deadly damage
- if (tech.isDeathAvoid && powerUps.reroll.rerolls && !tech.isDeathAvoidedThisLevel) {
+ if (tech.isDeathAvoid && powerUps.research.research && !tech.isDeathAvoidedThisLevel) {
tech.isDeathAvoidedThisLevel = true
- powerUps.reroll.changeRerolls(-1)
- simulation.makeTextLog(`mech.rerolls--
-
${powerUps.reroll.rerolls}`)
+ powerUps.research.changeRerolls(-1)
+ simulation.makeTextLog(`mech.research--
+
${powerUps.research.research}`)
for (let i = 0; i < 6; i++) {
powerUps.spawn(mech.pos.x, mech.pos.y, "heal", false);
}
@@ -649,12 +649,12 @@ const mech = {
dmg *= mech.harmReduction()
mech.health -= dmg;
if (mech.health < 0 || isNaN(mech.health)) {
- if (tech.isDeathAvoid && powerUps.reroll.rerolls > 0 && !tech.isDeathAvoidedThisLevel) { //&& Math.random() < 0.5
+ if (tech.isDeathAvoid && powerUps.research.research > 0 && !tech.isDeathAvoidedThisLevel) { //&& Math.random() < 0.5
tech.isDeathAvoidedThisLevel = true
mech.health = 0.05
- powerUps.reroll.changeRerolls(-1)
- simulation.makeTextLog(`mech.rerolls--
-
${powerUps.reroll.rerolls}`)
+ powerUps.research.changeRerolls(-1)
+ simulation.makeTextLog(`mech.research--
+
${powerUps.research.research}`)
for (let i = 0; i < 6; i++) {
powerUps.spawn(mech.pos.x, mech.pos.y, "heal", false);
}
@@ -1499,13 +1499,11 @@ const mech = {
description: "use energy to block mobs
excess energy used to build drones
double your default energy regeneration",
effect: () => {
mech.hold = function() {
- if (mech.energy > mech.maxEnergy - 0.02 && mech.fieldCDcycle < mech.cycle && !input.field) {
+ if (mech.energy > mech.maxEnergy - 0.02 && mech.fieldCDcycle < mech.cycle && !input.field && bullet.length < 200) {
if (tech.isSporeField) {
const len = Math.floor(5 + 4 * Math.random())
mech.energy -= len * 0.105;
- for (let i = 0; i < len; i++) {
- b.spore(mech.pos)
- }
+ for (let i = 0; i < len; i++) b.spore(mech.pos)
} else if (tech.isMissileField) {
mech.energy -= 0.55;
b.missile({ x: mech.pos.x, y: mech.pos.y - 40 }, -Math.PI / 2, 0, 1)
diff --git a/js/powerup.js b/js/powerup.js
index e6a8c02..e2c415c 100644
--- a/js/powerup.js
+++ b/js/powerup.js
@@ -42,11 +42,11 @@ const powerUps = {
if (Math.random() < 0.33) {
spawnType = "heal"
} else if (Math.random() < 0.5 && !tech.isSuperDeterminism) {
- spawnType = "reroll"
+ spawnType = "research"
}
for (let i = 0; i < 6; i++) powerUps.spawn(mech.pos.x + 40 * (Math.random() - 0.5), mech.pos.y + 40 * (Math.random() - 0.5), spawnType, false);
}
- if (tech.isBanish && type === 'tech') { // banish rerolled tech by adding them to the list of banished tech
+ if (tech.isBanish && type === 'tech') { // banish researched tech by adding them to the list of banished tech
const banishLength = tech.isDeterminism ? 1 : 3 + tech.isExtraChoice * 2
if (powerUps.tech.choiceLog.length > banishLength || powerUps.tech.choiceLog.length === banishLength) { //I'm not sure this check is needed
for (let i = 0; i < banishLength; i++) {
@@ -56,8 +56,8 @@ const powerUps = {
simulation.makeTextLog(`powerUps.tech.length: ${Math.max(0,powerUps.tech.lastTotalChoices - powerUps.tech.banishLog.length)}`)
}
}
- if (tech.manyWorlds && powerUps.reroll.rerolls === 0) {
- for (let i = 0; i < 2; i++) powerUps.spawn(mech.pos.x + 40 * (Math.random() - 0.5), mech.pos.y + 40 * (Math.random() - 0.5), "reroll", false);
+ if (tech.manyWorlds && powerUps.research.research === 0) {
+ for (let i = 0; i < 2; i++) powerUps.spawn(mech.pos.x + 40 * (Math.random() - 0.5), mech.pos.y + 40 * (Math.random() - 0.5), "research", false);
}
document.getElementById("choose-grid").style.display = "none"
document.getElementById("choose-background").style.display = "none"
@@ -69,58 +69,58 @@ const powerUps = {
build.unPauseGrid()
requestAnimationFrame(cycle);
},
- reroll: {
- rerolls: 0,
- name: "reroll",
+ research: {
+ research: 0,
+ name: "research",
color: "#f7b",
size() {
return 20;
},
effect() {
- powerUps.reroll.changeRerolls(1)
+ powerUps.research.changeRerolls(1)
},
changeRerolls(amount) {
- powerUps.reroll.rerolls += amount
- if (powerUps.reroll.rerolls < 0) {
- powerUps.reroll.rerolls = 0
+ powerUps.research.research += amount
+ if (powerUps.research.research < 0) {
+ powerUps.research.research = 0
} else {
- simulation.makeTextLog(`powerUps.reroll.rerolls += ${amount}`) //
${powerUps.reroll.rerolls}
+ simulation.makeTextLog(`powerUps.research.research += ${amount}`) //
${powerUps.research.research}
}
if (tech.isRerollBots) {
const limit = 5
- for (; powerUps.reroll.rerolls > limit - 1; powerUps.reroll.rerolls -= limit) {
+ for (; powerUps.research.research > limit - 1; powerUps.research.research -= limit) {
b.randomBot()
if (tech.renormalization) {
for (let i = 0; i < limit; i++) {
if (Math.random() < 0.37) {
mech.fieldCDcycle = mech.cycle + 30;
- powerUps.spawn(mech.pos.x, mech.pos.y, "reroll");
+ powerUps.spawn(mech.pos.x, mech.pos.y, "research");
}
}
}
}
}
if (tech.isDeathAvoid && document.getElementById("tech-anthropic")) {
- document.getElementById("tech-anthropic").innerHTML = `-${powerUps.reroll.rerolls}`
+ document.getElementById("tech-anthropic").innerHTML = `-${powerUps.research.research}`
}
- if (tech.renormalization && Math.random() < 0.37 && amount < 0) powerUps.spawn(mech.pos.x, mech.pos.y, "reroll");
+ if (tech.renormalization && Math.random() < 0.37 && amount < 0) powerUps.spawn(mech.pos.x, mech.pos.y, "research");
if (tech.isRerollHaste) {
- if (powerUps.reroll.rerolls === 0) {
- tech.rerollHaste = 0.66;
+ if (powerUps.research.research === 0) {
+ tech.researchHaste = 0.66;
b.setFireCD();
} else {
- tech.rerollHaste = 1;
+ tech.researchHaste = 1;
b.setFireCD();
}
}
},
- use(type) { //runs when you actually reroll a list of selections, type can be field, gun, or tech
- powerUps.reroll.changeRerolls(-1)
- // simulation.makeTextLog(`mech.rerolls--
- //
${powerUps.reroll.rerolls}`)
- if (tech.isBanish && type === 'tech') { // banish rerolled tech
+ use(type) { //runs when you actually research a list of selections, type can be field, gun, or tech
+ powerUps.research.changeRerolls(-1)
+ // simulation.makeTextLog(`mech.research--
+ //
${powerUps.research.research}`)
+ if (tech.isBanish && type === 'tech') { // banish researched tech
const banishLength = tech.isDeterminism ? 1 : 3 + tech.isExtraChoice * 2
if (powerUps.tech.choiceLog.length > banishLength || powerUps.tech.choiceLog.length === banishLength) { //I'm not sure this check is needed
for (let i = 0; i < banishLength; i++) {
@@ -248,12 +248,12 @@ const powerUps = {
powerUps.field.choiceLog.push(choice2)
powerUps.field.choiceLog.push(choice3)
- if (powerUps.reroll.rerolls) {
- text += ` `
- for (let i = 0, len = Math.min(powerUps.reroll.rerolls, 30); i < len; i++) text += ``
- text += `reroll `
+ if (powerUps.research.research) {
+ text += ` `
+ for (let i = 0, len = Math.min(powerUps.research.research, 30); i < len; i++) text += ``
+ text += `research `
}
- //(${powerUps.reroll.rerolls})
+ //(${powerUps.research.research})
// text += `${simulation.SVGrightMouse} activate the shield with the right mouse
fields shield you from damage
and let you pick up and throw blocks
`
document.getElementById("choose-grid").innerHTML = text
powerUps.showDraft();
@@ -358,12 +358,12 @@ const powerUps = {
powerUps.tech.choiceLog.push(choice1)
powerUps.tech.choiceLog.push(choice2)
powerUps.tech.choiceLog.push(choice3)
- // if (powerUps.reroll.rerolls) text += ` reroll
${powerUps.reroll.rerolls} `
+ // if (powerUps.research.research) text += ` research
${powerUps.research.research} `
- if (powerUps.reroll.rerolls) {
- text += ` `
- for (let i = 0, len = Math.min(powerUps.reroll.rerolls, 30); i < len; i++) text += ``
- text += `reroll `
+ if (powerUps.research.research) {
+ text += ` `
+ for (let i = 0, len = Math.min(powerUps.research.research, 30); i < len; i++) text += ``
+ text += `research `
}
document.getElementById("choose-grid").innerHTML = text
@@ -445,11 +445,11 @@ const powerUps = {
powerUps.gun.choiceLog.push(choice1)
powerUps.gun.choiceLog.push(choice2)
powerUps.gun.choiceLog.push(choice3)
- // if (powerUps.reroll.rerolls) text += ` reroll
${powerUps.reroll.rerolls} `
- if (powerUps.reroll.rerolls) {
- text += ` `
- for (let i = 0, len = Math.min(powerUps.reroll.rerolls, 30); i < len; i++) text += ``
- text += `reroll `
+ // if (powerUps.research.research) text += ` research
${powerUps.research.research} `
+ if (powerUps.research.research) {
+ text += ` `
+ for (let i = 0, len = Math.min(powerUps.research.research, 30); i < len; i++) text += ``
+ text += `research `
}
// console.log(powerUps.gun.choiceLog)
// console.log(choice1, choice2, choice3)
@@ -502,7 +502,7 @@ const powerUps = {
return;
}
// if (Math.random() < 0.01) {
- // powerUps.spawn(x, y, "reroll");
+ // powerUps.spawn(x, y, "research");
// return;
// }
},
@@ -543,10 +543,10 @@ const powerUps = {
powerUps.spawn(x, y, "ammo", false);
}
},
- addRerollToLevel() { //add a random power up to a location that has a mob, mostly used to give each level one randomly placed reroll
+ addRerollToLevel() { //add a random power up to a location that has a mob, mostly used to give each level one randomly placed research
if (mob.length && Math.random() < 0.8) { // 80% chance
const index = Math.floor(Math.random() * mob.length)
- powerUps.spawn(mob[index].position.x, mob[index].position.y, "reroll");
+ powerUps.spawn(mob[index].position.x, mob[index].position.y, "research");
}
},
spawnStartingPowerUps(x, y) { //used for map specific power ups, mostly to give player a starting gun
@@ -664,7 +664,7 @@ const powerUps = {
if (
(!tech.isSuperDeterminism || (target === 'tech' || target === 'heal' || target === 'ammo')) &&
!(tech.isEnergyNoAmmo && target === 'ammo') &&
- (!simulation.isNoPowerUps || (target === 'reroll' || target === 'heal' || target === 'ammo'))
+ (!simulation.isNoPowerUps || (target === 'research' || target === 'heal' || target === 'ammo'))
) {
powerUps.directSpawn(x, y, target, moving, mode, size)
if (Math.random() < tech.duplicationChance()) {
diff --git a/js/simulation.js b/js/simulation.js
index 2cf037f..c24cb95 100644
--- a/js/simulation.js
+++ b/js/simulation.js
@@ -527,7 +527,7 @@ const simulation = {
b.setFireCD();
simulation.updateTechHUD();
powerUps.totalPowerUps = 0;
- powerUps.reroll.rerolls = 0;
+ powerUps.research.research = 0;
mech.setFillColors();
mech.maxHealth = 1
mech.maxEnergy = 1
diff --git a/js/tech.js b/js/tech.js
index 908ee2f..6333617 100644
--- a/js/tech.js
+++ b/js/tech.js
@@ -77,7 +77,7 @@ const tech = {
},
damageFromTech() {
let dmg = mech.fieldDamage
- // if (tech.aimDamage>1)
+ if (tech.isDupDamage) dmg *= 1 + Math.min(1, tech.duplicationChance())
if (tech.isLowEnergyDamage) dmg *= 1 + Math.max(0, 1 - mech.energy) * 0.5
if (tech.isMaxEnergyTech) dmg *= 1.4
if (tech.isEnergyNoAmmo) dmg *= 1.5
@@ -89,7 +89,7 @@ const tech = {
if (tech.restDamage > 1 && player.speed < 1) dmg *= tech.restDamage
if (tech.isEnergyDamage) dmg *= 1 + mech.energy / 9;
if (tech.isDamageFromBulletCount) dmg *= 1 + bullet.length * 0.0038
- if (tech.isRerollDamage) dmg *= 1 + 0.04 * powerUps.reroll.rerolls
+ if (tech.isRerollDamage) dmg *= 1 + 0.035 * powerUps.research.research
if (tech.isOneGun && b.inventory.length < 2) dmg *= 1.25
if (tech.isNoFireDamage && mech.cycle > mech.fireCDcycle + 120) dmg *= 1.66
if (tech.isSpeedDamage) dmg *= 1 + Math.min(0.4, player.speed * 0.013)
@@ -97,7 +97,7 @@ const tech = {
return dmg * tech.slowFire * tech.aimDamage
},
duplicationChance() {
- return (tech.isBayesian ? 0.2 : 0) + tech.cancelCount * 0.04 + tech.duplicateChance + mech.duplicateChance
+ return (tech.isBayesian ? 0.2 : 0) + tech.cancelCount * 0.035 + tech.duplicateChance + mech.duplicateChance
},
totalBots() {
return tech.foamBotCount + tech.nailBotCount + tech.laserBotCount + tech.boomBotCount + tech.orbitBotCount + tech.plasmaBotCount + tech.missileBotCount
@@ -156,7 +156,7 @@ const tech = {
maxCount: 1,
count: 0,
allowed() {
- return tech.isEnergyLoss && mech.maxEnergy === 1 && !tech.isMissileField && !tech.isSporeField && !tech.isRewindAvoidDeath
+ return tech.isEnergyLoss && mech.maxEnergy < 1.1 && !tech.isMissileField && !tech.isSporeField && !tech.isRewindAvoidDeath
},
requires: "exothermic process, not max energy increase, CPT, missile or spore nano-scale",
effect() {
@@ -176,7 +176,7 @@ const tech = {
allowed() {
return tech.isEnergyLoss && mech.maxEnergy < 1.1
},
- requires: "exothermic process",
+ requires: "exothermic process, not max energy increase",
effect() {
tech.isLowEnergyDamage = true;
},
@@ -216,22 +216,6 @@ const tech = {
tech.isFarAwayDmg = false;
}
},
- {
- name: "fluoroantimonic acid",
- description: "increase damage by 40%
when your health is above 100",
- maxCount: 1,
- count: 0,
- allowed() {
- return mech.maxHealth > 1;
- },
- requires: "health above 100",
- effect() {
- tech.isAcidDmg = true;
- },
- remove() {
- tech.isAcidDmg = false;
- }
- },
{
name: "integrated armament",
description: "increase damage by 25%
your inventory can only hold 1 gun",
@@ -284,6 +268,22 @@ const tech = {
tech.isGunCycle = false;
}
},
+ {
+ name: "fluoroantimonic acid",
+ description: "increase damage by 40%
when your health is above 100",
+ maxCount: 1,
+ count: 0,
+ allowed() {
+ return mech.maxHealth > 1;
+ },
+ requires: "health above 100",
+ effect() {
+ tech.isAcidDmg = true;
+ },
+ remove() {
+ tech.isAcidDmg = false;
+ }
+ },
{
name: "negative feedback",
description: "increase damage by 6%
for every 10 health below 100",
@@ -317,14 +317,30 @@ const tech = {
}
},
{
- name: "perturbation theory",
- description: "increase damage by 4%
for each of your rerolls",
+ name: "correlated damage",
+ description: "your chance to duplicate power ups
increases your damage by the same percent",
maxCount: 1,
count: 0,
allowed() {
- return powerUps.reroll.rerolls > 3 || build.isCustomSelection
+ return tech.duplicationChance() > 0
},
- requires: "at least 4 rerolls",
+ requires: "some duplication chance",
+ effect() {
+ tech.isDupDamage = true;
+ },
+ remove() {
+ tech.isDupDamage = false;
+ }
+ },
+ {
+ name: "perturbation theory",
+ description: "increase damage by 3.5%
for each research in your inventory",
+ maxCount: 1,
+ count: 0,
+ allowed() {
+ return powerUps.research.research > 4 || build.isCustomSelection
+ },
+ requires: "at least 5 research",
effect() {
tech.isRerollDamage = true;
},
@@ -332,6 +348,26 @@ const tech = {
tech.isRerollDamage = false;
}
},
+ {
+ name: "Ψ(t) collapse",
+ description: "66% decreased delay after firing
when you have no research in your inventory",
+ maxCount: 1,
+ count: 0,
+ allowed() {
+ return powerUps.research.research === 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: "electrostatic discharge",
description: "increase damage by 20%
20% increased delay after firing",
@@ -349,26 +385,6 @@ const tech = {
b.setFireCD();
}
},
- {
- name: "Ψ(t) collapse",
- description: "66% decreased delay after firing
when you have no rerolls",
- maxCount: 1,
- count: 0,
- allowed() {
- return powerUps.reroll.rerolls === 0 && !tech.manyWorlds
- },
- requires: "no rerolls",
- effect() {
- tech.isRerollHaste = true;
- tech.rerollHaste = 0.33;
- b.setFireCD();
- },
- remove() {
- tech.isRerollHaste = false;
- tech.rerollHaste = 1;
- b.setFireCD();
- }
- },
{
name: "auto-loading heuristics",
description: "30% decreased delay after firing",
@@ -763,17 +779,17 @@ const tech = {
},
{
name: "bot fabrication",
- description: "anytime you collect 5 rerolls
use them to build a random bot",
+ description: "anytime you collect 5 research
use them to build a random bot",
maxCount: 1,
count: 0,
allowed() {
- return powerUps.reroll.rerolls > 5 || build.isCustomSelection
+ return powerUps.research.research > 5 || build.isCustomSelection
},
- requires: "at least 6 rerolls",
+ requires: "at least 6 research",
effect() {
tech.isRerollBots = true;
- powerUps.reroll.changeRerolls(0)
- simulation.makeTextLog(`mech.rerolls = 0`)
+ powerUps.research.changeRerolls(0)
+ simulation.makeTextLog(`mech.research = 0`)
},
remove() {
tech.isRerollBots = false;
@@ -1057,7 +1073,7 @@ const tech = {
maxCount: 1,
count: 0,
allowed() {
- return tech.isStunField || tech.isPulseStun || tech.oneSuperBall || tech.isHarmFreeze || tech.isIceField || tech.isIceCrystals || tech.isSporeFreeze || tech.isAoESlow || tech.isFreezeMobs || tech.haveGunCheck("ice IX") || tech.isCloakStun || tech.orbitBotCount > 1 || tech.isWormholeDamage
+ return tech.isStunField || tech.isPulseStun || tech.oneSuperBall || tech.isHarmFreeze || tech.isIceField || tech.isIceCrystals || tech.isSporeFreeze || tech.isAoESlow || tech.isFreezeMobs || tech.isCloakStun || tech.orbitBotCount > 1 || tech.isWormholeDamage
},
requires: "a freezing or stunning effect",
effect() {
@@ -1325,7 +1341,7 @@ const tech = {
},
{
name: "inductive coupling",
- description: "for each unused power up at the end of a level
add 4 max health (up to 44 health per level)",
+ description: "for each unused power up at the end of a level
add 4 max health (up to 40 health per level)",
maxCount: 1,
count: 0,
allowed() {
@@ -1394,21 +1410,21 @@ const tech = {
nameInfo: "",
addNameInfo() {
setTimeout(function() {
- powerUps.reroll.changeRerolls(0)
+ powerUps.research.changeRerolls(0)
}, 1000);
},
- description: "consume a reroll to avoid dying once a level
and spawn 6 heal power ups",
+ description: "use a research to avoid dying once a level
and spawn 6 heal power ups",
maxCount: 1,
count: 0,
allowed() {
- return powerUps.reroll.rerolls > 0 || build.isCustomSelection
+ return powerUps.research.research > 0 || build.isCustomSelection
},
- requires: "at least 1 reroll",
+ requires: "at least 1 research",
effect() {
tech.isDeathAvoid = true;
tech.isDeathAvoidedThisLevel = false;
setTimeout(function() {
- powerUps.reroll.changeRerolls(0)
+ powerUps.research.changeRerolls(0)
}, 1000);
},
remove() {
@@ -1417,17 +1433,17 @@ const tech = {
},
{
name: "quantum immortality",
- description: "after dying, continue in an alternate reality
spawn 4 rerolls",
+ description: "after dying, continue in an alternate reality
spawn 4 research",
maxCount: 1,
count: 0,
allowed() {
- return powerUps.reroll.rerolls > 1 || build.isCustomSelection
+ return powerUps.research.research > 1 || build.isCustomSelection
},
- requires: "at least 2 rerolls",
+ requires: "at least 2 research",
effect() {
tech.isImmortal = true;
for (let i = 0; i < 4; i++) {
- powerUps.spawn(mech.pos.x, mech.pos.y, "reroll", false);
+ powerUps.spawn(mech.pos.x, mech.pos.y, "research", false);
}
},
remove() {
@@ -1436,7 +1452,7 @@ const tech = {
},
{
name: "bubble fusion",
- description: "after destroying a mob's shield
spawn 1-2 heals, ammo, or rerolls",
+ description: "after destroying a mob's shield
spawn 1-2 heals, ammo, or research",
maxCount: 1,
count: 0,
allowed() {
@@ -1470,7 +1486,7 @@ const tech = {
},
{
name: "stimulated emission",
- description: "6% chance to duplicate spawned power ups",
+ description: "6% chance to duplicate spawned power ups
duplication chance can't exceed 100%",
maxCount: 9,
count: 0,
allowed() {
@@ -1488,7 +1504,7 @@ const tech = {
},
{
name: "futures exchange",
- description: "clicking × to cancel a field, tech, or gun
increases power up duplication chance by 4%",
+ description: "clicking × to cancel a field, tech, or gun
adds 3.5% power up duplication chance",
maxCount: 1,
count: 0,
allowed() {
@@ -1508,7 +1524,7 @@ const tech = {
},
{
name: "commodities exchange",
- description: "clicking × to cancel a field, tech, or gun
spawns 6 heals, ammo, or rerolls",
+ description: "clicking × to cancel a field, tech, or gun
spawns 6 heals, ammo, or research",
maxCount: 1,
count: 0,
allowed() {
@@ -1583,19 +1599,19 @@ const tech = {
},
{
name: "strange attractor",
- description: `use 2 rerolls to spawn 1 tech
with double your duplication chance`,
+ description: `use 2 research to spawn 1 tech
with double your duplication chance`,
maxCount: 1,
count: 0,
isNonRefundable: true,
isCustomHide: true,
allowed() {
- return !tech.isSuperDeterminism && tech.duplicationChance() > 0 && powerUps.reroll.rerolls > 1
+ return !tech.isSuperDeterminism && tech.duplicationChance() > 0 && powerUps.research.research > 1
},
- requires: "at least 1 tech and 1 reroll, a chance to duplicate power ups",
+ requires: "at least 1 tech and 1 research, a chance to duplicate power ups",
effect: () => {
- powerUps.reroll.changeRerolls(-2)
- simulation.makeTextLog(`mech.rerolls -= 2
-
${powerUps.reroll.rerolls}`)
+ powerUps.research.changeRerolls(-2)
+ simulation.makeTextLog(`mech.research -= 2
+
${powerUps.research.research}`)
const chanceStore = tech.duplicateChance
tech.duplicateChance = (tech.isBayesian ? 0.2 : 0) + tech.cancelCount * 0.04 + mech.duplicateChance + tech.duplicateChance * 2 //increase duplication chance to simulate doubling all 3 sources of duplication chance
powerUps.spawn(mech.pos.x, mech.pos.y, "tech");
@@ -1740,7 +1756,7 @@ const tech = {
},
{
name: "superdeterminism",
- description: "spawn 7 tech
rerolls, guns, and fields no longer spawn",
+ description: "spawn 7 tech
research, guns, and fields no longer spawn",
maxCount: 1,
count: 0,
isNonRefundable: true,
@@ -1760,13 +1776,13 @@ const tech = {
},
{
name: "many-worlds",
- description: "after choosing a field, tech, or gun
if you have no rerolls spawn 2",
+ description: "after choosing a field, tech, or gun
if you have no research spawn 2",
maxCount: 1,
count: 0,
allowed() {
- return powerUps.reroll.rerolls === 0 && !tech.isSuperDeterminism && !tech.isRerollHaste
+ return powerUps.research.research === 0 && !tech.isSuperDeterminism && !tech.isRerollHaste
},
- requires: "not superdeterminism or Ψ(t) collapse
no rerolls",
+ requires: "not superdeterminism or Ψ(t) collapse
no research",
effect: () => {
tech.manyWorlds = true;
},
@@ -1776,13 +1792,13 @@ const tech = {
},
{
name: "renormalization",
- description: "consuming a reroll for any purpose
has a 37% chance to spawn a reroll",
+ description: "using a research for any purpose
has a 37% chance to spawn a research",
maxCount: 1,
count: 0,
allowed() {
- return (powerUps.reroll.rerolls > 1 || build.isCustomSelection) && !tech.isSuperDeterminism && !tech.isRerollHaste
+ return (powerUps.research.research > 1 || build.isCustomSelection) && !tech.isSuperDeterminism && !tech.isRerollHaste
},
- requires: "not superdeterminism or Ψ(t) collapse
at least 2 rerolls",
+ requires: "not superdeterminism or Ψ(t) collapse
at least 2 research",
effect() {
tech.renormalization = true;
},
@@ -1792,17 +1808,17 @@ const tech = {
},
{
name: "erase",
- description: "rerolled or canceled tech will not reoccur
spawn 4 rerolls",
+ description: "researched or canceled tech won't reoccur
spawn 4 research",
maxCount: 1,
count: 0,
allowed() {
- return (powerUps.reroll.rerolls > 2 || build.isCustomSelection) && !tech.isDeterminism
+ return (powerUps.research.research > 2 || build.isCustomSelection) && !tech.isDeterminism
},
- requires: "not determinism, at least 3 rerolls",
+ requires: "not determinism, at least 3 research",
effect() {
tech.isBanish = true
for (let i = 0; i < 4; i++) {
- powerUps.spawn(mech.pos.x, mech.pos.y, "reroll", false);
+ powerUps.spawn(mech.pos.x, mech.pos.y, "research", false);
}
},
remove() {
@@ -1841,8 +1857,8 @@ const tech = {
remove() {}
},
{
- name: "perpetual rerolls",
- description: "find 1 reroll at the start of each level",
+ name: "perpetual research",
+ description: "find 1 research at the start of each level",
maxCount: 1,
count: 0,
allowed() {
@@ -1984,16 +2000,33 @@ const tech = {
tech.fragments = 0
}
},
+ {
+ name: "superfluidity",
+ description: "freeze effects are applied to a small area",
+ isGunTech: true,
+ maxCount: 1,
+ count: 0,
+ allowed() {
+ return tech.isIceCrystals || tech.isSporeFreeze || tech.isIceField
+ },
+ requires: "a freeze effect",
+ effect() {
+ tech.isAoESlow = true
+ },
+ remove() {
+ tech.isAoESlow = false
+ }
+ },
{
name: "anti-shear topology",
- description: "some bullets last 30% longer
drones, spores, missiles, foam, wave, ice IX, neutron",
+ description: "some bullets last 30% longer
drones, spores, missiles, foam, wave, neutron",
isGunTech: true,
maxCount: 3,
count: 0,
allowed() {
- return mech.fieldUpgrades[mech.fieldMode].name === "nano-scale manufacturing" || tech.haveGunCheck("spores") || tech.haveGunCheck("drones") || tech.haveGunCheck("missiles") || tech.haveGunCheck("foam") || tech.haveGunCheck("wave beam") || tech.haveGunCheck("ice IX") || tech.isNeutronBomb
+ return mech.fieldUpgrades[mech.fieldMode].name === "nano-scale manufacturing" || tech.haveGunCheck("spores") || tech.haveGunCheck("drones") || tech.haveGunCheck("missiles") || tech.haveGunCheck("foam") || tech.haveGunCheck("wave beam") || tech.isNeutronBomb
},
- requires: "drones, spores, missiles, foam
wave beam, ice IX, neutron bomb",
+ requires: "drones, spores, missiles, foam
wave beam, neutron bomb",
effect() {
tech.isBulletsLastLonger += 0.3
},
@@ -2351,7 +2384,7 @@ const tech = {
maxCount: 1,
count: 0,
allowed() {
- return tech.haveGunCheck("flechettes") || tech.isNailPoison || tech.isHeavyWater || tech.isWormholeDamage || tech.isNeutronBomb
+ return tech.haveGunCheck("flechettes") || tech.isNailPoison || tech.isWormholeDamage || tech.isNeutronBomb
},
requires: "radiation damage source",
effect() {
@@ -2779,57 +2812,6 @@ const tech = {
tech.isDroneGrab = false
}
},
- {
- name: "superfluidity",
- description: "freeze effects apply to mobs near it's target",
- isGunTech: true,
- maxCount: 1,
- count: 0,
- allowed() {
- return tech.haveGunCheck("ice IX") || tech.isIceCrystals || tech.isSporeFreeze || tech.isIceField
- },
- requires: "a freeze effect",
- effect() {
- tech.isAoESlow = true
- },
- remove() {
- tech.isAoESlow = false
- }
- },
- {
- name: "heavy water",
- description: "ice IX is synthesized with an extra neutron
does radioactive damage over 5 seconds",
- isGunTech: true,
- maxCount: 1,
- count: 0,
- allowed() {
- return (tech.haveGunCheck("ice IX") || tech.isIceField) && !tech.iceEnergy
- },
- requires: "ice IX",
- effect() {
- tech.isHeavyWater = true
- },
- remove() {
- tech.isHeavyWater = false;
- }
- },
- {
- name: "thermoelectric effect",
- description: "killing mobs with ice IX gives 4 health
and 80 energy",
- isGunTech: true,
- maxCount: 9,
- count: 0,
- allowed() {
- return (tech.haveGunCheck("ice IX") || tech.isIceField) && !tech.isHeavyWater
- },
- requires: "ice IX",
- effect() {
- tech.iceEnergy++
- },
- remove() {
- tech.iceEnergy = 0;
- }
- },
{
name: "necrophoresis",
description: "foam bubbles grow and split into 3 copies
when the mob they are stuck to dies",
@@ -3387,7 +3369,7 @@ const tech = {
},
{
name: "ice IX manufacturing",
- description: "nano-scale manufacturing is repurposed
excess energy used to synthesize ice IX",
+ description: "nano-scale manufacturing is repurposed
excess energy used to synthesize ice IX",
isFieldTech: true,
maxCount: 1,
count: 0,
@@ -3402,6 +3384,23 @@ const tech = {
tech.isIceField = false;
}
},
+ {
+ name: "thermoelectric effect",
+ description: "killing mobs with ice IX gives 4 health
and 80 energy",
+ isFieldTech: true,
+ maxCount: 9,
+ count: 0,
+ allowed() {
+ return tech.isIceField
+ },
+ requires: "ice IX",
+ effect() {
+ tech.iceEnergy++
+ },
+ remove() {
+ tech.iceEnergy = 0;
+ }
+ },
{
name: "degenerate matter",
description: "reduce harm by 40%
while negative mass field is active",
@@ -3745,8 +3744,8 @@ const tech = {
remove() {}
},
{
- name: "rerolls",
- description: "spawn 4 rerolls",
+ name: "research",
+ description: "spawn 4 research",
maxCount: 9,
count: 0,
isNonRefundable: true,
@@ -3757,7 +3756,7 @@ const tech = {
requires: "not superdeterminism",
effect() {
for (let i = 0; i < 4; i++) {
- powerUps.spawn(mech.pos.x, mech.pos.y, "reroll");
+ powerUps.spawn(mech.pos.x, mech.pos.y, "research");
}
this.count--
},
@@ -3858,7 +3857,6 @@ const tech = {
isBlockStun: null,
isStunField: null,
isHarmDamage: null,
- isHeavyWater: null,
energyRegen: null,
isVacuumBomb: null,
renormalization: null,
@@ -3902,7 +3900,7 @@ const tech = {
isHarmFreeze: null,
isBotArmor: null,
isRerollHaste: null,
- rerollHaste: null,
+ researchHaste: null,
isMineDrop: null,
isRerollBots: null,
isRailTimeSlow: null,
@@ -3978,5 +3976,7 @@ const tech = {
isRewindGun: null,
missileSize: null,
isLaserMine: null,
- isAmmoFoamSize: null
+ isAmmoFoamSize: null,
+ isIceIX: null,
+ isDupDamage: null
}
\ No newline at end of file
diff --git a/style.css b/style.css
index ea7ed8e..506210b 100644
--- a/style.css
+++ b/style.css
@@ -646,12 +646,12 @@ summary {
background: #0d9;
}
-.reroll {
+.research {
/* #f84 #f99*/
background: #f7b;
}
-.reroll-select {
+.research-select {
float: right;
}
@@ -676,4 +676,15 @@ summary {
.right {
text-align: right;
-}
\ No newline at end of file
+}
+
+/* #console {
+ font-family: monospace;
+ font-size: 1.5em;
+ width: 300px;
+ height: 50px;
+ position: absolute;
+ bottom: 10px;
+ right: 10px;
+ z-index: 3;
+} */
\ No newline at end of file
diff --git a/todo.txt b/todo.txt
index 1f40ffc..9978dfa 100644
--- a/todo.txt
+++ b/todo.txt
@@ -1,6 +1,16 @@
******************************************************** NEXT PATCH ********************************************************
+reroll renamed -> research
+spore damage increased 25%
+
+ice IX has it's damage buffed by 50%, and freeze effect lasts 2s (up from 1s)
+ice IX is no longer a gun
+ but you can still get it for nano-scale field (and it's pretty strong)
+tech: heavy water was removed
+
+tech: correlated damage - duplication chance also gives % damage
+(also added some minor nerfs to other duplication tech for balance)
******************************************************** BUGS ********************************************************
@@ -41,8 +51,6 @@ tech: dodge chance for cloaking, harmonic fields, also pilot wave
rename
health > integrity, unity
heal > also integrity, unity
- level > world?
- reroll > research
in game console
set highlighting rules
@@ -416,11 +424,13 @@ scientist console text:
at the start of each level listen to text conversation from the two colors of text strings also
talking about the robot, watching
trying to communicate with the robot? but how
- random lines:
- say something about what mobs types are queued up, and level order
- I think it's planing to escape
- Why is it attacking those shapes?
- Are those shapes supposed to be us?
+ random lines when:
+ at start of level, about: what mobs types are queued up, and level order
+ when player gets a cool tech combination
+ at random times:
+ I think it's planing to escape
+ Why is it attacking those shapes?
+ Are those shapes supposed to be us?
ending outline
if no cheats