factory: rewrote the end

clock gating was removed because it's annoying
liquid cooling -> refrigerant - freezes mobs after losing at least 5% health
mass-energy gets more effect from defense (0.13 -> 0.19)
ternary 84 -> 77% damage
dark patterns 15 -> 17% damage and JUNK
Maxwell's demon 3% -> 1% energy loss above max
exciton 16 -> 14% chance to drop

10% increase in overall mob health
new images
bug fixes
This commit is contained in:
landgreen
2023-05-07 09:30:07 -07:00
parent e6e505809d
commit 4f87444541
25 changed files with 202 additions and 188 deletions

View File

@@ -27,15 +27,15 @@ const level = {
// m.immuneCycle = Infinity //you can't take damage
// tech.tech[297].frequency = 100
// m.couplingChange(10)
// m.setField("metamaterial cloaking") //1 standing wave 2 perfect diamagnetism 3 negative mass 4 molecular assembler 5 plasma torch 6 time dilation 7 metamaterial cloaking 8 pilot wave 9 wormhole
// m.setField("time dilation") //1 standing wave 2 perfect diamagnetism 3 negative mass 4 molecular assembler 5 plasma torch 6 time dilation 7 metamaterial cloaking 8 pilot wave 9 wormhole
// m.energy = 0
// simulation.molecularMode = 2
// m.damage(0.1);
// b.giveGuns("harpoon") //0 nail gun 1 shotgun 2 super balls 3 wave 4 missiles 5 grenades 6 spores 7 drones 8 foam 9 harpoon 10 mine 11 laser
// b.giveGuns("shotgun") //0 nail gun 1 shotgun 2 super balls 3 wave 4 missiles 5 grenades 6 spores 7 drones 8 foam 9 harpoon 10 mine 11 laser
// b.guns[3].ammo = 100000000
// tech.giveTech("accretion")
// tech.giveTech("metastability")
// tech.giveTech("Maxwells demon")
// tech.giveTech("missile-bot")
// for (let i = 0; i < 6; ++i) tech.giveTech("replication")
// for (let i = 0; i < 1; ++i) tech.giveTech("waste heat recovery")
// requestAnimationFrame(() => { for (let i = 0; i < 1; i++) tech.giveTech("foam-bot") });
@@ -44,11 +44,11 @@ const level = {
// for (let i = 0; i < 3; i++) powerUps.directSpawn(450, -50, "tech");
// for (let i = 0; i < 10; i++) powerUps.directSpawn(1750, -500, "research");
// for (let i = 0; i < 10; i++) powerUps.directSpawn(1750, -500, "coupling");
// level.underpass();
// level.factory();
// spawn.nodeGroup(3200, -300, "sniper")
// spawn.nodeGroup(2200, -300, "sniper")
// spawn.nodeGroup(2200, -300, "sniper")
// spawn.mantisBoss(1900, -500)
// spawn.shareBoss(1900, -500)
// spawn.cellBoss(1900, -500)
// for (let i = 0; i < 2; ++i) spawn.starter(1900, -500, 50)
// spawn.sneaker(1900, -500, 25)
@@ -198,7 +198,7 @@ const level = {
difficultyIncrease(num = 1) {
for (let i = 0; i < num; i++) {
simulation.difficulty++
m.dmgScale *= 0.922; //damage done by player decreases each level
m.dmgScale *= 0.9; //damage done by player decreases each level
if (simulation.accelScale < 6) simulation.accelScale *= 1.024 //mob acceleration increases each level
if (simulation.CDScale > 0.15) simulation.CDScale *= 0.964 //mob CD time decreases each level
}
@@ -209,7 +209,7 @@ const level = {
difficultyDecrease(num = 1) { //used in easy mode for simulation.reset()
for (let i = 0; i < num; i++) {
simulation.difficulty--
m.dmgScale /= 0.922; //damage done by player decreases each level
m.dmgScale /= 0.9; //damage done by player decreases each level
if (simulation.accelScale > 1) simulation.accelScale /= 1.024 //mob acceleration increases each level
if (simulation.CDScale < 1) simulation.CDScale /= 0.964 //mob CD time decreases each level
}
@@ -292,20 +292,28 @@ const level = {
if (document.getElementById("banned").value) { //remove levels from ban list in settings
const banList = document.getElementById("banned").value.replace(/,/g, ' ').replace(/\s\s+/g, ' ').replace(/[^\w\s]/g, '') //replace commas with spaces, replace double spaces with single, remove strange symbols
const remove = banList.split(" ");
console.log('remove these', remove)
console.log('community levels before', level.communityLevels)
// console.log('remove these', remove)
// console.log('community levels before', level.communityLevels)
for (let i = 0; i < remove.length; i++) {
const index = level.communityLevels.indexOf(remove[i])
if (index !== -1) level.communityLevels.splice(index, 1);
if (index !== -1) {
level.communityLevels.splice(index, 1);
// console.log('removed level:', remove[i])
requestAnimationFrame(() => { simulation.makeTextLog(`banned level: <strong style="color: '#f00';">${remove[i]}</strong>`); });
}
}
console.log('community levels after', level.communityLevels)
console.log('Landgreen levels before', level.playableLevels)
// console.log('community levels after', level.communityLevels)
// console.log('Landgreen levels before', level.playableLevels)
for (let i = 0; i < remove.length; i++) {
if (level.playableLevels.length + level.communityLevels.length * simulation.isCommunityMaps < 10) break //can't remove too many levels
const index = level.playableLevels.indexOf(remove[i])
if (index !== -1) level.playableLevels.splice(index, 1);
if (index !== -1) {
level.playableLevels.splice(index, 1);
// console.log('removed level:', remove[i])
requestAnimationFrame(() => { simulation.makeTextLog(`banned level: <strong style="color: '#f00';">${remove[i]}</strong>`); });
}
}
console.log('Landgreen levels after', level.playableLevels)
// console.log('Landgreen levels after', level.playableLevels)
}
if (document.getElementById("seed").value) { //check for player entered seed in settings
@@ -1607,15 +1615,11 @@ const level = {
pushBlock(blocks[i].bodyA)
pushBlock(blocks[i].bodyB)
}
const mobTargets = Matter.Query.collides(this, mob)
for (let i = 0; i < mobTargets.length; i++) {
pushBlock(mobTargets[i].bodyA)
pushBlock(mobTargets[i].bodyB)
}
let pushPowerUp = (who) => {
if (!who.isMover) {
if ((this.VxGoal > 0 && who.velocity.x < this.VxGoal) || (this.VxGoal < 0 && who.velocity.x > this.VxGoal)) {
@@ -3398,34 +3402,45 @@ const level = {
level.setPosToSpawn(2235, -1375); //normal spawn
spawn.mapRect(level.enter.x, level.enter.y + 20, 100, 20); //bump for level entrance
level.exit.x = 5150;
level.exit.y = -2705;
level.exit.x = 7875;
level.exit.y = -2480;
spawn.mapRect(level.exit.x, level.exit.y + 20, 100, 20); //bump for level exit
level.defaultZoom = 1800
level.defaultZoom = 1500
simulation.zoomTransition(level.defaultZoom)
document.body.style.backgroundColor = "#d8d9dc";
color.map = "#262a2f"
document.body.style.backgroundColor = "#d0d2d4s";
// color.map = "#262a2f"
let isPowerLeft = true
const movers = []
const moveSpeed = -5
movers.push(level.mover(125, -140, 925, 35, moveSpeed))
movers.push(level.mover(1100, -437, 1100, 35, moveSpeed))
movers.push(level.mover(2000, -600, 850, 35, moveSpeed))
//left side
movers.push(level.mover(125, -140, 925, 35, -5))
movers.push(level.mover(1100, -437, 1100, 35, -5))
movers.push(level.mover(2000, -600, 850, 35, -5))
//right side
const moveSpeedStopGo = 8
movers.push(level.mover(2700, -200, 3600, 35, 0))
const leftMoverSpeed = 6
movers.push(level.mover(6750, -450, 425, 350, leftMoverSpeed))
movers.push(level.mover(7675, -725, 500, 410, -leftMoverSpeed))
movers.push(level.mover(6750, -1075, 425, 50, -leftMoverSpeed))
movers.push(level.mover(5525, -1075, 450, 50, leftMoverSpeed))
movers.push(level.mover(7175, -215, 2275, 50, 3))
movers.push(level.mover(6475, -215, 275, 100, -3))
movers.push(level.mover(6725, -500, 500, 375, 3))
const trains = []
trains.push(level.transport(6275, -2100, 600, 50, 8 + simulation.difficultyMode))
trains.push(level.transport(6275, -2425, 600, 50, -8 - simulation.difficultyMode))
movers.push(level.mover(7675, -725, 500, 410, 0))
movers.push(level.mover(6775, -1075, 375, 50, 0))
movers.push(level.mover(5525, -1075, 450, 50, 0))
movers.push(level.mover(6775, -2100, 375, 50, 0))
movers.push(level.mover(5450, -1900, 525, 50, 0))
function setMoverDirection(VxGoal) {
for (let i = 7; i < movers.length; i++) {
movers[i].VxGoal = VxGoal
}
}
setMoverDirection(0)
const buttonRight = level.button(7735, -1825)
buttonRight.isUp = true
const buttonLeft = level.button(5275, -1900)
const lasers = []
const laserX = 3390 //3882 - 1130 / 2
@@ -3454,15 +3469,15 @@ const level = {
if (isPowerLeft) {
if (!(simulation.cycle % 90)) spawnBlock(2730, -1600);
} else {
for (let i = 0; i < trains.length; i++) {
//oscillate back and forth
if (trains[i].position.x < 5275) {
trains[i].changeDirection(true) //go right
} else if (trains[i].position.x > 7875) {
trains[i].changeDirection(false) //go left
}
trains[i].move();
}
// for (let i = 0; i < trains.length; i++) {
// //oscillate back and forth
// if (trains[i].position.x < 5275) {
// trains[i].changeDirection(true) //go right
// } else if (trains[i].position.x > 7875) {
// trains[i].changeDirection(false) //go left
// }
// trains[i].move();
// }
const rate = 160 //multiples of 32!
if ((simulation.cycle % rate) === 80) {
@@ -3513,6 +3528,20 @@ const level = {
}
}
}
if (buttonRight.isUp) {
buttonRight.query();
if (!buttonRight.isUp) {
buttonLeft.isUp = true //flip the other button up
setMoverDirection(-7)
}
}
if (buttonLeft.isUp) {
buttonLeft.query();
if (!buttonLeft.isUp) {
buttonRight.isUp = true //flip the other button up
setMoverDirection(7)
}
}
if (button1.isUp) {
button1.query();
@@ -3544,19 +3573,20 @@ const level = {
powerUps.addResearchToLevel() //needs to run after mobs are spawned
}
}
buttonRight.draw();
buttonLeft.draw();
button1.draw();
for (let i = 0; i < movers.length; i++) movers[i].push();
level.exit.drawAndCheck();
level.enter.draw();
ctx.fillStyle = "rgba(0,0,0,0.1)"
ctx.fillRect(6937, -1050, 50, 675);
ctx.fillRect(6937, -2075, 50, 1775); //6937, -1050, 50, 675);
ctx.fillStyle = "rgba(0,255,255,0.15)" // ctx.fillStyle = "#f2f2f2"
ctx.fillRect(4975, -3050, 475, 375); //exit room
ctx.fillRect(7675, -2875, 500, 425); //exit room
};
level.customTopLayer = () => {
if (isPowerLeft) {
ctx.fillStyle = "rgba(0,0,0,0.1)"
ctx.fillStyle = "rgba(0,0,0,0.2)"
ctx.fillRect(2400, -1650, 7050, 2750) //right side
ctx.fillRect(4950, -3075, 3225, 1425);
ctx.beginPath()
@@ -3572,7 +3602,7 @@ const level = {
ctx.lineTo(2452, 65)
ctx.fill();
} else {
for (let i = 0; i < trains.length; i++) trains[i].draw()
// for (let i = 0; i < trains.length; i++) trains[i].draw()
ctx.beginPath()
ctx.moveTo(2526, -589);
ctx.lineTo(2531, -597)
@@ -3583,14 +3613,14 @@ const level = {
ctx.lineTo(6618, 857)
ctx.lineTo(6622, 1100)
ctx.lineTo(2521, 1100)
ctx.fillStyle = "rgba(0,0,0,0.1)"
ctx.fillStyle = "rgba(0,0,0,0.2)"
ctx.fill();
ctx.fillRect(-100, -1650, 2625, 2750) //left side
for (let i = 0; i < lasers.length; i++) lasers[i].opticalQuery()
}
ctx.fillStyle = "rgba(0,0,0,0.07)"
ctx.fillRect(7675, -1825, 1775, 1650);
ctx.fillRect(4975, -1900, 475, 825);
ctx.fillRect(7675, -2200, 1775, 2025);
ctx.fillRect(4950, -2075, 500, 1000);
ctx.fillRect(2050, -1650, 350, 325) //entrance room
for (let i = 0; i < movers.length; i++) movers[i].draw();
};
@@ -3609,8 +3639,6 @@ const level = {
spawn.mapRect(4975, -1087, 550, 62);
spawn.mapRect(4975, -1100, 500, 75);
spawn.mapRect(7875, -1100, 175, 25); //right 3 hop stairs
spawn.mapRect(8075, -1450, 200, 25);
spawn.mapRect(7675, -1825, 375, 25);
@@ -3620,9 +3648,13 @@ const level = {
spawn.mapRect(4900, -1575, 175, 25);
spawn.mapRect(5125, -1900, 325, 25);
spawn.mapRect(5225, -1875, 225, 625);
spawn.mapRect(4950, -3075, 500, 1000);
//exit
spawn.mapRect(7675, -2450, 525, 250);
spawn.mapRect(7675, -3050, 550, 175);
spawn.mapRect(7675, -2925, 50, 175);
spawn.mapRect(5400, -3100, 50, 250); //exit
spawn.mapRect(4875, -2675, 675, 50); //exit
spawn.mapRect(1925, -1325, 550, 50); //entrance
spawn.mapRect(2050, -1675, 50, 175); //entrance
spawn.mapRect(1700, -200, 750, 275); //button shelf

View File

@@ -60,7 +60,7 @@ const mobs = {
function applySlow(whom) {
if (!whom.shield && !whom.isShielded && whom.alive) {
if (tech.isIceMaxHealthLoss && whom.health > 0.65 && whom.damageReduction > 0) whom.health = 0.66
if (tech.isIceMaxHealthLoss && whom.health > 0.66 && whom.damageReduction > 0) whom.health = 0.66
if (tech.isIceKill && whom.health < 0.34 && whom.damageReduction > 0 && whom.alive) {
// whom.death();
whom.damage(Infinity);

View File

@@ -546,7 +546,6 @@ const m = {
if (tech.isFieldHarmReduction) dmg *= 0.5
if (tech.isHarmMACHO) dmg *= 0.4
if (tech.isImmortal) dmg *= 0.67
if (tech.isSlowFPS) dmg *= 0.8
if (tech.energyRegen === 0) dmg *= 0.34
// if (tech.healthDrain) dmg *= 1 + 3.33 * tech.healthDrain //tech.healthDrain = 0.03 at one stack //cause more damage
if (m.fieldMode === 0 || m.fieldMode === 3) dmg *= 0.973 ** m.coupling
@@ -563,7 +562,7 @@ const m = {
if (tech.isTurret && m.crouch) dmg *= 0.34;
if (tech.isFirstDer && b.inventory[0] === b.activeGun) dmg *= 0.85 ** b.inventory.length
if (tech.isEnergyHealth) {
return Math.pow(dmg, 0.13) //defense has less effect
return Math.pow(dmg, 0.19) //defense has less effect
} else {
return dmg
}
@@ -782,26 +781,37 @@ const m = {
};
if (m.defaultFPSCycle < m.cycle) requestAnimationFrame(normalFPS);
if (tech.isSlowFPS) { // slow game
simulation.fpsCap = 30 //new fps
if (dmg > 0.05) { // freeze game for high damage hits
simulation.fpsCap = 4 //40 - Math.min(25, 100 * dmg)
simulation.fpsInterval = 1000 / simulation.fpsCap;
//how long to wait to return to normal fps
m.defaultFPSCycle = m.cycle + 20 + Math.min(90, Math.floor(200 * dmg))
if (tech.isHarmFreeze) { //freeze all mobs
for (let i = 0, len = mob.length; i < len; i++) {
mobs.statusSlow(mob[i], 450)
}
if (tech.isHarmFreeze) {
for (let i = 0, len = mob.length; i < len; i++) mobs.statusSlow(mob[i], 480) //freeze all mobs
}
} else {
if (dmg > 0.05) { // freeze game for high damage hits
simulation.fpsCap = 4 //40 - Math.min(25, 100 * dmg)
simulation.fpsInterval = 1000 / simulation.fpsCap;
} else {
simulation.fpsCap = simulation.fpsCapDefault
simulation.fpsInterval = 1000 / simulation.fpsCap;
}
m.defaultFPSCycle = m.cycle
simulation.fpsCap = simulation.fpsCapDefault
simulation.fpsInterval = 1000 / simulation.fpsCap;
}
m.defaultFPSCycle = m.cycle
// if (tech.isSlowFPS) { // slow game
// simulation.fpsCap = 30 //new fps
// simulation.fpsInterval = 1000 / simulation.fpsCap;
// //how long to wait to return to normal fps
// m.defaultFPSCycle = m.cycle + 20 + Math.min(90, Math.floor(200 * dmg))
// if (tech.isHarmFreeze) { //freeze all mobs
// for (let i = 0, len = mob.length; i < len; i++) {
// mobs.statusSlow(mob[i], 450)
// }
// }
// } else {
// if (dmg > 0.05) { // freeze game for high damage hits
// simulation.fpsCap = 4 //40 - Math.min(25, 100 * dmg)
// simulation.fpsInterval = 1000 / simulation.fpsCap;
// } else {
// simulation.fpsCap = simulation.fpsCapDefault
// simulation.fpsInterval = 1000 / simulation.fpsCap;
// }
// m.defaultFPSCycle = m.cycle
// }
// if (!noTransition) {
// document.getElementById("health").style.transition = "width 0s ease-out"
// } else {
@@ -2235,16 +2245,14 @@ const m = {
// float towards player if looking at and in range or if very close to player
if (
dist2 < m.grabPowerUpRange2 &&
(m.lookingAt(powerUp[i]) || dist2 < 1000) &&
(m.lookingAt(powerUp[i]) || dist2 < 10000) &&
Matter.Query.ray(map, powerUp[i].position, m.pos).length === 0
) {
powerUp[i].force.x += 0.04 * (dxP / Math.sqrt(dist2)) * powerUp[i].mass;
powerUp[i].force.y += 0.04 * (dyP / Math.sqrt(dist2)) * powerUp[i].mass - powerUp[i].mass * simulation.g; //negate gravity
//extra friction
Matter.Body.setVelocity(powerUp[i], {
x: powerUp[i].velocity.x * 0.11,
y: powerUp[i].velocity.y * 0.11
});
if (!tech.isHealAttract || powerUp[i].name !== "heal") { //if you have accretion heals are already pulled in a different way
powerUp[i].force.x += 0.04 * (dxP / Math.sqrt(dist2)) * powerUp[i].mass;
powerUp[i].force.y += 0.04 * (dyP / Math.sqrt(dist2)) * powerUp[i].mass - powerUp[i].mass * simulation.g; //negate gravity
Matter.Body.setVelocity(powerUp[i], { x: powerUp[i].velocity.x * 0.11, y: powerUp[i].velocity.y * 0.11 }); //extra friction
}
if ( //use power up if it is close enough
dist2 < 5000 &&
!simulation.isChoosing &&
@@ -3784,7 +3792,7 @@ const m = {
},
{
name: "metamaterial cloaking",
description: "when not firing activate <strong class='color-cloaked'>cloaking</strong><br>after <strong class='color-cloaked'>decloaking</strong> <strong>+333%</strong> <strong class='color-d'>damage</strong> for <strong>2</strong> s<br>generate <strong>6</strong> <strong class='color-f'>energy</strong> per second",
description: "<strong>+50%</strong> <strong class='color-defense'>defense</strong> while <strong class='color-cloaked'>cloaked</strong><br>after <strong class='color-cloaked'>decloaking</strong> <strong>+333%</strong> <strong class='color-d'>damage</strong> for <strong>2</strong> s<br>generate <strong>6</strong> <strong class='color-f'>energy</strong> per second",
effect: () => {
m.fieldFire = true;
m.fieldMeterColor = "#333";
@@ -3957,7 +3965,7 @@ const m = {
//<br><strong class='color-block'>blocks</strong> can't <strong>collide</strong> with <strong>intangible</strong> mobs
//field <strong>radius</strong> decreases out of <strong>line of sight</strong>
//<strong>unlock</strong> <strong class='color-m'>tech</strong> from other <strong class='color-f'>fields</strong>
description: "use <strong class='color-f'>energy</strong> to guide <strong class='color-block'>blocks</strong><br><strong class='color-m'>tech</strong>, <strong class='color-f'>fields</strong>, and <strong class='color-g'>guns</strong> have <strong>+2</strong> <strong>choice</strong><br>generate <strong>10</strong> <strong class='color-f'>energy</strong> per second",
description: "use <strong class='color-f'>energy</strong> to guide <strong class='color-block'>blocks</strong><br><strong class='color-m'>tech</strong>, <strong class='color-f'>fields</strong>, and <strong class='color-g'>guns</strong> have <strong>+2</strong> <strong>choices</strong><br>generate <strong>10</strong> <strong class='color-f'>energy</strong> per second",
effect: () => {
m.fieldMeterColor = "#333"
m.eyeFillColor = m.fieldMeterColor

View File

@@ -516,7 +516,7 @@ const powerUps = {
const overHeal = m.health + heal * simulation.healScale - m.maxHealth //used with tech.isOverHeal
const healOutput = Math.min(m.maxHealth - m.health, heal) * simulation.healScale
m.addHealth(heal);
simulation.makeTextLog(`<span class='color-var'>m</span>.health <span class='color-symbol'>+=</span> ${(healOutput).toFixed(3)}`) // <br>${m.health.toFixed(3)}
if (healOutput > 0) simulation.makeTextLog(`<span class='color-var'>m</span>.health <span class='color-symbol'>+=</span> ${(healOutput).toFixed(3)}`) // <br>${m.health.toFixed(3)}
if (tech.isOverHeal && overHeal > 0) { //tech quenching
const scaledOverHeal = overHeal * 0.9
m.damage(scaledOverHeal);
@@ -582,7 +582,6 @@ const powerUps = {
tech.healMaxEnergyBonus += 0.08 * tech.largerHeals * (tech.isHalfHeals ? 0.5 : 1)
m.setMaxEnergy();
}
},
spawn(x, y, size) { //used to spawn a heal with a specific size / heal amount, not normally used
powerUps.directSpawn(x, y, "heal", false, null, size)
@@ -1313,7 +1312,7 @@ const powerUps = {
powerUps.spawn(x, y, "coupling");
return;
}
if (tech.isBoostPowerUps && Math.random() < 0.16) {
if (tech.isBoostPowerUps && Math.random() < 0.14) {
powerUps.spawn(x, y, "boost");
return;
}

View File

@@ -765,8 +765,8 @@ const simulation = {
input.endKeySensing();
simulation.ephemera = []
b.removeAllGuns();
tech.setupAllTech(); //sets tech to default values
b.removeAllGuns();
tech.duplication = 0;
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
if (b.guns[i].name === "laser") b.guns[i].chooseFireMethod()

View File

@@ -228,7 +228,7 @@ const tech = {
// }
// }
// }
if (tech.isDivisor && b.guns[b.activeGun].ammo % 3 === 0) dmg *= 1.83
if (tech.isDivisor && b.activeGun && b.guns[b.activeGun].ammo % 3 === 0) dmg *= 1.77
if (tech.isNoGroundDamage) dmg *= m.onGround ? 0.78 : 1.88
if (tech.isDilate) dmg *= 1.5 + 0.6 * Math.sin(m.cycle * 0.0075)
if (tech.isGunChoice && tech.buffedGun === b.inventoryGun) dmg *= 1 + 0.31 * b.inventory.length
@@ -407,7 +407,7 @@ const tech = {
{
name: "mass-energy equivalence",
// description: "<strong class='color-f'>energy</strong> protects you instead of <strong class='color-h'>health</strong><br>√ of <strong class='color-defense'>defense</strong> <strong>reduction</strong> reduces max <strong class='color-f'>energy</strong>",
description: "<strong class='color-f'>energy</strong> protects you instead of <strong class='color-h'>health</strong><br>exponentially <strong>reduced</strong> <strong class='color-defense'>defense</strong> <em>(~ x^0.13)</em>",
description: "<strong class='color-f'>energy</strong> protects you instead of <strong class='color-h'>health</strong><br>exponentially <strong>reduced</strong> <strong class='color-defense'>defense</strong> <em>(~ x^0.19)</em>",
maxCount: 1,
count: 0,
frequency: 1,
@@ -542,7 +542,7 @@ const tech = {
{
name: "ternary", //"divisor",
descriptionFunction() {
return `<strong>+83%</strong> <strong class='color-d'>damage</strong> while your current <strong class='color-g'>gun</strong><br>has <strong class='color-ammo'>ammo</strong> divisible by <strong>3</strong>`
return `<strong>+77%</strong> <strong class='color-d'>damage</strong> while your current <strong class='color-g'>gun</strong><br>has <strong class='color-ammo'>ammo</strong> divisible by <strong>3</strong>`
},
maxCount: 1,
count: 0,
@@ -2475,16 +2475,16 @@ const tech = {
}
},
{
name: "liquid cooling",
description: `after losing <strong class='color-h'>health</strong><br><strong class='color-s'>freeze</strong> all mobs for <strong>7</strong> seconds`,
name: "refrigerant",
description: `after losing at least <strong>5%</strong> <strong class='color-h'>health</strong><br><strong class='color-s'>freeze</strong> all mobs for <strong>7</strong> seconds`,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
frequency: 1,
frequencyDefault: 1,
allowed() {
return tech.isSlowFPS
return true
},
requires: "clock gating",
requires: "",
effect() {
tech.isHarmFreeze = true;
},
@@ -2492,24 +2492,24 @@ const tech = {
tech.isHarmFreeze = false;
}
},
{
name: "clock gating",
description: `after losing <strong class='color-h'>health</strong> <strong>slow</strong> <strong>time</strong> by <strong>50%</strong><br><strong>+20%</strong> <strong class='color-defense'>defense</strong>`,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return simulation.fpsCapDefault > 45
},
requires: "FPS above 45",
effect() {
tech.isSlowFPS = true;
},
remove() {
tech.isSlowFPS = false;
}
},
// {
// name: "clock gating",
// description: `after losing <strong class='color-h'>health</strong> <strong>slow</strong> <strong>time</strong> by <strong>50%</strong><br><strong>+20%</strong> <strong class='color-defense'>defense</strong>`,
// maxCount: 1,
// count: 0,
// frequency: 1,
// frequencyDefault: 1,
// allowed() {
// return simulation.fpsCapDefault > 45
// },
// requires: "FPS above 45",
// effect() {
// tech.isSlowFPS = true;
// },
// remove() {
// tech.isSlowFPS = false;
// }
// },
{
name: "piezoelectricity",
@@ -2639,7 +2639,7 @@ const tech = {
},
{
name: "Maxwells demon",
description: "<strong class='color-f'>energy</strong> above your max decays <strong>96%</strong> slower<br><strong>+5%</strong> <strong class='color-junk'>JUNK</strong> to <strong class='color-m'>tech</strong> pool",
description: "<strong class='color-f'>energy</strong> above max decays by <strong style = 'text-decoration: line-through;'>30%</strong> <strong>1%</strong> per second<br><strong>+5%</strong> <strong class='color-junk'>JUNK</strong> to <strong class='color-m'>tech</strong> pool",
maxCount: 1,
count: 0,
frequency: 2,
@@ -2649,7 +2649,7 @@ const tech = {
},
requires: "energy above your max",
effect() {
tech.overfillDrain = 0.94 //70% = 1-(1-0.75)/(1-0.15) //92% = 1-(1-0.75)/(1-0.87)
tech.overfillDrain = 0.99 //70% = 1-(1-0.75)/(1-0.15) //92% = 1-(1-0.75)/(1-0.87)
this.refundAmount += tech.addJunkTechToPool(0.05)
},
refundAmount: 0,
@@ -3574,7 +3574,7 @@ const tech = {
},
{
name: "dark patterns",
description: "<strong>+15%</strong> <strong class='color-d'>damage</strong><br><strong>+15%</strong> <strong class='color-junk'>JUNK</strong> to <strong class='color-m'>tech</strong> pool",
description: "<strong>+17%</strong> <strong class='color-d'>damage</strong><br><strong>+17%</strong> <strong class='color-junk'>JUNK</strong> to <strong class='color-m'>tech</strong> pool",
maxCount: 9,
count: 0,
frequency: 1,
@@ -3583,10 +3583,10 @@ const tech = {
return true
},
requires: "",
damage: 1.15,
damage: 1.17,
effect() {
tech.damage *= this.damage
this.refundAmount += tech.addJunkTechToPool(0.15)
this.refundAmount += tech.addJunkTechToPool(0.17)
},
refundAmount: 0,
remove() {
@@ -3599,7 +3599,7 @@ const tech = {
{
name: "exciton",
descriptionFunction() {
return `<span style = 'font-size:94%;'>after mobs <strong>die</strong> they have a <strong>16%</strong> chance to<br>spawn ${powerUps.orb.boost(1)} that give <strong>+${(powerUps.boost.damage * 100).toFixed(0)}%</strong> <strong class='color-d'>damage</strong> for <strong>${(powerUps.boost.duration / 60).toFixed(0)}</strong> seconds</span>`
return `<span style = 'font-size:94%;'>after mobs <strong>die</strong> they have a <strong>14%</strong> chance to<br>spawn ${powerUps.orb.boost(1)} that give <strong>+${(powerUps.boost.damage * 100).toFixed(0)}%</strong> <strong class='color-d'>damage</strong> for <strong>${(powerUps.boost.duration / 60).toFixed(0)}</strong> seconds</span>`
},
maxCount: 1,
count: 0,
@@ -4181,8 +4181,8 @@ const tech = {
}
powerUps.spawn(m.pos.x, m.pos.y, "gun");
// powerUps.spawn(m.pos.x, m.pos.y, "gun");
tech.tech[choose].count = 0;
tech.tech[choose].remove(); // remove a random tech form the list of tech you have
// tech.tech[choose].count = 0;
tech.tech[choose].isLost = true
simulation.updateTechHUD();
},
@@ -7502,7 +7502,8 @@ const tech = {
{
name: "dynamic equilibrium",
descriptionFunction() {
return `increase <strong class='color-d'>damage</strong> by your <strong class='color-defense'>defense</strong> and<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 * Math.max(5, tech.lastHitDamage) * m.lastHit * (2 - m.defense())).toFixed(0)}% damage)</em>`
// return `increase <strong class='color-d'>damage</strong> by your <strong class='color-defense'>defense</strong> and<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 * Math.max(5, tech.lastHitDamage) * m.lastHit * (2 - m.defense())).toFixed(0)}% damage)</em>`
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> scales with <strong class='color-defense'>defense</strong> &nbsp; <em style = 'font-size:94%;'>(+${(100 * Math.max(5, tech.lastHitDamage) * m.lastHit * (2 - m.defense())).toFixed(0)}% damage)</em>`
}, // = <strong>+${10*m.defense()}%</strong>
// 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.defense()} <strong class='color-defense'>defense</strong>) = ${(100*tech.lastHitDamage * m.lastHit * (2 - m.defense())).toFixed(0)}% <strong class='color-d'>damage</strong></strong> ` }, // = <strong>+${10*m.defense()}%</strong>
isFieldTech: true,
@@ -7515,7 +7516,7 @@ const tech = {
},
requires: "negative mass, pilot wave, not patch",
effect() {
tech.lastHitDamage += 5;
tech.lastHitDamage += 4;
},
remove() {
tech.lastHitDamage = 0;