tech: ricochet -  nails bounce off mobs and hit other mobs with extra damage per ricochet

tech: dye laser - 20% efficiency and 20% damage
laser diode renamed infrared diode
  40 -> 50% efficiency but you can't see the laser beam
laser-bots acquire new targets much faster
iridescence 88 -> 100% damage, a tiny bit harder to hit center of mobs
   stacks up to 3 -> 9

dynamic equilibrium scales damage with defense
  goes up to 9x stacks
neutronium 25 -> 20% slower movement

revolutionBoss laser swords are much slower and shorter
  but they do more damage
This commit is contained in:
landgreen
2022-07-29 10:08:10 -07:00
parent eafadff785
commit 3434869989
7 changed files with 221 additions and 223 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@@ -1964,7 +1964,6 @@ const b = {
mob[i].alive && !mob[i].isBadTarget && mob[i].alive && !mob[i].isBadTarget &&
Matter.Query.ray(map, this.position, mob[i].position).length === 0 && Matter.Query.ray(map, this.position, mob[i].position).length === 0 &&
!mob[i].isInvulnerable !mob[i].isInvulnerable
// && Matter.Query.ray(body, this.position, mob[i].position).length === 0
) { ) {
const futureDist = Vector.magnitude(Vector.sub(futurePos, mob[i].position)); const futureDist = Vector.magnitude(Vector.sub(futurePos, mob[i].position));
if (futureDist < closeDist) { if (futureDist < closeDist) {
@@ -2327,7 +2326,7 @@ const b = {
if (best.who.damageReduction) { if (best.who.damageReduction) {
if ( //iridescence if ( //iridescence
tech.laserCrit && !best.who.shield && tech.laserCrit && !best.who.shield &&
Vector.dot(Vector.normalise(Vector.sub(best.who.position, path[path.length - 1])), Vector.normalise(Vector.sub(path[path.length - 1], path[path.length - 2]))) > 0.995 - 0.6 / best.who.radius Vector.dot(Vector.normalise(Vector.sub(best.who.position, path[path.length - 1])), Vector.normalise(Vector.sub(path[path.length - 1], path[path.length - 2]))) > 0.997 - 0.6 / best.who.radius
) { ) {
damage *= 1 + tech.laserCrit damage *= 1 + tech.laserCrit
simulation.drawList.push({ //add dmg to draw queue simulation.drawList.push({ //add dmg to draw queue
@@ -2449,7 +2448,7 @@ const b = {
dmg: 0, // 0.14 //damage done in addition to the damage from momentum dmg: 0, // 0.14 //damage done in addition to the damage from momentum
minDmgSpeed: 2, minDmgSpeed: 2,
lookFrequency: 67 + Math.floor(7 * Math.random()), lookFrequency: 67 + Math.floor(7 * Math.random()),
drain: 0.7 * tech.isLaserDiode * tech.laserFieldDrain, drain: 0.7 * tech.laserDrain,
isDetonated: false, isDetonated: false,
torqueMagnitude: 0.000003 * (Math.round(Math.random()) ? 1 : -1), torqueMagnitude: 0.000003 * (Math.round(Math.random()) ? 1 : -1),
range: 1500, range: 1500,
@@ -3958,7 +3957,33 @@ const b = {
b.explosion(this.position, 150 + 30 * Math.random()); //makes bullet do explosive damage at end b.explosion(this.position, 150 + 30 * Math.random()); //makes bullet do explosive damage at end
} }
} }
this.ricochet(who)
}; };
bullet[me].ricochet = function(who) { //use for normal nails, and ice crystal nails
if (tech.isRicochet) {
const targets = [] //target nearby mobs
for (let i = 0, len = mob.length; i < len; i++) {
const dist = Vector.magnitude(Vector.sub(this.position, mob[i].position));
if (
mob[i] !== who &&
dist < 2500 + mob[i].radius &&
!mob[i].isBadTarget && //|| mob[i].isMobBullet
!mob[i].isInvulnerable &&
Matter.Query.ray(body, this.position, mob[i].position).length === 0 &&
Matter.Query.ray(map, this.position, mob[i].position).length === 0
) {
targets.push(Vector.add(mob[i].position, Vector.mult(mob[i].velocity, dist / 60))) //predict where the mob will be in a few cycles
}
}
if (targets.length > 0) { // aim near a random target in array
const index = Math.floor(Math.random() * targets.length)
Matter.Body.setVelocity(this, Vector.mult(Vector.normalise(Vector.sub(targets[index], this.position)), 45));
Matter.Body.setAngle(this, Math.atan2(this.velocity.y, this.velocity.x))
Matter.Body.setAngularVelocity(this, 0);
}
this.dmg += 2
}
}
bullet[me].do = function() {}; bullet[me].do = function() {};
}, },
needle(angle = m.angle) { needle(angle = m.angle) {
@@ -4590,10 +4615,10 @@ const b = {
offPlayer: { x: 0, y: 0, }, offPlayer: { x: 0, y: 0, },
dmg: 0, //damage done in addition to the damage from momentum dmg: 0, //damage done in addition to the damage from momentum
minDmgSpeed: 2, minDmgSpeed: 2,
lookFrequency: 40 + Math.floor(7 * Math.random()) - 13 * tech.isLaserBotUpgrade, lookFrequency: 20 + Math.floor(7 * Math.random()) - 13 * tech.isLaserBotUpgrade,
range: (700 + 500 * tech.isLaserBotUpgrade) * (1 + 0.1 * Math.random()), range: (700 + 500 * tech.isLaserBotUpgrade) * (1 + 0.1 * Math.random()),
drainThreshold: tech.isEnergyHealth ? 0.6 : 0.4, drainThreshold: tech.isEnergyHealth ? 0.6 : 0.4,
drain: (0.5 - 0.44 * tech.isLaserBotUpgrade) * tech.laserFieldDrain * tech.isLaserDiode, drain: (0.5 - 0.44 * tech.isLaserBotUpgrade) * tech.laserDrain,
laserDamage: 0.85 + 0.8 * tech.isLaserBotUpgrade, laserDamage: 0.85 + 0.8 * tech.isLaserBotUpgrade,
endCycle: Infinity, endCycle: Infinity,
classType: "bullet", classType: "bullet",
@@ -5375,6 +5400,7 @@ const b = {
b.explosion(this.position, 150 + 30 * Math.random()); //makes bullet do explosive damage at end b.explosion(this.position, 150 + 30 * Math.random()); //makes bullet do explosive damage at end
} }
} }
this.ricochet(who)
}; };
if (m.energy < 0.01) { if (m.energy < 0.01) {
m.fireCDcycle = m.cycle + 60; // cool down m.fireCDcycle = m.cycle + 60; // cool down
@@ -6950,7 +6976,7 @@ const b = {
} }
ctx.beginPath(); ctx.beginPath();
ctx.arc(m.pos.x, m.pos.y, 60, this.angle - this.arcRange, this.angle + this.arcRange); ctx.arc(m.pos.x, m.pos.y, 60, this.angle - this.arcRange, this.angle + this.arcRange);
ctx.strokeStyle = '#fff' //'rgba(255,255,255,0.9)' //'hsl(189, 100%, 95%)' //tech.laserColor ctx.strokeStyle = '#fff' //'rgba(255,255,255,0.9)' //'hsl(189, 100%, 95%)'
ctx.stroke(); ctx.stroke();
// const a = { x: radius * Math.cos(this.angle + this.arcRange), y: radius * Math.sin(this.angle + this.arcRange) } // const a = { x: radius * Math.cos(this.angle + this.arcRange), y: radius * Math.sin(this.angle + this.arcRange) }
// const b = Vector.add(m.pos, a) // const b = Vector.add(m.pos, a)
@@ -6962,7 +6988,7 @@ const b = {
if (tech.isStuckOn) { if (tech.isStuckOn) {
if (this.isStuckOn) { if (this.isStuckOn) {
if (!input.fire) this.fire(); if (!input.fire) this.fire();
if (m.energy < tech.laserFieldDrain * tech.isLaserDiode) this.isStuckOn = false if (m.energy < tech.laserDrain) this.isStuckOn = false
} else if (input.fire) { } else if (input.fire) {
this.isStuckOn = true this.isStuckOn = true
} }
@@ -6979,7 +7005,7 @@ const b = {
} }
if (tech.isPulseLaser) { if (tech.isPulseLaser) {
this.fire = () => { this.fire = () => {
const drain = 0.01 * tech.isLaserDiode * (tech.isCapacitor ? 10 : 1) const drain = 0.01 * (tech.isCapacitor ? 10 : 1) / b.fireCDscale
if (m.energy > drain) { if (m.energy > drain) {
// m.energy -= m.fieldRegen // m.energy -= m.fieldRegen
if (this.charge < 50 * m.maxEnergy) { if (this.charge < 50 * m.maxEnergy) {
@@ -7003,7 +7029,7 @@ const b = {
ctx.moveTo(history.position.x, history.position.y - off); ctx.moveTo(history.position.x, history.position.y - off);
ctx.ellipse(history.position.x, history.position.y - off, mag, mag * 0.65, history.angle, 0, 2 * Math.PI) ctx.ellipse(history.position.x, history.position.y - off, mag, mag * 0.65, history.angle, 0, 2 * Math.PI)
} }
ctx.fillStyle = tech.isLaserDiode === 1 ? `rgba(255,0,0,${0.09 * Math.sqrt(this.charge)})` : `rgba(0,0,255,${0.09 * Math.sqrt(this.charge)})`; ctx.fillStyle = `rgba(255,0,0,${0.09 * Math.sqrt(this.charge)})`;
ctx.fill(); ctx.fill();
//fire //fire
if (!input.fire) { if (!input.fire) {
@@ -7027,7 +7053,7 @@ const b = {
ctx.beginPath(); ctx.beginPath();
ctx.arc(m.pos.x, m.pos.y, 4.2 * Math.sqrt(this.charge), 0, 2 * Math.PI); ctx.arc(m.pos.x, m.pos.y, 4.2 * Math.sqrt(this.charge), 0, 2 * Math.PI);
// ctx.fillStyle = `rgba(255,0,0,${0.09 * Math.sqrt(this.charge)})`; // ctx.fillStyle = `rgba(255,0,0,${0.09 * Math.sqrt(this.charge)})`;
ctx.fillStyle = tech.isLaserDiode === 1 ? `rgba(255,0,0,${0.09 * Math.sqrt(this.charge)})` : `rgba(0,0,255,${0.09 * Math.sqrt(this.charge)})`; ctx.fillStyle = `rgba(255,0,0,${0.09 * Math.sqrt(this.charge)})`;
ctx.fill(); ctx.fill();
//fire //fire
if (!input.fire) { if (!input.fire) {
@@ -7063,11 +7089,12 @@ const b = {
// b.photon({ x: m.pos.x + 23 * Math.cos(m.angle), y: m.pos.y + 23 * Math.sin(m.angle) }, m.angle) // b.photon({ x: m.pos.x + 23 * Math.cos(m.angle), y: m.pos.y + 23 * Math.sin(m.angle) }, m.angle)
// }, // },
fireLaser() { fireLaser() {
if (m.energy < tech.laserFieldDrain) { const drain = m.fieldRegen + tech.laserDrain / b.fireCDscale
if (m.energy < drain) {
m.fireCDcycle = m.cycle + 100; // cool down if out of energy m.fireCDcycle = m.cycle + 100; // cool down if out of energy
} else { } else {
m.fireCDcycle = m.cycle m.fireCDcycle = m.cycle
m.energy -= m.fieldRegen + tech.laserFieldDrain * tech.isLaserDiode / b.fireCDscale m.energy -= drain
const where = { const where = {
x: m.pos.x + 20 * Math.cos(m.angle), x: m.pos.x + 20 * Math.cos(m.angle),
y: m.pos.y + 20 * Math.sin(m.angle) y: m.pos.y + 20 * Math.sin(m.angle)
@@ -7080,11 +7107,12 @@ const b = {
}, },
firePulse() {}, firePulse() {},
fireSplit() { fireSplit() {
if (m.energy < tech.laserFieldDrain) { const drain = m.fieldRegen + tech.laserDrain / b.fireCDscale
if (m.energy < drain) {
m.fireCDcycle = m.cycle + 100; // cool down if out of energy m.fireCDcycle = m.cycle + 100; // cool down if out of energy
} else { } else {
m.fireCDcycle = m.cycle m.fireCDcycle = m.cycle
m.energy -= m.fieldRegen + tech.laserFieldDrain * tech.isLaserDiode / b.fireCDscale m.energy -= drain
// const divergence = input.down ? 0.15 : 0.2 // const divergence = input.down ? 0.15 : 0.2
// const scale = Math.pow(0.9, tech.beamSplitter) // const scale = Math.pow(0.9, tech.beamSplitter)
// const pushScale = scale * scale // const pushScale = scale * scale
@@ -7104,11 +7132,12 @@ const b = {
} }
}, },
fireWideBeam() { fireWideBeam() {
if (m.energy < tech.laserFieldDrain) { const drain = m.fieldRegen + tech.laserDrain / b.fireCDscale
if (m.energy < drain) {
m.fireCDcycle = m.cycle + 100; // cool down if out of energy m.fireCDcycle = m.cycle + 100; // cool down if out of energy
} else { } else {
m.fireCDcycle = m.cycle m.fireCDcycle = m.cycle
m.energy -= m.fieldRegen + tech.laserFieldDrain * tech.isLaserDiode / b.fireCDscale m.energy -= drain
const range = { const range = {
x: 5000 * Math.cos(m.angle), x: 5000 * Math.cos(m.angle),
y: 5000 * Math.sin(m.angle) y: 5000 * Math.sin(m.angle)
@@ -7132,9 +7161,6 @@ const b = {
ctx.globalAlpha = 0.5; ctx.globalAlpha = 0.5;
ctx.beginPath(); ctx.beginPath();
if (Matter.Query.ray(map, eye, where).length === 0 && Matter.Query.ray(body, eye, where).length === 0) { if (Matter.Query.ray(map, eye, where).length === 0 && Matter.Query.ray(body, eye, where).length === 0) {
// this.isInsideArc(m.angle) ? 8 : 3
//where = {x: m.pos.x + 20 * Math.cos(m.angle),y: m.pos.y + 20 * Math.sin(m.angle)}, whereEnd = {x: where.x + 3000 * Math.cos(m.angle),y: where.y + 3000 * Math.sin(m.angle)}, dmg = tech.laserDamage, reflections = tech.laserReflections, isThickBeam = false, push = 1) {
b.laser(eye, { b.laser(eye, {
x: eye.x + range.x, x: eye.x + range.x,
y: eye.y + range.y y: eye.y + range.y
@@ -7171,13 +7197,14 @@ const b = {
} }
}, },
fireHistory() { fireHistory() {
if (m.energy < tech.laserFieldDrain) { drain = m.fieldRegen + tech.laserDrain / b.fireCDscale
if (m.energy < drain) {
m.fireCDcycle = m.cycle + 100; // cool down if out of energy m.fireCDcycle = m.cycle + 100; // cool down if out of energy
} else { } else {
m.fireCDcycle = m.cycle m.fireCDcycle = m.cycle
m.energy -= m.fieldRegen + tech.laserFieldDrain * tech.isLaserDiode / b.fireCDscale m.energy -= drain
const dmg = 0.4 * tech.laserDamage / b.fireCDscale * this.lensDamage // 3.5 * 0.55 = 200% more damage const dmg = 0.4 * tech.laserDamage / b.fireCDscale * this.lensDamage // 3.5 * 0.55 = 200% more damage
const spacing = Math.ceil(4 - 0.3 * tech.historyLaser) const spacing = Math.ceil(5 - 0.4 * tech.historyLaser)
ctx.beginPath(); ctx.beginPath();
b.laser({ b.laser({
x: m.pos.x + 20 * Math.cos(m.angle), x: m.pos.x + 20 * Math.cos(m.angle),

View File

@@ -16,7 +16,7 @@ const level = {
start() { start() {
if (level.levelsCleared === 0) { //this code only runs on the first level if (level.levelsCleared === 0) { //this code only runs on the first level
// simulation.enableConstructMode() //used to build maps in testing mode // simulation.enableConstructMode() //used to build maps in testing mode
// level.difficultyIncrease(4 * 4) //30 is near max on hard //60 is near max on why // level.difficultyIncrease(6 * 4) //30 is near max on hard //60 is near max on why
// simulation.isHorizontalFlipped = true // simulation.isHorizontalFlipped = true
// m.maxHealth = m.health = 100 // m.maxHealth = m.health = 100
// powerUps.research.changeRerolls(100000) // powerUps.research.changeRerolls(100000)
@@ -24,20 +24,21 @@ const level = {
// powerUps.research.changeRerolls(100) // powerUps.research.changeRerolls(100)
// tech.tech[297].frequency = 100 // tech.tech[297].frequency = 100
// b.guns[0].ammo = 10000 // b.guns[0].ammo = 10000
// m.setField("negative mass") //molecular assembler time dilation perfect diamagnetism metamaterial cloaking wormhole negative mass // m.setField("molecular assembler") //molecular assembler time dilation perfect diamagnetism metamaterial cloaking wormhole negative mass
// b.giveGuns("nail gun") //0 nail gun 1 shotgun 2 super balls 3 matter wave 4 missiles 5 grenades 6 spores 7 drones 8 foam 9 harpoon 10 mine 11 laser // b.giveGuns("laser") //0 nail gun 1 shotgun 2 super balls 3 matter wave 4 missiles 5 grenades 6 spores 7 drones 8 foam 9 harpoon 10 mine 11 laser
// tech.giveTech("dynamic equilibrium") // tech.giveTech("infrared diode");
// tech.giveTech("quantum eraser"); // tech.giveTech("active cooling");
// tech.giveTech("patch"); // tech.giveTech("pulse")
// tech.giveTech("polyurethane foam") // for (let i = 0; i < 1; ++i) tech.giveTech("slow light")
// for (let i = 0; i < 100; ++i) tech.giveTech("nail-bot") // for (let i = 0; i < 1; ++i) tech.giveTech("free-electron laser")
// for (let i = 0; i < 1; ++i) tech.giveTech("electric generator") // m.damage(0.1);
// for (let i = 0; i < 9; i++) tech.giveTech("compound lens") // for (let i = 0; i < 1; i++) tech.giveTech("dynamic equilibrium")
// for (let i = 0; i < 10; i++) powerUps.directSpawn(450, -50, "tech"); // for (let i = 0; i < 10; i++) powerUps.directSpawn(450, -50, "tech");
// for (let i = 0; i < 10; i++) powerUps.directSpawn(450, -50, "research"); // for (let i = 0; i < 10; i++) powerUps.directSpawn(450, -50, "research");
// spawn.starter(1900, -500, 100) // spawn.starter(1900, -500, 200)
// spawn.snakeBoss(1900, -500) // spawn.starter(1900, -500, 50)
// for (let i = 0; i < 10; ++i) spawn.grower(1900, -500) // spawn.revolutionBoss(1900, -500)
// for (let i = 0; i < 10; ++i) spawn.starter(1900 + 300 * Math.random(), -500 + 300 * Math.random())
// level.testing(); //not in rotation, used for testing // level.testing(); //not in rotation, used for testing
// for (let i = 0; i < 7; ++i) powerUps.directSpawn(m.pos.x + 50 * Math.random(), m.pos.y + 50 * Math.random(), "research"); // for (let i = 0; i < 7; ++i) powerUps.directSpawn(m.pos.x + 50 * Math.random(), m.pos.y + 50 * Math.random(), "research");
// for (let i = 0; i < 4; ++i) powerUps.directSpawn(m.pos.x + 50 * Math.random(), m.pos.y + 50 * Math.random(), "tech"); // for (let i = 0; i < 4; ++i) powerUps.directSpawn(m.pos.x + 50 * Math.random(), m.pos.y + 50 * Math.random(), "tech");

View File

@@ -284,7 +284,7 @@ const powerUps = {
// } // }
// requestAnimationFrame(cycle); // requestAnimationFrame(cycle);
document.getElementById("choose-grid").style.opacity = "0.8" document.getElementById("choose-grid").style.opacity = "0.9"
} else { } else {
simulation.paused = true; simulation.paused = true;
document.getElementById("choose-grid").style.opacity = "1" document.getElementById("choose-grid").style.opacity = "1"

View File

@@ -3621,11 +3621,11 @@ const spawn = {
mobs.spawn(x, y, sides, radius, "rgb(201,202,225)"); mobs.spawn(x, y, sides, radius, "rgb(201,202,225)");
let me = mob[mob.length - 1]; let me = mob[mob.length - 1];
Matter.Body.rotate(me, 2 * Math.PI * Math.random()); Matter.Body.rotate(me, 2 * Math.PI * Math.random());
me.accelMag = 0.00038 * Math.sqrt(simulation.accelScale); me.accelMag = 0.00018 + 0.00018 * Math.sqrt(simulation.accelScale);
me.frictionAir = 0.01; me.frictionAir = 0.01;
me.swordRadiusMax = 550 + 10 * simulation.difficulty; me.swordRadiusMax = 400 + 10 * simulation.difficulty;
me.laserAngle = 0; me.laserAngle = 0;
me.swordDamage = 0.0025 * simulation.dmgScale me.swordDamage = 0.025 * simulation.dmgScale //0.033 * simulation.dmgScale; previous //0.14 * simulation.dmgScale;laserBoss
// spawn.shield(me, x, y, 1); // spawn.shield(me, x, y, 1);
Matter.Body.setDensity(me, 0.005); //extra dense //normal is 0.001 //makes effective life much larger Matter.Body.setDensity(me, 0.005); //extra dense //normal is 0.001 //makes effective life much larger
@@ -3652,7 +3652,7 @@ const spawn = {
if (this.isInvulnerable) { if (this.isInvulnerable) {
if (this.invulnerabilityCountDown > 0) { if (this.invulnerabilityCountDown > 0) {
this.invulnerabilityCountDown-- this.invulnerabilityCountDown--
//graphics //draw a super shield? //draw invulnerability
ctx.beginPath(); ctx.beginPath();
let vertices = this.vertices; let vertices = this.vertices;
ctx.moveTo(vertices[0].x, vertices[0].y); ctx.moveTo(vertices[0].x, vertices[0].y);
@@ -3673,7 +3673,7 @@ const spawn = {
this.seePlayerByHistory(60); this.seePlayerByHistory(60);
this.attraction(); this.attraction();
//traveling laser //traveling laser
this.laserAngle += this.isInvulnerable ? 0.06 : 0.015 this.laserAngle += this.isInvulnerable ? 0.025 : 0.006
for (let i = 0, len = this.vertices.length; i < len; i++) { for (let i = 0, len = this.vertices.length; i < len; i++) {
// this.laserSword(this.vertices[1], this.angle + laserAngle); // this.laserSword(this.vertices[1], this.angle + laserAngle);
const bend = bendFactor * Math.cos(this.laserAngle + 2 * Math.PI * i / len) const bend = bendFactor * Math.cos(this.laserAngle + 2 * Math.PI * i / len)
@@ -3710,15 +3710,15 @@ const spawn = {
vertexCollision(where, look, map); vertexCollision(where, look, map);
if (!m.isCloak) vertexCollision(where, look, [playerBody, playerHead]); if (!m.isCloak) vertexCollision(where, look, [playerBody, playerHead]);
if (best.who && (best.who === playerBody || best.who === playerHead) && m.immuneCycle < m.cycle) { if (best.who && (best.who === playerBody || best.who === playerHead) && m.immuneCycle < m.cycle) {
// m.immuneCycle = m.cycle + tech.collisionImmuneCycles + 60; //player is immune to damage for an extra second m.immuneCycle = m.cycle + tech.collisionImmuneCycles; //player is immune to damage for an extra second
m.damage(this.swordDamage); m.damage(this.swordDamage);
// simulation.drawList.push({ //add dmg to draw queue simulation.drawList.push({ //add dmg to draw queue
// x: best.x, x: best.x,
// y: best.y, y: best.y,
// radius: this.swordDamage * 1500, radius: this.swordDamage * 1500,
// color: "rgba(80,0,255,0.5)", color: "rgba(80,0,255,0.5)",
// time: 20 time: 20
// }); });
} }
if (best.dist2 === Infinity) best = look; if (best.dist2 === Infinity) best = look;
ctx.beginPath(); //draw beam ctx.beginPath(); //draw beam

View File

@@ -253,7 +253,7 @@ const tech = {
if (m.isSneakAttack && m.sneakAttackCycle + Math.min(120, 0.5 * (m.cycle - m.enterCloakCycle)) > m.cycle) dmg *= tech.sneakAttackDmg if (m.isSneakAttack && m.sneakAttackCycle + Math.min(120, 0.5 * (m.cycle - m.enterCloakCycle)) > m.cycle) dmg *= tech.sneakAttackDmg
if (tech.isAxion && tech.isHarmMACHO) dmg *= 2 - m.harmReduction() if (tech.isAxion && tech.isHarmMACHO) dmg *= 2 - m.harmReduction()
if (tech.isHarmDamage && m.lastHarmCycle + 600 > m.cycle) dmg *= 3; if (tech.isHarmDamage && m.lastHarmCycle + 600 > m.cycle) dmg *= 3;
if (tech.isLastHitDamage && m.lastHit) dmg *= 1 + 10 * m.lastHit // if (!simulation.paused) m.lastHit = 0 if (tech.lastHitDamage && m.lastHit) dmg *= 1 + tech.lastHitDamage * m.lastHit * (2 - m.harmReduction()) // if (!simulation.paused) m.lastHit = 0
return dmg * tech.slowFire * tech.aimDamage return dmg * tech.slowFire * tech.aimDamage
}, },
duplicationChance() { duplicationChance() {
@@ -397,9 +397,6 @@ const tech = {
}, },
{ {
name: "arsenal", name: "arsenal",
// descriptionFunction() {
// return `increase <strong class='color-d'>damage</strong> by <strong>${14 * b.inventory.length}%</strong><br><strong>14%</strong> for each <strong class='color-g'>gun</strong> in your inventory`
// },
description: "for each <strong class='color-g'>gun</strong> in your inventory<br><strong>+13%</strong> <strong class='color-d'>damage</strong>", description: "for each <strong class='color-g'>gun</strong> in your inventory<br><strong>+13%</strong> <strong class='color-d'>damage</strong>",
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -439,7 +436,7 @@ const tech = {
{ {
name: "integrated armament", name: "integrated armament",
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Weapon' class="link">integrated armament</a>`, link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Weapon' class="link">integrated armament</a>`,
description: `<span style = 'font-size:95%;'>increase <strong class='color-d'>damage</strong> by <strong>25%</strong>, but new <strong class='color-g'>guns</strong><br>replace your current <strong class='color-g'>gun</strong> and convert <strong class='color-g'>gun</strong><strong class='color-m'>tech</strong></span>`, description: `<span style = 'font-size:95%;'>+<strong>25%</strong> <strong class='color-d'>damage</strong>, but new <strong class='color-g'>guns</strong><br>replace your current <strong class='color-g'>gun</strong> and convert <strong class='color-g'>gun</strong><strong class='color-m'>tech</strong></span>`,
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 1, frequency: 1,
@@ -780,7 +777,6 @@ const tech = {
{ {
name: "kinetic bombardment", name: "kinetic bombardment",
description: "<strong class='color-d'>damage</strong> is proportional to mob <strong>distance</strong><br>up to <strong>+33%</strong> <strong class='color-d'>damage</strong> at <strong>3000</strong> displacement", description: "<strong class='color-d'>damage</strong> is proportional to mob <strong>distance</strong><br>up to <strong>+33%</strong> <strong class='color-d'>damage</strong> at <strong>3000</strong> displacement",
// description: "increase <strong class='color-d'>damage</strong> by up to <strong>33%</strong> at a <strong>distance</strong><br>of up to 50 player widths from the target",
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 1, frequency: 1,
@@ -1022,7 +1018,7 @@ const tech = {
}, },
{ {
name: "anticorrelation", name: "anticorrelation",
description: "increase <strong class='color-d'>damage</strong> by <strong>100%</strong><br>after not using your <strong class='color-g'>gun</strong> or <strong class='color-f'>field</strong> for <strong>2</strong> seconds", description: "<strong>+100%</strong> <strong class='color-d'>damage</strong><br>after not using your <strong class='color-g'>gun</strong> or <strong class='color-f'>field</strong> for <strong>2</strong> seconds",
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 1, frequency: 1,
@@ -1161,7 +1157,7 @@ const tech = {
{ {
name: "foam-bot upgrade", name: "foam-bot upgrade",
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">foam-bot upgrade</a>`, link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">foam-bot upgrade</a>`,
description: "<strong>convert</strong> your bots to <strong>foam-bots</strong><br><strong>300%</strong> increased foam <strong>size</strong> and <strong>fire rate</strong>", description: "<strong>convert</strong> your bots to <strong>foam-bots</strong><br><strong>+300%</strong> foam <strong>size</strong> and <strong>fire rate</strong>",
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 3, frequency: 3,
@@ -1217,7 +1213,7 @@ const tech = {
{ {
name: "boom-bot upgrade", name: "boom-bot upgrade",
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">boom-bot upgrade</a>`, link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">boom-bot upgrade</a>`,
description: "<strong>convert</strong> your bots to <strong>boom-bots</strong><br><strong>300%</strong> increased <strong class='color-e'>explosion</strong> <strong class='color-d'>damage</strong> and size", description: "<strong>convert</strong> your bots to <strong>boom-bots</strong><br><strong>+300%</strong> <strong class='color-e'>explosion</strong> <strong class='color-d'>damage</strong> and size",
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 3, frequency: 3,
@@ -1275,7 +1271,7 @@ const tech = {
{ {
name: "laser-bot upgrade", name: "laser-bot upgrade",
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">laser-bot upgrade</a>`, link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">laser-bot upgrade</a>`,
description: "<strong>convert</strong> your bots to <strong>laser-bots</strong><br><strong>100%</strong> improved <strong class='color-d'>damage</strong>, efficiency, and range", // <strong>400%</strong> increased <strong>laser-bot</strong> <strong class='color-laser'>laser</strong> <strong class='color-d'>damage</strong>", description: "<strong>convert</strong> your bots to <strong>laser-bots</strong><br><strong>+100%</strong> <strong class='color-d'>damage</strong>, efficiency, and range",
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 3, frequency: 3,
@@ -1331,7 +1327,7 @@ const tech = {
{ {
name: "orbital-bot upgrade", name: "orbital-bot upgrade",
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">orbital-bot upgrade</a>`, link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">orbital-bot upgrade</a>`,
description: "<strong>convert</strong> your bots to <strong>orbital-bots</strong><br>increase <strong class='color-d'>damage</strong> by <strong>300%</strong> and <strong>radius</strong> by <strong>50%</strong>", description: "<strong>convert</strong> your bots to <strong>orbital-bots</strong><br><strong>+300%</strong> orbital <strong class='color-d'>damage</strong> and <strong>+50%</strong> <strong>radius</strong>",
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 3, frequency: 3,
@@ -2229,6 +2225,7 @@ const tech = {
name: "1st ionization energy", name: "1st ionization energy",
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Ionization_energy' class="link">1st ionization energy</a>`, link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Ionization_energy' class="link">1st ionization energy</a>`,
description: `after you collect ${powerUps.orb.heal()}<br><strong>+10</strong> maximum <strong class='color-f'>energy</strong>`, description: `after you collect ${powerUps.orb.heal()}<br><strong>+10</strong> maximum <strong class='color-f'>energy</strong>`,
description: `convert ${powerUps.orb.heal()} into <div class="heal-circle" style = "background-color: #0ae;"></div><br><div class="heal-circle" style = "background-color: #0ae;"></div> give <strong>+10</strong> maximum <strong class='color-f'>energy</strong>`,
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 2, frequency: 2,
@@ -3129,8 +3126,8 @@ const tech = {
frequencyDefault: 1, frequencyDefault: 1,
isNonRefundable: true, isNonRefundable: true,
// isJunk: true, // isJunk: true,
allowed() { return true }, allowed() { return !tech.isDeterminism },
requires: "", requires: "not determinism",
effect() { effect() {
tech.tooManyTechChoices = 1 tech.tooManyTechChoices = 1
// 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; i < this.bonusResearch; i++) powerUps.spawn(m.pos.x + 40 * (Math.random() - 0.5), m.pos.y + 40 * (Math.random() - 0.5), "research", false);
@@ -3229,7 +3226,6 @@ const tech = {
}, },
{ {
name: "eternalism", name: "eternalism",
// description: `increase <strong class='color-d'>damage</strong> by <strong>60%</strong>, but <strong>time</strong> doesn't <strong>pause</strong><br>while choosing a choosing a <strong class='color-f'>field</strong>, <strong class='color-m'>tech</strong>, or <strong class='color-g'>gun</strong>`, //${powerUps.orb.heal()} or
description: "<strong>+34%</strong> <strong class='color-d'>damage</strong><br><strong>time</strong> can't be <strong>paused</strong> <em>(time can be dilated)</em>", description: "<strong>+34%</strong> <strong class='color-d'>damage</strong><br><strong>time</strong> can't be <strong>paused</strong> <em>(time can be dilated)</em>",
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -3894,6 +3890,27 @@ const tech = {
tech.bulletSize = 1; tech.bulletSize = 1;
} }
}, },
{
name: "ricochet",
description: "after <strong>nails</strong> hit a mob they <strong>rebound</strong> towards<br>a new mob with <strong>+180%</strong> <strong class='color-d'>damage</strong> per bounce",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
// return (tech.haveGunCheck("nail gun") && !tech.isRivets && !tech.isNeedles) || (tech.haveGunCheck("mines"))
return tech.isMineDrop || tech.isNailBotUpgrade || tech.fragments || tech.nailsDeathMob || (tech.haveGunCheck("mine") && !tech.isLaserMine) || (tech.haveGunCheck("nail gun") && !tech.isRivets && !tech.isNeedles) || (tech.haveGunCheck("shotgun") && (tech.isNeedles || tech.isNailShot))
},
//
requires: "nail gun, not rotary cannon, rivets, or needles",
effect() {
tech.isRicochet = true
},
remove() {
tech.isRicochet = false
}
},
{ {
name: "pneumatic actuator", name: "pneumatic actuator",
description: "<strong>nail gun</strong> takes <strong>no</strong> time to ramp up<br>to its fastest <strong><em>fire rate</em></strong>", description: "<strong>nail gun</strong> takes <strong>no</strong> time to ramp up<br>to its fastest <strong><em>fire rate</em></strong>",
@@ -5026,7 +5043,7 @@ const tech = {
}, },
{ {
name: "vacuum permittivity", name: "vacuum permittivity",
description: "increase <strong class='color-p'>radioactive</strong> range by <strong>20%</strong><br>objects in range of the bomb are <strong>slowed</strong>", description: "<strong>+20%</strong> <strong class='color-p'>radioactive</strong> range<br>objects in range of the bomb are <strong>slowed</strong>",
isGunTech: true, isGunTech: true,
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -5918,7 +5935,6 @@ const tech = {
descriptionFunction() { descriptionFunction() {
return `+${(10 * Math.sqrt(b.guns[9].ammo)).toFixed(0)}% <strong>harpoon</strong> size and <strong class='color-d'>damage</strong><br><em>(1/10 √ harpoon <strong class='color-ammo'>ammo</strong>)</em>` return `+${(10 * Math.sqrt(b.guns[9].ammo)).toFixed(0)}% <strong>harpoon</strong> size and <strong class='color-d'>damage</strong><br><em>(1/10 √ harpoon <strong class='color-ammo'>ammo</strong>)</em>`
}, },
// description: "increase the <strong>size</strong> of your <strong>harpoon</strong><br>by <strong>10%</strong> of √ of harpoon <strong class='color-ammo'>ammo</strong>",
isGunTech: true, isGunTech: true,
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -5983,7 +5999,6 @@ const tech = {
descriptionFunction() { descriptionFunction() {
return `+${(b.guns[9].ammo).toFixed(0)}% <strong>harpoon</strong> <strong>rope</strong> <strong>length</strong><br><em>(1/80 of harpoon <strong class='color-ammo'>ammo</strong>)</em>` return `+${(b.guns[9].ammo).toFixed(0)}% <strong>harpoon</strong> <strong>rope</strong> <strong>length</strong><br><em>(1/80 of harpoon <strong class='color-ammo'>ammo</strong>)</em>`
}, },
// description: "increase the <strong>length</strong> of your <strong>harpoon</strong>'s <strong>rope</strong><br>by <strong>1%</strong> per harpoon <strong class='color-ammo'>ammo</strong>",
isGunTech: true, isGunTech: true,
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -6036,7 +6051,7 @@ const tech = {
effect() { effect() {
let techGiven = 0 let techGiven = 0
for (let j = 0; j < 3; j++) { for (let j = 0; j < 3; j++) {
const names = ["lens", "compound lens", "arc length", "laser diode", "free-electron laser", "relativistic momentum", "specular reflection", "diffraction grating", "diffuse beam", "output coupler", "slow light", "laser-bot", "laser-bot upgrade"] const names = ["lens", "compound lens", "arc length", "infrared diode", "free-electron laser", "dye laser", "relativistic momentum", "specular reflection", "diffraction grating", "diffuse beam", "output coupler", "slow light", "laser-bot", "laser-bot upgrade"]
//convert names into indexes //convert names into indexes
const options = [] const options = []
for (let i = 0; i < names.length; i++) { for (let i = 0; i < names.length; i++) {
@@ -6082,54 +6097,6 @@ const tech = {
tech.isStuckOn = false tech.isStuckOn = false
} }
}, },
{
name: "laser diode",
description: "<strong>+40%</strong> <strong class='color-laser'>laser</strong> <strong class='color-f'>energy</strong> efficiency",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return (tech.haveGunCheck("laser") || tech.isLaserBotUpgrade || tech.isLaserMine) && tech.laserDamage === 0.18
},
requires: "laser, not free-electron",
effect() {
tech.isLaserDiode = 0.6; //100%-40%
tech.laserColor = "rgb(0, 11, 255)"
tech.laserColorAlpha = "rgba(0, 11, 255,0.5)"
},
remove() {
tech.isLaserDiode = 1;
tech.laserColor = "#f02"
tech.laserColorAlpha = "rgba(255, 0, 0, 0.5)"
}
},
{
name: "free-electron laser",
description: "<strong>+225%</strong> <strong class='color-laser'>laser</strong> <strong class='color-d'>damage</strong> <br><strong>250%</strong> <strong class='color-laser'>laser</strong> <strong class='color-f'>energy</strong> efficiency",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return (tech.haveGunCheck("laser") || tech.isLaserMine || tech.isLaserBotUpgrade) && !tech.isPulseLaser && tech.isLaserDiode === 1
},
requires: "laser, not pulse, diodes",
effect() {
tech.laserFieldDrain = 0.0063 //base is 0.002
tech.laserDamage = 0.52; //base is 0.16, 0.16 * (1 + 2.25)
tech.laserColor = "#83f"
tech.laserColorAlpha = "rgba(136, 51, 255,0.5)"
},
remove() {
tech.laserFieldDrain = 0.0018;
tech.laserDamage = 0.18; //used in check on pulse and diode: tech.laserDamage === 0.18
tech.laserColor = "#f00"
tech.laserColorAlpha = "rgba(255, 0, 0, 0.5)"
}
},
{ {
name: "relativistic momentum", name: "relativistic momentum",
description: "<strong class='color-laser'>lasers</strong> push <strong>mobs</strong> and <strong class='color-block'>blocks</strong>", description: "<strong class='color-laser'>lasers</strong> push <strong>mobs</strong> and <strong class='color-block'>blocks</strong>",
@@ -6152,9 +6119,9 @@ const tech = {
{ {
name: "iridescence", name: "iridescence",
// description: "if a <strong class='color-laser'>laser</strong> hits a mob at a low angle of illumination<br><strong>+66%</strong> <strong class='color-laser'>laser</strong> <strong class='color-d'>damage</strong>", // description: "if a <strong class='color-laser'>laser</strong> hits a mob at a low angle of illumination<br><strong>+66%</strong> <strong class='color-laser'>laser</strong> <strong class='color-d'>damage</strong>",
description: "if <strong class='color-laser'>laser</strong> beams hit mobs near their <strong>center</strong><br><strong>+88%</strong> <strong class='color-laser'>laser</strong> <strong class='color-d'>damage</strong>", description: "if <strong class='color-laser'>laser</strong> beams hit mobs near their <strong>center</strong><br><strong>+100%</strong> <strong class='color-laser'>laser</strong> <strong class='color-d'>damage</strong>",
isGunTech: true, isGunTech: true,
maxCount: 3, maxCount: 9,
count: 0, count: 0,
frequency: 2, frequency: 2,
frequencyDefault: 2, frequencyDefault: 2,
@@ -6163,7 +6130,7 @@ const tech = {
}, },
requires: "laser, not pulse", requires: "laser, not pulse",
effect() { effect() {
tech.laserCrit += 0.88; tech.laserCrit += 1;
}, },
remove() { remove() {
tech.laserCrit = 0; tech.laserCrit = 0;
@@ -6215,58 +6182,6 @@ const tech = {
b.guns[11].lensDamageOn = 2.5 b.guns[11].lensDamageOn = 2.5
} }
}, },
// {
// name: "lens",
// // description: "<strong>+150%</strong> <strong class='color-laser'>laser</strong> gun <strong class='color-d'>damage</strong> if it passes<br>through a revolving <strong>+90°</strong> arc circular lens", //<span style='font-size: 125%;'>π</span> / 2</strong>
// descriptionFunction() {
// if (this.count) {
// return `<strong>+70%</strong> lens <strong class='color-d'>damage</strong><br><strong>+20°</strong> arc circular lens`
// } else {
// return `<strong>+150%</strong> <strong class='color-laser'>laser</strong> gun <strong class='color-d'>damage</strong> if it passes<br>through a revolving <strong>90°</strong> arc circular lens`
// }
// },
// isGunTech: true,
// maxCount: 3,
// count: 0,
// frequency: 2,
// frequencyDefault: 2,
// allowed() {
// return tech.haveGunCheck("laser")
// },
// requires: "laser",
// effect() {
// tech.isLaserLens = true
// if (this.count) {
// b.guns[11].lensDamageOn += 0.7
// b.guns[11].arcRange += 20 * Math.PI / 180
// } else [
// b.guns[11].lensDamageOn = 2.5 // 100% + 150%
// ]
// b.guns[11].chooseFireMethod()
// },
// remove() {
// tech.isLaserLens = false
// b.guns[11].arcRange = 90 * Math.PI / 180
// b.guns[11].chooseFireMethod()
// }
// },
// {
// name: "arc length",
// description: "increase the circular arc of your <strong class='color-laser'>laser</strong> <strong>lens</strong><br>by <strong>+<span style='font-size: 125%;'>π</span> / 4</strong>",
// isGunTech: true,
// maxCount: 3,
// count: 0,
// frequency: 2,
// frequencyDefault: 2,
// allowed() {
// return tech.isLaserLens && tech.haveGunCheck("laser")
// },
// requires: "laser gun, lens",
// effect() {
// },
// remove() {
// }
// },
{ {
name: "specular reflection", name: "specular reflection",
description: "<strong>+2</strong> <strong class='color-laser'>laser</strong> beam reflections", description: "<strong>+2</strong> <strong class='color-laser'>laser</strong> beam reflections",
@@ -6378,13 +6293,85 @@ const tech = {
b.guns[11].chooseFireMethod() b.guns[11].chooseFireMethod()
}, },
remove() { remove() {
// this.description = "<strong>laser</strong> beam is <strong>spread</strong> into your recent <strong>past</strong><br>increase total beam <strong class='color-d'>damage</strong> by <strong>300%</strong>"
if (tech.historyLaser) { if (tech.historyLaser) {
tech.historyLaser = 0 tech.historyLaser = 0
b.guns[11].chooseFireMethod() b.guns[11].chooseFireMethod()
} }
} }
}, },
{
name: "infrared diode",
description: "<strong>+50%</strong> <strong class='color-laser'>laser</strong> <strong class='color-f'>energy</strong> efficiency<br><em>infrared light is outside visual perception</em>",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return (tech.haveGunCheck("laser") || tech.isLaserBotUpgrade || tech.isLaserMine) && !tech.isPulseLaser && tech.laserDrain === 0.0018
},
requires: "laser, not free-electron",
effect() {
tech.laserDrain *= 0.5; //100%-50%
tech.laserColor = "transparent" //"rgb(255,0,20,0.02)"
// tech.laserColorAlpha = "rgba(255,0,20,0.05)"
},
remove() {
tech.laserDrain = 0.0018;
tech.laserColor = "#f02"
tech.laserColorAlpha = "rgba(255, 0, 0, 0.5)"
}
},
{
name: "dye laser",
description: "<strong>+20%</strong> <strong class='color-laser'>laser</strong> <strong class='color-f'>energy</strong> efficiency<br><strong>+20%</strong> <strong class='color-laser'>laser</strong> <strong class='color-d'>damage</strong>",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return (tech.haveGunCheck("laser") || tech.isLaserMine || tech.isLaserBotUpgrade) && !tech.isPulseLaser && tech.laserDrain === 0.0018
},
requires: "laser, not pulse, infrared diode",
effect() {
tech.laserDrain *= 0.8
tech.laserDamage *= 1 + 0.2
tech.laserColor = "rgb(0, 11, 255)"
tech.laserColorAlpha = "rgba(0, 11, 255,0.5)"
},
remove() {
tech.laserDrain = 0.0018;
tech.laserDamage = 0.18; //used in check on pulse and diode: tech.laserDamage === 0.18
tech.laserColor = "#f00"
tech.laserColorAlpha = "rgba(255, 0, 0, 0.5)"
}
},
{
name: "free-electron laser",
description: "<strong>250%</strong> <strong class='color-laser'>laser</strong> <strong class='color-f'>energy</strong> efficiency<br><strong>+190%</strong> <strong class='color-laser'>laser</strong> <strong class='color-d'>damage</strong>",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return (tech.haveGunCheck("laser") || tech.isLaserMine || tech.isLaserBotUpgrade) && !tech.isPulseLaser && tech.laserDrain === 0.0018
},
requires: "laser, not pulse, infrared diode",
effect() {
tech.laserDrain *= 1 + 2.5 //250% more drain
tech.laserDamage *= 1 + 1.9 //190% more damage
tech.laserColor = "#83f"
tech.laserColorAlpha = "rgba(136, 51, 255,0.5)"
},
remove() {
tech.laserDrain = 0.0018;
tech.laserDamage = 0.18; //used in check on pulse and diode: tech.laserDamage === 0.18
tech.laserColor = "#f00"
tech.laserColorAlpha = "rgba(255, 0, 0, 0.5)"
}
},
{ {
name: "pulse", name: "pulse",
description: "charge your <strong class='color-f'>energy</strong> and release it as a<br><strong class='color-laser'>laser</strong> pulse that initiates an <strong class='color-e'>explosion</strong> cluster", description: "charge your <strong class='color-f'>energy</strong> and release it as a<br><strong class='color-laser'>laser</strong> pulse that initiates an <strong class='color-e'>explosion</strong> cluster",
@@ -6394,7 +6381,7 @@ const tech = {
frequency: 2, frequency: 2,
frequencyDefault: 2, frequencyDefault: 2,
allowed() { allowed() {
return tech.haveGunCheck("laser") && tech.laserReflections < 3 && !tech.isWideLaser && tech.laserDamage === 0.18 && !tech.isStuckOn return tech.haveGunCheck("laser") && tech.laserReflections < 3 && !tech.isWideLaser && tech.laserDrain === 0.0018 && !tech.isStuckOn
}, },
requires: "laser gun, not specular reflection, diffuse, free-electron laser, optical amplifier", requires: "laser gun, not specular reflection, diffuse, free-electron laser, optical amplifier",
effect() { effect() {
@@ -6661,10 +6648,10 @@ const tech = {
}, },
{ {
name: "dynamic equilibrium", name: "dynamic equilibrium",
descriptionFunction() { return `increase <strong class='color-d'>damage</strong> by <strong>10%</strong><br>of your last ${tech.isEnergyHealth ? "<strong class='color-f'>energy</strong>" : "<strong class='color-h'>health</strong>"} loss` }, descriptionFunction() { return `increase <strong class='color-d'>damage</strong> by your <strong class='color-defense'>defense</strong> times<br><strong>5%</strong> of your last ${tech.isEnergyHealth ? "<strong class='color-f'>energy</strong>" : "<strong class='color-h'>health</strong>"} loss &nbsp; <em style = 'font-size:94%;'>(+${(100*tech.lastHitDamage * m.lastHit * (2 - m.harmReduction())).toFixed(0)}% damage)</em>` }, // = <strong>+${10*m.harmReduction()}%</strong>
// description: `increase <strong class='color-d'>damage</strong> by <strong>500%</strong><br>of your last <strong class='color-h'>health</strong> loss`, // descriptionFunction() { return `increase <strong class='color-d'>damage</strong> by your last ${tech.isEnergyHealth ? "<strong class='color-f'>energy</strong>" : "<strong class='color-h'>health</strong>"} loss<br><strong style = 'font-size:90%;'>(${(tech.lastHitDamage).toFixed(0)}%)(${(100*m.lastHit).toFixed(0)} ${tech.isEnergyHealth ? "<strong class='color-f'>energy</strong>" : "<strong class='color-h'>health</strong>"})(${2 - m.harmReduction()} <strong class='color-defense'>defense</strong>) = ${(100*tech.lastHitDamage * m.lastHit * (2 - m.harmReduction())).toFixed(0)}% <strong class='color-d'>damage</strong></strong> ` }, // = <strong>+${10*m.harmReduction()}%</strong>
isFieldTech: true, isFieldTech: true,
maxCount: 1, maxCount: 9,
count: 0, count: 0,
frequency: 2, frequency: 2,
frequencyDefault: 2, frequencyDefault: 2,
@@ -6673,15 +6660,15 @@ const tech = {
}, },
requires: "negative mass, pilot wave, not patch", requires: "negative mass, pilot wave, not patch",
effect() { effect() {
tech.isLastHitDamage = true; tech.lastHitDamage += 5;
}, },
remove() { remove() {
tech.isLastHitDamage = false; tech.lastHitDamage = 0;
} }
}, },
{ {
name: "neutronium", name: "neutronium",
description: `<strong>move</strong> and <strong>jump</strong> <strong>25%</strong> <strong>slower</strong><br>if your <strong class='color-f'>field</strong> is active <strong>+90%</strong> <strong class='color-defense'>defense</strong>`, description: `<strong>move</strong> and <strong>jump</strong> <strong>20%</strong> <strong>slower</strong><br>if your <strong class='color-f'>field</strong> is active <strong>+90%</strong> <strong class='color-defense'>defense</strong>`,
isFieldTech: true, isFieldTech: true,
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -6693,8 +6680,8 @@ const tech = {
requires: "negative mass, not mass-energy", requires: "negative mass, not mass-energy",
effect() { effect() {
tech.isNeutronium = true tech.isNeutronium = true
tech.baseFx *= 0.75 tech.baseFx *= 0.8
tech.baseJumpForce *= 0.75 tech.baseJumpForce *= 0.8
m.setMovement() m.setMovement()
}, },
//also removed in m.setHoldDefaults() if player switches into a bad field //also removed in m.setHoldDefaults() if player switches into a bad field
@@ -7066,7 +7053,6 @@ const tech = {
name: "plasma jet", name: "plasma jet",
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Plasma_(physics)' class="link">plasma jet</a>`, link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Plasma_(physics)' class="link">plasma jet</a>`,
description: `use ${powerUps.orb.research(2)}<br><strong>+50%</strong> <strong class='color-plasma'>plasma</strong> <strong>torch</strong> range`, description: `use ${powerUps.orb.research(2)}<br><strong>+50%</strong> <strong class='color-plasma'>plasma</strong> <strong>torch</strong> range`,
// description: "use <strong>1</strong> <strong class='color-r'>research</strong> to <br>increase <strong class='color-plasma'>plasma</strong> <strong>torch's</strong> range by <strong>50%</strong>",
isFieldTech: true, isFieldTech: true,
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -7358,7 +7344,7 @@ const tech = {
frequency: 2, frequency: 2,
frequencyDefault: 2, frequencyDefault: 2,
allowed() { allowed() {
return m.fieldUpgrades[m.fieldMode].name === "metamaterial cloaking" && !tech.isLastHitDamage && !tech.isEnergyHealth return m.fieldUpgrades[m.fieldMode].name === "metamaterial cloaking" && !tech.lastHitDamage && !tech.isEnergyHealth
}, },
requires: "metamaterial cloaking, not dynamic equilibrium, mass-energy", requires: "metamaterial cloaking, not dynamic equilibrium, mass-energy",
effect() { effect() {
@@ -7410,7 +7396,6 @@ const tech = {
{ {
name: "dynamical systems", name: "dynamical systems",
description: `use ${powerUps.orb.research(2)}<br><strong>+35%</strong> <strong class='color-d'>damage</strong>`, description: `use ${powerUps.orb.research(2)}<br><strong>+35%</strong> <strong class='color-d'>damage</strong>`,
// description: "use <strong>1</strong> <strong class='color-r'>research</strong><br>increase your <strong class='color-d'>damage</strong> by <strong>35%</strong>",
isFieldTech: true, isFieldTech: true,
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -7452,25 +7437,6 @@ const tech = {
b.setFireCD(); b.setFireCD();
} }
}, },
// {
// name: "potential well",
// description: "the force that <strong>pilot wave</strong> generates<br>to trap <strong class='color-block'>blocks</strong> is greatly increased",
// isFieldTech: true,
// maxCount: 1,
// count: 0,
// frequency: 2,
// frequencyDefault: 2,
// allowed() {
// return m.fieldUpgrades[m.fieldMode].name === "pilot wave"
// },
// requires: "pilot wave",
// effect() {
// tech.pilotForce = 0.0006
// },
// remove() {
// tech.pilotForce = 0.00002
// }
// },
{ {
name: "WIMPs", name: "WIMPs",
description: `at the end of each <strong>level</strong> spawn ${powerUps.orb.research(5)}<br> and a <strong class='color-defense'>harmful</strong> particle that slowly <strong>chases</strong> you`, description: `at the end of each <strong>level</strong> spawn ${powerUps.orb.research(5)}<br> and a <strong class='color-defense'>harmful</strong> particle that slowly <strong>chases</strong> you`,
@@ -7934,7 +7900,6 @@ const tech = {
}, },
requires: "", requires: "",
effect() { effect() {
// level.levelsCleared = 0 //increases chance of power ups spawns, so shouldn't reset
level.difficultyDecrease(simulation.difficultyMode * 2) level.difficultyDecrease(simulation.difficultyMode * 2)
level.onLevel = 0 level.onLevel = 0
simulation.clearNow = true //end current level simulation.clearNow = true //end current level
@@ -10266,7 +10231,6 @@ const tech = {
oneSuperBall: null, oneSuperBall: null,
laserReflections: null, laserReflections: null,
laserDamage: null, laserDamage: null,
laserFieldDrain: null,
isAmmoFromHealth: null, isAmmoFromHealth: null,
mobSpawnWithHealth: null, mobSpawnWithHealth: null,
isEnergyRecovery: null, isEnergyRecovery: null,
@@ -10303,7 +10267,7 @@ const tech = {
isNeutronStun: null, isNeutronStun: null,
isAnsatz: null, isAnsatz: null,
isDamageFromBulletCount: null, isDamageFromBulletCount: null,
isLaserDiode: null, laserDrain: null,
isNailShot: null, isNailShot: null,
slowFire: null, slowFire: null,
fastTime: null, fastTime: null,
@@ -10551,5 +10515,6 @@ const tech = {
isSporeColony: null, isSporeColony: null,
isExtraBotOption: null, isExtraBotOption: null,
isLastHitDamage: null, isLastHitDamage: null,
isCloakHealLastHit: null isCloakHealLastHit: null,
isRicochet: null
} }

View File

@@ -1,23 +1,24 @@
******************************************************** NEXT PATCH ************************************************** ******************************************************** NEXT PATCH **************************************************
field tech: patch - after cloaking recover 75% of last health lost using that much energy tech: ricochet - nails bounce off mobs and hit other mobs with extra damage per ricochet
taking damage now forces decloaking
field tech: dynamic equilibrium - increase damage by 5% the value of your last health loss
foam has less velocity after a mob it's stuck to dies tech: dye laser - 20% efficiency and 20% damage
snakeBoss becomes vulnerable if you remove any of the first 3 body segments laser diode renamed infrared diode
body segments have more health 40 -> 50% efficiency but you can't see the laser beam
laser-bots acquire new targets much faster
iridescence 88 -> 100% damage, a tiny bit harder to hit center of mobs
stacks up to 3 -> 9
bug fix: quantum eraser now removes mobs in a more random order dynamic equilibrium scales damage with defense
it used to have a too low chance to remove bosses goes up to 9x stacks
neutronium 25 -> 20% slower movement
revolutionBoss laser swords are much slower and shorter
but they do more damage
*********************************************************** TODO ***************************************************** *********************************************************** TODO *****************************************************
labs room: mob mechanics
low gravity zone
a button that toggles it on/off
boss mechanics
bullets hit player and stay attached for 4-5 seconds, slowing player bullets hit player and stay attached for 4-5 seconds, slowing player
hopperBullets? hopperBullets?
black hole sucker effect on tail black hole sucker effect on tail
@@ -25,10 +26,14 @@ boss mechanics
draw pair of circles at 2 different locations, like beetle wings flapping draw pair of circles at 2 different locations, like beetle wings flapping
draw as ellipse draw as ellipse
damage player if caught in wings damage player if caught in wings
vines
tech: ricochet after nails do damage, the nail fires at a different nearby mobs attached to map and grows, a series of spheres connected by vines
can reuse some targeted nail code if node dies it's removed from tree
don't target 'who' you just damaged vine do
keeps track of connection tree
nested object with nesting to show connection
spawns new nodes
draws connections as quad lines
tech: You can place an extra perfect diamagnatism field on the map tech: You can place an extra perfect diamagnatism field on the map