`);
},
giveTech(index = 'random') {
if (index === 'random') {
let options = [];
for (let i = 0; i < tech.tech.length; i++) {
if (tech.tech[i].count < tech.tech[i].maxCount && tech.tech[i].allowed() && !tech.tech[i].isJunk && !tech.tech[i].isLore && !tech.tech[i].isBadRandomOption) options.push(i);
}
// give a random tech from the tech I don't have
if (options.length > 0) {
let newTech = options[Math.floor(Math.random() * options.length)]
tech.giveTech(newTech)
simulation.makeTextLog(`tech.giveTech("${tech.tech[newTech].name}") //random tech`);
}
} else {
if (isNaN(index)) { //find index by name
let found = false;
for (let i = 0; i < tech.tech.length; i++) {
if (index === tech.tech[i].name) {
index = i;
found = true;
break;
}
}
if (!found) return //if name not found don't give any tech
}
if (tech.isMetaAnalysis && tech.tech[index].isJunk) {
simulation.makeTextLog(`//tech: meta-analysis replaced junk tech with random tech`);
tech.giveTech('random')
for (let i = 0; i < 2; i++) powerUps.spawn(m.pos.x + 40 * Math.random(), m.pos.y + 40 * Math.random(), "research");
return
}
if (tech.tech[index].isLost) tech.tech[index].isLost = false; //give specific tech
if (tech.isBanish && tech.tech[index].isBanished) tech.tech[index].isBanished = false //stops the bug where you can't gets stacks of tech you take with decoherence, I think
tech.tech[index].effect(); //give specific tech
tech.tech[index].count++
tech.totalCount++ //used in power up randomization
tech.countJunkTech();
simulation.updateTechHUD();
}
},
junkCount: 0,
countJunkTech() {
tech.junkCount = 0
for (let i = 0; i < tech.tech.length; i++) {
if (tech.tech[i].count > 0 && tech.tech[i].isJunk) tech.junkCount++
}
},
// setTechoNonRefundable(name) {
// for (let i = 0; i < tech.tech.length; i++) {
// if (tech.tech.name === name) {
// tech.tech[i].isNonRefundable = true;
// return
// }
// }
// },
setCheating() {
if (!simulation.isCheating) {
simulation.isCheating = true;
level.levelAnnounce();
lore.techCount = 0;
for (let i = 0, len = tech.tech.length; i < len; i++) {
if (tech.tech[i].isLore) {
tech.tech[i].frequency = 0;
tech.tech[i].count = 0;
}
}
console.log('cheating')
sound.tone(250)
sound.tone(300)
sound.tone(375)
}
},
haveGunCheck(name, needActive = true) {
// if (
// !build.isExperimentSelection &&
// b.inventory.length > 2 &&
// name !== b.guns[b.activeGun].name &&
// Math.random() > 2 - b.inventory.length * 0.5
// ) {
// return false
// }
// for (i = 0, len = b.inventory.length; i < len; i++) {
// if (b.guns[b.inventory[i]].name === name) return true
// }
// return false
if (build.isExperimentSelection || !needActive) {
for (i = 0, len = b.inventory.length; i < len; i++) {
if (b.guns[b.inventory[i]].name === name) return true
}
return false
} else { //must be holding gun, this is the standard while playing
return b.inventory.length > 0 && b.guns[b.activeGun].name === name
}
},
hasExplosiveDamageCheck() {
return tech.haveGunCheck("missiles") || (m.fieldMode === 4 && simulation.molecularMode === 1) || tech.missileBotCount > 0 || tech.isBoomBotUpgrade || tech.isIncendiary || tech.isPulseLaser || tech.isTokamak || (tech.haveGunCheck("grenades") && !tech.isNeutronBomb)
},
damage: 1, //used for tech changes to player damage that don't have complex conditions
damageFromTech() {
let dmg = tech.damage //m.fieldDamage
// if (tech.isDivisor) {
// for (let i = 0; i < b.inventory.length; i++) {
// if (b.guns[b.inventory[i]].ammo % 3 === 0) {
// dmg *= 1.44
// break
// }
// }
// }
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
if (powerUps.boost.endCycle > m.cycle) dmg *= 1 + powerUps.boost.damage
if (m.coupling && (m.fieldMode === 0 || m.fieldMode === 5)) dmg *= 1 + 0.015 * m.coupling
if (m.isSneakAttack && m.sneakAttackCycle + Math.min(120, 0.5 * (m.cycle - m.enterCloakCycle)) > m.cycle) dmg *= 4.33 * (1 + 0.033 * m.coupling)
if (tech.deathSkipTime) dmg *= 1 + 0.6 * tech.deathSkipTime
if (tech.isTechDebt) dmg *= tech.totalCount > 20 ? Math.pow(0.85, tech.totalCount - 20) : 4 - 0.15 * tech.totalCount // if (tech.isTechDebt) dmg *= Math.min(Math.pow(0.85, tech.totalCount - 20), 4 - 0.15 * tech.totalCount)
if (tech.isFlipFlopDamage && tech.isFlipFlopOn) dmg *= 1.555
if (tech.isAnthropicDamage && tech.isDeathAvoidedThisLevel) dmg *= 2.3703599
if (tech.isDupDamage) dmg *= 1 + Math.min(1, tech.duplicationChance())
if (tech.isDamageForGuns) dmg *= 1 + 0.22 * Math.max(0, b.inventory.length - 1)
if (tech.isOneGun && b.inventory.length < 2) dmg *= 1.25
if (tech.isAcidDmg && m.health > 1) dmg *= 1.35;
if (tech.isRerollDamage) dmg *= 1 + Math.max(0, 0.03 * powerUps.research.count)
if (tech.isBotDamage) dmg *= 1 + 0.06 * b.totalBots()
if (tech.restDamage > 1 && player.speed < 1) dmg *= tech.restDamage
if (tech.isLowEnergyDamage) dmg *= 1 + 0.7 * Math.max(0, 1 - m.energy)
if (tech.energyDamage) dmg *= 1 + m.energy * 0.22 * tech.energyDamage;
if (tech.isDamageFromBulletCount) dmg *= 1 + bullet.length * 0.007
if (tech.isNoFireDamage && m.cycle > m.fireCDcycle + 120) dmg *= 2
if (tech.isSpeedDamage) dmg *= 1 + Math.min(0.66, player.speed * 0.0165)
if (tech.isDamageAfterKillNoRegen && m.lastKillCycle + 300 > m.cycle) dmg *= 1.83
if (tech.isAxion && tech.isHarmMACHO) dmg *= 2 - m.defense()
if (tech.isHarmDamage && m.lastHarmCycle + 480 > m.cycle) dmg *= 3;
if (tech.lastHitDamage && m.lastHit) dmg *= 1 + tech.lastHitDamage * m.lastHit * (2 - m.defense()) // if (!simulation.paused) m.lastHit = 0
if (tech.isLowHealthDmg) dmg *= 1 + 0.7 * Math.max(0, 1 - (tech.isEnergyHealth ? m.energy : m.health))
return dmg
},
duplicationChance() {
return Math.min(1, Math.max(0, (tech.isPowerUpsVanish ? 0.13 : 0) + (tech.isStimulatedEmission ? 0.17 : 0) + tech.duplication + tech.duplicateChance + 0.05 * tech.isExtraGunField + m.duplicateChance + tech.fieldDuplicate + 0.08 * tech.isDuplicateMobs + tech.cloakDuplication + (tech.isAnthropicTech && tech.isDeathAvoidedThisLevel ? 0.5 : 0)))
},
isScaleMobsWithDuplication: false,
maxDuplicationEvent() {
if (tech.is100Duplicate && tech.duplicationChance() > 0.99) {
tech.is100Duplicate = false
const range = 1300
tech.isScaleMobsWithDuplication = true
for (let i = 0, len = 9; i < len; i++) {
const angle = 2 * Math.PI * i / len
spawn.randomLevelBoss(m.pos.x + range * Math.cos(angle), m.pos.y + range * Math.sin(angle), spawn.nonCollideBossList);
}
spawn.historyBoss(0, 0)
spawn.pulsarBoss(level.exit.x, level.exit.y, 70, true)
spawn.blockBoss(level.enter.x, level.enter.y)
tech.isScaleMobsWithDuplication = false
}
},
setTechFrequency(name, frequency) {
for (let i = 0, len = tech.tech.length; i < len; i++) {
if (tech.tech[i].name === name) tech.tech[i].frequency = frequency
}
},
setBotTechFrequency(f = 0) {
for (let i = 0, len = tech.tech.length; i < len; i++) {
if (tech.tech[i].isBotTech) {
switch (tech.tech[i].name) {
case "dynamo-bot":
tech.tech[i].frequency = f
break;
case "orbital-bot":
tech.tech[i].frequency = f
break;
case "laser-bot":
tech.tech[i].frequency = f
break;
case "boom-bot":
tech.tech[i].frequency = f
break;
case "foam-bot":
tech.tech[i].frequency = f
break;
case "nail-bot":
tech.tech[i].frequency = f
break;
}
}
}
},
tech: [{
name: "tungsten carbide",
description: "+222 maximum health
lose health after hard landings",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
isSkin: true,
allowed() {
return !m.isAltSkin
},
requires: "not skin",
effect() {
tech.hardLanding = 70
tech.isFallingDamage = true;
m.setMaxHealth();
m.addHealth(2.22 / simulation.healScale)
m.skin.tungsten()
},
remove() {
tech.hardLanding = 130
tech.isFallingDamage = false;
m.setMaxHealth();
if (this.count) m.resetSkin();
}
},
{
name: "nitinol",
description: "+33% movement and jumping
+22% defense",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
isSkin: true,
allowed() {
return !m.isAltSkin
},
requires: "not skinned",
effect() {
m.skin.mech();
tech.hardLanding = 110
tech.squirrelFx += 0.4;
tech.squirrelJump += 0.16;
m.setMovement()
},
remove() {
tech.hardLanding = 130
tech.squirrelFx = 1;
tech.squirrelJump = 1;
m.setMovement()
if (this.count) m.resetSkin();
}
},
{
name: "aperture",
description: "every 6 seconds your damage cycles
between -10% and +110% damage",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
isSkin: true,
allowed() {
return !m.isAltSkin
},
requires: "not skinned",
effect() {
tech.isDilate = true
m.skin.dilate()
},
remove() {
tech.isDilate = false
if (this.count) m.resetSkin();
}
},
{
name: "diaphragm",
description: "every 6 seconds your defense cycles
between +8% and +80% defense",
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
isSkin: true,
allowed() {
return tech.isDilate
},
requires: "aperture",
effect() {
tech.isDiaphragm = true
m.resetSkin();
m.skin.dilate2()
},
remove() {
tech.isDiaphragm = false
if (this.count) m.resetSkin();
}
},
{
name: "mass-energy equivalence",
// description: "energy protects you instead of health
√ of defense reduction reduces max energy",
description: "energy protects you instead of health
exponentially reduced defense (~ x^0.19)",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
isSkin: true,
allowed() {
return !m.isAltSkin && !tech.isPiezo && !tech.isRewindAvoidDeath && !tech.isAnnihilation //&& !tech.isAmmoFromHealth && !tech.isRewindGun
},
requires: "not piezoelectricity, CPT, annihilation",
effect() {
m.health = 0
document.getElementById("health").style.display = "none"
document.getElementById("health-bg").style.display = "none"
document.getElementById("dmg").style.backgroundColor = "#0cf";
tech.isEnergyHealth = true;
simulation.mobDmgColor = "rgba(0, 255, 255,0.6)" //"#0cf"
m.displayHealth();
m.lastCalculatedDefense = 0 //this triggers a redraw of the defense bar
m.skin.energy();
},
remove() {
if (tech.isEnergyHealth) {
tech.isEnergyHealth = false;
document.getElementById("health").style.display = "inline"
document.getElementById("health-bg").style.display = "inline"
document.getElementById("dmg").style.backgroundColor = "#f67";
m.health = Math.max(Math.min(m.maxHealth, m.energy), 0.1);
simulation.mobDmgColor = "rgba(255,0,0,0.7)"
m.displayHealth();
m.lastCalculatedDefense = 0 //this triggers a redraw of the defense bar
m.resetSkin();
}
tech.isEnergyHealth = false;
}
},
{
name: "1st ionization energy",
link: `1st ionization energy`,
// description: `after you collect ${powerUps.orb.heal()}
+${0.1 * tech.largerHeals} maximum energy`,
// descriptionFunction: `convert current and future ${powerUps.orb.heal()} into
give +${10 * tech.largerHeals} maximum energy`,
descriptionFunction() {
return `convert current and future into
give +${8 * tech.largerHeals * (tech.isHalfHeals ? 0.5 : 1)} maximum energy`
},
maxCount: 1,
count: 0,
frequency: 4,
frequencyDefault: 4,
allowed() {
return tech.isEnergyHealth
},
requires: "mass-energy equivalence",
effect() {
powerUps.healGiveMaxEnergy = true; //tech.healMaxEnergyBonus given from heal power up
powerUps.heal.color = "#ff0" //"#0ae"
for (let i = 0; i < powerUp.length; i++) { //find active heal power ups and adjust color live
if (powerUp[i].name === "heal") powerUp[i].color = powerUps.heal.color
}
},
remove() {
powerUps.healGiveMaxEnergy = false;
// tech.healMaxEnergyBonus = 0
powerUps.heal.color = "#0eb"
for (let i = 0; i < powerUp.length; i++) { //find active heal power ups and adjust color live
if (powerUp[i].name === "heal") powerUp[i].color = powerUps.heal.color
}
}
},
{
name: "CPT symmetry",
// description: "charge, parity, and time invert to undo defense
rewind (1.5—5) seconds for (66—220) energy",
// description: "after losing health, if you have full energy
rewind time for 44 energy per second",
descriptionFunction() {
return `after losing health, if you have ${(100 * Math.min(100, m.maxEnergy)).toFixed(0)} energy
rewind time for 20 energy per second`
},
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
isSkin: true,
allowed() {
return !m.isAltSkin && m.fieldUpgrades[m.fieldMode].name !== "standing wave" && !tech.isRewindField && !tech.isEnergyHealth
},
requires: "not skinned, standing wave, max energy reduction, retrocausality, mass-energy",
effect() {
tech.isRewindAvoidDeath = true;
m.skin.CPT()
},
remove() {
tech.isRewindAvoidDeath = false;
if (this.count) m.resetSkin();
}
},
{
name: "causality bots",
link: `causality bots`,
description: "when you rewind build scrap bots
that protect you for about 9 seconds",
maxCount: 3,
count: 0,
frequency: 2,
frequencyDefault: 2,
isBotTech: true,
allowed() {
return tech.isRewindAvoidDeath || tech.isRewindField
},
requires: "CPT, retrocausality",
effect() {
tech.isRewindBot++;
},
remove() {
tech.isRewindBot = 0;
}
},
{
name: "causality bombs",
link: `causality bombs`,
description: "when you rewind drop several grenades", //
become invulnerable until they explode
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.isRewindAvoidDeath || tech.isRewindField
},
requires: "CPT, retrocausality",
effect() {
tech.isRewindGrenade = true;
},
remove() {
tech.isRewindGrenade = false;
}
},
{
name: "ternary", //"divisor",
descriptionFunction() {
return `+77% damage while your current gun
has ammo divisible by 3`
},
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed: () => true,
requires: "",
// divisible: 3, // + Math.floor(6 * Math.random()),
effect() {
tech.isDivisor = true;
},
remove() {
tech.isDivisor = false;
}
},
{
name: "ordnance",
description: "double the frequency of finding guntech
spawn a gun and +7% JUNK to tech pool",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
isNonRefundable: true,
isBadRandomOption: true,
allowed: () => true,
requires: "",
effect() {
powerUps.spawn(m.pos.x, m.pos.y, "gun");
for (let i = 0, len = tech.tech.length; i < len; i++) {
if (tech.tech[i].isGunTech) tech.tech[i].frequency *= 2
}
this.refundAmount += tech.addJunkTechToPool(0.07)
},
refundAmount: 0,
remove() {
if (this.count > 0 && this.refundAmount > 0) {
tech.removeJunkTechFromPool(this.refundAmount)
this.refundAmount = 0
}
}
},
{
name: "ad hoc",
descriptionFunction() {
return `spawn a ${powerUps.orb.heal()}, ${powerUps.orb.research(1)}, ${powerUps.orb.ammo(1)}, field, gun, or tech
for each of your guns`
},
maxCount: 1, //random power up
count: 0,
frequency: 1,
frequencyDefault: 1,
isNonRefundable: true,
allowed() {
return b.inventory.length > 1
},
requires: "at least 2 guns",
effect() {
for (let i = 0; i < b.inventory.length; i++) {
if (Math.random() < 1 / 6) {
powerUps.spawn(m.pos.x + 10 * Math.random(), m.pos.y + 10 * Math.random(), "gun");
} else if (Math.random() < 1 / 5) {
powerUps.spawn(m.pos.x + 10 * Math.random(), m.pos.y + 10 * Math.random(), "tech");
} else if (Math.random() < 1 / 4) {
powerUps.spawn(m.pos.x + 10 * Math.random(), m.pos.y + 10 * Math.random(), "field");
} else if (Math.random() < 1 / 3) {
powerUps.spawn(m.pos.x + 10 * Math.random(), m.pos.y + 10 * Math.random(), "heal");
} else if (Math.random() < 1 / 2) {
powerUps.spawn(m.pos.x + 10 * Math.random(), m.pos.y + 10 * Math.random(), "ammo");
} else {
powerUps.spawn(m.pos.x + 10 * Math.random(), m.pos.y + 10 * Math.random(), "research");
}
}
},
remove() { }
},
{
name: "applied science",
description: `get a random guntech
for each of your guns`, //spawn ${powerUps.orb.research(1)} and
maxCount: 9,
count: 0,
isNonRefundable: true,
frequency: 2,
frequencyDefault: 2,
allowed() {
return b.inventory.length > 1
},
requires: "at least 2 guns",
effect() {
for (let i = b.inventory.length - 1; i > -1; i--) { //backwards because some tech can remove or add guns
const gunTechPool = [] //find gun tech for this gun
for (let j = 0, len = tech.tech.length; j < len; j++) {
// console.log(j, tech.tech[j].isGunTech, tech.tech[j].allowed(), !tech.tech[j].isJunk, !tech.tech[j].isBadRandomOption, tech.tech[j].count < tech.tech[j].maxCount)
const originalActiveGunIndex = b.activeGun //set current gun to active so allowed works
b.activeGun = b.inventory[i] //to make the .allowed work for guns that aren't active
if (tech.tech[j].isGunTech && tech.tech[j].allowed() && !tech.tech[j].isJunk && !tech.tech[j].isBadRandomOption && tech.tech[j].count < tech.tech[j].maxCount) {
const regex = tech.tech[j].requires.search(b.guns[b.inventory[i]].name) //get string index of gun name
const not = tech.tech[j].requires.search(' not ') //get string index of ' not '
if (regex !== -1 && (not === -1 || not > regex)) gunTechPool.push(j) //look for the gun name in the requirements, but the gun name needs to show up before the word ' not '
}
b.activeGun = originalActiveGunIndex
if (!b.guns[b.activeGun].have) {
if (b.inventory.length === 0) {
b.activeGun = null
} else {
b.activeGun = b.inventory[0]
}
b.inventoryGun = 0;
}
}
if (gunTechPool.length) {
const index = Math.floor(Math.random() * gunTechPool.length)
tech.giveTech(gunTechPool[index]) // choose from the gun pool
tech.tech[gunTechPool[index]].isFromAppliedScience = true //makes it not remove properly under paradigm shift
simulation.makeTextLog(`tech.giveTech("${tech.tech[gunTechPool[index]].name}")`, 360)
}
}
simulation.boldActiveGunHUD();
},
remove() { }
},
{
name: "arsenal",
descriptionFunction() {
return `+22% damage per unequipped gun (${(22 * Math.max(0, b.inventory.length - 1)).toFixed(0)}%)`
},
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed: () => b.inventory.length > 1,
requires: "at least 2 guns",
effect() {
tech.isDamageForGuns = true;
},
remove() {
tech.isDamageForGuns = false;
}
},
{
name: "active cooling",
descriptionFunction() {
return `+28% fire rate per unequipped gun (${(28 * Math.max(0, b.inventory.length - 1)).toFixed(0)}%)`
}, //
but not including your equipped gun` },
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed: () => b.inventory.length > 1,
requires: "at least 2 guns",
effect() {
tech.isFireRateForGuns = true;
b.setFireCD();
},
remove() {
tech.isFireRateForGuns = false;
b.setFireCD();
}
},
{
name: "pigeonhole principle",
descriptionFunction() {
let info = ""
if (this.count > 0 && Number.isInteger(tech.buffedGun) && b.inventory.length) {
let gun = b.guns[b.inventory[tech.buffedGun]].name
info = `
this level: +${(31 * Math.max(0, b.inventory.length)).toFixed(0)}% damage for ${gun}`
}
return `
a new gun is chosen to be improved each level
+31% damage per gun for the chosen gun${info}`
},
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return b.inventory.length > 1
},
requires: "at least 2 guns",
effect() {
tech.isGunChoice = true
//switches gun on new level
//generalist uses the same chosen gun so they match
},
remove() {
tech.isGunChoice = false;
}
},
{
name: "generalist",
description: "spawn 7 guns, but you can't switch guns
your equipped gun cycles after each level",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
isNonRefundable: true,
isBadRandomOption: true,
allowed() {
return b.inventory.length < b.guns.length - 5 && b.inventory.length > 1
},
requires: "at least 2 guns, at least 5 unclaimed guns",
effect() {
tech.isGunCycle = true;
for (let i = 0; i < 7; i++) powerUps.spawn(m.pos.x + 10 * Math.random(), m.pos.y + 10 * Math.random(), "gun");
},
remove() {
if (!this.count) tech.isGunCycle = false; // only set to false if you don't have this tech
// if (tech.isGunCycle) {
// for (let i = 0; i < 8; i++) {
// if (b.inventory.length) b.removeGun(b.guns[b.inventory[b.inventory.length - 1]].name) //remove your last gun
// }
// tech.isGunCycle = false;
// }
}
},
{
name: "supply chain",
descriptionFunction() {
return `double your current ammo
+4% JUNK to tech pool`
},
maxCount: 9,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return true
},
requires: "",
effect() {
for (let i = 0; i < b.guns.length; i++) {
if (b.guns[i].have) b.guns[i].ammo = Math.floor(2 * b.guns[i].ammo)
}
simulation.makeGunHUD();
this.refundAmount += tech.addJunkTechToPool(0.04)
},
refundAmount: 0,
remove() {
for (let j = 0; j < this.count; j++) {
for (let i = 0; i < b.guns.length; i++) {
if (b.guns[i].have) b.guns[i].ammo = Math.floor(0.5 * b.guns[i].ammo)
}
}
simulation.makeGunHUD();
if (this.count > 0 && this.refundAmount > 0) {
tech.removeJunkTechFromPool(this.refundAmount)
this.refundAmount = 0
}
}
},
{
name: "logistics",
description: `${powerUps.orb.ammo()} give 80% more ammo, but
it's only added to your current gun`,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return !tech.isEnergyNoAmmo
},
requires: "not non-renewables",
effect() {
tech.isAmmoForGun = true;
},
remove() {
tech.isAmmoForGun = false;
}
},
{
name: "cache",
link: `cache`,
description: `${powerUps.orb.ammo()} give 1500% more ammo, but
you can't store any more ammo than that`,
// ammo powerups always max out your gun,
// but the maximum ammo ti limited
// description: `${powerUps.orb.ammo()} give 13x more ammo, but
you can't store any more ammo than that`,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return !tech.isEnergyNoAmmo
},
requires: "not non-renewables",
effect() {
tech.ammoCap = 15;
powerUps.ammo.effect()
},
remove() {
tech.ammoCap = 0;
}
},
{
name: "catabolism",
descriptionFunction() {
return `if you fire while out of ammo
spawn ${powerUps.orb.ammo(4)} and ${tech.isEnergyHealth ? "–4 maximum energy" : "–2 maximum health"}`
},
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return !tech.isEnergyNoAmmo
},
requires: "not non-renewables",
effect() {
tech.isAmmoFromHealth = true;
},
remove() {
tech.isAmmoFromHealth = false;
}
},
{
name: "non-renewables",
description: `+78% damage
${powerUps.orb.ammo()} can't spawn`,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return !tech.isAmmoFromHealth && !tech.isBoostReplaceAmmo
},
requires: "not catabolism, quasiparticles",
damage: 1.78,
effect() {
tech.damage *= this.damage
tech.isEnergyNoAmmo = true;
},
remove() {
if (this.count) tech.damage /= this.damage
tech.isEnergyNoAmmo = false;
}
},
{
name: "desublimated ammunition",
link: `desublimated ammunition`,
description: `if crouching
alternating shots use no ammo`,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed: () => true,
requires: "",
effect() {
tech.crouchAmmoCount = true
},
remove() {
tech.crouchAmmoCount = false;
}
},
{
name: "gun turret",
description: "if crouching
+66% defense ",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return true
},
requires: "",
effect() {
tech.isTurret = true
},
remove() {
tech.isTurret = false;
}
},
{
name: "dead reckoning",
description: "if your speed is 0
+50% damage",
maxCount: 9,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return true
},
requires: "",
effect() {
tech.restDamage += 0.5
},
remove() {
tech.restDamage = 1;
}
},
{
name: "kinetic bombardment",
description: "far away mobs take more damage
up to +33% damage at 3000 displacement",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return true
},
requires: "",
effect() {
tech.isFarAwayDmg = true; //used in mob.damage()
},
remove() {
tech.isFarAwayDmg = false;
}
},
{
name: "Higgs mechanism",
description: "+45% fire rate
while firing your position is fixed",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return !m.isShipMode && !tech.isAlwaysFire, !tech.isGrapple
},
requires: "not ship mode, automatic, grappling hook",
effect() {
tech.isFireMoveLock = true;
b.setFireCD();
b.setFireMethod();
},
remove() {
if (tech.isFireMoveLock) {
tech.isFireMoveLock = false
b.setFireCD();
b.setFireMethod();
}
}
},
{
name: "integrated armament",
link: `integrated armament`,
description: `+25% damage, but new guns replace
your current gun and convert guntech`,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return b.inventory.length === 1
},
requires: "only 1 gun",
effect() {
tech.isOneGun = true;
},
remove() {
tech.isOneGun = false;
}
},
{
name: "mechatronics",
descriptionFunction() {
let damageTotal = 1
for (let i = 0; i < this.damageSoFar.length; i++) damageTotal *= this.damageSoFar[i]
let currentDamage = ""
if (this.count) currentDamage = `
(+${(100 * (damageTotal - 1)).toFixed(0)}%)`
return `gain between +7% and +13% damage` + currentDamage
},
maxCount: 9,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() { return true },
requires: "",
damage: 1.1,
damageSoFar: [], //tracks the random damage upgrades so it can be removed and in descriptionFunction
effect() {
const damage = (Math.floor((Math.random() * 0.07 + 0.07 + 1) * 100)) / 100
tech.damage *= damage
this.damageSoFar.push(damage)
},
remove() {
for (let i = 0; i < this.damageSoFar.length; i++) tech.damage /= this.damageSoFar[i]
this.damageSoFar.length = 0
}
},
// {
// name: "coyote",
// description: "",
// maxCount: 1,
// count: 0,
// frequency: 1,
// frequencyDefault: 1,
// allowed() { return true },
// requires: "",
// effect() { // good with melee builds, content skipping builds
// tech.coyoteTime = 120
// // simulation.gravity = function() {
// // function addGravity(bodies, magnitude) {
// // for (var i = 0; i < bodies.length; i++) {
// // bodies[i].force.y += bodies[i].mass * magnitude;
// // }
// // }
// // if (!m.isBodiesAsleep) {
// // addGravity(powerUp, simulation.g);
// // addGravity(body, simulation.g);
// // }
// // player.force.y += player.mass * simulation.g
// // }
// },
// remove() {
// tech.coyoteTime = 5
// }
// },
{
name: "Newtons 1st law",
description: "defense is proportional to your speed
up to +66% defense at 40 speed",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return true
},
requires: "",
effect() {
tech.isSpeedHarm = true //max at speed = 40
},
remove() {
tech.isSpeedHarm = false
}
},
{
name: "Newtons 2nd law",
description: "damage is proportional to your speed
up to +66% damage at 40 speed",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return true
},
requires: "",
effect() {
tech.isSpeedDamage = true //max at speed = 40
},
remove() {
tech.isSpeedDamage = false
}
},
{
name: "microstates",
link: `microstates`,
description: "for each active bullet or bot
+0.7% damage",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return true
},
requires: "",
effect() {
tech.isDamageFromBulletCount = true
},
remove() {
tech.isDamageFromBulletCount = false
}
},
{
name: "regression",
description: "bullet collisions increase vulnerability to
damage by +5% for mobs (+0.25% for bosses)",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return true
},
requires: "",
effect() {
tech.isLessDamageReduction = true
},
remove() {
tech.isLessDamageReduction = false
}
},
{
name: "simulated annealing",
description: "+20% damage
–20% fire rate",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return true
},
damage: 1.2,
effect() {
tech.damage *= this.damage
tech.slowFire = 1.2
b.setFireCD();
},
remove() {
if (this.count) tech.damage /= this.damage
tech.slowFire = 1;
b.setFireCD();
}
},
{
name: "heuristics",
description: "+22% fire rate
spawn a gun",
maxCount: 9,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return true
},
requires: "",
effect() {
tech.fireRate *= 0.78
b.setFireCD();
powerUps.spawn(m.pos.x, m.pos.y, "gun");
},
remove() {
tech.fireRate = 1;
b.setFireCD();
}
},
{
name: "anti-shear topology",
link: `anti-shear topology`,
description: "your bullets last +30% longer", //
drone spore worm flea missile foam wave neutron ice",
maxCount: 3,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed: () => true,
requires: "",
effect() {
tech.bulletsLastLonger += 0.3
},
remove() {
tech.bulletsLastLonger = 1;
}
},
{
name: "fracture analysis",
description: "if a mob is stunned it takes
+400% damage from bullet impacts",
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.isStunField || tech.oneSuperBall || tech.isCloakStun || tech.isOrbitBotUpgrade || tech.isStun
},
requires: "a stun effect",
effect() {
tech.isCrit = true;
},
remove() {
tech.isCrit = false;
}
},
{
name: "shear stress",
description: "after mobs die
they fire a nail at nearby mobs",
maxCount: 9,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return !tech.sporesOnDeath && !tech.isExplodeMob && !tech.botSpawner && !tech.isMobBlockFling && !tech.iceIXOnDeath
},
requires: "no other mob death tech",
effect() {
tech.nailsDeathMob++
},
remove() {
tech.nailsDeathMob = 0;
}
},
{
name: "thermal runaway",
description: "after mobs die
they explode",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return !tech.sporesOnDeath && !tech.nailsDeathMob && !tech.botSpawner && !tech.isMobBlockFling && !tech.iceIXOnDeath
},
requires: "no other mob death tech",
effect() {
tech.isExplodeMob = true;
},
remove() {
tech.isExplodeMob = false;
}
},
{
name: "zoospore vector",
link: `zoospore vector`,
descriptionFunction() {
return `after mobs die there is a +10% chance
they grow ${b.guns[6].nameString('s')}`
},
// description: "after mobs die
they have a +10% chance to grow spores",
maxCount: 9,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return !tech.nailsDeathMob && !tech.isExplodeMob && !tech.botSpawner && !tech.isMobBlockFling && !tech.iceIXOnDeath
},
requires: "no other mob death tech",
effect() {
tech.sporesOnDeath += 0.1;
// if (tech.isSporeWorm) {
// for (let i = 0; i < 4; i++) b.worm(m.pos)
// } else {
// for (let i = 0; i < 8; i++) b.spore(m.pos)
// }
},
remove() {
tech.sporesOnDeath = 0;
}
},
{
name: "propagator",
description: "after mobs die advance time 0.5 seconds
+60% damage",
maxCount: 3,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed: () => true,
requires: "",
effect() {
tech.deathSkipTime++
},
remove() {
tech.deathSkipTime = 0
}
},
{
name: "collider",
descriptionFunction() {
return `after mobs die there is a +50% chance to
collide power ups to form different power ups`
// return `after mobs die there is a +33% chance to convert
${powerUps.orb.heal()}, ${powerUps.orb.ammo()}, ${powerUps.orb.research(1)}, tech, field, gun into other types`
},
maxCount: 2,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed: () => true,
requires: "",
effect() {
tech.collidePowerUps += 0.5
},
remove() {
tech.collidePowerUps = 0
}
},
{
name: "bubble fusion",
descriptionFunction() {
return `after destroying a mob's natural shield
spawn 1-2 ${powerUps.orb.heal()}, ${powerUps.orb.ammo()}, or ${powerUps.orb.research(1)}`
},
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
isHealTech: true,
allowed() {
return true
},
requires: "",
effect() {
tech.isShieldAmmo = true;
},
remove() {
tech.isShieldAmmo = false;
}
},
{
name: "reaction inhibitor",
description: "-11% maximum mob health", //health
maxCount: 3,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return true //tech.nailsDeathMob || tech.sporesOnDeath || tech.isExplodeMob || tech.botSpawner || tech.isMobBlockFling || tech.iceIXOnDeath
},
requires: "", //"any mob death tech",
effect() {
tech.mobSpawnWithHealth++
mobs.setMobSpawnHealth()
//set all mobs at full health to 0.85
for (let i = 0; i < mob.length; i++) {
if (mob.health > mobs.mobSpawnWithHealth) mob.health = mobs.mobSpawnWithHealth
}
},
remove() {
tech.mobSpawnWithHealth = 0
mobs.setMobSpawnHealth()
}
},
{
name: "scrap bots",
link: `scrap bots`,
description: "after mobs die you have a +33% chance
to build scrap bots that operate for 13 seconds",
maxCount: 3,
count: 0,
frequency: 1,
frequencyDefault: 1,
isBotTech: true,
allowed() {
return !tech.sporesOnDeath && !tech.nailsDeathMob && !tech.isExplodeMob && !tech.isMobBlockFling && !tech.iceIXOnDeath
},
requires: "no other mob death tech",
effect() {
tech.botSpawner += 0.33;
},
remove() {
tech.botSpawner = 0;
}
},
{
name: "scrap refit",
link: `scrap refit`,
description: "after mobs die
reset scrap bots to 13 seconds of operation",
maxCount: 1,
count: 0,
frequency: 3,
frequencyDefault: 3,
isBotTech: true,
allowed() {
return tech.botSpawner
},
requires: "scrap bots",
effect() {
tech.isBotSpawnerReset = true;
},
remove() {
tech.isBotSpawnerReset = false;
}
},
{
name: "nail-bot",
link: `nail-bot`,
description: "a bot fires nails at mobs in line of sight",
maxCount: 9,
count: 0,
frequency: 1,
frequencyDefault: 1,
isBot: true,
isBotTech: true,
allowed() {
return true
},
requires: "",
effect() {
tech.nailBotCount++;
b.nailBot();
},
remove() {
if (this.count) {
tech.nailBotCount -= this.count;
b.clearPermanentBots();
b.respawnBots();
}
}
},
{
name: "nail-bot upgrade",
link: `nail-bot upgrade`,
description: "convert your bots to nail-bots
+500% fire rate and +40% nail velocity",
maxCount: 1,
count: 0,
frequency: 3,
frequencyDefault: 3,
isBotTech: true,
allowed() {
return tech.nailBotCount > 1 && !b.hasBotUpgrade()
},
requires: "2 or more nail bots and no other bot upgrade",
effect() {
tech.isNailBotUpgrade = true
b.convertBotsTo("nail-bot")
for (let i = 0; i < bullet.length; i++) {
if (bullet[i].botType === 'nail') bullet[i].isUpgraded = true
}
tech.setBotTechFrequency()
tech.setTechFrequency("nail-bot", 5)
},
remove() {
if (this.count) {
for (let i = 0; i < bullet.length; i++) {
if (bullet[i].botType === 'nail') bullet[i].isUpgraded = false
}
tech.setBotTechFrequency(1)
}
tech.isNailBotUpgrade = false
}
},
{
name: "foam-bot",
link: `foam-bot`,
description: "a bot fires foam at nearby mobs",
maxCount: 9,
count: 0,
frequency: 1,
frequencyDefault: 1,
isBot: true,
isBotTech: true,
allowed() {
return true
},
requires: "",
effect() {
tech.foamBotCount++;
b.foamBot();
},
remove() {
if (this.count) {
tech.foamBotCount -= this.count;
b.clearPermanentBots();
b.respawnBots();
}
}
},
{
name: "foam-bot upgrade",
link: `foam-bot upgrade`,
description: "convert your bots to foam-bots
+300% foam size and fire rate",
maxCount: 1,
count: 0,
frequency: 3,
frequencyDefault: 3,
isBotTech: true,
allowed() {
return tech.foamBotCount > 1 && !b.hasBotUpgrade()
},
requires: "2 or more foam bots and no other bot upgrade",
effect() {
tech.isFoamBotUpgrade = true
b.convertBotsTo("foam-bot")
for (let i = 0; i < bullet.length; i++) {
if (bullet[i].botType === 'foam') bullet[i].isUpgraded = true
}
tech.setBotTechFrequency()
tech.setTechFrequency("foam-bot", 5)
},
remove() {
if (this.count) {
for (let i = 0; i < bullet.length; i++) {
if (bullet[i].botType === 'foam') bullet[i].isUpgraded = false
}
tech.setBotTechFrequency(1)
}
tech.isFoamBotUpgrade = false
}
},
{
name: "sound-bot",
link: `sound-bot`,
description: "a bot emits expanding arcs
aimed towards nearby mobs",
maxCount: 9,
count: 0,
frequency: 1,
frequencyDefault: 1,
isBot: true,
isBotTech: true,
allowed() { return true },
requires: "",
effect() {
tech.soundBotCount++;
b.soundBot();
},
remove() {
if (this.count) {
tech.soundBotCount -= this.count;
b.clearPermanentBots();
b.respawnBots();
}
}
},
{
name: "sound-bot upgrade",
link: `sound-bot upgrade`,
description: "convert your bots to sound-bots
+150% wave fire rate and +150% damage",
maxCount: 1,
count: 0,
frequency: 3,
frequencyDefault: 3,
isBotTech: true,
allowed() {
return tech.soundBotCount > 1 && !b.hasBotUpgrade()
},
requires: "2 or more sound bots and no other bot upgrade",
effect() {
tech.isSoundBotUpgrade = true
b.convertBotsTo("sound-bot")
for (let i = 0; i < bullet.length; i++) {
if (bullet[i].botType === 'sound') bullet[i].isUpgraded = true
}
tech.setBotTechFrequency()
tech.setTechFrequency("sound-bot", 5)
},
remove() {
if (this.count) {
for (let i = 0; i < bullet.length; i++) {
if (bullet[i].botType === 'sound') bullet[i].isUpgraded = false
}
tech.setBotTechFrequency(1)
}
tech.isSoundBotUpgrade = false
}
},
{
name: "boom-bot",
link: `boom-bot`,
description: "a bot defends the space around you
ignites an explosion after hitting a mob",
maxCount: 9,
count: 0,
frequency: 1,
frequencyDefault: 1,
isBot: true,
isBotTech: true,
allowed() {
return true
},
requires: "",
effect() {
tech.boomBotCount++;
b.boomBot();
},
remove() {
if (this.count) {
tech.boomBotCount -= this.count;
b.clearPermanentBots();
b.respawnBots();
}
}
},
{
name: "boom-bot upgrade",
link: `boom-bot upgrade`,
description: "convert your bots to boom-bots
+300% explosion damage and size",
maxCount: 1,
count: 0,
frequency: 3,
frequencyDefault: 3,
isBotTech: true,
allowed() {
return tech.boomBotCount > 1 && !b.hasBotUpgrade()
},
requires: "2 or more boom bots and no other bot upgrade",
effect() {
tech.isBoomBotUpgrade = true
b.convertBotsTo("boom-bot")
for (let i = 0; i < bullet.length; i++) {
if (bullet[i].botType === 'boom') bullet[i].isUpgraded = true
}
tech.setBotTechFrequency()
tech.setTechFrequency("boom-bot", 5)
},
remove() {
if (this.count) {
for (let i = 0; i < bullet.length; i++) {
if (bullet[i].botType === 'boom') bullet[i].isUpgraded = false
}
tech.setBotTechFrequency(1)
}
tech.isBoomBotUpgrade = false
}
},
{
name: "laser-bot",
link: `laser-bot`,
description: "a bot uses energy to emit a laser beam
that targets nearby mobs",
maxCount: 9,
count: 0,
frequency: 1,
frequencyDefault: 1,
isBot: true,
isBotTech: true,
allowed() {
return m.maxEnergy > 0.5
},
requires: "maximum energy above 50",
effect() {
tech.laserBotCount++;
b.laserBot();
},
remove() {
if (this.count) {
tech.laserBotCount -= this.count;
b.clearPermanentBots();
b.respawnBots();
}
}
},
{
name: "laser-bot upgrade",
link: `laser-bot upgrade`,
description: "convert your bots to laser-bots
+100% damage, efficiency, and range",
maxCount: 1,
count: 0,
frequency: 3,
frequencyDefault: 3,
isBotTech: true,
allowed() {
return tech.laserBotCount > 1 && !b.hasBotUpgrade()
},
requires: "2 or more laser bots and no other bot upgrade",
effect() {
tech.isLaserBotUpgrade = true
b.convertBotsTo("laser-bot")
for (let i = 0; i < bullet.length; i++) {
if (bullet[i].botType === 'laser') bullet[i].isUpgraded = true
}
tech.setBotTechFrequency()
tech.setTechFrequency("laser-bot", 5)
},
remove() {
if (this.count) {
for (let i = 0; i < bullet.length; i++) {
if (bullet[i].botType === 'laser') bullet[i].isUpgraded = false
}
tech.setBotTechFrequency(1)
}
tech.isLaserBotUpgrade = false
}
},
{
name: "orbital-bot",
link: `orbital-bot`,
description: "a bot is locked in orbit around you
stuns and damages mobs on contact",
maxCount: 9,
count: 0,
frequency: 1,
frequencyDefault: 1,
isBot: true,
isBotTech: true,
allowed() {
return true
},
requires: "",
effect() {
b.orbitBot();
tech.orbitBotCount++;
},
remove() {
if (this.count) {
tech.orbitBotCount -= this.count;
b.clearPermanentBots();
b.respawnBots();
}
}
},
{
name: "orbital-bot upgrade",
link: `orbital-bot upgrade`,
description: "convert your bots to orbital-bots
+300% orbital damage and +50% radius",
maxCount: 1,
count: 0,
frequency: 3,
frequencyDefault: 3,
isBotTech: true,
allowed() {
return tech.orbitBotCount > 1 && !b.hasBotUpgrade()
},
requires: "2 or more orbital bots and no other bot upgrade",
effect() {
tech.isOrbitBotUpgrade = true
b.convertBotsTo("orbital-bot")
const range = 190 + 120 * tech.isOrbitBotUpgrade
for (let i = 0; i < bullet.length; i++) {
if (bullet[i].botType === 'orbit') {
bullet[i].isUpgraded = true
bullet[i].range = range
bullet[i].orbitalSpeed = Math.sqrt(0.25 / range)
}
}
tech.setBotTechFrequency()
tech.setTechFrequency("orbital-bot", 5)
},
remove() {
if (this.count) {
const range = 190 + 100 * tech.isOrbitBotUpgrade
for (let i = 0; i < bullet.length; i++) {
if (bullet[i].botType === 'orbit') {
bullet[i].range = range
bullet[i].orbitalSpeed = Math.sqrt(0.25 / range)
}
}
tech.setBotTechFrequency(1)
}
tech.isOrbitBotUpgrade = false
}
},
{
name: "dynamo-bot",
link: `dynamo-bot`,
description: "a bot damages mobs while it traces your path
when it's near generate +8 energy per second",
maxCount: 9,
count: 0,
frequency: 1,
frequencyDefault: 1,
isBot: true,
isBotTech: true,
allowed() {
return true
},
requires: "",
effect() {
tech.dynamoBotCount++;
b.dynamoBot();
},
remove() {
if (this.count) {
tech.dynamoBotCount -= this.count;
b.clearPermanentBots();
b.respawnBots();
}
}
},
{
name: "dynamo-bot upgrade",
link: `dynamo-bot upgrade`,
description: "convert your bots to dynamo-bots
when it's near generate +24 energy per second",
maxCount: 1,
count: 0,
frequency: 3,
frequencyDefault: 3,
isBotTech: true,
allowed() {
return tech.dynamoBotCount > 1 && !b.hasBotUpgrade()
},
requires: "2 or more dynamo bots and no other bot upgrade",
effect() {
tech.isDynamoBotUpgrade = true
b.convertBotsTo("dynamo-bot")
for (let i = 0; i < bullet.length; i++) {
if (bullet[i].botType === 'dynamo') bullet[i].isUpgraded = true
}
tech.setBotTechFrequency()
tech.setTechFrequency("dynamo-bot", 5)
},
remove() {
if (this.count) {
for (let i = 0; i < bullet.length; i++) {
if (bullet[i].botType === 'dynamo') bullet[i].isUpgraded = false
}
tech.setBotTechFrequency(1)
}
tech.isDynamoBotUpgrade = false
}
},
{
name: "perimeter defense",
description: "for each permanent bot
+6% defense",
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
isBotTech: true,
allowed() {
return b.totalBots() > 1
},
requires: "at least 2 bots",
effect() {
tech.isBotArmor = true
},
remove() {
tech.isBotArmor = false
}
},
{
name: "network effect",
description: "for each permanent bot
+6% damage",
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
isBotTech: true,
allowed() {
return b.totalBots() > 1
},
requires: "at least 2 bots",
effect() {
tech.isBotDamage = true
},
remove() {
tech.isBotDamage = false
}
},
{
name: "bot fabrication",
link: `bot fabrication`,
descriptionFunction() {
return `after you collect ${powerUps.orb.research(2 + Math.floor(0.1666 * b.totalBots()))}use them to build a
random bot (+1 cost every 5 bots)`
},
// description: `if you collect ${powerUps.orb.research(2)}use them to build a
random bot (+1 cost every 5 bots)`,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
isBotTech: true,
allowed() {
return powerUps.research.count > 1 || build.isExperimentSelection
},
requires: "at least 2 research",
effect() {
tech.isRerollBots = true;
powerUps.research.changeRerolls(0)
simulation.makeTextLog(`m.research = 0`)
},
remove() {
tech.isRerollBots = false;
// this.description = `if you collect ${powerUps.orb.research(2 + Math.floor(0.2 * b.totalBots()))}use them to build a
random bot (+1 cost every 5 bots)`
}
},
{
name: "ersatz bots",
link: `ersatz bots`,
description: "double your current permanent bots
remove all guns in your inventory",
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
isBotTech: true,
// isNonRefundable: true,
isBadRandomOption: true,
numberOfGunsLost: 0,
allowed() {
return b.totalBots() > 3 && !build.isExperimentSelection
},
requires: "NOT EXPERIMENT MODE, at least 4 bots",
effect() {
this.numberOfGunsLost = b.inventory.length
b.removeAllGuns();
simulation.makeGunHUD();
//double bots
for (let i = 0; i < tech.nailBotCount; i++) b.nailBot();
tech.nailBotCount *= 2
for (let i = 0; i < tech.laserBotCount; i++) b.laserBot();
tech.laserBotCount *= 2
for (let i = 0; i < tech.foamBotCount; i++) b.foamBot();
tech.foamBotCount *= 2
for (let i = 0; i < tech.boomBotCount; i++) b.boomBot();
tech.boomBotCount *= 2
for (let i = 0; i < tech.orbitBotCount; i++) b.orbitBot();
tech.orbitBotCount *= 2
for (let i = 0; i < tech.dynamoBotCount; i++) b.dynamoBot();
tech.dynamoBotCount *= 2
for (let i = 0; i < tech.soundBotCount; i++) b.soundBot();
tech.soundBotCount *= 2
for (let i = 0; i < tech.plasmaBotCount; i++) b.plasmaBot();
tech.plasmaBotCount *= 2
for (let i = 0; i < tech.missileBotCount; i++) b.missileBot();
tech.missileBotCount *= 2
},
remove() {
if (this.count) {
//return guns
for (let i = 0; i < this.numberOfGunsLost; i++) powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "gun");
this.numberOfGunsLost = 0;
//half all current guns
tech.nailBotCount = Math.round(tech.nailBotCount / 2)
tech.laserBotCount = Math.round(tech.laserBotCount / 2)
tech.foamBotCount = Math.round(tech.foamBotCount / 2)
tech.soundBotCount = Math.round(tech.soundBotCount / 2)
tech.boomBotCount = Math.round(tech.boomBotCount / 2)
tech.orbitBotCount = Math.round(tech.orbitBotCount / 2)
tech.dynamoBotCount = Math.round(tech.dynamoBotCount / 2)
tech.plasmaBotCount = Math.round(tech.plasmaBotCount / 2)
tech.missileBotCount = Math.round(tech.missileBotCount / 2)
b.clearPermanentBots();
b.respawnBots();
}
}
},
// {
// name: "robotics",
// description: `spawn 2 random bots
quadruple the frequency of finding bot tech`,
// maxCount: 1,
// count: 0,
// frequency: 1,
// frequencyDefault: 1,
// isBotTech: true,
// allowed() {
// return b.totalBots() > 1 || build.isExperimentSelection
// },
// requires: "at least 2 bots",
// effect: () => {
// b.randomBot()
// b.randomBot()
// for (let i = 0, len = tech.tech.length; i < len; i++) {
// if (tech.tech[i].isBotTech) tech.tech[i].frequency *= 4
// }
// },
// remove() {
// if (this.count > 0) {
// b.removeBot()
// b.removeBot()
// b.clearPermanentBots();
// b.respawnBots();
// for (let i = 0, len = tech.tech.length; i < len; i++) {
// if (tech.tech[i].isBotTech) tech.tech[i].frequency = Math.ceil(tech.tech[i].frequency / 4)
// }
// }
// }
// },
{
name: "robotics",
description: `spawn 2 random bots
tech, fields, and guns have +1 bot choice`, //tech have an extra bot tech option
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
isBotTech: true,
allowed() {
return b.totalBots() > 1
},
requires: "at least 2 bots",
effect() {
tech.isExtraBotOption = true
for (let i = 0; i < 2; i++) b.randomBot()
},
remove() {
if (this.count > 0) {
for (let i = 0; i < 2; i++) b.removeBot()
b.clearPermanentBots();
b.respawnBots();
}
tech.isExtraBotOption = false
}
},
{
name: "open-source", //digital fabricator
description: `spawn 3 random bots
triple the frequency of finding bot tech`,
maxCount: 1,
count: 0,
frequency: 0,
frequencyDefault: 0,
isBotTech: true,
allowed() {
return tech.isExtraBotOption
},
requires: "robotics",
effect() {
for (let i = 0; i < 3; i++) b.randomBot()
for (let i = 0, len = tech.tech.length; i < len; i++) {
if (tech.tech[i].isBotTech) tech.tech[i].frequency *= 3
}
},
remove() {
if (this.count > 0) {
for (let i = 0; i < 3; i++) b.removeBot()
b.clearPermanentBots();
b.respawnBots();
for (let i = 0, len = tech.tech.length; i < len; i++) {
if (tech.tech[i].isBotTech) tech.tech[i].frequency = Math.ceil(tech.tech[i].frequency / 3)
}
}
}
},
{
name: "decorrelation",
description: "if your gun or field are unused for 2 seconds
+70% defense",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return !tech.isRewindField
},
requires: "not retrocausality",
effect() {
tech.isNoFireDefense = true
},
remove() {
tech.isNoFireDefense = false
}
},
{
name: "anticorrelation",
description: "if your gun or field are unused for 2 seconds
+100% damage",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return !tech.isRewindField
},
requires: "not retrocausality",
effect() {
tech.isNoFireDamage = true
},
remove() {
tech.isNoFireDamage = false
}
},
{
name: "mass driver",
description: "+300% block collision damage",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return m.fieldMode !== 9 && !tech.isTokamak
},
requires: "not wormhole, tokamak",
effect() {
tech.blockDamage = 0.3
},
remove() {
tech.blockDamage = 0.075
}
},
{
name: "inflation",
link: `inflation`,
description: "if holding a block +90% defense
after throwing a block it expands 200%",
maxCount: 1,
count: 0,
frequency: 3,
frequencyDefault: 3,
allowed() {
return (tech.blockDamage > 0.075 || tech.isPrinter) && m.fieldMode !== 8 && m.fieldMode !== 9 && !tech.isTokamak
},
requires: "mass driver, not pilot wave, tokamak, wormhole",
effect() {
tech.isAddBlockMass = true
},
remove() {
tech.isAddBlockMass = false
}
},
{
name: "restitution",
description: "+150% block collision damage
after throwing a block it becomes very bouncy",
maxCount: 1,
count: 0,
frequency: 3,
frequencyDefault: 3,
allowed() {
return (tech.blockDamage > 0.075 || tech.isPrinter) && m.fieldUpgrades[m.fieldMode].name !== "pilot wave" && m.fieldUpgrades[m.fieldMode].name !== "wormhole" && !tech.isTokamak
},
requires: "mass driver, not pilot wave, tokamak, wormhole",
effect() {
tech.isBlockRestitution = true
},
remove() {
tech.isBlockRestitution = false
}
},
{
name: "flywheel",
description: "+150% block collision damage
after a mob dies its block is flung at mobs",
maxCount: 1,
count: 0,
frequency: 3,
frequencyDefault: 3,
allowed() {
return (tech.blockDamage > 0.075 || tech.isPrinter) && !tech.nailsDeathMob && !tech.sporesOnDeath && !tech.isExplodeMob && !tech.botSpawner && !tech.iceIXOnDeath
},
requires: "mass driver, no other mob death tech",
effect() {
tech.isMobBlockFling = true
},
remove() {
tech.isMobBlockFling = false
}
},
// {
// name: "fermions",
// description: "blocks thrown by you or pilot wave will
collide with intangible mobs, but not you",
// maxCount: 1,
// count: 0,
// frequency: 2,
// frequencyDefault: 2,
// allowed() {
// return (tech.blockDamage > 0.075 || m.fieldMode === 8) && !tech.isTokamak
// },
// requires: "mass driver or pilot wave, not tokamak",
// effect() {
// tech.isBlockBullets = true
// },
// remove() {
// tech.isBlockBullets = false
// }
// },
{
name: "buckling",
descriptionFunction() {
return `if a block you threw kills a mob
spawn either ${powerUps.orb.coupling(1)}, ${powerUps.orb.boost(1)}, ${powerUps.orb.heal()}, ${powerUps.orb.ammo()}, or ${powerUps.orb.research(1)}`
},
maxCount: 1,
count: 0,
frequency: 3,
frequencyDefault: 3,
allowed() {
return (tech.blockDamage > 0.075 || tech.isPrinter) && m.fieldUpgrades[m.fieldMode].name !== "pilot wave" && !tech.isTokamak
},
requires: "mass driver, not pilot wave, tokamak",
effect() {
tech.isBlockPowerUps = true
},
remove() {
tech.isBlockPowerUps = false
}
},
{
name: "NOR gate",
description: "if flip-flop is OFF
become invulnerable to your next collision",
maxCount: 1,
count: 0,
frequency: 3,
frequencyDefault: 3,
allowed() {
return tech.isFlipFlop
},
requires: "flip-flop",
effect() {
tech.isFlipFlopHarm = true //do you have this tech
},
remove() {
tech.isFlipFlopHarm = false
}
},
{
name: "shape-memory alloy",
descriptionFunction() {
return `if flip-flop is ON
+400 maximum health and +100% ${powerUps.orb.heal()} effect`
},
maxCount: 1,
count: 0,
frequency: 3,
frequencyDefault: 3,
allowed() {
return tech.isFlipFlop
},
requires: "flip-flop",
effect() {
tech.isFlipFlopHealth = true;
m.setMaxHealth();
for (let i = 0; i < powerUp.length; i++) {
if (powerUp[i].name === "heal") {
const oldSize = powerUp[i].size
powerUp[i].size = powerUps.heal.size() //update current heals
const scale = powerUp[i].size / oldSize
Matter.Body.scale(powerUp[i], scale, scale); //grow
}
}
},
remove() {
tech.isFlipFlopHealth = false;
m.setMaxHealth();
for (let i = 0; i < powerUp.length; i++) {
if (powerUp[i].name === "heal") {
const oldSize = powerUp[i].size
powerUp[i].size = powerUps.heal.size() //update current heals
const scale = powerUp[i].size / oldSize
Matter.Body.scale(powerUp[i], scale, scale); //grow
}
}
}
},
{
name: "flip-flop",
link: `flip-flop`,
description: `toggle ON and OFF after a collision
unlock advanced tech that runs if ON`,
nameInfo: "",
addNameInfo() {
setTimeout(function () {
if (document.getElementById("tech-flip-flop")) {
if (tech.isFlipFlopOn) {
document.getElementById("tech-flip-flop").innerHTML = ` = ON`
m.eyeFillColor = m.fieldMeterColor //'#5af'
} else {
document.getElementById("tech-flip-flop").innerHTML = ` = OFF`
m.eyeFillColor = "transparent"
}
}
}, 100);
},
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return !tech.isRelay
},
requires: "not relay switch",
effect() {
tech.isFlipFlop = true //do you have this tech?
if (!tech.isFlipFlopOn) {
tech.isFlipFlopOn = true //what is the state of flip-Flop?
}
// if (!m.isShipMode) {
// m.skin.flipFlop()
// }
},
remove() {
tech.isFlipFlop = false
if (tech.isFlipFlopOn) {
tech.isFlipFlopOn = false //what is the state of flip-Flop?
}
m.eyeFillColor = 'transparent'
// m.resetSkin();
}
},
{
name: "NAND gate",
description: "if ON
+55.5% damage",
maxCount: 1,
count: 0,
frequency: 3,
frequencyDefault: 3,
allowed() {
return tech.isFlipFlop || tech.isRelay
},
requires: "ON/OFF tech",
effect() {
tech.isFlipFlopDamage = true;
},
remove() {
tech.isFlipFlopDamage = false;
}
},
{
name: "integrated circuit",
description: "if ON +7 power up choices
if OFF -1 power up choices",
maxCount: 1,
count: 0,
frequency: 3,
frequencyDefault: 3,
allowed() {
return (tech.isFlipFlop || tech.isRelay) && !tech.isDeterminism
},
requires: "ON/OFF tech, not determinism",
effect() {
tech.isFlipFlopChoices = true //do you have this tech
},
remove() {
tech.isFlipFlopChoices = false
}
},
{
name: "transistor",
description: "if ON generate +20 energy per second
if OFF drain -1 energy per second",
maxCount: 1,
count: 0,
frequency: 3,
frequencyDefault: 3,
allowed() {
return tech.isFlipFlop || tech.isRelay
},
requires: "ON/OFF tech",
effect() {
tech.isFlipFlopEnergy = true;
},
remove() {
tech.isFlipFlopEnergy = false;
}
},
// {
// name: "decoupling",
// link: `decoupling`,
// descriptionFunction() {
// //(${ m.couplingDescription(this.bonus)})
// return `if ON +5 coupling
if OFF a dangerous particle slowly chases you`
// },
// maxCount: 1,
// count: 0,
// frequency: 3,
// frequencyDefault: 3,
// bonus: 5, //coupling given
// allowed() {
// return tech.isFlipFlop || tech.isRelay
// },
// requires: "ON/OFF tech",
// effect() {
// tech.isFlipFlopCoupling = true;
// if (tech.isFlipFlopOn) {
// m.couplingChange(this.bonus)
// } else {
// for (let i = 0; i < mob.length; i++) {
// if (mob[i].isDecoupling) mob[i].alive = false //remove WIMP
// }
// spawn.WIMP()
// mob[mob.length - 1].isDecoupling = true //so you can find it to remove
// }
// },
// remove() {
// tech.isFlipFlopCoupling = false;
// if (this.count) {
// if (tech.isFlipFlop || tech.isRelay) {
// if (tech.isFlipFlopOn) {
// m.couplingChange(-this.bonus)
// } else {
// for (let i = 0; i < mob.length; i++) {
// if (mob[i].isDecoupling) mob[i].alive = false //remove WIMP
// }
// }
// }
// }
// }
// },
{
name: "relay switch",
description: `toggle ON and OFF after picking up a power up
unlock advanced tech that runs if ON`,
nameInfo: "",
addNameInfo() {
setTimeout(function () {
if (document.getElementById("tech-switch")) {
if (tech.isFlipFlopOn) {
document.getElementById("tech-switch").innerHTML = ` = ON`
m.eyeFillColor = m.fieldMeterColor //'#5af'
} else {
document.getElementById("tech-switch").innerHTML = ` = OFF`
m.eyeFillColor = "transparent"
}
}
}, 100);
},
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return !tech.isFlipFlop
},
requires: "not flip-flop",
effect() {
m.isAltSkin = true
tech.isRelay = true //do you have this tech?
if (!tech.isFlipFlopOn) {
tech.isFlipFlopOn = true //what is the state of flip-Flop?
}
// if (!m.isShipMode) {
// m.skin.flipFlop()
// }
},
remove() {
tech.isRelay = false
if (tech.isFlipFlopOn) {
tech.isFlipFlopOn = false //what is the state of flip-Flop?
}
m.eyeFillColor = 'transparent'
// m.resetSkin();
}
},
{
name: "lithium-ion",
description: "if relay switch is ON
+300 maximum energy",
maxCount: 1,
count: 0,
frequency: 3,
frequencyDefault: 3,
allowed() {
return tech.isRelay
},
requires: "relay switch",
effect() {
tech.isRelayEnergy = true
m.setMaxEnergy()
},
remove() {
tech.isRelayEnergy = false
m.setMaxEnergy()
}
},
{
name: "thermocouple",
description: "if relay switch is ON
condense 4-13 ice IX crystals per second",
maxCount: 9,
count: 0,
frequency: 3,
frequencyDefault: 3,
allowed() {
return tech.isRelay
},
requires: "relay switch",
effect() {
tech.relayIce++
},
remove() {
tech.relayIce = 0
}
},
{
name: "first derivative",
descriptionFunction() {
return `while your first gun is equipped
+15% defense per gun (${(100 * (1 - 0.85 ** b.inventory.length)).toFixed(0)}%)`
},
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return true
},
requires: "",
effect() {
tech.isFirstDer = true
},
remove() {
tech.isFirstDer = false;
}
},
{
name: "MACHO",
description: "a massive but compact object slowly follows you
if you are inside the MACHO +60% defense",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return true
},
requires: "",
effect() {
tech.isMACHO = true; //this harm reduction comes from the particle toggling tech.isHarmMACHO
spawn.MACHO()
},
remove() {
tech.isMACHO = false;
tech.isHarmMACHO = false;
for (let i = 0, len = mob.length; i < len; i++) {
if (mob[i].isMACHO) mob[i].alive = false;
}
}
},
{
name: "axion",
description: "while inside the MACHO
defense increases damage",
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.isMACHO
},
requires: "MACHO",
effect() {
tech.isAxion = true
},
remove() {
tech.isAxion = false
}
},
{
name: "dark star",
description: "mobs inside the MACHO are damaged
increase MACHO radius by 15%",
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.isMACHO
},
requires: "MACHO",
effect() {
tech.isDarkStar = true
},
remove() {
tech.isDarkStar = false
}
},
{
name: "ablative drones",
description: "after losing health there is a chance
to rebuild your broken parts as drones",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed: () => true,
requires: "",
effect() {
tech.isDroneOnDamage = true;
// for (let i = 0; i < 4; i++) b.drone()
},
remove() {
tech.isDroneOnDamage = false;
}
},
{
name: "non-Newtonian armor",
link: `non-Newtonian armor`,
description: "after mob collisions
+66% defense for 10 seconds",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return true
},
requires: "",
effect() {
tech.isHarmArmor = true;
},
remove() {
tech.isHarmArmor = false;
}
},
{
name: "Pauli exclusion",
description: `after mob collisions
become invulnerable for +3.5 seconds`,
maxCount: 9,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return true
},
requires: "",
effect() {
m.collisionImmuneCycles += 210;
if (m.immuneCycle < m.cycle + m.collisionImmuneCycles) m.immuneCycle = m.cycle + m.collisionImmuneCycles; //player is immune to damage
},
remove() {
m.collisionImmuneCycles = 30;
}
},
{
name: "spin–statistics theorem",
description: `every 7 seconds
become invulnerable for +1.9 seconds`,
maxCount: 3,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return true //m.collisionImmuneCycles > 30
},
requires: "",
effect() {
tech.cyclicImmunity += 114;
},
remove() {
tech.cyclicImmunity = 0;
}
},
{
name: "refrigerant",
descriptionFunction() {
return `after losing at least 5% ${tech.isEnergyHealth ? "energy" : "health"}
freeze all mobs for 7 seconds`
},
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return true
},
requires: "",
effect() {
tech.isHarmFreeze = true;
},
remove() {
tech.isHarmFreeze = false;
}
},
// {
// name: "clock gating",
// description: `after losing health slow time by 50%
+20% defense`,
// 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",
description: "if you collide with a mob
generate +2048 energy", //
reduce defense by 15%
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return !tech.isEnergyHealth
},
requires: "not mass-energy",
effect() {
tech.isPiezo = true;
// if (simulation.isTextLogOpen) m.energy += 20.48;
},
remove() {
tech.isPiezo = false;
}
},
{
name: "ground state",
description: "+266 maximum energy
–33% passive energy generation",
// description: "reduce defense by 66%
you no longer passively regenerate energy",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return !tech.isTimeCrystals
},
requires: "not time crystals",
effect() {
tech.isGroundState = true
m.setFieldRegen()
m.setMaxEnergy()
},
remove() {
tech.isGroundState = false
m.setFieldRegen()
m.setMaxEnergy()
}
},
{
name: "heat engine",
description: `+50% damage
–50 maximum energy`,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed: () => true,
requires: "not CPT",
damage: 1.5,
effect() {
tech.damage *= this.damage
tech.isMaxEnergyTech = true;
m.setMaxEnergy()
},
remove() {
if (this.count) tech.damage /= this.damage
tech.isMaxEnergyTech = false;
m.setMaxEnergy()
}
},
{
name: "exothermic process",
description: "+50% damage
after mobs die –20% energy",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return true
},
requires: "",
damage: 1.55,
effect() {
tech.damage *= this.damage
tech.isEnergyLoss = true;
},
remove() {
if (this.count) tech.damage /= this.damage
tech.isEnergyLoss = false;
}
},
{
name: "Gibbs free energy",
description: `for each energy below 100
+0.7% damage`,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed: () => true,
requires: "",
effect() {
tech.isLowEnergyDamage = true;
},
remove() {
tech.isLowEnergyDamage = false;
}
},
{
name: "overcharge",
description: "+66 maximum energy
+6% JUNK to tech pool",
maxCount: 9,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return true
},
requires: "",
effect() {
tech.bonusEnergy += 0.66
m.setMaxEnergy()
this.refundAmount += tech.addJunkTechToPool(0.06)
},
refundAmount: 0,
remove() {
tech.bonusEnergy = 0;
m.setMaxEnergy()
if (this.count > 0 && this.refundAmount > 0) {
tech.removeJunkTechFromPool(this.refundAmount)
this.refundAmount = 0
}
}
},
{
name: "Maxwells demon",
description: "energy above max decays by 30% 1% per second
+5% JUNK to tech pool",
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.energy > m.maxEnergy || build.isExperimentSelection
},
requires: "energy above your max",
effect() {
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,
remove() {
tech.overfillDrain = 0.7
if (this.count > 0 && this.refundAmount > 0) {
tech.removeJunkTechFromPool(this.refundAmount)
this.refundAmount = 0
}
}
},
{
name: "inductive charging",
description: "if crouched +600% passive energy generation
if not crouched energy generation is disabled",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return !tech.isDamageAfterKillNoRegen
},
requires: "not parasitism",
effect() {
tech.isCrouchRegen = true; //only used to check for requirements
m.regenEnergy = function () {
if (m.immuneCycle < m.cycle && m.crouch && m.fieldCDcycle < m.cycle) m.energy += 7 * m.fieldRegen;
if (m.energy < 0) m.energy = 0
}
},
remove() {
tech.isCrouchRegen = false;
m.regenEnergy = m.regenEnergyDefault
}
},
{
name: "energy conservation",
description: "4% of damage done recovered as energy",
maxCount: 9,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return true
},
requires: "",
effect() {
tech.energySiphon += 0.04;
},
remove() {
tech.energySiphon = 0;
}
},
{
name: "parasitism",
description: "if a mob has died in the last 5 seconds
+83% damage, inhibit energy generation",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return !tech.isCrouchRegen
},
requires: "not inductive charging",
effect() {
tech.isDamageAfterKillNoRegen = true;
m.regenEnergy = function () {
if (m.immuneCycle < m.cycle && (m.lastKillCycle + 300 < m.cycle) && m.fieldCDcycle < m.cycle) m.energy += m.fieldRegen;
if (m.energy < 0) m.energy = 0
}
},
remove() {
if (this.count) m.regenEnergy = m.regenEnergyDefault
tech.isDamageAfterKillNoRegen = false;
}
},
{
name: "waste heat recovery",
description: "if a mob has died in the last 5 seconds
generate 5% of max energy per second",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return true
},
requires: "",
effect() {
tech.isEnergyRecovery = true;
},
remove() {
tech.isEnergyRecovery = false;
}
},
{
name: "recycling",
description: "if a mob has died in the last 5 seconds
recover 0.5% of max health per second",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
isHealTech: true,
allowed() {
return true
},
requires: "",
effect() {
tech.isHealthRecovery = true;
},
remove() {
tech.isHealthRecovery = false;
}
},
{
name: "torpor",
description: "if a mob has not died in the last 5 seconds
+66% defense",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return true
},
requires: "",
effect() {
tech.isHarmReduceNoKill = true;
},
remove() {
tech.isHarmReduceNoKill = false;
}
},
{
name: "homeostasis",
descriptionFunction() {
return `for each health below 100
+0.8% defense (${(100 * (Math.max(0, 1 - m.health) * 0.8)).toFixed(0)}%)`
},
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return m.health < 0.6 || build.isExperimentSelection
},
requires: "health below 60",
effect() {
tech.isLowHealthDefense = true;
},
remove() {
tech.isLowHealthDefense = false;
}
},
{
name: "negative feedback",
descriptionFunction() {
return `for each ${tech.isEnergyHealth ? "energy" : "health"} below 100
+0.7% damage (${(70 * Math.max(0, 1 - (tech.isEnergyHealth ? m.energy : m.health))).toFixed(0)}%)`
},
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return m.health < 0.6 || build.isExperimentSelection
},
requires: "health below 60",
effect() {
tech.isLowHealthDmg = true; //used in mob.damage()
},
remove() {
tech.isLowHealthDmg = false;
}
},
{
name: "Zenos paradox",
descriptionFunction() {
return `+85% defense
–5% of current ${tech.isEnergyHealth ? "energy" : "health"} every 5 seconds`
},
// description: "+85% defense
–5% of current health every 5 seconds",
// description: "every 5 seconds remove 1/10 of your health
reduce defense by 90%",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return true
},
requires: "",
effect() {
tech.isZeno = true;
},
remove() {
tech.isZeno = false;
}
},
{
name: "antiscience",
descriptionFunction() {
return `–10 ${tech.isEnergyHealth ? "energy" : "health"} after picking up a tech
+66% damage`
},
// description: "+66% damage
–10 health after picking up a tech",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return true
},
requires: "",
damage: 1.66,
effect() {
tech.damage *= this.damage
tech.isTechDamage = true;
},
remove() {
if (this.count) tech.damage /= this.damage
tech.isTechDamage = false;
}
},
{
name: "ergodicity",
descriptionFunction() {
return `${powerUps.orb.heal()} have -50% effect
+66% damage`
},
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return true
},
requires: "",
damage: 1.66,
effect() {
tech.damage *= this.damage
tech.isHalfHeals = true;
for (let i = 0; i < powerUp.length; i++) {
if (powerUp[i].name === "heal") {
const scale = Math.sqrt(0.5)
powerUp[i].size *= scale
Matter.Body.scale(powerUp[i], scale, scale); //grow
}
}
},
remove() {
if (this.count) {
tech.damage /= this.damage
for (let i = 0; i < powerUp.length; i++) {
if (powerUp[i].name === "heal") {
const scale = 1 / Math.sqrt(0.5)
powerUp[i].size *= scale
Matter.Body.scale(powerUp[i], scale, scale); //grow
}
}
}
tech.isHalfHeals = false;
}
},
{
name: "fluoroantimonic acid",
description: "if your health is above 100
+35% damage",
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.maxHealth > 1;
},
requires: "max health above 100",
effect() {
tech.isAcidDmg = true;
},
remove() {
tech.isAcidDmg = false;
}
},
{
name: "induction brake",
descriptionFunction() {
return `after using ${powerUps.orb.heal()} slow nearby mobs for 15 seconds
spawn ${powerUps.orb.heal(4)}`
},
// description: `after using ${powerUps.orb.heal()} slow nearby mobs for 15 seconds
spawn ${powerUps.orb.heal(4)}`,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return !tech.isPerfectBrake
},
requires: "not eddy current brake",
effect() {
tech.isHealBrake = true;
for (let i = 0; i < 4; i++) powerUps.spawn(m.pos.x + 100 * (Math.random() - 0.5), m.pos.y + 100 * (Math.random() - 0.5), "heal");
},
remove() {
tech.isHealBrake = false;
}
},
{
name: "adiabatic healing",
descriptionFunction() {
return `${powerUps.orb.heal()} have +100% effect
+4% JUNK to tech pool`
},
maxCount: 3,
count: 0,
frequency: 1,
frequencyDefault: 1,
isHealTech: true,
allowed() {
return (m.health / m.maxHealth) < 0.7 || build.isExperimentSelection
},
requires: "under 70% health",
effect() {
tech.largerHeals++;
for (let i = 0; i < powerUp.length; i++) {
if (powerUp[i].name === "heal") {
const oldSize = powerUp[i].size
powerUp[i].size = powerUps.heal.size() //update current heals
const scale = powerUp[i].size / oldSize
Matter.Body.scale(powerUp[i], scale, scale); //grow
}
}
this.refundAmount += tech.addJunkTechToPool(0.04)
},
refundAmount: 0,
remove() {
tech.largerHeals = 1;
for (let i = 0; i < powerUp.length; i++) {
if (powerUp[i].name === "heal") {
const oldSize = powerUp[i].size
powerUp[i].size = powerUps.heal.size() //update current heals
const scale = powerUp[i].size / oldSize
Matter.Body.scale(powerUp[i], scale, scale); //grow
}
}
if (this.count > 0 && this.refundAmount > 0) {
tech.removeJunkTechFromPool(this.refundAmount)
this.refundAmount = 0
}
}
},
{
name: "quenching",
descriptionFunction() {
return `after over healing from ${powerUps.orb.heal()}
gain max health and lose current health`
},
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
isHealTech: true,
allowed() {
return true
},
requires: "",
effect() {
tech.isOverHeal = true;
},
remove() {
tech.isOverHeal = false;
}
},
{
name: "accretion",
descriptionFunction() {
return `${powerUps.orb.heal(1)} follow you, even between levels
spawn ${powerUps.orb.heal(5)}`
},
// description: `${powerUps.orb.heal(1)} follow you, even between levels
spawn ${powerUps.orb.heal(5)}`,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
isHealTech: true,
allowed() {
return m.fieldMode !== 9
},
requires: "not wormhole",
effect() {
tech.isHealAttract = true
powerUps.setPowerUpMode();
for (let i = 0; i < 5; i++) powerUps.spawn(m.pos.x + 100 * (Math.random() - 0.5), m.pos.y + 100 * (Math.random() - 0.5), "heal");
},
remove() {
tech.isHealAttract = false
powerUps.setPowerUpMode();
},
},
{
name: "self-assembly",
descriptionFunction() {
return `at the start of each level
for every 25% missing ${tech.isEnergyHealth ? "energy" : "health"} spawn ${powerUps.orb.heal()}`
},
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
isHealTech: true,
allowed() {
return true
},
requires: "",
effect() {
tech.isHealLowHealth = true;
},
remove() {
tech.isHealLowHealth = false;
}
},
{
name: "enthalpy",
descriptionFunction() {
return `doing damage has a small chance to spawn ${powerUps.orb.heal(1)}` //
–10% defense
},
maxCount: 9,
count: 0,
frequency: 1,
frequencyDefault: 1,
isHealTech: true,
allowed() {
return true
},
requires: "",
effect() {
tech.healthDrain += 0.023;
},
remove() {
tech.healthDrain = 0;
}
},
{
name: "maintenance",
descriptionFunction() {
return `double the frequency of finding healing tech
spawn ${powerUps.orb.heal(13)}`
},
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
isNonRefundable: true,
isBadRandomOption: true,
allowed() {
return true
},
requires: "",
effect() {
for (let i = 0; i < 13; i++) powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "heal");
for (let i = 0, len = tech.tech.length; i < len; i++) {
if (tech.tech[i].isHealTech) tech.tech[i].frequency *= 2
}
},
remove() { }
},
{
name: "anthropic principle",
nameInfo: "",
addNameInfo() {
setTimeout(function () {
powerUps.research.changeRerolls(0)
}, 1000);
},
descriptionFunction() {
return `once per level, instead of dying
use ${powerUps.orb.research(1)} and spawn ${powerUps.orb.heal(5)}`
},
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
isHealTech: true,
allowed() {
return powerUps.research.count > 0 || build.isExperimentSelection
},
requires: "at least 1 research",
effect() {
tech.isDeathAvoid = true;
tech.isDeathAvoidedThisLevel = false;
setTimeout(function () {
powerUps.research.changeRerolls(0)
}, 1000);
},
remove() {
tech.isDeathAvoid = false;
}
},
{
name: "weak anthropic principle",
description: "after anthropic principle prevents your death
+50% duplication chance for that level",
maxCount: 1,
count: 0,
frequency: 3,
frequencyDefault: 3,
allowed() {
return tech.isDeathAvoid
},
requires: "anthropic principle",
effect() {
tech.isAnthropicTech = true
powerUps.setPowerUpMode(); //needed after adjusting duplication chance
},
remove() {
tech.isAnthropicTech = false
powerUps.setPowerUpMode(); //needed after adjusting duplication chance
}
},
{
name: "strong anthropic principle",
description: "after anthropic principle prevents your death
+137.03599% damage for that level",
maxCount: 1,
count: 0,
frequency: 3,
frequencyDefault: 3,
allowed() {
return tech.isDeathAvoid
},
requires: "anthropic principle",
effect() {
tech.isAnthropicDamage = true
},
remove() {
tech.isAnthropicDamage = false
}
},
{
name: "quantum immortality",
description: "+30% defense
after dying, continue in an alternate reality",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return true
},
requires: "",
effect() {
tech.isImmortal = true;
},
remove() {
tech.isImmortal = false;
}
},
{
name: "Hilbert space",
description: "+99% damage
after a collision enter an alternate reality",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
isAltRealityTech: true,
allowed() {
return !tech.isResearchReality && !tech.isSwitchReality
},
requires: "not Ψ(t) collapse, many-worlds",
damage: 1.99,
effect() {
tech.damage *= this.damage
tech.isCollisionRealitySwitch = true;
},
remove() {
if (this.count) tech.damage /= this.damage
tech.isCollisionRealitySwitch = false;
}
},
{
name: "many-worlds",
// description: "each level is an alternate reality, where you
find a tech at the start of each level",
description: `on each new level spawn a tech power up
and enter an alternate reality`,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
isAltRealityTech: true,
allowed() {
return !tech.isResearchReality && !tech.isCollisionRealitySwitch
},
requires: "not Ψ(t) collapse, Hilbert space",
effect() {
tech.isSwitchReality = true;
},
remove() {
tech.isSwitchReality = false;
}
},
{
name: "Ψ(t) collapse",
link: `Ψ(t) collapse`,
description: `spawn ${powerUps.orb.research(16)}
after you research enter an alternate reality`,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
isAltRealityTech: true,
allowed() {
return !tech.isSwitchReality && !tech.isCollisionRealitySwitch && !tech.isJunkResearch
},
requires: "not many-worlds, Hilbert space, pseudoscience",
bonusResearch: 16,
effect() {
tech.isResearchReality = true;
for (let i = 0; i < this.bonusResearch; i++) powerUps.spawn(m.pos.x + Math.random() * 60, m.pos.y + Math.random() * 60, "research", false);
},
remove() {
tech.isResearchReality = false;
if (this.count > 0) powerUps.research.changeRerolls(-this.bonusResearch)
}
},
{
name: "decoherence",
description: `tech options you don't choose won't reoccur
spawn ${powerUps.orb.research(6)}`,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return !tech.isSuperDeterminism
},
requires: "not superdeterminism",
bonusResearch: 6,
effect() {
tech.isBanish = true
for (let i = 0; i < this.bonusResearch; i++) powerUps.spawn(m.pos.x + 40 * (Math.random() - 0.5), m.pos.y + 40 * (Math.random() - 0.5), "research", false);
},
remove() {
if (tech.isBanish) {
tech.isBanish = false
//reset banish list
for (let i = 0; i < tech.tech.length; i++) {
if (tech.tech[i].isBanished) tech.tech[i].isBanished = false
}
powerUps.research.changeRerolls(-this.bonusResearch)
}
tech.isBanish = false
}
},
{
name: "renormalization",
description: `46% chance to spawn ${powerUps.orb.research(1)} after consuming ${powerUps.orb.research(1)}
+3% JUNK to tech pool`,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return (powerUps.research.count > 3 || build.isExperimentSelection) && !tech.isSuperDeterminism
},
requires: "at least 4 research, not superdeterminism",
effect() {
tech.renormalization = true;
this.refundAmount += tech.addJunkTechToPool(0.03)
},
refundAmount: 0,
remove() {
tech.renormalization = false;
if (this.count > 0 && this.refundAmount > 0) {
tech.removeJunkTechFromPool(this.refundAmount)
this.refundAmount = 0
}
}
},
{
name: "perturbation theory",
description: `if you have no ${powerUps.orb.research(1)} in your inventory
+70% fire rate`,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return powerUps.research.count === 0
},
requires: "no research",
effect() {
tech.isRerollHaste = true;
tech.researchHaste = 0.3;
b.setFireCD();
},
remove() {
tech.isRerollHaste = false;
tech.researchHaste = 1;
b.setFireCD();
}
},
{
name: "ansatz",
description: `after choosing a field, tech, or gun
if you have no ${powerUps.orb.research(1)} in your inventory spawn ${powerUps.orb.research(2)}`,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return powerUps.research.count < 1 && !tech.isSuperDeterminism && !tech.isRerollHaste && !tech.isResearchReality
},
requires: "no research, not superdeterminism, Ψ(t) collapse, perturbation theory",
effect() {
tech.isAnsatz = true;
},
remove() {
tech.isAnsatz = false;
}
},
{
name: "Bayesian statistics",
// description: `for each ${powerUps.orb.research(1)} in your inventory
+3.8% damage`,
descriptionFunction() {
return `spawn ${powerUps.orb.research(this.bonusResearch)}
+3% damage per ${powerUps.orb.research(1)} (${(3 * powerUps.research.count).toFixed(0)}%)`
},
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return powerUps.research.count > 2 || build.isExperimentSelection
},
requires: "at least 3 research",
bonusResearch: 3,
effect() {
powerUps.spawnDelay("research", this.bonusResearch)
tech.isRerollDamage = true;
},
remove() {
tech.isRerollDamage = false;
if (this.count) {
powerUps.research.changeRerolls(-this.bonusResearch)
}
}
},
{
name: "mass production",
descriptionFunction() {
return `tech always have +3 choices to spawn
${powerUps.orb.ammo(8)} ${powerUps.orb.heal(8)} or ${powerUps.orb.research(5)}`
},
// description: `tech always have +3 choices to spawn
${powerUps.orb.ammo(8)} ${powerUps.orb.heal(8)} or ${powerUps.orb.research(5)}`,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() { return true },
requires: "",
effect() {
tech.isMassProduction = true
},
remove() {
tech.isMassProduction = false
}
},
{
name: "research",
description: `spawn ${powerUps.orb.research(5)}`,
maxCount: 1,
count: 0,
frequency: 0,
frequencyDefault: 0,
isNonRefundable: true,
isMassProduction: true,
allowed() { return true },
requires: "",
effect() {
powerUps.spawnDelay("research", 5);
},
remove() { }
},
{
name: "ammo",
description: `spawn ${powerUps.orb.ammo(8)}`,
maxCount: 1,
count: 0,
frequency: 0,
frequencyDefault: 0,
isNonRefundable: true,
isMassProduction: true,
allowed() { return true },
requires: "",
effect() {
powerUps.spawnDelay("ammo", 8);
},
remove() { }
},
{
name: "heals",
descriptionFunction() {
return `spawn ${powerUps.orb.heal(8)}`
},
maxCount: 1,
count: 0,
frequency: 0,
frequencyDefault: 0,
isNonRefundable: true,
isMassProduction: true,
allowed() { return true },
requires: "mass production",
effect() {
powerUps.spawnDelay("heal", 8);
},
remove() { }
},
{
name: "pseudoscience",
description: "when selecting a power up, research 3 times
for free, but add 1-4% JUNK to the tech pool",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return !tech.isResearchReality && !tech.isSuperDeterminism //tech.isResearchBoss || tech.isMetaAnalysis || tech.isRerollBots || tech.isDeathAvoid || tech.isRerollDamage || build.isExperimentSelection
},
requires: "not Ψ(t) collapse, superdeterminism", //"abiogenesis, meta-analysis, bot fabrication, anthropic principle, or Bayesian statistics, not Ψ(t) collapse",
effect() {
tech.isJunkResearch = true;
},
remove() {
tech.isJunkResearch = false;
}
},
{
name: "brainstorming",
description: "tech choices randomize
every 1.5 seconds for 10 seconds",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return !tech.isSuperDeterminism
},
requires: "not superdeterminism",
effect() {
tech.isBrainstorm = true
tech.isBrainstormActive = false
tech.brainStormDelay = 1800 - simulation.difficultyMode * 100
},
remove() {
tech.isBrainstorm = false
tech.isBrainstormActive = false
}
},
{
name: "cross-disciplinary",
description: "tech have an extra field or gun choice
+5% chance to duplicate spawned power ups",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return !tech.isDeterminism
},
requires: "not determinism",
effect() {
tech.isExtraGunField = true;
},
remove() {
tech.isExtraGunField = false;
}
},
{
name: "emergence",
description: "tech, fields, and guns have +1 choice
+8% damage",
// description: "tech, fields, and guns have +2 choices
+3% JUNK to tech pool",
maxCount: 9,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return !tech.isDeterminism
},
requires: "not determinism",
damage: 1.08,
effect() {
tech.extraChoices += 1;
tech.damage *= this.damage
// this.refundAmount += tech.addJunkTechToPool(0.03)
},
refundAmount: 0,
remove() {
tech.extraChoices = 0;
if (this.count > 0) {
tech.damage /= this.damage
// if (this.refundAmount > 0) tech.removeJunkTechFromPool(this.refundAmount)
}
}
},
{
name: "path integral",
link: `path integral`,
description: "your next tech choice has all possible options
+5% JUNK to tech pool",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
isNonRefundable: true,
// isJunk: true,
allowed() {
return !tech.isDeterminism && !tech.isBrainstorm
},
requires: "not determinism, brainstorm",
effect() {
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);
this.refundAmount += tech.addJunkTechToPool(0.05)
},
refundAmount: 0,
remove() {
tech.tooManyTechChoices = 0
if (this.count > 0 && this.refundAmount > 0) {
tech.removeJunkTechFromPool(this.refundAmount)
this.refundAmount = 0
}
}
},
{
name: "determinism",
description: "spawn 5 tech
only 1 choice for tech, fields, and guns",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
isBadRandomOption: true,
isNonRefundable: true,
allowed() {
return !tech.extraChoices && !tech.isExtraGunField && !tech.isFlipFlopChoices
},
requires: "not emergence, cross-disciplinary, integrated circuit",
effect() {
tech.isDeterminism = true;
//if you change the number spawned also change it in Born rule
for (let i = 0; i < 5; i++) powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "tech");
},
remove() {
tech.isDeterminism = false;
}
},
{
name: "superdeterminism",
description: `spawn 5 tech
you can't cancel and ${powerUps.orb.research(1)} no longer spawn`,
maxCount: 1,
count: 0,
frequency: 3,
frequencyDefault: 3,
isBadRandomOption: true,
isNonRefundable: true,
allowed() {
return tech.isDeterminism && !tech.isAnsatz && !tech.isJunkResearch && !tech.isBrainstorm
},
requires: "determinism, not ansatz, pseudoscience, brainstorming",
effect() {
tech.isSuperDeterminism = true;
//if you change the number spawned also change it in Born rule
for (let i = 0; i < 5; i++) powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "tech");
},
remove() {
tech.isSuperDeterminism = false;
}
},
{
name: "technical debt",
descriptionFunction() {
// return `+300% damage –15% damage
for each tech you have learned (+${(Math.floor(100 * (Math.min(Math.pow(0.85, tech.totalCount - 20), 4 - 0.15 * tech.totalCount))) - 100)}%)`
return `+300% damage –15% damage
for each tech you have learned (${(tech.totalCount > 20 ? 100 * (Math.pow(0.85, tech.totalCount - 20) - 1) : 100 * (3 - 0.15 * tech.totalCount)).toFixed(0)}%)`
},
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return true
},
requires: "",
effect() {
tech.isTechDebt = true;
},
remove() {
tech.isTechDebt = false;
}
},
// {
// name: "abiogenesis",
// // description: `use ${powerUps.orb.research(4)}(or 49% JUNK to the tech pool if you can't) to add a 2nd boss to each level`,
// description: `as a level begins spawn a 2nd boss using ${powerUps.orb.research(3)}
(+49% JUNK to the tech pool if you can't pay)`,
// maxCount: 1,
// count: 0,
// frequency: 2,
// frequencyDefault: 2,
// allowed() {
// return (build.isExperimentSelection || powerUps.research.count > 2) && !tech.isDuplicateMobs
// },
// requires: "at least 3 research, not parthenogenesis",
// effect() {
// tech.isResearchBoss = true;
// },
// remove() {
// tech.isResearchBoss = false;
// }
// },
{
name: "meta-analysis",
description: `if you choose a JUNKtech you instead get a
random normal tech and spawn ${powerUps.orb.research(2)}`,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return tech.junkCount > 0
},
requires: "some JUNK tech",
effect() {
tech.isMetaAnalysis = true
},
remove() {
tech.isMetaAnalysis = false
}
},
{
name: "dark patterns",
description: "+22% damage
+22% JUNK to tech pool",
maxCount: 9,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return true
},
requires: "",
damage: 1.22,
effect() {
tech.damage *= this.damage
this.refundAmount += tech.addJunkTechToPool(0.22)
},
refundAmount: 0,
remove() {
if (this.count > 0) {
tech.damage /= this.damage
if (this.refundAmount > 0) tech.removeJunkTechFromPool(this.refundAmount)
}
}
},
{
name: "exciton",
descriptionFunction() {
return `after mobs die they have a 14% chance to
spawn ${powerUps.orb.boost(1)} that give +${(powerUps.boost.damage * 100).toFixed(0)}% damage for ${(powerUps.boost.duration / 60).toFixed(0)} seconds`
},
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed: () => true,
requires: "",
effect() {
tech.isBoostPowerUps = true
},
remove() {
tech.isBoostPowerUps = false
}
},
{
name: "band gap",
descriptionFunction() {
return `${powerUps.orb.boost(1)} give +77% damage
but their duration is reduced by 1 second`
},
maxCount: 9,
count: 1,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.isBoostPowerUps || tech.isBoostReplaceAmmo
},
requires: "exciton, quasiparticles",
effect() {
powerUps.boost.duration -= 60
powerUps.boost.damage += 0.77
},
remove() {
powerUps.boost.duration = 600
powerUps.boost.damage = 1.25
}
},
{
name: "eternalism",
description: "+24% damage
time can't be paused (time can be dilated)",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return !tech.isPauseSwitchField && !tech.isPauseEjectTech && !tech.isWormHolePause
},
requires: "not unified field theory, paradigm shift, invariant",
damage: 1.24,
effect() {
tech.damage *= this.damage
tech.isNoDraftPause = true
},
remove() {
if (this.count) tech.damage /= this.damage
tech.isNoDraftPause = false
}
},
{
name: "paradigm shift",
description: `when paused clicking a tech ejects it
with a 20% chance to remove without ejecting`,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return !tech.isSuperDeterminism && !tech.isNoDraftPause
},
requires: "not superdeterminism, eternalism",
effect() {
tech.isPauseEjectTech = true;
},
remove() {
tech.isPauseEjectTech = false;
}
},
{
name: "unified field theory",
description: `when paused clicking your field cycles it
double the frequency of finding fieldtech`,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return !tech.isSuperDeterminism && !tech.isNoDraftPause
},
requires: "not superdeterminism, eternalism",
effect() {
tech.isPauseSwitchField = true;
for (let i = 0, len = tech.tech.length; i < len; i++) {
if (tech.tech[i].isFieldTech) tech.tech[i].frequency *= 2
}
},
remove() {
tech.isPauseSwitchField = false;
if (this.count > 1) {
for (let i = 0, len = tech.tech.length; i < len; i++) {
if (tech.tech[i].isFieldTech) tech.tech[i].frequency /= 2
}
}
}
},
{
name: "field coupling",
descriptionFunction() {
// return `spawn ${powerUps.orb.coupling(10)}
that each give +0.1 coupling` //
${m.couplingDescription(1)} ${m.fieldMode === 0 ? "" : "per coupling"}
return `spawn ${powerUps.orb.coupling(10)}
${m.couplingDescription(1)} per ${powerUps.orb.coupling(1)}`
},
maxCount: 9,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return true
},
requires: "",
effect() {
powerUps.spawnDelay("coupling", 10)
},
remove() {
if (this.count) m.couplingChange(-this.count * 10)
}
},
{
name: "quintessence",
descriptionFunction() {
if (this.count) {
converted = this.researchUsed * this.couplingToResearch
let orbText
if (converted > 15) {
orbText = `${converted} ${powerUps.orb.coupling()}`
} else {
orbText = powerUps.orb.coupling(converted)
}
return `convert ${this.researchUsed} ${powerUps.orb.research(1)} into ${orbText}
${m.couplingDescription(1)} per ${powerUps.orb.coupling(1)}`
} else {
let converted = powerUps.research.count * this.couplingToResearch
let orbText
if (converted > 15) {
orbText = `${converted} ${powerUps.orb.coupling()}`
} else {
orbText = powerUps.orb.coupling(converted)
}
return `convert ${powerUps.research.count} ${powerUps.orb.research(1)} into ${orbText}
${m.couplingDescription(1)} per ${powerUps.orb.coupling(1)}`
}
},
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return powerUps.research.count > 3
},
requires: "",
researchUsed: 0,
couplingToResearch: 3,
effect() {
// let count = 0
// while (powerUps.research.count > 0 && powerUps.research.count !== Infinity) {
// powerUps.research.changeRerolls(-1)
// count += 2.5
// this.researchUsed++
// }
// powerUps.spawnDelay("coupling", Math.floor(count))
let cycle = () => {
if (powerUps.research.count > 0 && powerUps.research.count !== Infinity) {
if (m.alive) requestAnimationFrame(cycle);
if (!simulation.paused && !simulation.isChoosing) { //&& !(simulation.cycle % 2)
powerUps.research.changeRerolls(-1)
this.researchUsed++
powerUps.spawnDelay("coupling", this.couplingToResearch)
}
} // else exit delay loop
}
requestAnimationFrame(cycle);
},
remove() {
if (this.count) {
m.couplingChange(-this.researchUsed * this.couplingToResearch)
powerUps.research.changeRerolls(this.researchUsed)
this.researchUsed = 0
}
}
},
{
name: "virtual particles",
descriptionFunction() {
return `17% chance after mobs die to spawn ${powerUps.orb.coupling(1)}
${m.couplingDescription(1)} per ${powerUps.orb.coupling(1)}`
// return `17% chance after mobs die to spawn ${powerUps.orb.coupling(1)} that each give +0.1 coupling` //
${m.couplingDescription(1)} ${m.fieldMode === 0 ? "" : "per coupling"}
},
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed: () => true,
requires: "",
effect() {
tech.isCouplingPowerUps = true //about 20-30 mobs per level so at 16% and 0.1 coupling that's about 25 * 0.16 * 0.1 = 0.4 coupling per level with out duplication
},
remove() {
tech.isCouplingPowerUps = false
}
},
{
name: "fine-structure constant",
descriptionFunction() {
// return `spawn ${this.value} ${powerUps.orb.coupling(1)} that each give +0.1 coupling
-0.5 coupling after mob collisions`//
${m.couplingDescription(1)} ${m.fieldMode === 0 ? "" : "per coupling"}
return `spawn ${this.value} ${powerUps.orb.coupling(1)}, but lose ${powerUps.orb.coupling(5)} after mob collisions
${m.couplingDescription(1)} per ${powerUps.orb.coupling(1)}`
},
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
isNonRefundable: true,
allowed: () => true,
requires: "",
value: 60,
effect() {
tech.isCouplingNoHit = true
powerUps.spawnDelay("coupling", this.value)
},
remove() {
if (this.count) m.couplingChange(-this.value)
tech.isCouplingNoHit = false
}
},
{
name: "residual dipolar coupling",
descriptionFunction() {
// return `clicking cancel for a field, tech, or gun
spawns ${powerUps.orb.coupling(5)}that each give +0.1 coupling`//
${m.couplingDescription(1)} ${m.fieldMode === 0 ? "" : "per coupling"}
return `clicking cancel spawns ${powerUps.orb.coupling(5)}
${m.couplingDescription(1)} per ${powerUps.orb.coupling(1)}`
},
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return !tech.isSuperDeterminism
},
requires: "not superdeterminism",
effect() {
tech.isCancelCouple = true
},
remove() {
tech.isCancelCouple = false
}
},
{
name: "commodities exchange",
descriptionFunction() {
return `clicking cancel for a field, tech, or gun
spawns 5-10 ${powerUps.orb.heal()}, ${powerUps.orb.ammo()}, or ${powerUps.orb.research(1)}`
},
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return !tech.isSuperDeterminism
},
requires: "not superdeterminism",
effect() {
tech.isCancelRerolls = true
},
remove() {
tech.isCancelRerolls = false
}
},
{
name: "options exchange",
link: `options exchange`,
description: `clicking cancel for a field, tech, or gun
has a 85% chance to randomize choices`,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return !tech.isSuperDeterminism //&& (tech.isCancelRerolls || tech.isCancelDuplication)
},
requires: "not superdeterminism", //futures exchange, commodities exchange,
effect() {
tech.isCancelTech = true
},
remove() {
tech.isCancelTech = false
}
},
{
name: "futures exchange",
description: "clicking cancel for a field, tech, or gun
gives +4.1% power up duplication chance",
// descriptionFunction() {
// return `clicking × to cancel a field, tech, or gun
gives +${4.9 - 0.15*simulation.difficultyMode}% power up duplication chance`
// },
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return tech.duplicationChance() < 1 && !tech.isSuperDeterminism
},
requires: "below 100% duplication chance, not superdeterminism",
effect() {
tech.isCancelDuplication = true //search for tech.duplication to balance
powerUps.setPowerUpMode(); //needed after adjusting duplication chance
},
remove() {
tech.isCancelDuplication = false
powerUps.setPowerUpMode(); //needed after adjusting duplication chance
}
},
{
name: "replication",
description: "+9% chance to duplicate spawned power ups
+33% JUNK to tech pool",
maxCount: 9,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return tech.duplicationChance() < 1.
},
requires: "below 100% duplication chance",
effect() {
tech.duplicateChance += 0.09
powerUps.setPowerUpMode(); //needed after adjusting duplication chance
if (!build.isExperimentSelection && !simulation.isTextLogOpen) simulation.circleFlare(0.11);
this.refundAmount += tech.addJunkTechToPool(0.33)
},
refundAmount: 0,
remove() {
tech.duplicateChance = 0
powerUps.setPowerUpMode(); //needed after adjusting duplication chance
if (this.count > 0 && this.refundAmount > 0) {
tech.removeJunkTechFromPool(this.refundAmount)
this.refundAmount = 0
}
}
},
{
name: "stimulated emission",
description: "+17% chance to duplicate spawned power ups,
but after a collision eject 1 tech",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return tech.duplicationChance() < 1
},
requires: "below 1% duplication chance",
effect() {
tech.isStimulatedEmission = true
powerUps.setPowerUpMode(); //needed after adjusting duplication chance
if (!build.isExperimentSelection && !simulation.isTextLogOpen) simulation.circleFlare(0.15);
},
remove() {
tech.isStimulatedEmission = false
powerUps.setPowerUpMode(); //needed after adjusting duplication chance
}
},
{
name: "metastability",
description: "+13% chance to duplicate spawned power ups
duplicates explode with a 4 second half-life",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return tech.duplicationChance() < 1
},
requires: "below 100% duplication chance",
effect() {
tech.isPowerUpsVanish = true
powerUps.setPowerUpMode(); //needed after adjusting duplication chance
if (!build.isExperimentSelection && !simulation.isTextLogOpen) simulation.circleFlare(0.11);
},
remove() {
tech.isPowerUpsVanish = false
powerUps.setPowerUpMode(); //needed after adjusting duplication chance
}
},
{
name: "correlated damage",
description: "duplication increases damage",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return tech.duplicationChance() > 0.15
},
requires: "duplication chance > 15%",
effect() {
tech.isDupDamage = true;
},
remove() {
tech.isDupDamage = false;
}
},
{
name: "parthenogenesis",
description: "+8% chance to duplicate spawned power ups
duplication also duplicates mobs",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return tech.duplicationChance() > 0// && !tech.isResearchBoss
},
requires: "some duplication chance",
effect() {
tech.isDuplicateMobs = true;
powerUps.setPowerUpMode(); //needed after adjusting duplication chance
},
remove() {
tech.isDuplicateMobs = false;
}
},
{
name: "apomixis",
description: `when you reach 100% duplication
spawn 11 bosses with 100% more durability`,
maxCount: 1,
count: 0,
frequency: 3,
frequencyDefault: 3,
isNonRefundable: true,
allowed() {
return tech.duplicationChance() > 0.5
},
requires: "duplication chance above 50%",
effect() {
tech.is100Duplicate = true;
tech.maxDuplicationEvent()
},
remove() {
tech.is100Duplicate = false;
}
},
{
name: "strange attractor",
descriptionFunction() {
return `+7% damage
removing this increases duplication by +10%`
},
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
isBadRandomOption: true,
allowed() {
return true
},
requires: "",
damage: 1.07,
effect() {
tech.damage *= this.damage
},
remove() {
if (this.count > 0 && m.alive) {
tech.duplication += 0.1
powerUps.setPowerUpMode(); //needed after adjusting duplication chance
tech.damage /= this.damage
this.frequency = 0
}
}
},
{
name: "null hypothesis",
description: `+8% damage
removing this spawns ${powerUps.orb.research(15)}`,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
isBadRandomOption: true,
allowed() {
return true
},
requires: "",
damage: 1.08,
effect() {
tech.damage *= this.damage
},
remove() {
if (this.count > 0 && m.alive) {
tech.damage /= this.damage
powerUps.spawnDelay("research", 15)
this.frequency = 0
}
}
},
{
name: "Born rule",
description: "remove all current tech
spawn new tech to replace them",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
isNonRefundable: true,
isBadRandomOption: true,
allowed() {
return (tech.totalCount > 6)
},
requires: "more than 6 tech",
effect() {
//remove active bullets //to get rid of bots
for (let i = 0; i < bullet.length; ++i) Matter.Composite.remove(engine.world, bullet[i]);
bullet = [];
let count = 1 //count tech
for (let i = 0, len = tech.tech.length; i < len; i++) { // spawn new tech power ups
if (!tech.tech[i].isNonRefundable) count += tech.tech[i].count
}
if (tech.isDeterminism) count -= 4 //remove the bonus tech
if (tech.isSuperDeterminism) count -= 4 //remove the bonus tech
tech.setupAllTech(); // remove all tech
if (simulation.isCheating) tech.setCheating();
lore.techCount = 0;
// tech.addLoreTechToPool();
for (let i = 0; i < count; i++) powerUps.spawn(m.pos.x + 100 * (Math.random() - 0.5), m.pos.y + 100 * (Math.random() - 0.5), "tech"); // spawn new tech power ups
//have state is checked in m.death()
},
remove() { }
},
{
name: "Occams razor",
descriptionFunction() {
return `randomly remove half your tech
for each removed +${this.damagePerRemoved * 100}% damage (~${(this.count === 0) ? this.damagePerRemoved * 50 * tech.totalCount : this.damage * 100}%)`
},
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
isNonRefundable: true,
isBadRandomOption: true,
allowed() {
return (tech.totalCount > 6)
},
requires: "more than 6 tech",
// removePercent: 0.5,
damagePerRemoved: 0.5,
damage: null,
effect() {
let pool = []
for (let i = 0, len = tech.tech.length; i < len; i++) { // spawn new tech power ups
if (tech.tech[i].count && !tech.tech[i].isNonRefundable && !tech.tech[i].isFromAppliedScience) pool.push(i)
}
pool = shuffle(pool); //shuffles order of maps
let removeCount = 0
for (let i = 0, len = pool.length * this.damagePerRemoved; i < len; i++) removeCount += tech.removeTech(pool[i])
this.damage = this.damagePerRemoved * removeCount
tech.damage *= (1 + this.damage)
},
remove() {
if (this.count) tech.damage /= (1 + this.damage)
}
},
{
name: "exchange symmetry",
description: "remove 1 random tech
spawn 2 new guns",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
isNonRefundable: true,
isBadRandomOption: true,
allowed() {
return (tech.totalCount > 3) && !tech.isSuperDeterminism
},
requires: "at least 4 tech, not superdeterminism",
effect() {
const have = [] //find which tech you have
for (let i = 0; i < tech.tech.length; i++) {
if (tech.tech[i].count > 0 && !tech.tech[i].isNonRefundable) have.push(i)
}
const choose = have[Math.floor(Math.random() * have.length)]
simulation.makeTextLog(`tech.removeTech("${tech.tech[choose].name}")`, 360)
for (let i = 0; i < tech.tech[choose].count; i++) {
powerUps.spawn(m.pos.x, m.pos.y, "gun");
}
powerUps.spawn(m.pos.x, m.pos.y, "gun");
// powerUps.spawn(m.pos.x, m.pos.y, "gun");
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();
},
remove() { }
},
{
name: "Monte Carlo method",
description: "remove 1 random tech
spawn 2 tech",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
isNonRefundable: true,
isBadRandomOption: true,
allowed() {
return (tech.totalCount > 3) && tech.duplicationChance() > 0 && !tech.isSuperDeterminism
},
requires: "some duplication, at least 4 tech, not superdeterminism",
effect() {
const removeTotal = tech.removeTech()
for (let i = 0; i < removeTotal + 1; i++) powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "tech");
},
remove() { }
},
{
name: "reinforcement learning",
description: "increase the frequency of finding copies of
your current tech by 1000%",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return tech.totalCount > 9
},
requires: "at least 10 tech",
effect() {
for (let i = 0, len = tech.tech.length; i < len; i++) {
if (tech.tech[i].count > 0) tech.tech[i].frequency *= 10
}
},
remove() {
if (this.count) {
for (let i = 0, len = tech.tech.length; i < len; i++) {
if (tech.tech[i].count > 0 && tech.tech[i].frequency > 1) tech.tech[i].frequency /= 10
}
}
}
},
// {
// name: "backward induction",
// descriptionFunction() {
// if (build.isExperimentSelection || powerUps.tech.choiceLog.length < 10) return `use ${powerUps.orb.research(2)} to choose all the unchosen tech
from your last selection`
// text = ``
// let num = 3
// if (tech.extraChoices) num = 5
// if (tech.isDeterminism) num = 1
// for (let i = 0; i < num; i++) {
// const index = powerUps.tech.choiceLog[powerUps.tech.choiceLog.length - i - 1]
// if (index !== powerUps.lastTechIndex && tech.tech[index].count < tech.tech[index].maxCount && tech.tech[index].allowed() && tech.tech[index].name !== "backward induction") {
// text += `${tech.tech[index].name}, `
// }
// }
// text = text.slice(0, -2);
// return `use ${powerUps.orb.research(2)}to choose the unchosen
tech from your previous selection:
${text}`
// },
// // description: `use ${powerUps.orb.research(2)}to choose all the unchosen
tech from your previous tech selection`,
// maxCount: 1,
// count: 0,
// frequency: 100,
// frequencyDefault: 100,
// isNonRefundable: true,
// isBadRandomOption: true,
// allowed() {
// return powerUps.tech.choiceLog.length > 10 && !tech.isDeterminism && powerUps.research.count > 1
// },
// requires: "NOT EXPERIMENT MODE, rejected an option in the last tech selection, at least 2 research, not determinism",
// effect: () => {
// powerUps.research.changeRerolls(-2)
// let num = 3
// if (tech.extraChoices) num = 5
// if (tech.isDeterminism) num = 1
// for (let i = 0; i < num; i++) {
// const index = powerUps.tech.choiceLog[powerUps.tech.choiceLog.length - i - 1]
// if (index !== powerUps.lastTechIndex && tech.tech[index].count < tech.tech[index].maxCount && tech.tech[index].allowed() && tech.tech[index].name !== "backward induction") {
// tech.giveTech(index)
// simulation.makeTextLog(`tech.giveTech("${tech.tech[index].name}") //backward induction`);
// }
// }
// },
// remove() {}
// },
//**************************************************
//************************************************** gun
//************************************************** tech
//**************************************************
{
name: "needle ice",
description: `after needles impact walls
they chip off 1-2 freezing ice IX crystals`,
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return (tech.isNeedles || tech.isNeedles) && !tech.needleTunnel
},
requires: "nail gun, needle gun, not nanowires",
effect() {
tech.isNeedleIce = true
},
remove() {
tech.isNeedleIce = false
}
},
{
name: "nanowires",
description: `needles tunnel through blocks and map
+20% needle damage`,
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return ((tech.haveGunCheck("nail gun") && tech.isNeedles) || (tech.isNeedles && tech.haveGunCheck("shotgun"))) && !tech.isNeedleIce
},
requires: "nail gun, needle gun, not needle ice",
effect() {
tech.needleTunnel = true
},
remove() {
tech.needleTunnel = false
}
},
{
name: "ceramics",
description: `needles and harpoons pierce shields
directly damaging shielded mobs`,
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return (!tech.isLargeHarpoon && tech.haveGunCheck("harpoon")) || tech.isNeedles
},
requires: "needle gun, harpoon, not Bessemer process",
effect() {
tech.isShieldPierce = true
},
remove() {
tech.isShieldPierce = false
}
},
{
name: "needle gun",
description: "nail gun and shotgun fire mob piercing needles",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return ((tech.haveGunCheck("nail gun") && !tech.nailInstantFireRate && !tech.nailRecoil && !tech.isRicochet) || (tech.haveGunCheck("shotgun") && !tech.isNailShot && !tech.isFoamShot && !tech.isSporeWorm && !tech.isSporeFlea)) && !tech.isRivets && !tech.isIncendiary && !tech.isIceCrystals && !tech.isIceShot
},
requires: "nail gun, shotgun, not ice crystal, rivets, rotary cannon, pneumatic, incendiary, nail-shot, foam-shot, worm-shot, ice-shot",
effect() {
tech.isNeedles = true
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
if (b.guns[i].name === "nail gun") {
b.guns[i].ammo = Math.ceil(b.guns[i].ammo / 3);
b.guns[i].ammoPack = Math.ceil(b.guns[i].defaultAmmoPack / 3);
b.guns[i].chooseFireMethod()
simulation.updateGunHUD();
break
}
}
},
remove() {
if (tech.isNeedles) {
tech.isNeedles = false
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
if (b.guns[i].name === "nail gun") {
b.guns[i].chooseFireMethod()
b.guns[i].ammo = Math.ceil(b.guns[i].ammo * 3);
b.guns[i].ammoPack = b.guns[i].defaultAmmoPack;
simulation.updateGunHUD();
break
}
}
}
}
},
{
name: "stress concentration",
description: "mobs below 50% durability die after you shoot
them near their center with needles or rivets",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return (tech.isNeedles || tech.isRivets) && !tech.isNailCrit && !tech.isIncendiary
},
requires: "needles, rivets, not incendiary, supercritical fission",
effect() {
tech.isCritKill = true
},
remove() {
tech.isCritKill = false
}
},
{
name: "rivet gun",
description: "nail gun and shotgun slowly lob a heavy rivet",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return ((tech.haveGunCheck("nail gun") && !tech.nailInstantFireRate && !tech.isRicochet) || (tech.haveGunCheck("shotgun") && !tech.isNailShot && !tech.isFoamShot && !tech.isSporeWorm && !tech.isSporeFlea)) && !tech.isNeedles && !tech.isIceCrystals && !tech.isIceShot
},
requires: "nail gun, shotgun, not ice crystal, needles, or pneumatic actuator",
effect() {
tech.isRivets = true
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
if (b.guns[i].name === "nail gun") {
b.guns[i].chooseFireMethod()
break
}
}
},
remove() {
if (tech.isRivets) {
tech.isRivets = false
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
if (b.guns[i].name === "nail gun") {
b.guns[i].chooseFireMethod()
break
}
}
}
tech.isRivets = false
}
},
{
name: "pneumatic actuator",
description: "nail gun takes no time to ramp up
to its fastest fire rate",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("nail gun") && !tech.isRivets && !tech.isNeedles && !tech.nailRecoil
},
requires: "nail gun, not rotary cannon, rivets, or needles",
effect() {
tech.nailInstantFireRate = true
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
if (b.guns[i].name === "nail gun") b.guns[i].chooseFireMethod()
}
},
remove() {
if (tech.nailInstantFireRate) {
tech.nailInstantFireRate = false
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
if (b.guns[i].name === "nail gun") b.guns[i].chooseFireMethod()
}
}
}
},
{
name: "ice crystal nucleation",
link: `ice crystal nucleation`,
description: "nail gun uses energy to condense
unlimited freezing ice shards",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("nail gun") && !tech.isRivets && !tech.isNeedles // && !tech.isNailRadiation && !tech.isNailCrit
},
requires: "nail gun, not rivets, needles",
effect() {
tech.isIceCrystals = true;
b.guns[0].ammoPack = Infinity
b.guns[0].recordedAmmo = b.guns[i].ammo
b.guns[0].ammo = Infinity
simulation.updateGunHUD();
},
remove() {
if (tech.isIceCrystals) {
tech.isIceCrystals = false;
b.guns[0].ammoPack = b.guns[0].defaultAmmoPack;
if (b.guns[0].recordedAmmo) b.guns[0].ammo = b.guns[0].recordedAmmo
simulation.updateGunHUD();
}
tech.isIceCrystals = false;
if (b.guns[0].ammo === Infinity) b.guns[0].ammo = 0
}
},
{
name: "rotary cannon",
description: "nail gun has increased muzzle speed,
maximum fire rate, accuracy, and recoil",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("nail gun") && !tech.nailInstantFireRate && !tech.isNeedles
},
requires: "nail gun, not pneumatic actuator, needle gun",
effect() {
tech.nailRecoil = true
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
if (b.guns[i].name === "nail gun") b.guns[i].chooseFireMethod()
}
},
remove() {
if (tech.nailRecoil) {
tech.nailRecoil = false
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
if (b.guns[i].name === "nail gun") b.guns[i].chooseFireMethod()
}
}
}
},
{
name: "gauge",
description: `rivets, needles, super balls, and nails
have +30% mass and physical damage`,
isGunTech: true,
maxCount: 9,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.isMineDrop + tech.isNailBotUpgrade + tech.fragments + tech.nailsDeathMob + (tech.haveGunCheck("super balls") + (tech.haveGunCheck("mine") && !tech.isFoamMine) + (tech.haveGunCheck("nail gun")) + tech.isNeedles + tech.isNailShot + tech.isRivets) * 2 > 1
},
requires: "nails, nail gun, rivets, shotgun, super balls, mine",
effect() {
tech.bulletSize = 1 + 0.25 * Math.pow(this.count + 1, 0.5)
},
remove() {
tech.bulletSize = 1;
}
},
{
name: "supercritical fission",
description: "if nails, needles, or rivets strike mobs
near their center they can explode",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return (tech.isNailShot || tech.isNeedles || tech.isNailBotUpgrade || tech.haveGunCheck("nail gun") || tech.isRivets || (tech.haveGunCheck("mine") && !(tech.isFoamMine || tech.isSuperMine))) && !tech.isIncendiary && !tech.isCritKill
},
requires: "nail gun, mine, needles, nails, rivets, not incendiary, stress concentration",
effect() {
tech.isNailCrit = true
},
remove() {
tech.isNailCrit = false
}
},
{
name: "irradiated nails",
link: `irradiated nails`,
description: "nails, needles, and rivets are radioactive
+90% radioactive damage over 3 seconds",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.isMineDrop || tech.isNailBotUpgrade || tech.fragments || tech.nailsDeathMob || (tech.haveGunCheck("mine") && !(tech.isFoamMine || tech.isSuperMine)) || (tech.haveGunCheck("nail gun") && !tech.isShieldPierce) || (tech.haveGunCheck("shotgun") && (tech.isNeedles || tech.isNailShot))
},
requires: "nail gun, nails, rivets, mine, not ceramic needles",
effect() {
tech.isNailRadiation = true;
},
remove() {
tech.isNailRadiation = false;
}
},
{
name: "6s half-life",
link: `6s half-life`,
description: "nails, needles, rivets are made of plutonium-238
radioactive damage lasts +3 seconds",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.isNailRadiation && !tech.isFastRadiation
},
requires: "nail gun, mine, irradiated nails, not 1s half-life",
effect() {
tech.isSlowRadiation = true;
},
remove() {
tech.isSlowRadiation = false;
}
},
{
name: "1s half-life",
link: `1s half-life`,
description: "nails, needles, rivets are made of lithium-8
+300% radioactive damage for 1 second",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.isNailRadiation && !tech.isSlowRadiation
},
requires: "nail gun, mine, irradiated nails, not 6s half-life",
effect() {
tech.isFastRadiation = true;
},
remove() {
tech.isFastRadiation = false;
}
},
{
name: "spin-statistics",
link: `spin-statistics`,
description: "after firing the shotgun you are invulnerable
shotgun has 50% fewer shots",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("shotgun")
},
requires: "shotgun",
effect() {
tech.isShotgunImmune = true;
//cut current ammo by 1/2
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
if (b.guns[i].name === "shotgun") {
b.guns[i].ammo = Math.ceil(b.guns[i].ammo * 0.5);
b.guns[i].ammoPack = b.guns[i].defaultAmmoPack * 0.5
break;
}
}
simulation.updateGunHUD();
},
remove() {
if (tech.isShotgunImmune) {
tech.isShotgunImmune = false;
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
if (b.guns[i].name === "shotgun") {
b.guns[i].ammoPack = b.guns[i].defaultAmmoPack;
b.guns[i].ammo = Math.ceil(b.guns[i].ammo * 2);
break;
}
}
simulation.updateGunHUD();
}
}
},
{
name: "Newtons 3rd law",
description: "+66% shotgun fire rate and recoil",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("shotgun") && !tech.isShotgunReversed
},
requires: "shotgun, not Noether violation",
effect() {
tech.isShotgunRecoil = true;
},
remove() {
tech.isShotgunRecoil = false;
}
},
{
name: "Noether violation",
link: `Noether violation`,
description: "+50% shotgun damage
shotgun recoil is reversed",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return (tech.haveGunCheck("shotgun")) && !tech.isShotgunRecoil
},
requires: "shotgun, not Newtons 3rd law",
effect() {
tech.isShotgunReversed = true;
},
remove() {
tech.isShotgunReversed = false;
}
},
{
name: "repeater",
description: "shotgun immediately fires again for no ammo
-50% shotgun fire rate",
isGunTech: true,
maxCount: 9,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return (tech.haveGunCheck("shotgun"))
},
requires: "shotgun, not Newtons 3rd law",
effect() {
tech.shotgunExtraShots++;
},
remove() {
tech.shotgunExtraShots = 0
}
},
{
name: "nail-shot",
link: `nail-shot`,
description: "shotgun drives a long clip of nails",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("shotgun") && !tech.isIncendiary && !tech.isRivets && !tech.isIceShot && !tech.isFoamShot && !tech.isSporeWorm && !tech.isSporeFlea && !tech.isNeedles
},
requires: "shotgun, not incendiary, rivets, foam-shot, worm-shot, ice-shot, needles",
effect() {
tech.isNailShot = true;
},
remove() {
tech.isNailShot = false;
}
},
{
name: "foam-shot",
link: `foam-shot`,
description: "shotgun sprays sticky foam bubbles",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("shotgun") && !tech.isNailShot && !tech.isIncendiary && !tech.isRivets && !tech.isIceShot && !tech.isSporeWorm && !tech.isSporeFlea && !tech.isNeedles
},
requires: "shotgun, not incendiary, nail-shot, rivet, worm-shot, ice-shot, needle",
effect() {
tech.isFoamShot = true;
},
remove() {
tech.isFoamShot = false;
}
},
{
name: "ice-shot",
link: `ice-shot`,
description: "shotgun grows freezing ice IX crystals",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("shotgun") && !tech.isNailShot && !tech.isIncendiary && !tech.isRivets && !tech.isFoamShot && !tech.isSporeWorm && !tech.isSporeFlea && !tech.isNeedles
},
requires: "shotgun, not incendiary, nail-shot, rivet, foam-shot, worm-shot",
effect() {
tech.isIceShot = true;
},
remove() {
tech.isIceShot = false;
}
},
{
name: "freezer burn",
description: "mobs frozen while below 33% durability die",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.isIceCrystals || tech.isSporeFreeze || (m.fieldMode === 4 && simulation.molecularMode === 2) || tech.isIceShot || tech.relayIce || tech.isNeedleIce || (m.coupling && (m.fieldMode === 3 || m.fieldMode === 0))
},
requires: "a freeze effect",
effect() {
tech.isIceKill = true
},
remove() {
tech.isIceKill = false
}
},
{
name: "flash freeze",
description: "mobs frozen while above 66% durability
have their durability reduced to 66%",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.isIceCrystals || tech.isSporeFreeze || (m.fieldMode === 4 && simulation.molecularMode === 2) || tech.isIceShot || tech.relayIce || tech.isNeedleIce || (m.coupling && (m.fieldMode === 3 || m.fieldMode === 0))
},
requires: "a freeze effect",
effect() {
tech.isIceMaxHealthLoss = true
},
remove() {
tech.isIceMaxHealthLoss = false
}
},
{
name: "crystallizer",
description: "after frozen mobs die they
shatter into ice IX crystals",
isGunTech: true,
maxCount: 9,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return (tech.isIceCrystals || tech.isSporeFreeze || (m.fieldMode === 4 && simulation.molecularMode === 2) || tech.isIceShot || tech.relayIce || tech.isNeedleIce || (m.coupling && (m.fieldMode === 3 || m.fieldMode === 0))) && !tech.sporesOnDeath && !tech.isExplodeMob && !tech.botSpawner && !tech.isMobBlockFling && !tech.nailsDeathMob
},
requires: "a localized freeze effect, no other mob death tech",
effect() {
tech.iceIXOnDeath++
},
remove() {
tech.iceIXOnDeath = 0
}
},
{
name: "thermoelectric effect",
description: "after killing mobs with ice IX
+100 energy",
isGunTech: true,
maxCount: 9,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return (m.fieldMode === 4 && simulation.molecularMode === 2) || tech.relayIce || tech.isNeedleIce || (m.coupling && (m.fieldMode === 3 || m.fieldMode === 0)) || tech.iceIXOnDeath || tech.isIceShot
},
requires: "ice IX",
effect() {
tech.iceEnergy++
},
remove() {
tech.iceEnergy = 0;
}
},
{
name: "superfluidity",
description: "freeze effects are applied
to a small area around the target",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.isIceCrystals || tech.isSporeFreeze || (m.fieldMode === 4 && simulation.molecularMode === 2) || tech.relayIce || tech.isNeedleIce || (m.coupling && (m.fieldMode === 3 || m.fieldMode === 0)) || tech.iceIXOnDeath || tech.isIceShot
},
requires: "a localized freeze effect",
effect() {
tech.isAoESlow = true
},
remove() {
tech.isAoESlow = false
}
},
{
name: "incendiary ammunition",
description: "shotgun, rivets, super balls, and drones
are loaded with explosives",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return (tech.haveGunCheck("shotgun") && !tech.isNailShot && !tech.isIceShot && !tech.isRivets && !tech.isFoamShot && !tech.isSporeWorm && !tech.isSporeFlea && !tech.isNeedles) || ((tech.haveGunCheck("super balls") || tech.isSuperMine) && !tech.isSuperBounce && !tech.isFoamBall && !tech.isSuperHarm) || (tech.isRivets && !tech.isNailCrit) || (m.fieldMode === 4 && simulation.molecularMode === 3) || (tech.haveGunCheck("drones") && !tech.isForeverDrones && !tech.isDroneRadioactive && !tech.isDroneTeleport)
},
requires: "shotgun, super balls, rivets, drones, not irradiated drones, burst drones, polyurethane, Zectron",
effect() {
tech.isIncendiary = true
},
remove() {
tech.isIncendiary = false;
}
},
{
name: "rebound",
description: `after they collide with a mob, super balls
gain speed, duration, and +33% damage`,
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return (tech.haveGunCheck("super balls") || tech.isSuperMine) && !tech.isIncendiary && !tech.isFoamBall
},
requires: "super balls, not incendiary",
effect() {
tech.isSuperBounce = true
},
remove() {
tech.isSuperBounce = false
}
},
{
name: "Zectron",
description: `+75% super ball density and damage, but
after colliding with super balls -25% energy`,
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return (tech.haveGunCheck("super balls") || tech.isSuperMine) && !tech.isIncendiary && !tech.isBulletTeleport
},
requires: "super balls not incendiary ammunition, uncertainty principle",
effect() {
tech.isSuperHarm = true
},
remove() {
tech.isSuperHarm = false
}
},
{
name: "polyurethane foam",
description: "super balls and harpoons colliding with mobs
catalyzes a reaction that yields foam bubbles",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return ((tech.haveGunCheck("super balls") || tech.isSuperMine) && !tech.isSuperBounce) || (tech.haveGunCheck("harpoon") && !tech.fragments)
},
requires: "super balls, harpoon, not fragmentation",
effect() {
tech.isFoamBall = true;
},
remove() {
tech.isFoamBall = false;
}
},
{
name: "autocannon",
description: "fire +1 extra super ball
balls are quickly released in same direction",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("super balls") && !tech.oneSuperBall
},
requires: "super balls, but not the tech super ball",
effect() {
tech.superBallDelay = true
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
if (b.guns[i].name === "super balls") b.guns[i].chooseFireMethod()
}
},
remove() {
if (tech.superBallDelay) {
tech.superBallDelay = false;
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
if (b.guns[i].name === "super balls") b.guns[i].chooseFireMethod()
}
}
}
},
{
name: "super duper",
description: `randomly fire +0, +1, +2, or +3 extra super balls`,
isGunTech: true,
maxCount: 9,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return (tech.haveGunCheck("super balls") || tech.isSuperMine) && !tech.oneSuperBall
},
requires: "super balls, not super ball",
effect() {
tech.extraSuperBalls += 4
},
remove() {
tech.extraSuperBalls = 0;
}
},
{
name: "super ball",
description: "fire just 1 large super ball
that stuns mobs for 2 second",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return (tech.haveGunCheck("super balls") || tech.isSuperMine) && !tech.extraSuperBalls && !tech.superBallDelay
},
requires: "super balls, not super duper or autocannon",
effect() {
tech.oneSuperBall = true;
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
if (b.guns[i].name === "super balls") b.guns[i].chooseFireMethod()
}
},
remove() {
if (tech.oneSuperBall) {
tech.oneSuperBall = false;
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
if (b.guns[i].name === "super balls") b.guns[i].chooseFireMethod()
}
}
}
},
{
name: "phase velocity",
description: "wave particles propagate faster as solids
+40% wave damage",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("wave") && !tech.isLongitudinal
},
requires: "wave, not phonon",
effect() {
tech.isPhaseVelocity = true;
},
remove() {
tech.isPhaseVelocity = false;
}
},
{
name: "amplitude",
description: "+37% wave damage
+37% wave particle amplitude",
isGunTech: true,
maxCount: 3,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("wave") || tech.isSoundBotUpgrade
},
requires: "wave",
effect() {
tech.waveFrequency *= 0.66
tech.wavePacketDamage *= 1.37
},
remove() {
tech.waveFrequency = 0.2
tech.wavePacketDamage = 1
}
},
{
name: "propagation",
description: "–25% wave packet propagation speed
+41% wave damage",
isGunTech: true,
maxCount: 9,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("wave") || tech.isSoundBotUpgrade
},
requires: "wave",
effect() {
tech.waveBeamSpeed *= 0.75;
tech.waveBeamDamage += 0.27 * 0.41 //this sets base wave damage
},
remove() {
tech.waveBeamSpeed = 11;
tech.waveBeamDamage = 0.27 //this sets base wave damage
}
},
{
name: "bound state",
description: "wave packets reflect backwards 2 times
–33% range",
isGunTech: true,
maxCount: 9,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("wave") && !tech.isLongitudinal
},
requires: "wave, not phonon",
effect() {
tech.waveReflections += 2
},
remove() {
tech.waveReflections = 1
}
},
{
name: "frequency",
description: `wave has unlimited ammo
-25% wave damage`,
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed: () => tech.haveGunCheck("wave"),
requires: "wave",
effect() {
tech.isInfiniteWaveAmmo = true
b.guns[3].savedAmmo = b.guns[3].ammo
b.guns[3].ammo = Infinity
simulation.updateGunHUD();
},
remove() {
tech.isInfiniteWaveAmmo = false
if (this.count > 0 && b.guns[3].savedAmmo !== undefined) {
b.guns[3].ammo = b.guns[3].savedAmmo
simulation.updateGunHUD();
} else if (b.guns[3].ammo === Infinity) {
b.guns[3].ammo = 0
}
}
},
{
name: "phonon", //longitudinal //gravitational wave?
description: "waves are low frequency, high damage
expanding arcs that propagate through solids",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 3,
frequencyDefault: 3,
allowed() {
return tech.haveGunCheck("wave") && !tech.isPhaseVelocity && tech.waveReflections === 1
},
requires: "wave, not phase velocity, bound state",
ammoScale: 6,
effect() {
tech.isLongitudinal = true;
b.guns[3].chooseFireMethod()
b.guns[3].ammoPack = b.guns[3].defaultAmmoPack / this.ammoScale
if (tech.isInfiniteWaveAmmo) {
b.guns[3].savedAmmo = Math.ceil(b.guns[3].savedAmmo / this.ammoScale); //used with low frequency
} else {
b.guns[3].ammo = Math.ceil(b.guns[3].ammo / this.ammoScale);
}
simulation.updateGunHUD();
},
remove() {
if (tech.isLongitudinal) {
tech.isLongitudinal = false;
b.guns[3].chooseFireMethod()
b.guns[3].ammoPack = b.guns[3].defaultAmmoPack
if (tech.isInfiniteWaveAmmo) {
b.guns[3].savedAmmo = Math.ceil(b.guns[3].savedAmmo * this.ammoScale); //used with low frequency
} else {
b.guns[3].ammo = Math.ceil(b.guns[3].ammo * this.ammoScale);
}
simulation.updateGunHUD();
}
tech.isLongitudinal = false;
}
},
{
name: "isotropic",
description: "waves expand in all directions
–40% range and +50% damage",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 3,
frequencyDefault: 3,
allowed() {
return tech.isLongitudinal && tech.haveGunCheck("wave") && !tech.isBulletTeleport
},
requires: "wave, phonon, not uncertainty principle",
effect() {
tech.is360Longitudinal = true;
b.guns[3].chooseFireMethod()
},
remove() {
tech.is360Longitudinal = false;
b.guns[3].chooseFireMethod()
}
},
{
name: "mechanical resonance",
description: "after a block gets vibrated by a phonon
there is a chance it's flung at nearby mobs",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return (tech.isLongitudinal && tech.haveGunCheck("wave")) || tech.isSoundBotUpgrade
},
requires: "wave, phonon",
effect() {
tech.isPhononBlock = true
},
remove() {
tech.isPhononBlock = false
}
},
{
name: "sympathetic resonance",
description: "after a mob gets vibrated by a phonon
a new resonance wave expands",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return (tech.isLongitudinal && tech.haveGunCheck("wave")) || tech.isSoundBotUpgrade
},
requires: "wave, phonon",
effect() {
tech.isPhononWave = true
},
remove() {
tech.isPhononWave = false
}
},
{
name: "cruise missile",
description: "+100% missile explosive damage, radius
–50% missile speed",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return (tech.haveGunCheck("missiles") && tech.missileFireCD === 45) || (m.fieldMode === 4 && simulation.molecularMode === 1) || tech.missileBotCount
},
requires: "missiles, not launch system",
effect() {
tech.isMissileBig = true
},
remove() {
tech.isMissileBig = false
}
},
{
name: "ICBM",
description: "+75% missile explosive damage, radius
–50% missile speed",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return (tech.haveGunCheck("missiles") || (m.fieldMode === 4 && simulation.molecularMode === 1)) && tech.isMissileBig
},
requires: "missiles, cruise missile",
effect() {
tech.isMissileBiggest = true
},
remove() {
tech.isMissileBiggest = false
}
},
{
name: "launch system",
description: `+500% missile gun fire rate
+20% missile ammo per ${powerUps.orb.ammo(1)}`,
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("missiles") && !tech.isMissileBig
},
requires: "missiles, not cruise missile",
ammoBonus: 1.2,
effect() {
tech.missileFireCD = 10
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
if (b.guns[i].name === "missiles") {
b.guns[i].ammoPack *= this.ammoBonus;
b.guns[i].ammo = Math.ceil(b.guns[i].ammo * this.ammoBonus);
simulation.updateGunHUD();
break
}
}
},
remove() {
if (tech.missileFireCD !== 45) {
tech.missileFireCD = 45;
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
if (b.guns[i].name === "missiles") {
b.guns[i].ammoPack = 5;
b.guns[i].ammo = Math.ceil(b.guns[i].ammo / this.ammoBonus);
simulation.updateGunHUD();
break
}
}
}
}
},
{
name: "missile-bot",
link: `missile-bot`,
description: `use ${powerUps.orb.research(1)}to trade your missile gun
for a bot that fires missiles`,
isGunTech: true,
isRemoveGun: true,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
isBot: true,
isBotTech: true,
allowed() {
return tech.haveGunCheck("missiles", false) && tech.missileFireCD === 45 && (build.isExperimentSelection || powerUps.research.count > 0)
},
requires: "missiles, not launch system",
effect() {
tech.missileBotCount++;
b.missileBot();
if (tech.haveGunCheck("missiles", false)) b.removeGun("missiles") //remove your last gun
for (let i = 0; i < 1; i++) {
if (powerUps.research.count > 0) powerUps.research.changeRerolls(-1)
}
},
remove() {
if (this.count) {
tech.missileBotCount = 0;
b.clearPermanentBots();
b.respawnBots();
if (!tech.haveGunCheck("missiles", false)) b.giveGuns("missiles")
powerUps.research.changeRerolls(1)
}
}
},
{
name: "iridium-192",
description: "explosions release gamma radiation
+100% explosion damage over 4 seconds",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return !tech.isImmuneExplosion && tech.explosiveRadius === 1 && !tech.isSmallExplosion && !tech.isBlockExplode && !tech.fragments && (tech.haveGunCheck("missiles") || tech.missileBotCount || tech.isIncendiary || (tech.haveGunCheck("grenades") && !tech.isNeutronBomb) || tech.isPulseLaser || (m.fieldMode === 4 && simulation.molecularMode === 1) || tech.isBoomBotUpgrade || tech.isTokamak)
},
requires: "an explosive damage source, not ammonium nitrate, nitroglycerin, chain reaction, fragmentation, electric armor",
effect() {
tech.isExplodeRadio = true; //iridium-192
},
remove() {
tech.isExplodeRadio = false;
}
},
{
name: "fragmentation",
description: "some detonations and collisions eject nails
blocks, grenades, missiles, rivets, harpoon",
isGunTech: true,
maxCount: 9,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return !tech.isExplodeRadio && ((tech.haveGunCheck("harpoon") && !tech.isFoamBall) || (tech.haveGunCheck("grenades") && !tech.isNeutronBomb) || tech.haveGunCheck("missiles") || (m.fieldMode === 4 && simulation.molecularMode === 1) || tech.missileBotCount || tech.isRivets || tech.blockDamage > 0.075)
},
requires: "grenades, missiles, rivets, harpoon, or mass driver, not iridium-192, not polyurethane foam",
effect() {
tech.fragments++
},
remove() {
tech.fragments = 0
}
},
{
name: "ammonium nitrate",
description: "+24% explosive damage, radius",
isGunTech: true,
maxCount: 9,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return !tech.isExplodeRadio && tech.hasExplosiveDamageCheck()
},
requires: "an explosive damage source, not iridium-192",
effect() {
tech.explosiveRadius += 0.24;
},
remove() {
tech.explosiveRadius = 1;
}
},
{
name: "nitroglycerin",
description: "+66% explosive damage
–33% explosive radius",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return !tech.isExplodeRadio && tech.hasExplosiveDamageCheck() && !tech.isExplosionHarm
},
requires: "an explosive damage source, not iridium-192, acetone peroxide",
effect() {
tech.isSmallExplosion = true;
},
remove() {
tech.isSmallExplosion = false;
}
},
{
name: "acetone peroxide",
description: "+70% explosive radius
–33% explosive defense",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
isBadRandomOption: true,
allowed() {
return tech.hasExplosiveDamageCheck() && !tech.isSmallExplosion
},
requires: "an explosive damage source, not nitroglycerin",
effect() {
tech.isExplosionHarm = true;
},
remove() {
tech.isExplosionHarm = false;
}
},
{
name: "shock wave",
description: "mines and sporangium stun for 3-5 seconds
explosions stun for 0.5 seconds",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return tech.haveGunCheck("spores") || tech.haveGunCheck("mine") || (!tech.isExplodeRadio && tech.hasExplosiveDamageCheck())
},
requires: "mine, spores, an explosive damage source, not iridium-192",
effect() {
tech.isStun = true;
},
remove() {
tech.isStun = false;
}
},
{
name: "shaped charge",
description: `use ${powerUps.orb.research(3)} to dynamically reduce
all explosions to prevent health loss`,
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return !tech.isImmuneExplosion && (build.isExperimentSelection || powerUps.research.count > 2) && (tech.haveGunCheck("missiles") || (m.fieldMode === 4 && simulation.molecularMode === 1) || tech.missileBotCount > 0 || tech.isIncendiary || tech.isPulseLaser || tech.isTokamak || (tech.haveGunCheck("grenades") && !tech.isNeutronBomb))
},
requires: "an explosive damage source, not rocket propelled grenade",
effect() {
tech.isSmartRadius = true;
for (let i = 0; i < 3; i++) {
if (powerUps.research.count > 0) powerUps.research.changeRerolls(-1)
}
},
remove() {
tech.isSmartRadius = false;
if (this.count > 0) powerUps.research.changeRerolls(3)
}
},
// {
// name: "electric armor",
// // description: "explosions do no defense
while your energy is above 98%",
// description: "instead of causing health loss, explosions
drain 12 energy and have more knockback",
// isGunTech: true,
// maxCount: 1,
// count: 0,
// frequency: 2,
// frequencyDefault: 2,
// allowed() {
// return !tech.isSmartRadius && !tech.isExplodeRadio && tech.hasExplosiveDamageCheck()
// },
// requires: "an explosive damage source, not iridium-192",
// effect() {
// tech.isImmuneExplosion = true;
// },
// remove() {
// tech.isImmuneExplosion = false;
// }
// },
{
name: "MIRV",
description: "fire +1 missile or grenade per shot
–12% explosion damage and radius",
isGunTech: true,
maxCount: 9,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("missiles") || tech.missileBotCount || tech.haveGunCheck("grenades")
},
requires: "missiles, grenades",
effect() {
tech.missileCount++;
},
remove() {
tech.missileCount = 1;
}
},
{
name: "rocket-propelled grenade",
description: "grenades explode on map collisions
explosions drain energy, not health",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("grenades") && !tech.isVacuumBomb
},
requires: "grenades, not vacuum bomb",
effect() {
tech.isImmuneExplosion = true;
tech.isRPG = true;
b.setGrenadeMode()
},
remove() {
tech.isImmuneExplosion = false;
tech.isRPG = false;
b.setGrenadeMode()
}
},
{
name: "vacuum bomb",
description: "grenades fire slower, explode bigger,
and suck everything towards them",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("grenades") && !tech.isNeutronBomb && !tech.isBlockExplode && !tech.isRPG
},
requires: "grenades, not neutron bomb, chain reaction, RPG",
effect() {
tech.isVacuumBomb = true;
b.setGrenadeMode()
},
remove() {
tech.isVacuumBomb = false;
b.setGrenadeMode()
}
},
{
name: "chain reaction",
description: "+33% grenade radius and damage
blocks caught in explosions also explode",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("grenades") && !tech.isExplodeRadio && !tech.isNeutronBomb && !tech.isVacuumBomb
},
requires: "grenades, not iridium-192, neutron bomb, vacuum bomb",
effect() {
tech.isBlockExplode = true; //chain reaction
},
remove() {
tech.isBlockExplode = false;
}
},
{
name: "flame test",
description: "after grenades detonate they release
a colorful cluster of small explosions",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("grenades") && !tech.isNeutronBomb && !tech.isCircleExplode && !tech.isPetalsExplode
},
requires: "grenades, not neutron bomb, pyrotechnics, fireworks",
effect() {
tech.isClusterExplode = true;
},
remove() {
tech.isClusterExplode = false;
}
},
{
name: "pyrotechnics",
description: "after grenades detonate they release
a colorful circle of explosions",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("grenades") && !tech.isNeutronBomb && !tech.isClusterExplode && !tech.isPetalsExplode
},
requires: "grenades, not neutron bomb, flame test, fireworks",
effect() {
tech.isCircleExplode = true;
},
remove() {
tech.isCircleExplode = false;
}
},
{
name: "fireworks",
description: "after grenades detonate they release
colorful petals of explosions",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("grenades") && !tech.isNeutronBomb && !tech.isClusterExplode && !tech.isCircleExplode
},
requires: "grenades, not neutron bomb, pyrotechnics, flame test",
effect() {
tech.isPetalsExplode = true;
},
remove() {
tech.isPetalsExplode = false;
}
},
{
name: "neutron bomb",
description: "grenades are irradiated with Cf-252
does radioactive damage over time",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("grenades") && !tech.fragments && !tech.isVacuumBomb && !tech.isExplodeRadio && !tech.isBlockExplode && !tech.isClusterExplode && !tech.isPetalsExplode && !tech.isCircleExplode
},
requires: "grenades, not fragmentation, vacuum bomb, iridium-192, pyrotechnics, fireworks, flame test, chain reaction",
effect() {
tech.isNeutronBomb = true;
b.setGrenadeMode()
},
remove() {
tech.isNeutronBomb = false;
b.setGrenadeMode()
}
},
{
name: "vacuum permittivity",
description: "+20% radioactive range
objects in range of the bomb are slowed",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.isNeutronBomb
},
requires: "grenades, neutron bomb",
effect() {
tech.isNeutronSlow = true
},
remove() {
tech.isNeutronSlow = false
}
},
{
name: "radioactive contamination",
description: "after a mob or shield dies,
leftover radiation spreads to a nearby mob",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.isNailRadiation || tech.isWormholeDamage || tech.isNeutronBomb || tech.isExplodeRadio || tech.isBlockRadiation
},
requires: "radiation damage source",
effect() {
tech.isRadioactive = true
},
remove() {
tech.isRadioactive = false
}
},
{
name: "nuclear transmutation",
description: "+47% radiation damage
nail, drone, neutron bomb, iridium, cosmic string, deflect",
isGunTech: true,
maxCount: 9,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.isNailRadiation || tech.isWormholeDamage || tech.isNeutronBomb || tech.isExplodeRadio || tech.isBlockRadiation || tech.isDroneRadioactive
},
requires: "radiation damage source",
effect() {
tech.radioactiveDamage += 1.47
},
remove() {
tech.radioactiveDamage = 1
}
},
{
name: "water shielding",
link: `water shielding`,
description: "radioactive effects on you are reduced by 75%
neutron bomb, drones, explosions, slime",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.isNeutronBomb || tech.isDroneRadioactive || tech.isExplodeRadio
},
requires: "neutron bomb, irradiated drones, iridium-192",
effect() {
tech.isRadioactiveResistance = true
},
remove() {
tech.isRadioactiveResistance = false
}
},
{
name: "ricochet",
description: "after nails hit a mob they rebound towards
a new mob with +180% damage 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.isFoamMine || tech.isSuperMine)) || (tech.haveGunCheck("nail gun") && !tech.isRivets && !tech.isNeedles) || (tech.haveGunCheck("shotgun") && (tech.isNeedles || tech.isNailShot) && !tech.isRivets && !tech.isNeedles)
},
//
requires: "nail gun, not rotary cannon, rivets, or needles",
effect() {
tech.isRicochet = true
},
remove() {
tech.isRicochet = false
}
},
{
name: "booby trap",
description: "50% chance to drop a mine from power ups
+36% JUNK to tech pool",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("mine")
},
requires: "mines",
effect() {
tech.isMineDrop = true;
if (tech.isMineDrop) b.mine(m.pos, {
x: 0,
y: 0
}, 0)
this.refundAmount += tech.addJunkTechToPool(0.36)
},
refundAmount: 0,
remove() {
tech.isMineDrop = false;
if (this.count > 0 && this.refundAmount > 0) {
tech.removeJunkTechFromPool(this.refundAmount)
this.refundAmount = 0
}
}
},
{
name: "elephants toothpaste",
description: "instead of nails mines catalyze a reaction
that yields foam bubbles",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("mine") && !tech.isSuperMine && !tech.isRicochet && !tech.isNailRadiation && !tech.isNailCrit
},
requires: "mines, not blast ball, ricochet, irradiated nails, supercritical fission",
effect() {
tech.isFoamMine = true;
},
remove() {
tech.isFoamMine = false;
}
},
{
name: "blast ball",
descriptionFunction() {
return `instead of nails mines fire bouncy balls`
},
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("mine") && !tech.isFoamMine && !tech.isRicochet && !tech.isNailRadiation && !tech.isNailCrit
},
requires: "mines, not elephants toothpaste, ricochet, irradiated nails, supercritical fission",
effect() {
tech.isSuperMine = true;
},
remove() {
tech.isSuperMine = false;
}
},
{
name: "laser-mines",
link: `laser-mines`,
description: "mines laid while you are crouched
use energy to emit 3 unaimed lasers",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("mine")
},
requires: "mines",
effect() {
tech.isLaserMine = true;
},
remove() {
tech.isLaserMine = false;
}
},
{
name: "sentry",
descriptionFunction() {
return `mines fire one ${b.guns[10].nameString()} at a time
mines fire 50% more ${b.guns[10].nameString('s')}`
},
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("mine")
},
requires: "mines, not elephants toothpaste",
effect() {
tech.isMineSentry = true;
},
remove() {
tech.isMineSentry = false;
}
},
{
name: "extended magazine",
descriptionFunction() {
return `sentry mines fire 50% more ${b.guns[10].nameString('s')}`
},
isGunTech: true,
maxCount: 9,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("mine") && tech.isMineSentry
},
requires: "mines, sentry",
effect() {
tech.sentryAmmo += 17;
},
remove() {
tech.sentryAmmo = 33;
}
},
{
name: "mycelial fragmentation",
link: `mycelial fragmentation`,
description: "during their growth phase
+70% sporangium discharge",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("spores")
},
requires: "spores",
effect() {
tech.isSporeGrowth = true
},
remove() {
tech.isSporeGrowth = false
}
},
{
name: "cordyceps",
// descriptionFunction() {
// return `mobs infected by ${b.guns[6].nameString('s')} have a 5% chance
to resurrect and attack other mobs`
// },
description: "sporangium infect mobs they attach to
infected mobs resurrect and attack other mobs",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("spores")
},
requires: "spores",
effect() {
tech.isZombieMobs = true
},
remove() {
tech.isZombieMobs = false
}
},
{
name: "colony",
description: "+50% sporangium discharge
40% chance to discharge something different",
link: `colony`,
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("spores")
},
requires: "spores",
effect() {
tech.isSporeColony = true
},
remove() {
tech.isSporeColony = false
}
},
{
name: "cryodesiccation",
descriptionFunction() {
return `+25% sporangium discharge
${b.guns[6].nameString('s')} freeze mobs for 1.5 second`
},
// description: "+25% sporangium discharge
spores freeze mobs for 1.5 second",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("spores") || tech.sporesOnDeath > 0 || (m.fieldMode === 4 && simulation.molecularMode === 0) || tech.isSporeWorm || tech.isSporeFlea
},
requires: "spores",
effect() {
tech.isSporeFreeze = true
},
remove() {
tech.isSporeFreeze = false
}
},
{
name: "flagella",
descriptionFunction() {
return `+50% ${b.guns[6].nameString()} acceleration
if they can't find a target ${b.guns[6].nameString('s')} follow you`
},
// description: "+50% spore acceleration
if they can't find a target spores follow you",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("spores") || tech.sporesOnDeath > 0 || (m.fieldMode === 4 && simulation.molecularMode === 0) || tech.isSporeWorm || tech.isSporeFlea
},
requires: "spores",
effect() {
tech.isSporeFollow = true
},
remove() {
tech.isSporeFollow = false
}
},
{
name: "junk DNA",
descriptionFunction() {
return `+53% ${b.guns[6].nameString()} damage per JUNKtech (${(53 * tech.junkCount).toFixed(0)}%)
+50% JUNK to tech pool`
},
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("spores") || tech.sporesOnDeath > 0 || (m.fieldMode === 4 && simulation.molecularMode === 0) || tech.isSporeWorm || tech.isSporeFlea
},
requires: "spores",
effect() {
tech.isJunkDNA = true
this.refundAmount += tech.addJunkTechToPool(0.5)
},
refundAmount: 0,
remove() {
tech.isJunkDNA = false
if (this.count > 0 && this.refundAmount > 0) {
tech.removeJunkTechFromPool(this.refundAmount)
this.refundAmount = 0
}
}
},
// {
// name: "junk DNA",
// //increase damage by 10% for each JUNK tech percent in the tech pool, remove all JUNK tech,
// descriptionFunction() { return `+50% ${b.guns[6].nameString()} damage
+15% JUNK to tech pool` },
// isGunTech: true,
// maxCount: 1,
// count: 0,
// frequency: 3,
// frequencyDefault: 3,
// allowed() {
// return tech.haveGunCheck("spores") || tech.sporesOnDeath > 0 || (m.fieldMode === 4 && simulation.molecularMode === 0) || tech.isSporeWorm || tech.isSporeFlea
// },
// requires: "spores",
// effect() {
// tech.isSporeWorm = true
// this.refundAmount += tech.addJunkTechToPool(0.15)
// },
// refundAmount: 0,
// remove() {
// tech.isSporeWorm = false
// if (this.count > 0 && this.refundAmount > 0) {
// tech.removeJunkTechFromPool(this.refundAmount)
// this.refundAmount = 0
// }
// }
// },
{
name: "mutualism",
descriptionFunction() {
return `+200% ${b.guns[6].nameString()} damage
${b.guns[6].nameString('s')} borrow 1 health until they die`
},
// description: `+150% ${b.guns[6].name()} damage
spores borrow 0.5 health until they die`,
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return (tech.haveGunCheck("spores") || tech.sporesOnDeath > 0 || (m.fieldMode === 4 && simulation.molecularMode === 0)) || tech.isSporeWorm || tech.isSporeFlea
},
requires: "spores",
effect() {
tech.isMutualism = true
},
remove() {
tech.isMutualism = false
}
},
{
name: "necrophage",
description: "if foam, fleas, or worms kill their target
they grow 3 copies",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("foam") || tech.isFoamBall || tech.isFoamBotUpgrade || tech.isFoamShot || tech.isSporeWorm || tech.isSporeFlea || tech.isFoamMine
},
requires: "foam, spores, worms, fleas",
effect() {
tech.isSpawnBulletsOnDeath = true
},
remove() {
tech.isSpawnBulletsOnDeath = false;
}
},
{
name: "siphonaptera",
description: "spores metamorphose into fleas",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 3,
frequencyDefault: 3,
allowed() {
return (tech.haveGunCheck("spores") || tech.sporesOnDeath > 0 || (m.fieldMode === 4 && simulation.molecularMode === 0) || (tech.haveGunCheck("shotgun") && !tech.isIncendiary && !tech.isRivets && !tech.isIceShot && !tech.isFoamShot && !tech.isNeedles && !tech.isNailShot)) && !tech.isSporeWorm
},
requires: "spores, not worms",
effect() {
tech.isSporeFlea = true
},
remove() {
tech.isSporeFlea = false
}
},
{
name: "nematodes",
description: "spores metamorphose into worms",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 3,
frequencyDefault: 3,
allowed() {
return (tech.haveGunCheck("spores") || tech.sporesOnDeath > 0 || (m.fieldMode === 4 && simulation.molecularMode === 0) || (tech.haveGunCheck("shotgun") && !tech.isIncendiary && !tech.isRivets && !tech.isIceShot && !tech.isFoamShot && !tech.isNeedles && !tech.isNailShot)) && !tech.isSporeFlea
},
requires: "spores, not fleas",
effect() {
tech.isSporeWorm = true
},
remove() {
tech.isSporeWorm = false
}
},
{
name: "K-selection",
description: "+37% worm and flea damage",
isGunTech: true,
maxCount: 3,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.isSporeWorm || tech.isSporeFlea
},
requires: "spores, shotgun, worms, fleas",
effect() {
tech.wormSize++
},
remove() {
tech.wormSize = 0
}
},
{
name: "path integration",
descriptionFunction() {
return `drones and ${b.guns[6].nameString("s")}
travel with you through levels`
},
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return (tech.isSporeFollow && (tech.haveGunCheck("spores") || (tech.haveGunCheck("shotgun") && tech.isSporeWorm))) || tech.haveGunCheck("drones") || (m.fieldMode === 4 && (simulation.molecularMode === 0 || simulation.molecularMode === 3))
},
requires: "spores, worms, flagella, drones",
effect() {
tech.isDronesTravel = true
},
remove() {
tech.isDronesTravel = false
}
},
{
name: "reduced tolerances",
link: `reduced tolerances`,
description: `+66% drones per ${powerUps.orb.ammo()} and energy
–40% drone duration`,
isGunTech: true,
maxCount: 3,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return !tech.isDroneRadioactive && (tech.haveGunCheck("drones") || (m.fieldMode === 4 && simulation.molecularMode === 3))
},
requires: "drones, not irradiated drones",
effect() {
tech.droneCycleReduction = Math.pow(0.6, 1 + this.count)
tech.droneEnergyReduction = Math.pow(0.333, 1 + this.count)
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
if (b.guns[i].name === "drones") {
const scale = Math.pow(3, this.count + 1)
b.guns[i].ammoPack = b.guns[i].defaultAmmoPack * scale
}
}
},
remove() {
tech.droneCycleReduction = 1
tech.droneEnergyReduction = 1
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
if (b.guns[i].name === "drones") b.guns[i].ammoPack = b.guns[i].defaultAmmoPack
}
}
},
{
name: "delivery drone",
description: "if a drone picks up a power up,
it becomes larger, faster, and more durable",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("drones") || tech.isForeverDrones || (m.fieldMode === 4 && simulation.molecularMode === 3)
},
requires: "drones",
effect() {
tech.isDroneGrab = true
},
remove() {
tech.isDroneGrab = false
}
},
{
name: "von Neumann probe", //"drone repair",
description: "after a drone expires
it will harvest a nearby block to replicate itself",
// description: "broken drones repair if the drone gun is active
repairing has a 25% chance to use 1 drone",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("drones")
},
requires: "drones",
effect() {
tech.isDroneRespawn = true
},
remove() {
tech.isDroneRespawn = false
}
},
{
name: "brushless motor",
description: "drones rapidly rush towards their target
+33% drone collision damage",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 3,
frequencyDefault: 3,
allowed() {
return (tech.haveGunCheck("drones") || tech.isForeverDrones || (m.fieldMode === 4 && simulation.molecularMode === 3)) && !tech.isDroneRadioactive && !tech.isIncendiary
},
requires: "drones, molecular assembler, not irradiated drones, incendiary",
effect() {
tech.isDroneTeleport = true
},
remove() {
tech.isDroneTeleport = false
}
},
{
name: "axial flux motor",
description: "+66% drones rush frequency
+44% drone collision damage",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.isDroneTeleport
},
requires: "drones, brushless motor",
effect() {
tech.isDroneFastLook = true
},
remove() {
tech.isDroneFastLook = false
}
},
{
name: "irradiated drones",
link: `irradiated drones`,
description: `the space around drones is irradiated
–75% drones per ${powerUps.orb.ammo()} and energy`,
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.droneCycleReduction === 1 && !tech.isIncendiary && !tech.isDroneTeleport && (tech.haveGunCheck("drones") || tech.isForeverDrones || (m.fieldMode === 4 && simulation.molecularMode === 3))
},
requires: "drones, not reduced tolerances, incendiary, torque bursts",
effect() {
tech.isDroneRadioactive = true
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
if (b.guns[i].name === "drones") {
b.guns[i].ammoPack = b.guns[i].defaultAmmoPack * 0.25
b.guns[i].ammo = Math.ceil(b.guns[i].ammo * 0.25)
simulation.makeGunHUD();
}
}
},
remove() {
if (tech.isDroneRadioactive) {
tech.isDroneRadioactive = false
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
if (b.guns[i].name === "drones") {
b.guns[i].ammoPack = b.guns[i].defaultAmmoPack
b.guns[i].ammo = b.guns[i].ammo * 4
simulation.makeGunHUD();
}
}
}
}
},
{
name: "beta radiation", //"control rod ejection",
description: "–50% drone duration
+100% drone radiation damage",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.isDroneRadioactive
},
requires: "drones, irradiated drones",
effect() {
tech.droneRadioDamage = 2
},
remove() {
tech.droneRadioDamage = 1
}
},
{
name: "orthocyclic winding",
link: `orthocyclic winding`,
description: "+66% drone acceleration
+33% radiation damage",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.isDroneRadioactive
},
requires: "drones, irradiated drones",
effect() {
tech.isFastDrones = true
},
remove() {
tech.isFastDrones = false
}
},
{
name: "fault tolerance",
description: `use ${powerUps.orb.research(2)}to trade your drone gun
for 5 drones that last forever`,
isGunTech: true,
isRemoveGun: true,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return tech.haveGunCheck("drones", false) && !tech.isDroneRespawn && tech.bulletsLastLonger === 1 && !tech.isDronesTravel && (build.isExperimentSelection || powerUps.research.count > 1)
},
requires: "drones, not drone repair, anti-shear topology, autonomous navigation",
effect() {
const num = 5
tech.isForeverDrones += num
if (tech.haveGunCheck("drones", false)) b.removeGun("drones")
//spawn drones
if (tech.isDroneRadioactive) {
for (let i = 0; i < num * 0.25; i++) {
b.droneRadioactive({
x: m.pos.x + 30 * (Math.random() - 0.5),
y: m.pos.y + 30 * (Math.random() - 0.5)
}, 5)
bullet[bullet.length - 1].endCycle = Infinity
}
} else {
for (let i = 0; i < num; i++) {
b.drone({
x: m.pos.x + 30 * (Math.random() - 0.5),
y: m.pos.y + 30 * (Math.random() - 0.5)
}, 5)
bullet[bullet.length - 1].endCycle = Infinity
}
}
for (let i = 0; i < 2; i++) {
if (powerUps.research.count > 0) powerUps.research.changeRerolls(-1)
}
},
remove() {
tech.isForeverDrones = 0
if (this.count && !tech.haveGunCheck("drones", false)) b.giveGuns("drones")
if (this.count > 0) powerUps.research.changeRerolls(2)
}
},
{
name: "surfactant",
description: `use ${powerUps.orb.research(2)}to trade your foam gun
for 2 foam-bots and foam-bot upgrade`,
isGunTech: true,
isRemoveGun: true,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
isBot: true,
isBotTech: true,
isNonRefundable: true,
requires: "foam gun, not bot upgrades, fractionation, pressure vessel",
allowed() {
return tech.haveGunCheck("foam", false) && !b.hasBotUpgrade() && !tech.isAmmoFoamSize && !tech.isFoamPressure && (build.isExperimentSelection || powerUps.research.count > 1)
},
effect() {
tech.giveTech("foam-bot upgrade")
for (let i = 0; i < 2; i++) {
b.foamBot()
tech.foamBotCount++;
}
simulation.makeTextLog(`tech.isFoamBotUpgrade = true`)
if (tech.haveGunCheck("foam", false)) b.removeGun("foam")
for (let i = 0; i < 2; i++) {
if (powerUps.research.count > 0) powerUps.research.changeRerolls(-1)
}
},
remove() {
// if (this.count) {
// b.clearPermanentBots();
// b.respawnBots();
// if (!tech.haveGunCheck("foam")) b.giveGuns("foam")
// }
// if (this.count > 0) powerUps.research.changeRerolls(2)
}
},
{
name: "electrostatic induction",
description: "foam bubbles are electrically charged
causing attraction to nearby mobs",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return !tech.isBulletTeleport && (tech.haveGunCheck("foam") || tech.isFoamBotUpgrade || tech.isFoamShot || tech.isFoamBall || tech.isFoamMine)
},
requires: "foam, not uncertainty",
effect() {
tech.isFoamAttract = true
},
remove() {
tech.isFoamAttract = false
}
},
{
name: "uncertainty principle",
description: "foam, wave, and super ball positions are erratic
+53% foam, wave, and super ball damage",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return (!tech.isFoamAttract && (tech.haveGunCheck("foam") || tech.isFoamBotUpgrade || tech.isFoamShot || tech.isFoamBall || tech.isFoamMine)) || (tech.haveGunCheck("wave") && !tech.is360Longitudinal) || (tech.haveGunCheck("super balls") && !tech.isSuperHarm) || tech.isSoundBotUpgrade
},
requires: "foam, wave, super balls, not isotropic, electrostatic induction, Zectron",
effect() {
tech.isBulletTeleport = true
},
remove() {
tech.isBulletTeleport = false;
}
},
{
name: "aerogel",
description: "–50% foam duration and foam bubbles float
+180% foam damage",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("foam") || tech.isFoamBotUpgrade || tech.isFoamShot || tech.isFoamBall || tech.isFoamMine
},
requires: "foam",
effect() {
tech.isFastFoam = true
tech.foamGravity = -0.0003
},
remove() {
tech.isFastFoam = false;
tech.foamGravity = 0.00008
}
},
{
name: "surface tension",
description: "+43% foam damage",
isGunTech: true,
maxCount: 9,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("foam") || tech.isFoamBotUpgrade || tech.isFoamShot || tech.isFoamBall || tech.isFoamMine
},
requires: "foam",
effect() {
tech.foamDamage += 0.011 * 0.43
},
remove() {
tech.foamDamage = 0.011;
}
},
{
name: "cavitation",
description: "25% chance to discharge a huge foam bubble
increase foam recoil by 100%",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("foam") || tech.isFoamBotUpgrade || tech.isFoamShot || tech.isFoamBall || tech.isFoamMine
},
requires: "foam",
effect() {
tech.isFoamCavitation = true;
b.guns[8].knockBack = 0.001
},
remove() {
tech.isFoamCavitation = false;
b.guns[8].knockBack = 0.0005
}
},
{
name: "foam fractionation",
description: "if you have below 300 ammo
+100% foam gun bubble size",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("foam")
},
requires: "foam",
effect() {
tech.isAmmoFoamSize = true
},
remove() {
tech.isAmmoFoamSize = false;
}
},
{
name: "ideal gas law",
description: `remove all current foam ammo
+1200% foam ammo per ${powerUps.orb.ammo(1)}`,
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("foam") && !tech.isEnergyNoAmmo
},
requires: "foam, not non-renewables",
ammoLost: 0,
effect() {
b.guns[8].ammoPack = b.guns[8].ammoPack * 12;
this.ammoLost = b.guns[8].ammo
b.guns[8].ammo = 0
simulation.updateGunHUD()
},
remove() {
b.guns[8].ammoPack = 24
if (this.count) {
b.guns[8].ammo += this.ammoLost
simulation.updateGunHUD()
}
}
},
{
name: "pressure vessel",
description: "build up charge while firing foam gun
after firing discharge foam bubbles",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("foam")
},
requires: "foam",
effect() {
tech.isFoamPressure = true;
b.guns[8].chooseFireMethod()
},
remove() {
tech.isFoamPressure = false;
b.guns[8].chooseFireMethod()
}
},
{
name: "capacitor bank",
// description: "charge effects build up almost instantly
throwing blocks, foam, railgun, pulse, tokamak",
descriptionFunction() {
return `charge effects build up almost instantly
throwing, ${tech.haveGunCheck("foam", false) ? "foam" : "foam"}, ${tech.isPlasmaBall ? "plasma ball" : "plasma ball"}, ${tech.isRailGun ? "railgun" : "railgun"}, ${tech.isPulseLaser ? "pulse" : "pulse"}, ${tech.isTokamak ? "tokamak" : "tokamak"}`
},
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.blockDamage > 0.075 || tech.isRailGun || (tech.haveGunCheck("foam") && tech.isFoamPressure) || tech.isTokamak || tech.isPulseLaser || tech.isPlasmaBall
},
requires: "mass driver, railgun, foam, pressure vessel, pulse, tokamak, plasma ball",
effect() {
tech.isCapacitor = true;
},
remove() {
tech.isCapacitor = false;
}
},
{
name: "Bitter electromagnet",
descriptionFunction() {
return `railgun charges +33% slower
+100% harpoon density and damage`
},
isGunTech: true,
maxCount: 3,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("harpoon") && tech.isRailGun
},
requires: "harpoon, railgun",
effect() {
tech.railChargeRate *= 1.06
tech.harpoonDensity += 0.007
},
remove() {
tech.railChargeRate = 0.97;
tech.harpoonDensity = 0.007
}
},
{
name: "railgun",
description: `hold fire to charge harpoon and release to launch
harpoons can't retract`,
// description: `+900% harpoon ammo, but it can't retract
+50% harpoon density and damage`,
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("harpoon") && !tech.isFilament && !tech.isHarpoonPowerUp && !tech.isGrapple && !tech.isBoostReplaceAmmo
},
requires: "harpoon, not UHMWPE, induction furnace, grappling hook, quasiparticles",
ammoBonus: 9,
effect() {
tech.isRailGun = true;
b.guns[9].chooseFireMethod()
b.guns[9].ammoPack = 5;
b.guns[9].ammo = b.guns[9].ammo * 6;
simulation.updateGunHUD();
},
remove() {
if (tech.isRailGun) {
tech.isRailGun = false;
b.guns[9].chooseFireMethod()
b.guns[9].ammoPack = 1.7;
b.guns[9].ammo = Math.ceil(b.guns[9].ammo / 6);
simulation.updateGunHUD();
}
}
},
{
name: "grappling hook",
description: `harpoons attach to the map and pull you
your rope extends while holding fire`,
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("harpoon") && !tech.isFilament && !tech.isHarpoonPowerUp && !tech.isRailGun && !tech.isFireMoveLock
},
requires: "harpoon, not railgun, UHMWPE, induction furnace, Higgs mechanism",
effect() {
tech.isGrapple = true;
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
if (b.guns[i].name === "harpoon") b.guns[i].chooseFireMethod()
}
},
remove() {
if (tech.isGrapple) {
tech.isGrapple = false;
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
if (b.guns[i].name === "harpoon") b.guns[i].chooseFireMethod()
}
}
}
},
{
name: "bulk modulus",
description: `while grappling become invulnerable
drain energy`,
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("harpoon") && tech.isGrapple && !tech.isRailEnergy
},
requires: "grappling hook, not alternator",
effect() {
tech.isImmuneGrapple = true;
},
remove() {
tech.isImmuneGrapple = false
}
},
{
name: "alternator",
description: "+90% harpoon energy efficiency",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("harpoon") && !tech.isImmuneGrapple
},
requires: "harpoon, not bulk modulus",
effect() {
tech.isRailEnergy = true;
},
remove() {
tech.isRailEnergy = false;
}
},
{
name: "Bessemer process",
descriptionFunction() {
return `+${(10 * Math.sqrt(b.guns[9].ammo)).toFixed(0)}% harpoon size and damage
(1/10 √ harpoon ammo)`
},
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("harpoon") && !tech.isShieldPierce
},
requires: "harpoon, not ceramics",
effect() {
tech.isLargeHarpoon = true;
},
remove() {
tech.isLargeHarpoon = false;
}
},
{
name: "smelting",
descriptionFunction() {
return `forge ${this.removeAmmo()} ammo into a new harpoon
fire +1 harpoon with each shot`
},
isGunTech: true,
maxCount: 9,
count: 0,
frequency: 2,
frequencyDefault: 2,
ammoRemoved: 0,
removeAmmo() {
return (tech.isRailGun ? 5 : 1) * (2 + 2 * this.count)
},
allowed() {
return tech.haveGunCheck("harpoon") && b.guns[9].ammo >= this.removeAmmo()
},
requires: "harpoon",
effect() {
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
if (b.guns[i].name === "harpoon") {
const removeAmmo = this.removeAmmo()
this.ammoRemoved += removeAmmo
b.guns[i].ammo -= removeAmmo
if (b.guns[i].ammo < 0) b.guns[i].ammo = 0
simulation.updateGunHUD();
tech.extraHarpoons++;
break
}
}
},
remove() {
if (tech.extraHarpoons) {
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
if (b.guns[i].name === "harpoon") {
b.guns[i].ammo += this.ammoRemoved
simulation.updateGunHUD();
break
}
}
}
this.ammoRemoved = 0
tech.extraHarpoons = 0;
}
},
{
name: "UHMWPE",
descriptionFunction() {
return `+${(b.guns[9].ammo * 1.25).toFixed(0)}% harpoon rope length
(1/80 of harpoon ammo)`
},
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("harpoon") && !tech.isRailGun && !tech.isGrapple
},
requires: "harpoon, not grappling hook, railgun",
effect() {
tech.isFilament = true;
},
remove() {
tech.isFilament = false;
}
},
{
name: "induction furnace",
description: "after using harpoon to collect a power up
+600% harpoon damage",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("harpoon") && !tech.isRailGun && !tech.isGrapple
},
requires: "harpoon, not grappling hook, railgun",
effect() {
tech.isHarpoonPowerUp = true
},
remove() {
tech.isHarpoonPowerUp = false
}
},
{
name: "quasiparticles",
descriptionFunction() {
return `convert current and future ${powerUps.orb.ammo(1)} into ${powerUps.orb.boost(1)} which
give +${(powerUps.boost.damage * 100).toFixed(0)}% damage for ${(powerUps.boost.duration / 60).toFixed(0)} seconds`
},
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return ((tech.haveGunCheck("wave") && !tech.isInfiniteWaveAmmo) || tech.haveGunCheck("laser") || (tech.haveGunCheck("harpoon") && !tech.isRailGun)) && !tech.isEnergyNoAmmo
},
requires: "harpoon, laser, wave, frequency, not railgun, non-renewables",
effect() {
tech.isBoostReplaceAmmo = true
for (let i = powerUp.length - 1; i > -1; i--) {
if (powerUp[i].name === "ammo") {
powerUps.spawn(powerUp[i].position.x + 50 * (Math.random() - 0.5), powerUp[i].position.y + 50 * (Math.random() - 0.5), "boost");
Matter.Composite.remove(engine.world, powerUp[i]);
powerUp.splice(i, 1);
}
}
},
remove() {
tech.isBoostReplaceAmmo = false
}
},
{
name: "optical amplifier",
description: "gain 3 random laser guntech
laser only turns off if you have no energy",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
isNonRefundable: true,
allowed() {
return tech.haveGunCheck("laser") && !tech.isPulseLaser
},
requires: "laser gun, not pulse",
effect() {
let techGiven = 0
for (let j = 0; j < 3; j++) {
const names = ["quasiparticles", "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
const options = []
for (let i = 0; i < names.length; i++) {
for (let k = 0; k < tech.tech.length; k++) {
if (tech.tech[k].name === names[i]) {
options.push(k)
break
}
}
}
//remove options that don't meet requirements
for (let i = options.length - 1; i > -1; i--) {
const index = options[i]
if (!(tech.tech[index].count < tech.tech[index].maxCount) || !tech.tech[index].allowed()) {
options.splice(i, 1);
}
}
//pick one option
if (options.length) {
const index = options[Math.floor(Math.random() * options.length)]
simulation.makeTextLog(`tech.giveTech("${tech.tech[index].name}") //optical amplifier`, 360);
tech.giveTech(index)
techGiven++
}
}
if (techGiven > 0) {
tech.isStuckOn = true
} else { //eject if none found
simulation.makeTextLog(`0 tech found //optical amplifier`);
const loop = () => {
if (!simulation.paused && m.alive) {
for (let i = 0; i < tech.tech.length; i++) {
if (tech.tech[i].name === this.name) powerUps.ejectTech(i)
}
return
}
requestAnimationFrame(loop);
}
requestAnimationFrame(loop);
}
},
remove() {
tech.isStuckOn = false
}
},
{
name: "relativistic momentum",
description: "lasers push mobs and blocks",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return (tech.haveGunCheck("laser") && !tech.isPulseLaser) || tech.isLaserBotUpgrade || tech.isLaserField
},
requires: "laser, not pulse",
effect() {
tech.isLaserPush = true;
},
remove() {
tech.isLaserPush = false;
}
},
{
name: "iridescence",
// description: "if a laser hits a mob at a low angle of illumination
+66% laser damage",
description: "if laser beams hit mobs near their center
+100% laser damage",
isGunTech: true,
maxCount: 9,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return (tech.haveGunCheck("laser") && !tech.isPulseLaser) || tech.isLaserBotUpgrade || tech.isLaserMine
},
requires: "laser, not pulse",
effect() {
tech.laserCrit += 1;
},
remove() {
tech.laserCrit = 0;
}
},
{
name: "lens",
description: "+150% laser gun damage if it passes
through a revolving 90° arc circular lens", //π / 2
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("laser")
},
requires: "laser",
effect() {
tech.isLaserLens = true
b.guns[11].chooseFireMethod()
// if (this.count > 0) b.guns[11].lensDamageOn += 20 * Math.PI / 180
// b.guns[11].arcRange = 0.78
},
remove() {
tech.isLaserLens = false
b.guns[11].chooseFireMethod()
// b.guns[11].lensDamageOn = 2.5 // 100% + 150%
// b.guns[11].arcRange = 0
}
},
{
name: "compound lens",
description: "+50% laser lens damage
+15° lens arc",
isGunTech: true,
maxCount: 9,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("laser") && tech.isLaserLens
},
requires: "lens",
effect() {
b.guns[11].arcRange += 15 * Math.PI / 180 / 2
b.guns[11].lensDamageOn += 0.5
},
remove() {
b.guns[11].arcRange = 90 * Math.PI / 180 / 2 //0.78 divded by 2 because of how it's drawn
b.guns[11].lensDamageOn = 2.5
}
},
{
name: "specular reflection",
description: "+2 laser beam reflections",
isGunTech: true,
maxCount: 3,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return (tech.haveGunCheck("laser") || tech.isLaserMine || tech.isLaserBotUpgrade || tech.isLaserField) && !tech.isWideLaser && !tech.isPulseLaser && !tech.historyLaser
},
requires: "laser, not diffuse beam, pulse, or slow light",
effect() {
tech.laserReflections += 2;
},
remove() {
tech.laserReflections = 2;
}
},
{
name: "diffraction grating",
description: `+1 diverging laser gun beam`,
isGunTech: true,
maxCount: 9,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return tech.haveGunCheck("laser") && !tech.isWideLaser && !tech.historyLaser
},
requires: "laser gun, diffuse beam, or slow light",
effect() {
tech.beamSplitter++
b.guns[11].chooseFireMethod()
},
remove() {
if (tech.beamSplitter !== 0) {
tech.beamSplitter = 0
b.guns[11].chooseFireMethod()
}
}
},
{
name: "diffuse beam",
link: `diffuse beam`,
description: "laser gun beam is wider and doesn't reflect
+220% laser damage",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("laser") && tech.laserReflections < 3 && !tech.beamSplitter && !tech.isPulseLaser && !tech.historyLaser
},
requires: "laser gun, not specular reflection, diffraction grating, slow light, pulse",
effect() {
if (tech.wideLaser === 0) tech.wideLaser = 3
tech.isWideLaser = true;
b.guns[11].chooseFireMethod()
},
remove() {
if (tech.isWideLaser) {
// tech.wideLaser = 0
tech.isWideLaser = false;
b.guns[11].chooseFireMethod()
}
}
},
{
name: "output coupler",
description: "+30% laser gun beam width
+30% laser damage",
isGunTech: true,
maxCount: 9,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("laser") && tech.isWideLaser
},
requires: "laser gun, diffuse beam",
effect() {
tech.wideLaser += 2
b.guns[11].chooseFireMethod()
},
remove() {
if (tech.isWideLaser) {
tech.wideLaser = 3
} else {
tech.wideLaser = 0
}
b.guns[11].chooseFireMethod()
}
},
{
name: "slow light",
description: "laser gun beam is spread into your recent past
+300% total beam damage",
isGunTech: true,
maxCount: 9,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return tech.haveGunCheck("laser") && tech.laserReflections < 3 && !tech.beamSplitter && !tech.isWideLaser
},
requires: "laser gun, not specular reflection, diffraction grating, diffuse beam",
effect() {
// this.description = `add 5 more laser beams into into your past`
tech.historyLaser++
b.guns[11].chooseFireMethod()
},
remove() {
if (tech.historyLaser) {
tech.historyLaser = 0
b.guns[11].chooseFireMethod()
}
}
},
{
name: "infrared diode",
description: "+60% laser energy efficiency
infrared light is outside visual perception",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return (tech.haveGunCheck("laser") || tech.isLaserBotUpgrade || tech.isLaserMine || tech.isLaserField) && !tech.isPulseLaser && tech.laserDrain === 0.0018
},
requires: "laser, not free-electron, pulse",
effect() {
tech.laserDrain *= 0.4; //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: "+25% laser energy efficiency
+25% laser damage",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return (tech.haveGunCheck("laser") || tech.isLaserMine || tech.isLaserBotUpgrade || tech.isLaserField) && !tech.isPulseLaser && tech.laserDrain === 0.0018
},
requires: "laser, not pulse, infrared diode",
effect() {
tech.laserDrain *= 0.75
tech.laserDamage *= 1.25
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: "–250% laser energy efficiency
+200% laser damage",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return (tech.haveGunCheck("laser") || tech.isLaserMine || tech.isLaserBotUpgrade || tech.isLaserField) && !tech.isPulseLaser && tech.laserDrain === 0.0018
},
requires: "laser, not pulse, infrared diode",
effect() {
tech.laserDrain *= 1 + 2.5 //250% more drain
tech.laserDamage *= 1 + 2 //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",
description: "charge your energy and release it as a
laser pulse that initiates an explosion cluster",
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
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",
effect() {
tech.isPulseLaser = true;
b.guns[11].chooseFireMethod()
},
remove() {
if (tech.isPulseLaser) {
tech.isPulseLaser = false;
b.guns[11].chooseFireMethod()
}
}
},
//**************************************************
//************************************************** field
//************************************************** tech
//**************************************************
{
name: "spherical harmonics",
description: "+50% standing wave deflection efficiency
shield deflection radius maintains it's maximum range", //standing wave oscillates in a 3rd dimension
isFieldTech: true,
maxCount: 9,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.fieldMode === 1 && !tech.isLaserField
},
requires: "standing wave, not surface plasmons",
effect() {
tech.harmonics++
m.fieldShieldingScale = 1.6 * Math.pow(0.5, (tech.harmonics - 2))
m.harmonicShield = m.harmonicAtomic
},
remove() {
tech.harmonics = 2
m.fieldShieldingScale = 1.6 * Math.pow(0.5, (tech.harmonics - 2))
m.harmonicShield = m.harmonic3Phase
}
},
{
name: "surface plasmons",
description: "if deflecting drains all your energy
emit laser beams that scale with max energy",
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.fieldMode === 1 && tech.harmonics === 2
},
requires: "standing wave",
effect() {
tech.isLaserField = true
},
remove() {
tech.isLaserField = false
}
},
{
name: "zero point energy",
description: `use ${powerUps.orb.research(2)}
+100 maximum energy`,
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 3,
frequencyDefault: 3,
allowed() {
return (m.fieldMode === 1 || m.fieldMode === 8 || m.fieldMode === 6) && (build.isExperimentSelection || powerUps.research.count > 1)
},
requires: "standing wave, pilot wave, time dilation",
effect() {
tech.harmonicEnergy = 1
m.setMaxEnergy()
for (let i = 0; i < 2; i++) {
if (powerUps.research.count > 0) powerUps.research.changeRerolls(-1)
}
},
remove() {
tech.harmonicEnergy = 0;
m.setMaxEnergy()
if (this.count > 0) powerUps.research.changeRerolls(2)
}
},
{
name: "expansion",
description: "using standing wave field expands its radius
+40 maximum energy",
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.fieldMode === 1
},
requires: "standing wave",
effect() {
tech.isStandingWaveExpand = true
m.setMaxEnergy()
// m.fieldShieldingScale = (tech.isStandingWaveExpand ? 0.9 : 1.6) * Math.pow(0.6, (tech.harmonics - 2))
},
remove() {
tech.isStandingWaveExpand = false
m.setMaxEnergy()
// m.fieldShieldingScale = (tech.isStandingWaveExpand ? 0.9 : 1.6) * Math.pow(0.6, (tech.harmonics - 2))
m.harmonicRadius = 1
}
},
{
name: "electronegativity",
descriptionFunction() {
return `+0.22% damage per current stored energy
(+${(22 * m.maxEnergy).toFixed(0)}% damage at max energy)`
},
// description: "+1% damage per 8 stored energy",
isFieldTech: true,
maxCount: 9,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.fieldMode === 1 || m.fieldMode === 9 || m.fieldMode === 8
},
requires: "standing wave, wormhole, pilot wave",
effect() {
tech.energyDamage++
},
remove() {
tech.energyDamage = 0;
}
},
{
name: "bremsstrahlung",
description: "deflecting and thrown blocks
do braking damage to mobs",
isFieldTech: true,
maxCount: 9,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.fieldMode === 1 || m.fieldMode === 2 || m.fieldMode === 8
},
requires: "standing wave, perfect diamagnetism, pilot wave",
effect() {
tech.blockDmg += 5 //if you change this value also update the for loop in the electricity graphics in m.pushMass
},
remove() {
tech.blockDmg = 0;
}
},
{
name: "cherenkov radiation", //deflecting and blocks
description: "bremsstrahlung's effects are radioactive
+250% damage over 3 seconds",
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return (m.fieldMode === 1 || m.fieldMode === 2 || m.fieldMode === 8) && tech.blockDmg
},
requires: "bremsstrahlung",
effect() {
tech.isBlockRadiation = true
},
remove() {
tech.isBlockRadiation = false;
}
},
{
name: "flux pinning",
description: "after deflecting a mob
it is stunned for up to 4 seconds",
isFieldTech: true,
maxCount: 9,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.fieldMode === 2 || m.fieldMode === 1 || m.fieldMode === 4
},
requires: "a field that can block",
effect() {
tech.isStunField += 240;
},
remove() {
tech.isStunField = 0;
}
},
{
name: "triple point",
descriptionFunction() {
return `+1.5 second ice IX freeze and spawn ${powerUps.orb.coupling(10)}
${m.couplingDescription(1)} per ${powerUps.orb.coupling(1)}`
},
isFieldTech: true,
maxCount: 3,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.fieldMode === 2
},
requires: "perfect diamagnetism",
effect() {
tech.iceIXFreezeTime += 90
powerUps.spawnDelay("coupling", 10)
},
remove() {
tech.iceIXFreezeTime = 150
if (this.count) m.couplingChange(-10 * this.count)
}
},
{
name: "eddy current brake",
description: "perfect diamagnetism slows nearby mobs
effect radius scales with stored energy",
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.fieldMode === 2 && !tech.isHealBrake
},
requires: "perfect diamagnetism, not induction brake",
effect() {
tech.isPerfectBrake = true;
},
remove() {
tech.isPerfectBrake = false;
}
},
{
name: "Meissner effect",
description: "+55% perfect diamagnetism radius
+22° perfect diamagnetism circular arc",
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.fieldMode === 2
},
requires: "perfect diamagnetism",
effect() {
tech.isBigField = true;
},
remove() {
tech.isBigField = false;
}
},
{
name: "tessellation",
description: `use ${powerUps.orb.research(2)}
+50% defense`,
// description: "use 4 research
reduce defense by 50%",
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 3,
frequencyDefault: 3,
allowed() {
return (m.fieldMode === 8 || m.fieldMode === 2 || m.fieldMode === 3) && (build.isExperimentSelection || powerUps.research.count > 3)
},
requires: "perfect diamagnetism, negative mass, pilot wave",
effect() {
tech.isFieldHarmReduction = true
for (let i = 0; i < 2; i++) {
if (powerUps.research.count > 0) powerUps.research.changeRerolls(-1)
}
},
remove() {
tech.isFieldHarmReduction = false
if (this.count > 0) powerUps.research.changeRerolls(2)
}
},
{
name: "radiative equilibrium",
description: "after losing health
+200% damage for 8 seconds",
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.fieldMode === 8 || m.fieldMode === 3
},
requires: "negative mass, pilot wave",
effect() {
tech.isHarmDamage = true;
},
remove() {
tech.isHarmDamage = false;
}
},
{
name: "dynamic equilibrium",
descriptionFunction() {
// return `increase damage by your defense and
5% of your last ${tech.isEnergyHealth ? "energy" : "health"} loss (+${(100 * Math.max(5, tech.lastHitDamage) * m.lastHit * (2 - m.defense())).toFixed(0)}% damage)`
return `increase damage by your last ${tech.isEnergyHealth ? "energy" : "health"} loss
scales with defense (+${(100 * Math.max(5, tech.lastHitDamage) * m.lastHit * (2 - m.defense())).toFixed(0)}% damage)`
}, // = +${10*m.defense()}%
// descriptionFunction() { return `increase damage by your last ${tech.isEnergyHealth ? "energy" : "health"} loss
(${(tech.lastHitDamage).toFixed(0)}%)(${(100*m.lastHit).toFixed(0)} ${tech.isEnergyHealth ? "energy" : "health"})(${2 - m.defense()} defense) = ${(100*tech.lastHitDamage * m.lastHit * (2 - m.defense())).toFixed(0)}% damage ` }, // = +${10*m.defense()}%
isFieldTech: true,
maxCount: 9,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return (m.fieldMode === 8 || m.fieldMode === 3) && !tech.isCloakHealLastHit
},
requires: "negative mass, pilot wave, not patch",
effect() {
tech.lastHitDamage += 4;
},
remove() {
tech.lastHitDamage = 0;
}
},
{
name: "neutronium",
description: `move and jump 20% slower
if your field is active +90% defense`,
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.fieldMode === 3
},
requires: "negative mass",
effect() {
tech.isNeutronium = true
tech.baseFx *= 0.8
tech.baseJumpForce *= 0.8
m.setMovement()
},
//also removed in m.setHoldDefaults() if player switches into a bad field
remove() {
tech.isNeutronium = false
if (!tech.isFreeWormHole) {
tech.baseFx = 0.08
tech.baseJumpForce = 10.5
m.setMovement()
}
}
},
{
name: "aerostat",
description: `+88% damage while off the ground
-22% damage while on the ground`,
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.fieldMode === 3
},
requires: "negative mass",
effect() {
tech.isNoGroundDamage = true
},
remove() {
tech.isNoGroundDamage = false
}
},
{
name: "annihilation",
description: "after colliding with non-boss mobs
they are annihilated and –33% energy",
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.fieldMode === 3 && !tech.isEnergyHealth
},
requires: "negative mass, not mass-energy",
effect() {
tech.isAnnihilation = true
},
remove() {
tech.isAnnihilation = false;
}
},
{
name: "inertial mass",
description: "negative mass is larger and faster
blocks also move horizontally with the field",
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.fieldMode === 3
},
requires: "negative mass",
effect() {
tech.isFlyFaster = true
},
remove() {
tech.isFlyFaster = false;
}
},
// {
// name: "Bose Einstein condensate",
// description: "use energy to freeze mobs in your field
pilot wave, negative mass, time dilation",
// isFieldTech: true,
// maxCount: 1,
// count: 0,
// frequency: 2,
// frequencyDefault: 2,
// allowed() {
// return m.fieldMode === 8 || m.fieldMode === 3 || (m.fieldMode === 6 && !tech.isRewindField)
// },
// requires: "pilot wave, negative mass, time dilation, not retrocausality",
// effect() {
// tech.isFreezeMobs = true
// },
// remove() {
// tech.isFreezeMobs = false
// }
// },
{
name: "bot manufacturing",
description: `use ${powerUps.orb.research(2)} to build
3 random bots`,
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
isBotTech: true,
isNonRefundable: true,
allowed() {
return powerUps.research.count > 1 && (m.fieldMode === 4 || m.fieldMode === 8)
},
requires: "molecular assembler, pilot wave",
effect() {
for (let i = 0; i < 2; i++) {
if (powerUps.research.count > 0) powerUps.research.changeRerolls(-1)
}
m.energy = 0.01;
b.randomBot()
b.randomBot()
b.randomBot()
},
remove() { }
},
{
name: "bot prototypes",
description: `use ${powerUps.orb.research(3)}to build 2 random bots
and upgrade all bots to that type`,
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
isBotTech: true,
isNonRefundable: true,
allowed() {
return powerUps.research.count > 2 && (m.fieldMode === 4 || m.fieldMode === 8)
},
requires: "molecular assembler, pilot wave",
effect() {
for (let i = 0; i < 3; i++) {
if (powerUps.research.count > 0) powerUps.research.changeRerolls(-1)
}
//fill array of available bots
const notUpgradedBots = []
const num = 2
notUpgradedBots.push(() => {
tech.giveTech("nail-bot upgrade")
for (let i = 0; i < num; i++) {
b.nailBot()
tech.nailBotCount++;
}
simulation.makeTextLog(`tech.isNailBotUpgrade = true`)
})
notUpgradedBots.push(() => {
tech.giveTech("foam-bot upgrade")
for (let i = 0; i < num; i++) {
b.foamBot()
tech.foamBotCount++;
}
simulation.makeTextLog(`tech.isFoamBotUpgrade = true`)
})
notUpgradedBots.push(() => {
tech.giveTech("sound-bot upgrade")
for (let i = 0; i < num; i++) {
b.soundBot()
tech.soundBotCount++;
}
simulation.makeTextLog(`tech.isSoundBotUpgrade = true`)
})
notUpgradedBots.push(() => {
tech.giveTech("boom-bot upgrade")
for (let i = 0; i < num; i++) {
b.boomBot()
tech.boomBotCount++;
}
simulation.makeTextLog(`tech.isBoomBotUpgrade = true`)
})
notUpgradedBots.push(() => {
tech.giveTech("laser-bot upgrade")
for (let i = 0; i < num; i++) {
b.laserBot()
tech.laserBotCount++;
}
simulation.makeTextLog(`tech.isLaserBotUpgrade = true`)
})
notUpgradedBots.push(() => {
tech.giveTech("orbital-bot upgrade")
for (let i = 0; i < num; i++) {
b.orbitBot()
tech.orbitBotCount++;
}
simulation.makeTextLog(`tech.isOrbitalBotUpgrade = true`)
})
for (let i = 0; i < 2; i++) { //double chance for dynamo-bot, since it's very good for assembler
notUpgradedBots.push(() => {
tech.giveTech("dynamo-bot upgrade")
for (let i = 0; i < num; i++) {
b.dynamoBot()
tech.dynamoBotCount++;
}
simulation.makeTextLog(`tech.isDynamoBotUpgrade = true`)
})
}
notUpgradedBots[Math.floor(Math.random() * notUpgradedBots.length)]() //choose random function from the array and run it
},
remove() { }
},
// {
// name: "mycelium manufacturing",
// link: `mycelium manufacturing`,
// // description: `use ${powerUps.orb.research(1)}to repurpose molecular assembler
excess energy used to grow spores`,
// descriptionFunction() { return `use ${powerUps.orb.research(1)}to repurpose molecular assembler
excess energy used to grow ${b.guns[6].nameString('s')}` },
// isFieldTech: true,
// maxCount: 1,
// count: 0,
// frequency: 3,
// frequencyDefault: 3,
// allowed() {
// return (build.isExperimentSelection || powerUps.research.count > 0) && m.fieldMode === 4 && !(tech.isMissileField || tech.isIceField || tech.isFastDrones || tech.isDroneGrab || tech.isDroneRadioactive || tech.isDroneTeleport)
// },
// requires: "molecular assembler, no other manufacturing, no drone tech",
// effect() {
// if (!build.isExperimentSelection) {
// for (let i = 0; i < 1; i++) {
// if (powerUps.research.count > 0) powerUps.research.changeRerolls(-1)
// }
// }
// tech.isSporeField = true;
// },
// remove() {
// tech.isSporeField = false;
// if (this.count > 0) powerUps.research.changeRerolls(1)
// }
// },
// {
// name: "missile manufacturing",
// link: `missile manufacturing`,
// description: `use ${powerUps.orb.research(1)}to repurpose molecular assembler
excess energy used to construct missiles`,
// // description: "use 3 research to repurpose assembler
excess energy used to construct missiles",
// isFieldTech: true,
// maxCount: 1,
// count: 0,
// frequency: 3,
// frequencyDefault: 3,
// allowed() {
// return (build.isExperimentSelection || powerUps.research.count > 0) && m.maxEnergy > 0.5 && m.fieldMode === 4 && !(tech.isSporeField || tech.isIceField || tech.isFastDrones || tech.isDroneGrab || tech.isDroneRadioactive || tech.isDroneTeleport || tech.isDronesTravel)
// },
// requires: "molecular assembler, no other manufacturing, no drone tech",
// effect() {
// if (!build.isExperimentSelection) {
// for (let i = 0; i < 1; i++) {
// if (powerUps.research.count > 0) powerUps.research.changeRerolls(-1)
// }
// }
// tech.isMissileField = true;
// },
// remove() {
// tech.isMissileField = false;
// if (this.count > 0) powerUps.research.changeRerolls(1)
// }
// },
// {
// name: "ice IX manufacturing",
// link: `ice IX manufacturing`,
// description: `use ${powerUps.orb.research(1)}to repurpose molecular assembler
excess energy used to condense ice IX`,
// // description: "use 3 research to repurpose assembler
excess energy used to condense ice IX",
// isFieldTech: true,
// maxCount: 1,
// count: 0,
// frequency: 3,
// frequencyDefault: 3,
// allowed() {
// return (build.isExperimentSelection || powerUps.research.count > 0) && m.fieldMode === 4 && !(tech.isSporeField || tech.isMissileField || tech.isFastDrones || tech.isDroneGrab || tech.isDroneRadioactive || tech.isDroneTeleport || tech.isDronesTravel)
// },
// requires: "molecular assembler, no other manufacturing, no drone tech",
// effect() {
// if (!build.isExperimentSelection) {
// for (let i = 0; i < 1; i++) {
// if (powerUps.research.count > 0) powerUps.research.changeRerolls(-1)
// }
// }
// tech.isIceField = true;
// },
// remove() {
// tech.isIceField = false;
// if (this.count > 0) powerUps.research.changeRerolls(1)
// }
// },
{
name: "additive manufacturing",
description: "hold crouch and use your field to print a block
with +80% density, damage, and launch speed",
// description: "simultaneously fire and activate your field to make
molecular assembler print a throwable block
+80% block throwing speed",
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return (m.fieldMode === 4 || m.fieldMode === 8) && !tech.isTokamak
},
requires: "molecular assembler, pilot wave, not tokamak",
effect() {
tech.isPrinter = true;
},
remove() {
if (this.count > 0) m.holdingTarget = null;
tech.isPrinter = false;
}
},
{
name: "pair production",
description: "after picking up a power up
+200 energy",
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.fieldMode === 4 || m.fieldMode === 1 || m.fieldMode === 8
},
requires: "molecular assembler, pilot wave, standing wave",
effect() {
tech.isMassEnergy = true // used in m.grabPowerUp
m.energy += 2
},
remove() {
tech.isMassEnergy = false;
}
},
{
name: "electric generator",
description: "after deflecting mobs
molecular assembler generates +50 energy",
isFieldTech: true,
maxCount: 9,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.fieldMode === 4
},
requires: "molecular assembler",
effect() {
tech.deflectEnergy += 0.5;
},
remove() {
tech.deflectEnergy = 0;
}
},
{
name: "combinatorial optimization",
description: "+35% damage
–35% fire rate",
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.fieldMode === 5 || m.fieldMode === 6 || m.fieldMode === 7 || m.fieldMode === 8 || m.fieldMode === 4
},
requires: "cloaking, molecular assembler, plasma torch, pilot wave",
damage: 1.35,
effect() {
tech.damage *= this.damage
tech.aimDamage = 1.35
b.setFireCD();
},
remove() {
if (this.count) tech.damage /= this.damage
tech.aimDamage = 1
b.setFireCD();
}
},
{
name: "tokamak",
description: "throwing a block converts it into energy
and a pulsed fusion explosion",
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return (m.fieldMode === 5 || m.fieldMode === 4) && !tech.isPrinter
},
requires: "plasma torch, molecular assembler, not printer",
effect() {
tech.isTokamak = true;
},
remove() {
tech.isTokamak = false;
}
},
{
name: "degenerate matter",
description: "if your field is active
+75% defense",
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return (m.fieldMode === 5 || m.fieldMode === 4 || m.fieldMode === 2 || m.fieldMode === 8)
},
requires: "molecular assembler, plasma torch, perfect diamagnetism, pilot wave",
effect() {
tech.isHarmReduce = true
},
remove() {
tech.isHarmReduce = false;
}
},
{
name: "plasma-bot",
link: `plasma-bot`,
description: `use ${powerUps.orb.research(2)}to trade your field
for a bot that uses energy to emit plasma`,
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 3,
frequencyDefault: 3,
isBot: true,
isBotTech: true,
allowed() {
return m.fieldMode === 5 && !tech.isPlasmaBall && !tech.isExtruder && (build.isExperimentSelection || powerUps.research.count > 1)
},
requires: "plasma torch, not extruder, plasma ball",
effect() {
tech.plasmaBotCount++;
b.plasmaBot();
if (build.isExperimentSelection) {
document.getElementById("field-" + m.fieldMode).classList.remove("build-field-selected");
document.getElementById("field-0").classList.add("build-field-selected");
}
m.setField("field emitter")
for (let i = 0; i < 2; i++) {
if (powerUps.research.count > 0) powerUps.research.changeRerolls(-1)
}
},
remove() {
if (this.count > 0) {
tech.plasmaBotCount = 0;
b.clearPermanentBots();
b.respawnBots();
if (m.fieldMode === 0) {
m.setField("plasma torch")
if (build.isExperimentSelection) {
document.getElementById("field-0").classList.remove("build-field-selected");
document.getElementById("field-" + m.fieldMode).classList.add("build-field-selected");
}
}
powerUps.research.changeRerolls(2)
}
}
},
{
name: "plasma jet",
link: `plasma jet`,
description: `use ${powerUps.orb.research(2)}
+50% plasma torch range`,
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return (tech.plasmaBotCount || m.fieldMode === 5) && (build.isExperimentSelection || powerUps.research.count > 1) && !tech.isPlasmaBall
},
requires: "plasma torch, not plasma ball",
effect() {
tech.isPlasmaRange += 0.5;
for (let i = 0; i < 2; i++) {
if (powerUps.research.count > 0) powerUps.research.changeRerolls(-1)
}
},
remove() {
tech.isPlasmaRange = 1;
if (this.count > 0) powerUps.research.changeRerolls(this.count * 2)
}
},
{
name: "extruder",
description: "extrude a thin hot wire of plasma
increases damage and energy drain",
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.fieldMode === 5 && !tech.isPlasmaBall
},
requires: "plasma torch, not plasma ball",
effect() {
tech.isExtruder = true;
m.fieldUpgrades[m.fieldMode].set()
},
remove() {
tech.isExtruder = false;
if (this.count && m.fieldMode === 5) m.fieldUpgrades[m.fieldMode].set()
}
},
{
name: "refractory metal",
description: "extrude metals at a higher temperature
increases effective radius and damage",
isFieldTech: true,
maxCount: 9,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.fieldMode === 5 && tech.isExtruder
},
requires: "extruder",
effect() {
tech.extruderRange += 55
},
remove() {
tech.extruderRange = 15
}
},
{
name: "plasma ball",
description: "grow an expanding ball of plasma
increases damage and energy drain",
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.fieldMode === 5 && !tech.isExtruder && tech.isPlasmaRange === 1
},
requires: "plasma torch, not extruder, plasma jet",
effect() {
tech.isPlasmaBall = true;
m.fieldUpgrades[m.fieldMode].set()
},
remove() {
tech.isPlasmaBall = false;
if (this.count && m.fieldMode === 5) m.fieldUpgrades[m.fieldMode].set()
}
},
{
name: "corona discharge",
description: "increase the range and frequency
of plasma ball's electric arc ",
isFieldTech: true,
maxCount: 9,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.fieldMode === 5 && tech.isPlasmaBall
},
requires: "plasma ball",
effect() {
tech.plasmaDischarge += 0.03
},
remove() {
tech.plasmaDischarge = 0.01 //default chance per cycle of a discharge
}
},
{
name: "retrocausality",
description: "time dilation uses energy to rewind your
health, velocity, and position up to 10 seconds",
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return m.fieldMode === 6 && !m.isShipMode && !tech.isRewindAvoidDeath && !tech.isTimeSkip
},
requires: "time dilation, not CPT symmetry",
effect() {
tech.isRewindField = true;
m.fieldUpgrades[6].set()
m.wakeCheck();
},
remove() {
tech.isRewindField = false;
if (this.count) m.fieldUpgrades[6].set()
}
},
{
name: "frame-dragging", //"non-inertial frame",
description: "when not moving time dilation stops time
+33% defense",
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return m.fieldMode === 6
},
requires: "time dilation",
effect() {
tech.isTimeStop = true;
m.fieldHarmReduction = 0.66; //33% reduction
},
remove() {
tech.isTimeStop = false;
if (m.fieldMode === 6) m.fieldHarmReduction = 1;
}
},
{
name: "Lorentz transformation",
description: `use ${powerUps.orb.research(3)}
+50% movement, jumping, and fire rate`,
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 3,
frequencyDefault: 3,
allowed() {
return (m.fieldMode === 6 || m.fieldMode === 8) && (build.isExperimentSelection || powerUps.research.count > 2)
},
requires: "time dilation or pilot wave",
effect() {
tech.isFastTime = true
m.setMovement();
b.setFireCD();
for (let i = 0; i < 3; i++) {
if (powerUps.research.count > 0) powerUps.research.changeRerolls(-1)
}
},
remove() {
tech.isFastTime = false
m.setMovement();
b.setFireCD();
if (this.count > 0) powerUps.research.changeRerolls(3)
}
},
{
name: "time crystals",
// description: "+150% passive energy generation
${}",
descriptionFunction() {
return `+150% passive energy generation
(+${(150 * m.fieldRegen * 60).toFixed(1)} energy per second)`
},
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return !tech.isGroundState && (m.fieldMode === 6 || m.fieldMode === 8)
},
requires: "time dilation or pilot wave, not ground state",
effect() {
tech.isTimeCrystals = true
m.setFieldRegen()
this.descriptionFunction = function () {
return `+150% passive energy generation
(+${(60 * m.fieldRegen * 60).toFixed(1)} energy per second)`
}
},
remove() {
tech.isTimeCrystals = false
m.setFieldRegen()
this.descriptionFunction = function () {
return `+150% passive energy generation
(+${(150 * m.fieldRegen * 60).toFixed(1)} energy per second)`
}
}
},
{
name: "no-cloning theorem",
// descriptionFunction() { return `+45% chance to duplicate spawned power ups
after a mob dies –2% duplication (${tech.duplicationChance()})` },
description: `+45% chance to duplicate spawned power ups
after a mob dies –2% duplication`,
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return (m.fieldMode === 6 || m.fieldMode === 7)
},
requires: "cloaking, time dilation",
effect() {
tech.cloakDuplication = 0.45
powerUps.setPowerUpMode(); //needed after adjusting duplication chance
if (!build.isExperimentSelection && !simulation.isTextLogOpen) simulation.circleFlare(0.4);
},
remove() {
tech.cloakDuplication = 0
powerUps.setPowerUpMode(); //needed after adjusting duplication chance
}
},
{
name: "metamaterial absorber", //quantum eraser
descriptionFunction() {
return `for each mob left alive after you exit a level
there is a 17% chance to spawn a random power up`
},
// descriptionFunction() {
// return `for each mob left alive after you exit a level
`
// },
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return (m.fieldMode === 7) && !tech.cloakDuplication
},
requires: "cloaking",
effect() {
tech.isQuantumEraser = true
},
remove() {
tech.isQuantumEraser = false
}
},
{
name: "symbiosis",
descriptionFunction() {
return `after a boss dies spawn ${powerUps.orb.research(3)}${powerUps.orb.heal(3)} and a tech
after a mob dies –0.5 maximum ${tech.isEnergyHealth ? "energy" : "health"}`
},
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.fieldMode === 7 //|| m.fieldMode === 6
},
requires: "cloaking",
effect() {
tech.isAddRemoveMaxHealth = true
},
remove() {
tech.isAddRemoveMaxHealth = false
}
},
{
name: "boson composite",
link: `boson composite`,
description: "while cloaked you are intangible
to blocks and mobs, but mobs drain energy",
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.fieldMode === 7
},
requires: "metamaterial cloaking",
effect() {
tech.isIntangible = true;
},
remove() {
if (tech.isIntangible) {
tech.isIntangible = false;
player.collisionFilter.mask = cat.body | cat.map | cat.mob | cat.mobBullet | cat.mobShield //normal collisions
}
}
},
{
name: "patch",
link: `patch`,
description: "after cloaking recover 75% of your
last health loss using that much energy",
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.fieldMode === 7 && !tech.lastHitDamage && !tech.isEnergyHealth
},
requires: "metamaterial cloaking, not dynamic equilibrium, mass-energy",
effect() {
tech.isCloakHealLastHit = true;
},
remove() {
tech.isCloakHealLastHit = false;
}
},
{
name: "dazzler",
link: `dazzler`,
description: "after decloaking stun nearby mobs
and drain –15 energy",
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.fieldMode === 7
},
requires: "metamaterial cloaking",
effect() {
tech.isCloakStun = true;
},
remove() {
tech.isCloakStun = false;
}
},
// {
// name: "ambush",
// description: "metamaterial cloaking field damage effect
is increased from 333% to 555%",
// isFieldTech: true,
// maxCount: 1,
// count: 0,
// frequency: 2,
// frequencyDefault: 2,
// allowed() {
// return m.fieldMode === 7
// },
// requires: "metamaterial cloaking",
// effect() {
// tech.sneakAttackDmg = 6.55 //555% + 100%
// },
// remove() {
// tech.sneakAttackDmg = 4.33 //333% + 100%
// }
// },
{
name: "dynamical systems",
description: `use ${powerUps.orb.research(2)}
+35% damage`,
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 3,
frequencyDefault: 3,
allowed() {
return (m.fieldMode === 5 || m.fieldMode === 7 || m.fieldMode === 8) && (build.isExperimentSelection || powerUps.research.count > 1)
},
requires: "cloaking, pilot wave, or plasma torch",
damage: 1.35,
effect() {
tech.damage *= this.damage
tech.isCloakingDamage = true
for (let i = 0; i < 2; i++) {
if (powerUps.research.count > 0) powerUps.research.changeRerolls(-1)
}
},
remove() {
tech.isCloakingDamage = false
if (this.count > 0) {
tech.damage /= this.damage
powerUps.research.changeRerolls(2)
}
}
},
{
name: "WIMPs",
description: `at the end of each level spawn ${powerUps.orb.research(4)}
and a dangerous particle that slowly chases you`,
isFieldTech: true,
maxCount: 9,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.fieldMode === 9 || m.fieldMode === 8 || m.fieldMode === 6
},
requires: "wormhole, pilot wave, time dilation",
effect() {
tech.wimpCount++
spawn.WIMP()
for (let j = 0, len = 4; j < len; j++) powerUps.spawn(level.exit.x + 100 * (Math.random() - 0.5), level.exit.y - 100 + 100 * (Math.random() - 0.5), "research", false)
},
remove() {
tech.wimpCount = 0
}
},
{
name: "vacuum fluctuation",
description: `use ${powerUps.orb.research(3)}
+11% chance to duplicate spawned power ups`,
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 3,
frequencyDefault: 3,
allowed() {
return (m.fieldMode === 8 || m.fieldMode === 3 || m.fieldMode === 6 || m.fieldMode === 9) && (build.isExperimentSelection || powerUps.research.count > 2)
},
requires: "wormhole, time dilation, negative mass, pilot wave",
effect() {
tech.fieldDuplicate = 0.11
powerUps.setPowerUpMode(); //needed after adjusting duplication chance
if (!build.isExperimentSelection && !simulation.isTextLogOpen) simulation.circleFlare(0.11);
for (let i = 0; i < 3; i++) {
if (powerUps.research.count > 0) powerUps.research.changeRerolls(-1)
}
},
remove() {
tech.fieldDuplicate = 0
powerUps.setPowerUpMode(); //needed after adjusting duplication chance
if (this.count > 0) powerUps.research.changeRerolls(3)
}
},
// {
// name: "Penrose process",
// description: "after a block falls into a wormhole
+50 energy",
// isFieldTech: true,
// maxCount: 1,
// count: 0,
// frequency: 2,
// frequencyDefault: 2,
// allowed() {
// return m.fieldMode === 9
// },
// requires: "wormhole",
// effect() {
// tech.isWormholeEnergy = true
// },
// remove() {
// tech.isWormholeEnergy = false
// }
// },
{
name: "transdimensional worms",
link: `transdimensional worms`,
description: "after a block falls into a wormhole
spawn a worm",
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.fieldMode === 9
},
requires: "wormhole",
effect() {
tech.isWormholeWorms = true
},
remove() {
tech.isWormholeWorms = false
}
},
{
name: "geodesics",
description: `your bullets can traverse wormholes
spawn 2 guns and ${powerUps.orb.ammo(4)}`,
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.fieldMode === 9
},
requires: "wormhole",
effect() {
tech.isWormHoleBullets = true
for (let i = 0; i < 2; i++) powerUps.spawn(m.pos.x + 200 * (Math.random() - 0.5), m.pos.y + 200 * (Math.random() - 0.5), "gun");
for (let i = 0; i < 4; i++) powerUps.spawn(m.pos.x + 200 * (Math.random() - 0.5), m.pos.y + 200 * (Math.random() - 0.5), "ammo");
},
remove() {
if (tech.isWormHoleBullets) {
for (let i = 0; i < 2; i++) {
if (b.inventory.length) b.removeGun(b.guns[b.inventory[b.inventory.length - 1]].name) //remove your last gun
}
tech.isWormHoleBullets = false;
}
}
},
{
name: "cosmic string",
description: "after tunneling through mobs with a wormhole
stun them and do radioactive damage",
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.fieldMode === 9
},
requires: "wormhole",
effect() {
tech.isWormholeDamage = true
},
remove() {
tech.isWormholeDamage = false
}
},
{
name: "invariant",
description: "while placing your wormhole
use energy to pause time",
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.fieldMode === 9 && !tech.isNoDraftPause
},
requires: "wormhole, not eternalism",
effect() {
tech.isWormHolePause = true
},
remove() {
if (tech.isWormHolePause && m.isBodiesAsleep) m.wakeCheck();
tech.isWormHolePause = false
}
},
{
name: "charmed baryons",
description: `–33% movement and jumping
wormholes drain zero energy`,
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.fieldMode === 9 && !tech.isWormholeMapIgnore
},
requires: "wormhole, not affine connection",
effect() {
tech.isFreeWormHole = true
tech.baseFx *= 0.66
tech.baseJumpForce *= 0.66
m.setMovement()
},
//also removed in m.setHoldDefaults() if player switches into a bad field
remove() {
tech.isFreeWormHole = false
if (!tech.isNeutronium) {
tech.baseFx = 0.08
tech.baseJumpForce = 10.5
m.setMovement()
}
}
},
{
name: "affine connection",
description: "wormholes can tunnel through anything
for +200% energy drain",
isFieldTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.fieldMode === 9 && !tech.isFreeWormHole
},
requires: "wormhole, not charmed baryons",
effect() {
tech.isWormholeMapIgnore = true
},
remove() {
tech.isWormholeMapIgnore = false
}
},
//**************************************************
//************************************************** experimental
//************************************************** modes
//**************************************************
// {
// name: "-ship-",
// description: "experiment: fly around with no legs
aim with the keyboard",
// maxCount: 1,
// count: 0,
// frequency: 0,
// isNonRefundable: true,
// isBadRandomOption: true,
// isExperimentalMode: true,
// allowed() {
// return build.isExperimentSelection && !m.isShipMode && m.fieldUpgrades[m.fieldMode].name !== "negative mass"
// },
// requires: "",
// effect() {
// m.shipMode()
// },
// remove() {}
// },
// {
// name: "-quantum leap-",
// description: "experiment: every 20 seconds
become an alternate version of yourself",
// maxCount: 1,
// count: 0,
// frequency: 0,
// isBadRandomOption: true,
// isExperimentalMode: true,
// allowed() {
// return build.isExperimentSelection
// },
// requires: "",
// interval: undefined,
// effect() {
// this.interval = setInterval(() => {
// if (!build.isExperimentSelection) {
// m.switchWorlds()
// simulation.trails()
// }
// }, 20000); //every 20 seconds
// },
// remove() {
// if (this.count > 0) clearTimeout(this.interval);
// }
// },
// {
// name: "-shields-",
// description: "experiment: every 5 seconds
all mobs gain a shield",
// maxCount: 1,
// count: 0,
// frequency: 0,
// isBadRandomOption: true,
// isExperimentalMode: true,
// allowed() {
// return build.isExperimentSelection
// },
// requires: "",
// effect() {
// this.interval = setInterval(() => {
// if (!build.isExperimentSelection) {
// for (let i = 0; i < mob.length; i++) {
// if (!mob[i].isShielded && !mob[i].shield && mob[i].isDropPowerUp) spawn.shield(mob[i], mob[i].position.x, mob[i].position.y, 1, true);
// }
// }
// }, 5000); //every 5 seconds
// },
// interval: undefined,
// remove() {
// if (this.count > 0) clearTimeout(this.interval);
// }
// },
// {
// name: "-Fourier analysis-",
// description: "experiment: your aiming is random",
// maxCount: 1,
// count: 0,
// frequency: 0,
// isBadRandomOption: true,
// isExperimentalMode: true,
// allowed() {
// return build.isExperimentSelection && !m.isShipMode
// },
// requires: "not ship",
// effect() {
// m.look = () => {
// m.angle = 2 * Math.sin(m.cycle * 0.0133) + Math.sin(m.cycle * 0.013) + 0.5 * Math.sin(m.cycle * 0.031) + 0.33 * Math.sin(m.cycle * 0.03)
// const scale = 0.8;
// m.transSmoothX = canvas.width2 - m.pos.x - (simulation.mouse.x - canvas.width2) * scale;
// m.transSmoothY = canvas.height2 - m.pos.y - (simulation.mouse.y - canvas.height2) * scale;
// m.transX += (m.transSmoothX - m.transX) * 0.07;
// m.transY += (m.transSmoothY - m.transY) * 0.07;
// }
// },
// remove() {
// if (this.count > 0) m.look = m.lookDefault()
// }
// },
// {
// name: "-panopticon-",
// description: "experiment: mobs can always see you",
// maxCount: 1,
// count: 0,
// frequency: 0,
// isBadRandomOption: true,
// isExperimentalMode: true,
// allowed() {
// return build.isExperimentSelection
// },
// requires: "",
// effect() {
// this.interval = setInterval(() => {
// if (!build.isExperimentSelection) {
// for (let i = 0; i < mob.length; i++) {
// if (!mob[i].shield && mob[i].isDropPowerUp) {
// mob[i].locatePlayer()
// mob[i].seePlayer.yes = true;
// }
// }
// }
// }, 1000); //every 1 seconds
// },
// interval: undefined,
// remove() {
// if (this.count > 0) clearTimeout(this.interval);
// }
// },
// {
// name: "-decomposers-",
// description: "experiment: after they die
mobs leave behind spawns",
// maxCount: 1,
// count: 0,
// frequency: 0,
// isBadRandomOption: true,
// isExperimentalMode: true,
// allowed() {
// return build.isExperimentSelection
// },
// requires: "",
// effect() {
// tech.deathSpawns = 0.2
// },
// remove() {
// tech.deathSpawns = 0
// }
// },
//**************************************************
//************************************************** JUNK
//************************************************** tech
//**************************************************
// {
// name: "junk",
// description: "",
// maxCount: 9,
// count: 0,
// frequency: 0,
// isNonRefundable: true,
// isJunk: true,
// allowed() {
// return true
// },
// requires: "",
// effect() {
// },
// remove() {}
// },
{
name: "swap meet",
description: "normal tech become JUNK
and JUNK become normal tech",
maxCount: 1,
count: 0,
frequency: 0,
isJunk: true,
isNonRefundable: true,
allowed() {
return true
},
requires: "",
effect() {
for (let i = 0, len = tech.tech.length; i < len; i++) {
tech.tech[i].isJunk = !tech.tech[i].isJunk
if (tech.tech[i].isJunk) { } else { }
if (tech.tech[i].frequency > 0) {
tech.tech[i].frequency = 0
} else {
tech.tech[i].frequency = 2
}
}
},
remove() { }
},
// {
// name: "pocket dimension",
// description: "rotate tech descriptions into a higher spacial dimension",
// maxCount: 1,
// count: 0,
// frequency: 0,
// isJunk: true,
// isNonRefundable: true,
// allowed() {
// return true
// },
// requires: "",
// effect() {
// document.getElementById("choose-grid").classList.add("flipX");
// },
// remove() {}
// },
{
name: "random",
link: `random`,
delay: 333,
descriptionFunction() {
const delay = 333
const loop = () => {
if ((simulation.isChoosing) && m.alive && !build.isExperimentSelection) {
const dmg = Math.floor(27 * Math.random()) * 0.01
this.text = `+${(dmg * 100).toFixed(0).padStart(2, '0')}% damage`
this.damage = 1 + dmg
if (document.getElementById(`damage-JUNK-id${this.id}`)) document.getElementById(`damage-JUNK-id${this.id}`).innerHTML = this.text
setTimeout(() => {
loop()
}, delay);
}
}
setTimeout(() => {
loop()
}, delay);
this.id++
return `${this.text}`
},
maxCount: 3,
count: 0,
frequency: 1,
isJunk: true,
allowed() {
return !build.isExperimentSelection
},
requires: "NOT EXPERIMENT MODE",
damage: 0,
effect() {
tech.damage *= this.damage
},
remove() {
if (this.count > 0) tech.damage /= this.damage
}
},
{
name: "boost",
maxCount: 1,
count: 0,
frequency: 0,
isJunk: true,
isNonRefundable: true,
allowed() {
return !build.isExperimentSelection
},
requires: "NOT EXPERIMENT MODE",
effect() {
powerUps.spawnDelay("boost", this.spawnCount)
},
remove() { },
id: 0,
text: "",
delay: 100,
spawnCount: 0,
descriptionFunction() {
let count = 9999 * Math.random()
const loop = () => {
if ((simulation.isChoosing) && m.alive && !build.isExperimentSelection) { //&& (!simulation.isChoosing || this.count === 0) //simulation.paused ||
count += 4.5
const waves = 2 * Math.sin(count * 0.0133) + Math.sin(count * 0.013) + 0.5 * Math.sin(count * 0.031) + 0.33 * Math.sin(count * 0.03)
this.spawnCount = Math.floor(100 * Math.abs(waves))
this.text = `spawn ${this.spawnCount.toLocaleString(undefined, { minimumIntegerDigits: 3 })} ${powerUps.orb.boost(1)}
that give +${(powerUps.boost.damage * 100).toFixed(0)}% damage for ${(powerUps.boost.duration / 60).toFixed(0)} seconds`
if (document.getElementById(`boost-JUNK-id${this.id}`)) document.getElementById(`boost-JUNK-id${this.id}`).innerHTML = this.text
setTimeout(() => {
loop()
}, this.delay);
}
}
setTimeout(() => {
loop()
}, this.delay);
this.id++
return `${this.text}`
},
},
{
name: "placebo",
description: "+777% damage
+777% defense",
maxCount: 1,
count: 0,
frequency: 0,
isJunk: true,
allowed: () => true,
requires: "",
effect() {
if (Math.random() < 0.1) tech.damage *= 8.77
},
remove() { }
},
{
name: "universal healthcare",
description: "make your damage negative",
maxCount: 1,
count: 0,
frequency: 0,
isJunk: true,
allowed: () => true,
requires: "",
effect() {
tech.damage *= -1
},
remove() { }
},
// {
// name: "synchrotron",
// descriptionFunction() {
// return `power ups change into a different flavor after a boss dies`
// },
// maxCount: 3,
// count: 0,
// frequency: 1,
// frequencyDefault: 1,
// allowed: () => true,
// requires: "",
// effect() {
// },
// remove() {
// }
// },
{
name: "return",
description: "return to the start of the game
reduce combat difficulty by 2 levels",
maxCount: 1,
count: 0,
frequency: 0,
isJunk: true,
isNonRefundable: true,
allowed: () => true,
requires: "",
effect() {
level.difficultyDecrease(simulation.difficultyMode * 2)
level.onLevel = 0
simulation.clearNow = true //end current level
},
remove() { }
},
{
name: "panpsychism",
description: "awaken all blocks
blocks have a chance to spawn power ups",
maxCount: 1,
count: 0,
frequency: 0,
isJunk: true,
isNonRefundable: true,
allowed: () => true,
requires: "",
effect() {
setInterval(() => {
for (let i = body.length - 1; i > -1; i--) {
if (!body[i].isNotHoldable) {
Matter.Composite.remove(engine.world, body[i]);
spawn.blockMob(body[i].position.x, body[i].position.y, body[i], 0);
if (!body[i].isAboutToBeRemoved) mob[mob.length - 1].isDropPowerUp = true
body.splice(i, 1);
}
}
}, 6000);
},
remove() { }
},
{
name: "meteor shower",
description: "take a shower, but meteors instead of water",
maxCount: 1,
count: 0,
frequency: 0,
isJunk: true,
isNonRefundable: true,
allowed: () => true,
requires: "",
effect() {
setInterval(() => {
fireBlock = function (xPos, yPos) {
const index = body.length
spawn.bodyRect(xPos, yPos, 20 + 50 * Math.random(), 20 + 50 * Math.random());
const bodyBullet = body[index]
Matter.Body.setVelocity(bodyBullet, {
x: 5 * (Math.random() - 0.5),
y: 10 * (Math.random() - 0.5)
});
bodyBullet.isAboutToBeRemoved = true
setTimeout(() => { //remove block
for (let i = 0; i < body.length; i++) {
if (body[i] === bodyBullet) {
Matter.Composite.remove(engine.world, body[i]);
body.splice(i, 1);
}
}
}, 4000 + Math.floor(9000 * Math.random()));
}
fireBlock(player.position.x + 600 * (Math.random() - 0.5), player.position.y - 500 - 500 * Math.random());
// for (let i = 0, len = Math.random(); i < len; i++) {
// }
}, 1000);
},
remove() { }
},
{
name: "startle response",
description: `if a threat is nearby, activate a ${powerUps.orb.boost(1)}
and lock your mouse until you press escape`,
maxCount: 1,
count: 0,
frequency: 0,
isJunk: true,
isNonRefundable: true,
allowed: () => true,
requires: "",
effect() {
// tech.damage *= 1.33
setInterval(() => {
if (powerUps.boost.endCycle < m.cycle && !simulation.paused && m.alive) {
for (let i = 0; i < mob.length; i++) {
if (mob[i].distanceToPlayer2() < 400000) { //650
canvas.requestPointerLock();
powerUps.boost.effect();
break
}
}
}
}, 2000);
},
remove() { }
},
{
name: "closed timelike curve",
description: "spawn 5 field power ups, but every 12 seconds
teleport a second into your future or past",
maxCount: 1,
count: 0,
frequency: 0,
isJunk: true,
isNonRefundable: true,
allowed: () => true,
requires: "",
effect() {
for (let i = 0; i < 5; i++) powerUps.spawn(m.pos.x + 10 * Math.random(), m.pos.y + 10 * Math.random(), "field");
function loop() {
if (!simulation.paused && m.alive) {
if (!(simulation.cycle % 720)) {
requestAnimationFrame(() => {
if ((simulation.cycle % 1440) > 720) { //kinda alternate between each option
m.rewind(60)
m.energy += 0.4 //to make up for lost energy
} else {
simulation.timePlayerSkip(60)
}
}); //wrapping in animation frame prevents errors, probably
}
}
requestAnimationFrame(loop);
}
requestAnimationFrame(loop);
},
remove() { }
},
// {
// name: "translate",
// description: "translate n-gon into a random language",
// maxCount: 1,
// count: 0,
// frequency: 0,
// isJunk: true,
// isNonRefundable: true,
// allowed() {
// return true
// },
// requires: "",
// effect() {
// // generate a container
// const gtElem = document.createElement('div')
// gtElem.id = "gtElem"
// gtElem.style.visibility = 'hidden' // make it invisible
// document.body.append(gtElem)
// // generate a script to run after creation
// function initGT() {
// // create a new translate element
// new google.translate.TranslateElement({ pageLanguage: 'en', layout: google.translate.TranslateElement.InlineLayout.HORIZONTAL }, 'gtElem')
// // ok now since it's loaded perform a funny hack to make it work
// const langSelect = document.getElementsByClassName("goog-te-combo")[0]
// // select a random language. It takes a second for all langauges to load, so wait a second.
// setTimeout(() => {
// langSelect.selectedIndex = Math.round(langSelect.options.length * Math.random())
// // simulate a click
// langSelect.dispatchEvent(new Event('change'))
// // now make it go away
// const bar = document.getElementById(':1.container')
// bar.style.display = 'none'
// bar.style.visibility = 'hidden'
// }, 1000)
// }
// // add the google translate script
// const translateScript = document.createElement('script')
// translateScript.src = '//translate.google.com/translate_a/element.js?cb=initGT'
// document.body.append(translateScript)
// },
// remove() {}
// },
{
name: "discount",
description: "get 3 random JUNKtech for the price of 1!",
maxCount: 1,
count: 0,
frequency: 0,
isJunk: true,
isNonRefundable: true,
allowed: () => true,
requires: "",
effect() {
tech.giveRandomJUNK()
tech.giveRandomJUNK()
tech.giveRandomJUNK()
},
remove() { }
},
// {
// name: "hi",
// description: `spawn to seed 616 `,
// maxCount: 1,
// count: 0,
// frequency: 0,
// isNonRefundable: true,
// isJunk: true,
// allowed() {
// return true
// },
// requires: "",
// effect() {
// document.getElementById("seed").placeholder = Math.initialSeed = String(616)
// Math.seed = Math.abs(Math.hash(Math.initialSeed)) //update randomizer seed in case the player changed it
// },
// remove() {}
// },
{
name: "Higgs phase transition",
description: "instantly spawn 5 tech, but add a chance to
remove everything with a 5 minute half-life",
maxCount: 1,
count: 0,
frequency: 0,
frequencyDefault: 0,
isJunk: true,
isNonRefundable: true,
allowed: () => true,
requires: "",
effect() {
powerUps.spawn(m.pos.x, m.pos.y, "tech");
powerUps.spawn(m.pos.x + 30, m.pos.y, "tech");
powerUps.spawn(m.pos.x + 60, m.pos.y, "tech");
powerUps.spawn(m.pos.x, m.pos.y - 30, "tech");
powerUps.spawn(m.pos.x + 30, m.pos.y - 60, "tech");
function loop() {
// (1-X)^cycles = chance to be removed //Math.random() < 0.000019 10 min
if (!simulation.paused && m.alive) {
if (Math.random() < 0.000038) {
// m.death();
simulation.clearMap();
simulation.draw.setPaths();
return
}
}
requestAnimationFrame(loop);
}
requestAnimationFrame(loop);
},
remove() { }
},
{
name: "harvest",
description: "convert all the mobs on this level into ammo",
maxCount: 1,
count: 0,
frequency: 0,
frequencyDefault: 0,
isJunk: true,
isNonRefundable: true,
allowed: () => true,
requires: "",
effect() {
for (let i = 0, len = mob.length; i < len; i++) {
if (mob[i].isDropPowerUp) {
powerUps.directSpawn(mob[i].position.x, mob[i].position.y, "ammo");
mob[i].death();
}
}
// for (let i = powerUp.length - 1; i > -1; i--) {
// if (powerUp[i].name !== "ammo") {
// Matter.Composite.remove(engine.world, powerUp[i]);
// powerUp.splice(i, 1);
// }
// }
},
remove() { }
},
{
name: "brainstorm",
description: "the tech choice menu randomizes
every 0.5 seconds for 10 seconds",
maxCount: 1,
count: 0,
frequency: 0,
frequencyDefault: 0,
isJunk: true,
allowed: () => true,
requires: "",
effect() {
tech.isBrainstorm = true
tech.isBrainstormActive = false
tech.brainStormDelay = 500
},
remove() {
tech.isBrainstorm = false
tech.isBrainstormActive = false
}
},
{
name: "catabolysis",
description: `set your maximum health to 1
double your current ammo 10 times`,
maxCount: 1,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return !tech.isFallingDamage && !tech.isOverHeal && !tech.isEnergyHealth
},
requires: "not quenching, tungsten carbide, mass-energy",
effect() {
m.baseHealth = 0.01
m.setMaxHealth();
for (let i = 0; i < b.guns.length; i++) b.guns[i].ammo = b.guns[i].ammo * Math.pow(2, 10)
simulation.updateGunHUD();
},
remove() { }
},
{
name: "palantír",
description: `see far away lands`,
maxCount: 1,
count: 0,
frequency: 0,
// isNonRefundable: true,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
m.look = () => {
//always on mouse look
m.angle = Math.atan2(
simulation.mouseInGame.y - m.pos.y,
simulation.mouseInGame.x - m.pos.x
);
//smoothed mouse look translations
const scale = 2;
m.transSmoothX = canvas.width2 - m.pos.x - (simulation.mouse.x - canvas.width2) * scale;
m.transSmoothY = canvas.height2 - m.pos.y - (simulation.mouse.y - canvas.height2) * scale;
m.transX += (m.transSmoothX - m.transX) * m.lookSmoothing;
m.transY += (m.transSmoothY - m.transY) * m.lookSmoothing;
}
},
remove() {
if (this.count) m.look = m.lookDefault
}
},
{
name: "motion sickness",
description: `disable camera smoothing`,
maxCount: 1,
count: 0,
frequency: 0,
// isNonRefundable: true,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
m.look = () => {
//always on mouse look
m.angle = Math.atan2(
simulation.mouseInGame.y - m.pos.y,
simulation.mouseInGame.x - m.pos.x
);
//smoothed mouse look translations
const scale = 1.2;
m.transSmoothX = canvas.width2 - m.pos.x - (simulation.mouse.x - canvas.width2) * scale;
m.transSmoothY = canvas.height2 - m.pos.y - (simulation.mouse.y - canvas.height2) * scale;
m.transX = canvas.width2 - m.pos.x - (simulation.mouse.x - canvas.width2) * scale;
m.transY = canvas.height2 - m.pos.y - (simulation.mouse.y - canvas.height2) * scale;
// m.transX += (m.transSmoothX - m.transX) * m.lookSmoothing;
// m.transY += (m.transSmoothY - m.transY) * m.lookSmoothing;
}
},
remove() {
if (this.count) m.look = m.lookDefault
}
},
{
name: "facsimile",
description: `inserts a copy of your current level into the level list`,
maxCount: 1,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
const index = Math.min(level.levels.length - 1, level.onLevel)
level.levels.splice(index, 0, level.levels[index]);
},
remove() { }
},
{
name: "negative friction",
description: "when you touch walls you speed up instead of slowing down. It's kinda fun.",
maxCount: 1,
count: 0,
frequency: 0,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
player.friction = -0.4
},
remove() {
if (this.count) player.friction = 0.002
}
},
{
name: "bounce",
description: "you bounce off things. It's annoying, but not that bad.",
maxCount: 1,
count: 0,
frequency: 0,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
player.restitution = 0.9
},
remove() {
if (this.count) player.restitution = 0
}
},
{
name: "mouth",
description: "mobs have a non functional mouth",
maxCount: 1,
count: 0,
frequency: 0,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
mobs.draw = () => {
ctx.lineWidth = 2;
let i = mob.length;
while (i--) {
ctx.beginPath();
const vertices = mob[i].vertices;
ctx.moveTo(vertices[0].x, vertices[0].y);
for (let j = 1, len = vertices.length; j < len; ++j) ctx.lineTo(vertices[j].x, vertices[j].y);
ctx.quadraticCurveTo(mob[i].position.x, mob[i].position.y, vertices[0].x, vertices[0].y);
ctx.fillStyle = mob[i].fill;
ctx.strokeStyle = mob[i].stroke;
ctx.fill();
ctx.stroke();
}
}
},
remove() {
mobs.draw = mobs.drawDefault
}
},
{
name: "all-stars",
description: "make all mobs look like stars",
maxCount: 1,
count: 0,
frequency: 0,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
mobs.draw = () => {
ctx.lineWidth = 2;
let i = mob.length;
while (i--) {
ctx.beginPath();
const vertices = mob[i].vertices;
ctx.moveTo(vertices[0].x, vertices[0].y);
for (let j = 1, len = vertices.length; j < len; ++j) ctx.quadraticCurveTo(mob[i].position.x, mob[i].position.y, vertices[j].x, vertices[j].y);
ctx.quadraticCurveTo(mob[i].position.x, mob[i].position.y, vertices[0].x, vertices[0].y);
ctx.fillStyle = mob[i].fill;
ctx.strokeStyle = mob[i].stroke;
ctx.fill();
ctx.stroke();
}
}
},
remove() {
mobs.draw = mobs.drawDefault
}
},
// draw() {
// ctx.lineWidth = 2;
// let i = mob.length;
// while (i--) {
// ctx.beginPath();
// const vertices = mob[i].vertices;
// ctx.moveTo(vertices[0].x, vertices[0].y);
// for (let j = 1, len = vertices.length; j < len; ++j) ctx.lineTo(vertices[j].x, vertices[j].y);
// ctx.lineTo(vertices[0].x, vertices[0].y);
// ctx.fillStyle = mob[i].fill;
// ctx.strokeStyle = mob[i].stroke;
// ctx.fill();
// ctx.stroke();
// }
// },
{
name: "true colors",
description: `set all power ups to their real world colors`,
maxCount: 1,
count: 0,
frequency: 0,
isJunk: true,
isNonRefundable: true,
allowed() {
return true
},
requires: "",
effect() {
// const colors = shuffle(["#f7b", "#0eb", "#467", "#0cf", "hsl(246,100%,77%)", "#26a"])
const colors = shuffle([powerUps.research.color, powerUps.heal.color, powerUps.ammo.color, powerUps.ammo.color, powerUps.field.color, powerUps.gun.color])
powerUps.research.color = colors[0]
powerUps.heal.color = colors[1]
powerUps.ammo.color = colors[2]
powerUps.field.color = colors[3]
powerUps.tech.color = colors[4]
powerUps.gun.color = colors[5]
for (let i = 0; i < powerUp.length; i++) {
switch (powerUp[i].name) {
case "research":
powerUp[i].color = colors[0]
break;
case "heal":
powerUp[i].color = colors[1]
break;
case "ammo":
powerUp[i].color = colors[2]
break;
case "field":
powerUp[i].color = colors[3]
break;
case "tech":
powerUp[i].color = colors[4]
break;
case "gun":
powerUp[i].color = colors[5]
break;
}
}
},
remove() {
// const colors = ["#f7b", "#0eb", "#467", "#0cf", "hsl(246,100%,77%)", "#26a"] //no shuffle
// powerUps.research.color = colors[0]
// powerUps.heal.color = colors[1]
// powerUps.ammo.color = colors[2]
// powerUps.field.color = colors[3]
// powerUps.tech.color = colors[4]
// powerUps.gun.color = colors[5]
// for (let i = 0; i < powerUp.length; i++) {
// switch (powerUp[i].name) {
// case "research":
// powerUp[i].color = colors[0]
// break;
// case "heal":
// powerUp[i].color = colors[1]
// break;
// case "ammo":
// powerUp[i].color = colors[2]
// break;
// case "field":
// powerUp[i].color = colors[3]
// break;
// case "tech":
// powerUp[i].color = colors[4]
// break;
// case "gun":
// powerUp[i].color = colors[5]
// break;
// }
// }
}
},
{
name: "emergency broadcasting",
description: "emit 2 sine waveforms at 853 Hz and 960 Hz
lower your volume",
maxCount: 1,
count: 0,
frequency: 0,
isJunk: true,
isNonRefundable: true,
allowed() {
return true
},
requires: "",
effect: () => {
//setup audio context
function tone(frequency) {
const audioCtx = new (window.AudioContext || window.webkitAudioContext)();
const oscillator1 = audioCtx.createOscillator();
const gainNode1 = audioCtx.createGain();
gainNode1.gain.value = 0.5; //controls volume
oscillator1.connect(gainNode1);
gainNode1.connect(audioCtx.destination);
oscillator1.type = "sine"; // 'sine' 'square', 'sawtooth', 'triangle' and 'custom'
oscillator1.frequency.value = frequency; // value in hertz
oscillator1.start();
return audioCtx
}
// let sound = tone(1050)
function EBS() {
const audioCtx = new (window.AudioContext || window.webkitAudioContext)();
const oscillator1 = audioCtx.createOscillator();
const gainNode1 = audioCtx.createGain();
gainNode1.gain.value = 0.3; //controls volume
oscillator1.connect(gainNode1);
gainNode1.connect(audioCtx.destination);
oscillator1.type = "sine"; // 'sine' 'square', 'sawtooth', 'triangle' and 'custom'
oscillator1.frequency.value = 850; // value in hertz
oscillator1.start();
const oscillator2 = audioCtx.createOscillator();
const gainNode2 = audioCtx.createGain();
gainNode2.gain.value = 0.3; //controls volume
oscillator2.connect(gainNode2);
gainNode2.connect(audioCtx.destination);
oscillator2.type = "sine"; // 'sine' 'square', 'sawtooth', 'triangle' and 'custom'
oscillator2.frequency.value = 957; // value in hertz
oscillator2.start();
return audioCtx
}
let sound = EBS()
delay = 1000
setTimeout(() => {
sound.suspend()
powerUps.spawn(m.pos.x + 160 * (Math.random() - 0.5), m.pos.y + 160 * (Math.random() - 0.5), "heal");
setTimeout(() => {
sound.resume()
setTimeout(() => {
sound.suspend()
powerUps.spawn(m.pos.x + 160 * (Math.random() - 0.5), m.pos.y + 160 * (Math.random() - 0.5), "heal");
setTimeout(() => {
sound.resume()
setTimeout(() => {
sound.suspend()
powerUps.spawn(m.pos.x + 160 * (Math.random() - 0.5), m.pos.y + 160 * (Math.random() - 0.5), "heal");
setTimeout(() => {
sound.resume()
setTimeout(() => {
sound.suspend()
powerUps.spawn(m.pos.x + 160 * (Math.random() - 0.5), m.pos.y + 160 * (Math.random() - 0.5), "heal");
setTimeout(() => {
sound.resume()
setTimeout(() => {
sound.suspend()
powerUps.spawn(m.pos.x + 160 * (Math.random() - 0.5), m.pos.y + 160 * (Math.random() - 0.5), "heal");
setTimeout(() => {
sound.resume()
setTimeout(() => {
sound.suspend()
sound.close()
powerUps.spawn(m.pos.x + 160 * (Math.random() - 0.5), m.pos.y + 160 * (Math.random() - 0.5), "heal");
}, delay);
}, delay);
}, delay);
}, delay);
}, delay);
}, delay);
}, delay);
}, delay);
}, delay);
}, delay);
}, delay);
},
remove() { }
},
{
name: "automatic",
description: "you can't fire when moving
always fire when at rest",
maxCount: 1,
count: 0,
frequency: 0,
isJunk: true,
allowed() {
return !tech.isFireMoveLock
},
requires: "not Higgs mechanism",
effect() {
tech.isAlwaysFire = true;
b.setFireMethod();
},
remove() {
if (tech.isAlwaysFire) {
tech.isAlwaysFire = false
b.setFireMethod();
}
}
},
{
name: "hidden variable",
descriptionFunction() {
return `spawn ${powerUps.orb.heal(20)}
but hide your health bar`
},
maxCount: 1,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
document.getElementById("health").style.display = "none"
document.getElementById("health-bg").style.display = "none"
document.getElementById("defense-bar").style.display = "none"
for (let i = 0; i < 20; i++) powerUps.spawn(m.pos.x + 160 * (Math.random() - 0.5), m.pos.y + 160 * (Math.random() - 0.5), "heal");
},
remove() { }
},
{
name: "not a bug",
description: "initiate a totally safe game crash for 10 seconds",
maxCount: 1,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
const savedfunction = simulation.drawCircle
simulation.drawCircle = () => {
const a = mob[Infinity].position //crashed the game in a visually interesting way, because of the ctx.translate command is never reverted in the main game loop
}
setTimeout(() => {
simulation.drawCircle = savedfunction
canvas.width = canvas.width //clears the canvas // works on chrome at least
powerUps.spawn(m.pos.x, m.pos.y, "tech");
}, 10000);
// for (;;) {} //freezes the tab
},
remove() { }
},
{
name: "spinor",
description: "the direction you aim is determined by your position",
maxCount: 1,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return !m.isShipMode
},
requires: "",
effect() {
m.look = function () {
//always on mouse look
m.angle = (((m.pos.x + m.pos.y) / 100 + Math.PI) % Math.PI * 2) - Math.PI
//smoothed mouse look translations
const scale = 0.8;
m.transSmoothX = canvas.width2 - m.pos.x - (simulation.mouse.x - canvas.width2) * scale;
m.transSmoothY = canvas.height2 - m.pos.y - (simulation.mouse.y - canvas.height2) * scale;
m.transX += (m.transSmoothX - m.transX) * 0.07;
m.transY += (m.transSmoothY - m.transY) * 0.07;
}
},
remove() {
if (this.count) m.look = m.lookDefault
}
},
{
name: "p-zombie",
description: "set your health to 1
all mobs, not bosses, die and resurrect as zombies",
maxCount: 1,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() { return true },
requires: "",
effect() {
m.health = 0.01 //set health to 1
m.displayHealth();
for (let i = mob.length - 1; i > -1; i--) { //replace mobs with zombies
if (mob[i].isDropPowerUp && !mob[i].isBoss && mob[i].alive) {
mob[i].isSoonZombie = true
mob[i].death()
}
}
},
remove() { }
},
{
name: "decomposers",
description: "after they die mobs leave behind spawns",
maxCount: 1,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return tech.deathSpawns === 0
},
requires: "",
effect() {
tech.deathSpawns = 0.2
},
remove() {
tech.deathSpawns = 0
}
},
{
name: "panopticon",
description: "mobs can always see you",
maxCount: 1,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
setInterval(() => {
for (let i = 0; i < mob.length; i++) {
if (!mob[i].shield && mob[i].isDropPowerUp) {
mob[i].locatePlayer()
mob[i].seePlayer.yes = true;
}
}
}, 1000); //every 1 seconds
},
remove() { }
},
// {
// name: "inverted mouse",
// description: "your mouse is scrambled
it's fine, just rotate it 90 degrees",
// maxCount: 1,
// count: 0,
// frequency: 0,
// isExperimentHide: true,
// isNonRefundable: true,
// isJunk: true,
// allowed() {
// return !m.isShipMode
// },
// requires: "not ship",
// effect() {
// document.body.addEventListener("mousemove", (e) => {
// const ratio = window.innerWidth / window.innerHeight
// simulation.mouse.x = e.clientY * ratio
// simulation.mouse.y = e.clientX / ratio;
// });
// },
// remove() {
// // m.look = m.lookDefault
// }
// },
{
name: "Fourier analysis",
description: "your aiming is now controlled by this equation:
2sin(0.0133t) + sin(0.013t) + 0.5sin(0.031t)+ 0.33sin(0.03t)",
maxCount: 1,
count: 0,
frequency: 0,
isJunk: true,
allowed() {
return !m.isShipMode
},
requires: "not ship",
effect() {
m.look = () => {
m.angle = 2 * Math.sin(m.cycle * 0.0133) + Math.sin(m.cycle * 0.013) + 0.5 * Math.sin(m.cycle * 0.031) + 0.33 * Math.sin(m.cycle * 0.03)
const scale = 0.8;
simulation.mouse.y
m.transSmoothX = canvas.width2 - m.pos.x - (simulation.mouse.x - canvas.width2) * scale;
m.transSmoothY = canvas.height2 - m.pos.y - (simulation.mouse.y - canvas.height2) * scale;
m.transX += (m.transSmoothX - m.transX) * 0.07;
m.transY += (m.transSmoothY - m.transY) * 0.07;
}
},
remove() {
if (this.count) m.look = m.lookDefault
}
},
{
name: "disintegrated armament",
description: "spawn a gun
remove your active gun",
maxCount: 1,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return b.inventory.length > 0
},
requires: "at least 1 gun",
effect() {
if (b.inventory.length > 0) b.removeGun(b.guns[b.activeGun].name)
simulation.makeGunHUD()
powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "gun");
},
remove() { }
},
{
name: "probability",
description: "increase the frequency
of one random tech by 100",
maxCount: 1,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
let options = []; //find what tech I could get
for (let i = 0, len = tech.tech.length; i < len; i++) {
if (
tech.tech[i].count < tech.tech[i].maxCount &&
tech.tech[i].allowed() &&
!tech.tech[i].isJunk &&
!tech.tech.isLore
) {
options.push(i);
}
}
if (options.length) {
const index = options[Math.floor(Math.random() * options.length)]
tech.tech[index].frequency = 100
}
},
remove() { }
},
{
name: "encryption",
description: "secure tech information",
maxCount: 1,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
String.prototype.shuffle = function () {
var a = this.split(""),
n = a.length;
for (var i = n - 1; i > 0; i--) {
var j = Math.floor(Math.random() * (i + 1));
var tmp = a[i];
a[i] = a[j];
a[j] = tmp;
}
return a.join("");
}
for (let i = 0, len = tech.tech.length; i < len; i++) tech.tech[i].name = tech.tech[i].name.shuffle()
},
remove() { }
},
{
name: "quantum leap",
description: "become an alternate version of yourself
every 20 seconds",
maxCount: 1,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
setInterval(() => {
m.switchWorlds()
simulation.trails()
}, 20000); //every 30 seconds
},
remove() { }
},
{
name: "score",
description: "Add a score to n-gon!",
maxCount: 1,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
setInterval(() => {
let score = Math.ceil(1000 * Math.random() * Math.random() * Math.random() * Math.random() * Math.random())
simulation.makeTextLog(`simulation.score = ${score.toFixed(0)}`);
}, 10000); //every 10 seconds
},
remove() { }
},
{
name: "pop-ups",
description: "sign up to learn endless easy ways to win n-gon
that Landgreen doesn't want you to know!!!1!!",
maxCount: 1,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
setInterval(() => {
alert(`The best combo is ${tech.tech[Math.floor(Math.random() * tech.tech.length)].name} with ${tech.tech[Math.floor(Math.random() * tech.tech.length)].name}!`);
}, 30000); //every 30 seconds
},
remove() { }
},
{
name: "music",
description: "add music to n-gon",
maxCount: 1,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
window.open('https://www.youtube.com/watch?v=lEbHeSdmS-k&list=PL9Z5wjoBiPKEDhwCW2RN-VZoCpmhIojdn', '_blank')
},
remove() { }
},
{
name: "performance",
description: "display performance stats to n-gon",
maxCount: 1,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
(function () {
var script = document.createElement('script');
script.onload = function () {
var stats = new Stats();
document.body.appendChild(stats.dom);
requestAnimationFrame(function loop() {
stats.update();
requestAnimationFrame(loop)
});
};
script.src = 'https://unpkg.com/stats.js@0.17.0/build/stats.min.js';
document.head.appendChild(script);
})()
//move health to the right
document.getElementById("health").style.left = "86px"
document.getElementById("health-bg").style.left = "86px"
document.getElementById("defense-bar").style.left = "86px"
document.getElementById("damage-bar").style.left = "86px"
},
remove() { }
},
{
name: "repartitioning",
description: "set the frequency of finding normal tech to 0
spawn 5 tech",
maxCount: 1,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
for (let i = 0, len = tech.tech.length; i < len; i++) {
if (tech.tech[i].isJunk) {
tech.tech[i].frequency = 2
} else {
tech.tech[i].frequency = 0
}
}
for (let i = 0; i < 5; i++) powerUps.spawn(m.pos.x, m.pos.y, "tech");
},
remove() { }
},
{
name: "defragment",
description: "set the frequency of finding JUNKtech to zero",
maxCount: 1,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
for (let i = tech.tech.length - 1; i > 0; i--) {
if (tech.tech[i].isJunk) tech.tech[i].frequency = 0
}
},
remove() { }
},
// {
// name: "lubrication",
// description: "reduce block density and friction for this level",
// maxCount: 9,
// count: 0,
// frequency: 0,
// isNonRefundable: true,
// isExperimentHide: true,
// isJunk: true,
// allowed() {
// return true
// },
// requires: "",
// effect() {
// for (let i = 0; i < body.length; i++) {
// Matter.Body.setDensity(body[i], 0.0001) // 0.001 is normal
// body[i].friction = 0.01
// }
// },
// remove() {}
// },
{
name: "pitch",
description: "oscillate the pitch of your world",
maxCount: 1,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
setInterval(() => {
if (!simulation.paused) ctx.rotate(0.001 * Math.sin(simulation.cycle * 0.01))
}, 16);
},
remove() { }
},
{
name: "flatland",
description: "map blocks line of sight",
maxCount: 1,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() { return true },
requires: "",
effect() {
simulation.ephemera.push({
name: "LoS", count: 0, do() {
const pos = m.pos
const radius = 3000
if (!simulation.isTimeSkipping) {
const vertices = simulation.sight.circleLoS(pos, radius);
if (vertices.length) {
ctx.beginPath();
ctx.moveTo(vertices[0].x, vertices[0].y);
for (var i = 1; i < vertices.length; i++) {
var currentDistance = Math.sqrt((vertices[i - 1].x - pos.x) ** 2 + (vertices[i - 1].y - pos.y) ** 2);
var newDistance = Math.sqrt((vertices[i].x - pos.x) ** 2 + (vertices[i].y - pos.y) ** 2);
if (Math.abs(currentDistance - radius) < 1 && Math.abs(newDistance - radius) < 1) {
const currentAngle = Math.atan2(vertices[i - 1].y - pos.y, vertices[i - 1].x - pos.x);
const newAngle = Math.atan2(vertices[i].y - pos.y, vertices[i].x - pos.x);
ctx.arc(pos.x, pos.y, radius, currentAngle, newAngle);
} else {
ctx.lineTo(vertices[i].x, vertices[i].y)
}
}
newDistance = Math.sqrt((vertices[0].x - pos.x) ** 2 + (vertices[0].y - pos.y) ** 2);
currentDistance = Math.sqrt((vertices[vertices.length - 1].x - pos.x) ** 2 + (vertices[vertices.length - 1].y - pos.y) ** 2);
if (Math.abs(currentDistance - radius) < 1 && Math.abs(newDistance - radius) < 1) {
const currentAngle = Math.atan2(vertices[vertices.length - 1].y - pos.y, vertices[vertices.length - 1].x - pos.x);
const newAngle = Math.atan2(vertices[0].y - pos.y, vertices[0].x - pos.x);
ctx.arc(pos.x, pos.y, radius, currentAngle, newAngle);
} else {
ctx.lineTo(vertices[0].x, vertices[0].y)
}
//stroke the map, so it looks different form the line of sight
ctx.strokeStyle = "#234";
ctx.lineWidth = 9;
ctx.stroke(simulation.draw.mapPath); //this has a pretty large impact on performance, maybe 5% worse performance
ctx.globalCompositeOperation = "destination-in";
ctx.fillStyle = "#000";
ctx.fill();
ctx.globalCompositeOperation = "source-over";
// also see the map
// ctx.fill(simulation.draw.mapPath);
// ctx.fillStyle = "#000";
ctx.clip();
}
}
},
})
},
remove() { }
},
{
name: "umbra",
description: "produce a blue glow around everything
and probably some simulation lag",
maxCount: 1,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
ctx.shadowColor = '#06f';
ctx.shadowBlur = 25;
},
remove() { }
},
{
name: "lighter",
description: `ctx.globalCompositeOperation = "lighter"`,
maxCount: 1,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
ctx.globalCompositeOperation = "lighter";
},
remove() { }
},
{
name: "rewind",
description: "every 10 seconds rewind 2 seconds",
maxCount: 9,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
setInterval(() => {
m.rewind(120)
m.energy += 0.4
}, 10000);
// for (let i = 0; i < 24; i++) {
// setTimeout(() => { m.rewind(120) }, i * 5000);
// }
},
remove() { }
},
{
name: "undo",
description: "every 4 seconds rewind 1/2 a second",
maxCount: 9,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
setInterval(() => {
m.rewind(30)
m.energy += 0.2
}, 4000);
},
remove() { }
},
{
name: "energy to mass conversion",
description: "convert your energy into blocks",
maxCount: 9,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
for (let i = 0, len = 40; i < len; i++) {
setTimeout(() => {
m.energy -= 1 / len
where = Vector.add(m.pos, { x: 400 * (Math.random() - 0.5), y: 400 * (Math.random() - 0.5) })
spawn.bodyRect(where.x, where.y, Math.floor(15 + 100 * Math.random()), Math.floor(15 + 100 * Math.random()));
}, i * 100);
}
},
remove() { }
},
{
name: "level.nextLevel()",
description: "advance to the next level",
maxCount: 9,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
level.nextLevel();
},
remove() { }
},
{
name: "reincarnation",
description: "kill all mobs and spawn new ones
(also spawn a few extra mobs for fun)",
maxCount: 3,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
spawn.setSpawnList();
spawn.setSpawnList();
for (let i = 0, len = mob.length; i < len; i++) {
if (mob[i].alive && !mob[i].shield && !mob[i].isBadTarget) {
const pick = spawn.pickList[Math.floor(Math.random() * spawn.pickList.length)];
spawn[pick](mob[i].position.x, mob[i].position.y);
if (Math.random() < 0.5) spawn[pick](mob[i].position.x, mob[i].position.y);
mob[i].death();
}
}
},
remove() { }
},
{
name: "expert system",
description: "spawn a tech power up
+64% JUNK to tech pool",
maxCount: 9,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
powerUps.spawn(m.pos.x, m.pos.y, "tech");
tech.addJunkTechToPool(0.64)
},
remove() { }
},
{
name: "energy investment",
description: "every 10 seconds drain your energy
return it doubled 5 seconds later",
maxCount: 9,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
setInterval(() => {
if (!simulation.paused) {
const energy = m.energy
m.energy = 0
setTimeout(() => { //return energy
m.energy += 2 * energy
}, 5000);
}
}, 10000);
},
remove() { }
},
{
name: "missile launching system",
description: "fire missiles for the next 120 seconds",
maxCount: 9,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
for (let i = 0; i < 120; i++) {
setTimeout(() => {
const where = {
x: m.pos.x,
y: m.pos.y - 40
}
b.missile(where, -Math.PI / 2 + 0.2 * (Math.random() - 0.5) * Math.sqrt(tech.missileCount), -2)
}, i * 1000);
}
},
remove() { }
},
{
name: "grenade production",
description: "drop a grenade every 2 seconds",
maxCount: 9,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
setInterval(() => {
if (!simulation.paused && document.visibilityState !== "hidden") {
b.grenade(Vector.add(m.pos, {
x: 10 * (Math.random() - 0.5),
y: 10 * (Math.random() - 0.5)
}), -Math.PI / 2) //fire different angles for each grenade
const who = bullet[bullet.length - 1]
Matter.Body.setVelocity(who, {
x: who.velocity.x * 0.1,
y: who.velocity.y * 0.1
});
}
}, 2000);
},
remove() { }
},
{
name: "stubs",
description: "no knees or toes are drawn on the player
you can wall climb though",
maxCount: 1,
count: 0,
frequency: 0,
isJunk: true,
isNonRefundable: true,
allowed() {
return !m.isShipMode
},
requires: "",
effect() {
m.skin.stubs()
Matter.Body.scale(player.parts[3], 2, 2);
},
remove() {
// if (this.count) m.resetSkin();
}
},
{
name: "Sleipnir",
description: "grow more legs",
maxCount: 1,
count: 0,
frequency: 0,
isJunk: true,
allowed() {
return !m.isShipMode
},
requires: "",
effect() {
m.skin.Sleipnir()
},
remove() {
if (this.count) m.resetSkin();
}
},
{
name: "diegesis",
description: "indicate fire cooldown
through a rotation of your head",
maxCount: 1,
count: 0,
frequency: 0,
isJunk: true,
allowed() {
return !m.isShipMode
},
requires: "",
effect() {
m.skin.diegesis()
},
remove() {
if (this.count) m.resetSkin();
}
},
{
name: "🐱",
description: "🐈",
maxCount: 1,
count: 0,
frequency: 0,
isJunk: true,
allowed() {
return !m.isShipMode
},
requires: "",
effect() {
m.skin.cat();
},
remove() {
if (this.count) m.resetSkin();
}
},
{
name: "n-gone",
description: "become invisible to yourself
mobs can still see you",
maxCount: 1,
count: 0,
frequency: 0,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
m.draw = () => { }
},
remove() {
if (this.count) m.resetSkin();
}
},
{
name: "pareidolia",
description: "don't",
maxCount: 1,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return !m.isShipMode
},
requires: "",
effect() {
m.skin.pareidolia()
},
remove() {
if (this.count) m.resetSkin();
}
},
{
name: "posture",
description: "stand a bit taller",
maxCount: 1,
count: 0,
frequency: 0,
isJunk: true,
allowed() {
return !m.isShipMode
},
requires: "",
effect() {
m.yOffWhen.stand = 70
},
remove() {
m.yOffWhen.stand = 49
}
},
{
name: "rhythm",
description: "you oscillate up and down",
maxCount: 1,
count: 0,
frequency: 0,
isJunk: true,
isNonRefundable: true,
allowed() {
return !m.isShipMode
},
requires: "",
effect() {
setInterval(() => {
m.yOffWhen.stand = 53 + 28 * Math.sin(simulation.cycle * 0.2)
if (m.onGround && !m.crouch) m.yOffGoal = m.yOffWhen.stand
}, 100);
},
remove() { }
},
{
name: "prism",
description: "you cycle through different colors",
maxCount: 1,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
m.color = {
hue: 0,
sat: 100,
light: 50
}
setInterval(function () {
m.color.hue++
m.setFillColors()
}, 10);
},
remove() { }
},
// {
// name: "microtransactions",
// description: `when you choose a tech you can
use ${powerUps.orb.research(1)} to buy a free in game skin`,
// maxCount: 1,
// count: 0,
// frequency: 0,
// isJunk: true,
// allowed() {
// return true
// },
// requires: "",
// effect() {
// tech.isMicroTransactions = true
// },
// remove() {
// tech.isMicroTransactions = false
// }
// },
{
name: "ship",
description: "fly around with no legs
reduce combat difficulty by 1 level",
maxCount: 1,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return !m.isShipMode && !m.isAltSkin && m.fieldUpgrades[m.fieldMode].name !== "negative mass"
},
requires: "",
effect() {
m.isAltSkin = true
m.shipMode()
level.difficultyDecrease(simulation.difficultyMode)
//unlock relativistic rotation
for (let i = 0; i < tech.tech.length; i++) {
if (tech.tech[i].name === "relativistic rotation") tech.tech[i].frequency = 10
}
},
remove() { }
},
{
name: "circular symmetry",
description: "turning the ship rotates the universe instead
+200% damage",
maxCount: 1,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return m.isShipMode
},
requires: "",
effect() {
tech.damage *= 3
m.look = () => {
// const scale = 0;
m.transSmoothX = canvas.width2 - m.pos.x // - (simulation.mouse.x - canvas.width2) * scale;
m.transSmoothY = canvas.height2 - m.pos.y // - (simulation.mouse.y - canvas.height2) * scale;
m.transX += (m.transSmoothX - m.transX) * m.lookSmoothing;
m.transY += (m.transSmoothY - m.transY) * m.lookSmoothing;
ctx.restore();
ctx.save();
ctx.translate(canvas.width2, canvas.height2); //center
ctx.rotate(-m.angle)
ctx.translate(-canvas.width2, -canvas.height2); //center
}
},
remove() { }
},
{
name: "assimilation",
description: "all your bots are converted to the same random model",
maxCount: 1,
count: 0,
frequency: 0,
isBotTech: true,
isNonRefundable: true,
isJunk: true,
allowed() {
return b.totalBots() > 2
},
requires: "at least 3 bots",
effect() {
const total = b.totalBots();
tech.dynamoBotCount = 0;
tech.nailBotCount = 0;
tech.laserBotCount = 0;
tech.orbitBotCount = 0;
tech.foamBotCount = 0;
tech.soundBotCount = 0;
tech.boomBotCount = 0;
tech.plasmaBotCount = 0;
tech.missileBotCount = 0;
for (let i = 0; i < bullet.length; i++) {
if (bullet[i].botType) bullet[i].endCycle = 0
}
const bots = [
() => {
b.nailBot();
tech.nailBotCount++;
},
() => {
b.foamBot();
tech.foamBotCount++;
},
() => {
b.soundBot();
tech.soundBotCount++;
},
() => {
b.boomBot();
tech.boomBotCount++;
},
() => {
b.laserBot();
tech.laserBotCount++;
},
() => {
b.orbitBot();
tech.orbitBotCount++
},
() => {
b.dynamoBot();
tech.dynamoBotCount++
}
]
const index = Math.floor(Math.random() * bots.length)
for (let i = 0; i < total; i++) bots[index]()
},
remove() { }
},
{
name: "growth hacking",
description: "increase combat difficulty by 1 level",
maxCount: 1,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
level.difficultyIncrease(simulation.difficultyMode)
},
remove() { }
},
{
name: "stun",
description: "stun all mobs for up to 8 seconds",
maxCount: 9,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
for (let i = 0; i < mob.length; i++) mobs.statusStun(mob[i], 480)
},
remove() { }
},
{
name: "translucent",
description: "spawn 3 gun power ups
your bullets and bots are transparent",
maxCount: 1,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
for (let i = 0; i < 3; i++) powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "gun");
// //removes guns and ammo
// b.inventory = [];
// b.activeGun = null;
// b.inventoryGun = 0;
// for (let i = 0, len = b.guns.length; i < len; ++i) {
// b.guns[i].have = false;
// if (b.guns[i].ammo !== Infinity) b.guns[i].ammo = 0;
// }
// simulation.makeGunHUD(); //update gun HUD
b.bulletDraw = () => { }; //make bullets invisible
},
remove() { }
},
{
name: "re-research",
description: `eject all your ${powerUps.orb.research(1)}`,
maxCount: 9,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return powerUps.research.count > 3
},
requires: "at least 4 research",
effect() {
powerUps.spawnDelay("research", powerUps.research.count);
powerUps.research.count = 0
},
remove() { }
},
{
name: "black hole",
description: `use your energy and ${powerUps.orb.research(4)} to spawn
inside the event horizon of a huge black hole`,
maxCount: 1,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return powerUps.research.count > 3
},
requires: "at least 4 research",
effect() {
m.energy = 0
spawn.suckerBoss(m.pos.x, m.pos.y - 700)
powerUps.research.changeRerolls(-4)
simulation.makeTextLog(`m.research --
${powerUps.research.count}`)
},
remove() { }
},
{
name: "black hole cluster",
description: `spawn 30 nearby black holes`,
maxCount: 1,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
const unit = {
x: 1,
y: 0
}
for (let i = 0; i < 30; i++) {
const where = Vector.add(m.pos, Vector.mult(Vector.rotate(unit, Math.random() * 2 * Math.PI), 2000 + 1200 * Math.random()))
spawn.sucker(where.x, where.y, 140)
const who = mob[mob.length - 1]
who.locatePlayer()
// who.damageReduction = 0.2
}
},
remove() { }
},
{
name: "rule 30",
maxCount: 1,
count: 0,
frequency: 0,
isJunk: true,
allowed() {
return !build.isExperimentSelection
},
requires: "NOT EXPERIMENT MODE",
effect() { },
remove() { },
state: [
[false, false, false, Math.random() > 0.8, false, false, false, Math.random() > 0.8, false, false, false, false, false, false, false, false, false, true, false, false, false, Math.random() > 0.8, false, false, false, Math.random() > 0.8, false, false, false, false, Math.random() > 0.8, false, Math.random() > 0.8, false, false, false, Math.random() > 0.8, false, false, false, false, false, false, false, false, false]
],
rule(state, a, b, c) {
//30
if (state[a] && state[b] && state[c]) return false; // TTT => F
if (state[a] && state[b] && !state[c]) return false; // TTF => F
if (state[a] && !state[b] && state[c]) return false; //TFT => F
if (state[a] && !state[b] && !state[c]) return true; //TFF => T
if (!state[a] && state[b] && state[c]) return true; //FTT => T
if (!state[a] && state[b] && !state[c]) return true; //FTF => T
if (!state[a] && !state[b] && state[c]) return true; //FFT => T
if (!state[a] && !state[b] && !state[c]) return false; //FFF => F
},
id: 0,
researchSpawned: 0,
descriptionFunction() {
const loop = () => {
if ((simulation.paused || simulation.isChoosing) && m.alive && !build.isExperimentSelection) { //&& (!simulation.isChoosing || this.count === 0)
let b = []; //produce next row
b.push(this.rule(this.state[this.state.length - 1], this.state[this.state.length - 1].length - 1, 0, 1)); //left edge wrap around
for (let i = 1; i < this.state[this.state.length - 1].length - 1; i++) { //apply rule to the rest of the array
b.push(this.rule(this.state[this.state.length - 1], i - 1, i, i + 1));
}
b.push(this.rule(this.state[this.state.length - 1], this.state[this.state.length - 1].length - 2, this.state[this.state.length - 1].length - 1, 0)); //right edge wrap around
this.state.push(b)
if (document.getElementById(`cellular-rule-id${this.id}`)) document.getElementById(`cellular-rule-id${this.id}`).innerHTML = this.outputText() //convert to squares and send HTML
if (this.count && this.researchSpawned < 12 && !(this.state.length % 10)) {
this.researchSpawned++
powerUps.spawn(m.pos.x - 50 + 100 * (Math.random() - 0.5), m.pos.y + 100 * (Math.random() - 0.5), "research");
}
setTimeout(() => {
loop()
}, 300 + 5 * this.state.length);
}
}
setTimeout(() => {
loop()
}, 300);
this.id++
return `${this.outputText()}`
},
outputText() {
let text = ""
for (let j = 0; j < this.state.length; j++) {
// text += ""
text += "
"
for (let i = 0; i < this.state[j].length; i++) {
if (this.state[j][i]) {
text += "■" //"☻" //"⬛" //"█" //"■"
} else {
text += " " //"□" //"☺" //"⬜" //" " //"□"
}
}
text += "
"
}
text += "
"
return text
},
},
{
name: "rule 90",
maxCount: 1,
count: 0,
frequency: 0,
isJunk: true,
allowed() {
return !build.isExperimentSelection
},
requires: "NOT EXPERIMENT MODE",
effect() { },
remove() { },
state: [
[false, false, false, Math.random() > 0.8, false, false, false, Math.random() > 0.8, false, false, false, false, false, false, false, false, false, true, true, false, false, false, Math.random() > 0.8, false, false, false, Math.random() > 0.8, false, false, false, false, Math.random() > 0.8, false, Math.random() > 0.8, false, false, false, Math.random() > 0.8, false, false, false, false, false, false, false, false]
],
rule(state, a, b, c) { //90
if (state[a] && state[b] && state[c]) return false; // TTT => F
if (state[a] && state[b] && !state[c]) return true; // TTF => T
if (state[a] && !state[b] && state[c]) return false; //TFT => F
if (state[a] && !state[b] && !state[c]) return true; //TFF => T
if (!state[a] && state[b] && state[c]) return true; //FTT => T
if (!state[a] && state[b] && !state[c]) return false; //FTF => F
if (!state[a] && !state[b] && state[c]) return true; //FFT => T
if (!state[a] && !state[b] && !state[c]) return false; //FFF => F
},
id: 90,
researchSpawned: 0,
descriptionFunction() {
const loop = () => {
if ((simulation.paused || simulation.isChoosing) && m.alive && !build.isExperimentSelection) { //&& (!simulation.isChoosing || this.count === 0)
let b = []; //produce next row
b.push(this.rule(this.state[this.state.length - 1], this.state[this.state.length - 1].length - 1, 0, 1)); //left edge wrap around
for (let i = 1; i < this.state[this.state.length - 1].length - 1; i++) { //apply rule to the rest of the array
b.push(this.rule(this.state[this.state.length - 1], i - 1, i, i + 1));
}
b.push(this.rule(this.state[this.state.length - 1], this.state[this.state.length - 1].length - 2, this.state[this.state.length - 1].length - 1, 0)); //right edge wrap around
this.state.push(b)
if (document.getElementById(`cellular-rule-id${this.id}`)) document.getElementById(`cellular-rule-id${this.id}`).innerHTML = this.outputText() //convert to squares and send HTML
if (this.count && this.researchSpawned < 12 && !(this.state.length % 10)) {
this.researchSpawned++
powerUps.spawn(m.pos.x - 50 + 100 * (Math.random() - 0.5), m.pos.y + 100 * (Math.random() - 0.5), "research");
}
setTimeout(() => {
loop()
}, 300 + 5 * this.state.length);
}
}
setTimeout(() => {
loop()
}, 300);
this.id++
return `${this.outputText()}`
},
outputText() {
let text = ""
for (let j = 0; j < this.state.length; j++) {
// text += ""
text += "
"
for (let i = 0; i < this.state[j].length; i++) {
if (this.state[j][i]) {
text += "■" //"☻" //"⬛" //"█" //"■"
} else {
text += " " //"□" //"☺" //"⬜" //" " //"□"
}
}
text += "
"
}
text += "
"
return text
},
},
{
name: "cosmogonic myth",
description: `open a portal to a primordial version of reality
in 5 minutes close the portal, spawn 1 of each power up`,
maxCount: 1,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
const urls = ["https://scratch.mit.edu/projects/14005697/fullscreen/", "https://scratch.mit.edu/projects/22573757/fullscreen/", "https://scratch.mit.edu/projects/41429974/fullscreen/", "https://scratch.mit.edu/projects/43690666/fullscreen/", "https://codepen.io/lilgreenland/full/ozXNWZ", "https://codepen.io/lilgreenland/full/wzARJY", "classic/7-1-2017/", "classic/4-15-2018/", "classic/7-11-2019/", "classic/9-8-2019/", "classic/7-15-2020/", "classic/6-1-2021/"]
const choose = urls[Math.floor(Math.random() * urls.length)]
console.log(`opening new tab" ${choose}`)
let tab = window.open(choose, "_blank");
setTimeout(() => {
tab.close();
powerUps.spawn(m.pos.x, m.pos.y, "gun");
setTimeout(() => {
powerUps.spawn(m.pos.x, m.pos.y - 50, "ammo")
}, 250);
setTimeout(() => {
powerUps.spawn(m.pos.x + 50, m.pos.y, "field");
}, 500);
setTimeout(() => {
powerUps.spawn(m.pos.x + 50, m.pos.y - 50, "heal");
}, 750);
setTimeout(() => {
powerUps.spawn(m.pos.x - 50, m.pos.y, "tech");
}, 1000);
setTimeout(() => {
powerUps.spawn(m.pos.x - 50, m.pos.y - 50, "research");
}, 1250);
}, 1000 * 5 * 60);
},
remove() { }
},
{
name: "planetesimals",
description: `play planetesimals (an asteroids-like game)
clear levels in planetesimals to spawn tech
if you die in planetesimals you die in n-gon`,
maxCount: 1,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() {
return true
},
requires: "",
effect() {
window.open('../../planetesimals/index.html', '_blank')
// powerUps.spawn(m.pos.x, m.pos.y, "tech");
// for communicating to other tabs, like planetesimals
// Connection to a broadcast channel
const bc = new BroadcastChannel('planetesimals');
bc.activated = false
bc.onmessage = function (ev) {
if (ev.data === 'tech') powerUps.directSpawn(m.pos.x, m.pos.y, "tech");
if (ev.data === 'death') {
m.death()
bc.close(); //end session
}
if (ev.data === 'ready' && !bc.activated) {
bc.activated = true //prevents n-gon from activating multiple copies of planetesimals
bc.postMessage("activate");
}
}
},
remove() { }
},
{
name: "tinker",
description: "permanently unlock JUNKtech in experiment mode
this effect is stored for future visits",
maxCount: 1,
count: 0,
frequency: 0,
frequencyDefault: 0,
isJunk: true,
isNonRefundable: true,
allowed() {
return !localSettings.isJunkExperiment
},
requires: "",
effect() {
localSettings.isJunkExperiment = true
if (localSettings.isAllowed) localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage
},
remove() { }
},
{
name: "NFT",
descriptionFunction() {
return `buy your current game seed: ${Math.initialSeed}
no one is allowed to use your seeds
if they use them they are gonna get in trouble
your seeds: ${localSettings.personalSeeds.join(", ")}`
},
maxCount: 1,
count: 0,
frequency: 0,
isJunk: true,
isNonRefundable: true,
allowed: () => true,
requires: "",
effect() {
localSettings.personalSeeds.push(Math.initialSeed)
if (localSettings.isAllowed) localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage
},
remove() { }
},
// {
// name: "rule 90",
// maxCount: 1,
// count: 0,
// frequency: 0,
// isJunk: true,
// allowed() {
// return true
// },
// requires: "",
// effect() {},
// remove() {},
// state: [
// [false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, true, false, false, false, false, false, false, false, false, false, false, false, false, false]
// ],
// rule(state, a, b, c) {
// if (state[a] && state[b] && state[c]) return false; // TTT => F
// if (state[a] && state[b] && !state[c]) return true; // TTF => T
// if (state[a] && !state[b] && state[c]) return false; //TFT => F
// if (state[a] && !state[b] && !state[c]) return true; //TFF => T
// if (!state[a] && state[b] && state[c]) return true; //FTT => T
// if (!state[a] && state[b] && !state[c]) return false; //FTF => F
// if (!state[a] && !state[b] && state[c]) return true; //FFT => T
// if (!state[a] && !state[b] && !state[c]) return false; //FFF => F
// },
// id: 0,
// descriptionFunction() {
// const loop = () => {
// if ((simulation.paused || simulation.isChoosing) && m.alive && !build.isExperimentSelection) { //&& (!simulation.isChoosing || this.count === 0)
// let b = []; //produce next row
// b.push(this.rule(this.state[this.state.length - 1], this.state[this.state.length - 1].length - 1, 0, 1)); //left edge wrap around
// for (let i = 1; i < this.state[this.state.length - 1].length - 1; i++) { //apply rule to the rest of the array
// b.push(this.rule(this.state[this.state.length - 1], i - 1, i, i + 1));
// }
// b.push(this.rule(this.state[this.state.length - 1], this.state[this.state.length - 1].length - 2, this.state[this.state.length - 1].length - 1, 0)); //right edge wrap around
// this.state.push(b)
// if (document.getElementById(`cellular-rule-id${this.id}`)) document.getElementById(`cellular-rule-id${this.id}`).innerHTML = this.outputText() //convert to squares and send HTML
// if (this.count && this.state.length < 120 && !(this.state.length % 10)) powerUps.spawn(m.pos.x - 50 + 100 * (Math.random() - 0.5), m.pos.y + 100 * (Math.random() - 0.5), "research");
// setTimeout(() => { loop() }, 400);
// }
// }
// setTimeout(() => { loop() }, 400);
// // if (this.id === 0) {
// // for (let i = 0; i < 29; i++) this.state[0][i] = Math.random() < 0.5 //randomize seed
// // }
// this.id++
// return `${this.outputText()}`
// },
// outputText() {
// let text = ""
// for (let j = 0; j < this.state.length; j++) {
// text += ""
// for (let i = 0; i < this.state[j].length; i++) {
// if (this.state[j][i]) {
// text += "⬛" //"█" //"■"
// } else {
// text += "⬜" //" " //"□"
// }
// }
// text += "
"
// }
// return text
// },
// },
//**************************************************
//************************************************** undefined / lore
//************************************************** tech
//**************************************************
{
name: `undefined`,
description: `this
`,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
isLore: true,
// isExperimentHide: true,
allowed() { return !build.isExperimentSelection },
requires: "NOT EXPERIMENT MODE",
effect() {
if (localSettings.loreCount > lore.conversation.length - 1) { //reward for people done with lore chapters (or on the final chapter)
for (let i = mob.length - 1; i > -1; i--) { //replace mobs with starters
if (!mob[i].isBoss && mob[i].isDropPowerUp && mob[i].alive) {
spawn.starter(mob[i].position.x, mob[i].position.y)
mob[i].leaveBody = false
mob[i].isDropPowerUp = false
mob[i].death()
//spawn a random power up
// if (Math.random() < 1 / 5) {
// powerUps.spawn(mob[i].position.x, mob[i].position.y, "research")
// } else
if (Math.random() < 1 / 4) {
powerUps.spawn(mob[i].position.x, mob[i].position.y, "ammo")
} else if (Math.random() < 1 / 3) {
powerUps.spawn(mob[i].position.x, mob[i].position.y, "heal")
} else if (Math.random() < 1 / 2) {
powerUps.spawn(mob[i].position.x, mob[i].position.y, "boost")
} else {
powerUps.spawn(mob[i].position.x, mob[i].position.y, "coupling")
}
}
}
}
setTimeout(() => { //a short delay, I can't remember why
lore.techCount++
if (lore.techCount === lore.techGoal) {
// tech.removeLoreTechFromPool();
this.frequency = 0;
this.description = `null is open at level.final()
`
} else {
this.frequency += lore.techGoal * 2
// for (let i = 0; i < tech.tech.length; i++) { //set name for all unchosen copies of this tech
// if (tech.tech[i].isLore && tech.tech[i].count === 0) tech.tech[i].description = `${lore.techCount+1}/${lore.techGoal}
add copies of this to the potential tech pool`
// }
// for (let i = 0, len = 10; i < len; i++) tech.addLoreTechToPool()
this.description = `uncaught error:
${Math.max(0, lore.techGoal - lore.techCount)} more required for access to null`
}
}, 1);
},
remove() {
lore.techCount = 0;
this.maxCount = lore.techGoal;
this.description = `this
`
}
}
],
// addLoreTechToPool() { //adds lore tech to tech pool
// if (!simulation.isCheating) {
// tech.tech.push({
// name: `undefined`,
// description: `${lore.techCount+1}/${lore.techGoal}
add copies of this to the potential tech pool`,
// maxCount: 1,
// count: 0,
// frequency: 2,
// isLore: true,
// isNonRefundable: true,
// isExperimentHide: true,
// allowed() {
// return true
// },
// requires: "",
// effect() {
// setTimeout(() => { //a short delay, I can't remember why
// lore.techCount++
// if (lore.techCount > lore.techGoal - 1) {
// // tech.removeLoreTechFromPool();
// for (let i = tech.tech.length - 1; i > 0; i--) {
// if (tech.tech[i].isLore && tech.tech[i].count === 0) tech.tech.splice(i, 1)
// }
// } else {
// for (let i = 0; i < tech.tech.length; i++) { //set name for all unchosen copies of this tech
// if (tech.tech[i].isLore && tech.tech[i].count === 0) tech.tech[i].description = `${lore.techCount+1}/${lore.techGoal}
add copies of this to the potential tech pool`
// }
// for (let i = 0, len = 10; i < len; i++) tech.addLoreTechToPool()
// }
// }, 1);
// },
// remove() {}
// })
// }
// },
// junk: [
// ],
//variables use for gun tech upgrades
fireRate: null,
bulletSize: null,
energySiphon: null,
healthDrain: null,
crouchAmmoCount: null,
bulletsLastLonger: null,
isImmortal: null,
sporesOnDeath: null,
isImmuneExplosion: null,
isExplodeMob: null,
isDroneOnDamage: null,
isAcidDmg: null,
isAnnihilation: null,
largerHeals: null,
squirrelFx: null,
isCrit: null,
isLowHealthDmg: null,
isLowHealthDefense: null,
isLowHealthFireRate: null,
isFarAwayDmg: null,
isFirstDer: null,
isMassEnergy: null,
extraChoices: null,
laserBotCount: null,
dynamoBotCount: null,
nailBotCount: null,
foamBotCount: null,
soundBotCount: null,
boomBotCount: null,
plasmaBotCount: null,
missileBotCount: null,
orbitBotCount: null,
blockDmg: null,
isBlockRadiation: null,
isPiezo: null,
isFastDrones: null,
oneSuperBall: null,
laserReflections: null,
laserDamage: null,
isAmmoFromHealth: null,
mobSpawnWithHealth: null,
isEnergyRecovery: null,
isHealthRecovery: null,
isEnergyLoss: null,
isDeathAvoid: null,
isDeathAvoidedThisLevel: null,
isPlasmaRange: null,
isFreezeMobs: null,
isIceCrystals: null,
blockDamage: null,
isBlockStun: null,
isStunField: null,
isHarmDamage: null,
energyRegen: null,
isVacuumBomb: null,
renormalization: null,
fragments: null,
energyDamage: null,
botSpawner: null,
isBotSpawnerReset: null,
isSporeFollow: null,
isNailRadiation: null,
isEnergyHealth: null,
isStun: null,
restDamage: null,
isRPG: null,
missileCount: null,
isDeterminism: null,
isSuperDeterminism: null,
isHarmReduce: null,
nailsDeathMob: null,
isSlowFPS: null,
isNeutronStun: null,
isAnsatz: null,
isDamageFromBulletCount: null,
laserDrain: null,
isNailShot: null,
slowFire: null,
fastTime: null,
squirrelJump: null,
isFastRadiation: null,
isAmmoForGun: null,
isRapidPulse: null,
isSporeFreeze: null,
isShotgunRecoil: null,
isHealLowHealth: null,
isAoESlow: null,
isHarmArmor: null,
isTurret: null,
isRerollDamage: null,
isHarmFreeze: null,
isBotArmor: null,
isRerollHaste: null,
researchHaste: null,
isMineDrop: null,
isRerollBots: null,
isNailBotUpgrade: null,
isFoamBotUpgrade: null,
isSoundBotUpgrade: null,
isLaserBotUpgrade: null,
isBoomBotUpgrade: null,
isOrbitBotUpgrade: null,
isDroneGrab: null,
isOneGun: null,
isDamageForGuns: null,
isGunCycle: null,
isFastFoam: null,
isSporeGrowth: null,
isStimulatedEmission: null,
nailGun: null,
nailInstantFireRate: null,
isCapacitor: null,
isEnergyNoAmmo: null,
// isFreezeHarmImmune: null,
isSmallExplosion: null,
isExplosionHarm: null,
extraMaxHealth: null,
// bonusHealth: null,
isIntangible: null,
isCloakStun: null,
bonusEnergy: null,
// healGiveMaxEnergy: null,
healMaxEnergyBonus: 0, //not null
aimDamage: null,
isNoFireDefense: null,
isNoFireDamage: null,
duplicateChance: null,
beamSplitter: null,
iceEnergy: null,
isPerfectBrake: null,
explosiveRadius: null,
// isWormholeEnergy: null,
isWormholeDamage: null,
isNailCrit: null,
isFlechetteExplode: null,
isWormholeWorms: null,
isWormHoleBullets: null,
isWideLaser: null,
wideLaser: null,
isPulseLaser: null,
isRadioactive: null,
radioactiveDamage: null,
isRailEnergy: null,
isMineSentry: null,
isIncendiary: null,
overfillDrain: null,
isNeutronSlow: null,
// isRailAreaDamage: null,
historyLaser: null,
isSpeedHarm: null,
isSpeedDamage: null,
isTimeSkip: null,
isCancelDuplication: null,
duplication: null,
isCancelRerolls: null,
isCancelTech: null,
isBotDamage: null,
isBanish: null,
isMaxEnergyTech: null,
isLowEnergyDamage: null,
isRewindBot: null,
isRewindGrenade: null,
isExtruder: null,
isEndLevelPowerUp: null,
isMissileBig: null,
isMissileBiggest: null,
isLaserMine: null,
isFoamMine: null,
isAmmoFoamSize: null,
isIceIX: null,
isDupDamage: null,
isFireRateForGuns: null,
cyclicImmunity: null,
isTechDamage: null,
isRestHarm: null,
isFireMoveLock: null,
isRivets: null,
isNeedles: null,
isExplodeRadio: null,
isPauseSwitchField: null,
isPauseEjectTech: null,
isShieldPierce: null,
isDuplicateMobs: null,
is100Duplicate: null,
isDynamoBotUpgrade: null,
isBlockPowerUps: null,
isDamageAfterKillNoRegen: null,
isHarmReduceNoKill: null,
isSwitchReality: null,
isResearchReality: null,
isAnthropicDamage: null,
isFlipFlop: null,
isFlipFlopHarm: null,
isFlipFlopOn: null,
// isFlipFlopLevelReset: null,
isFlipFlopDamage: null,
isFlipFlopEnergy: null,
isFlipFlopChoices: null,
isRelay: null,
relayIce: null,
isMetaAnalysis: null,
isFoamAttract: null,
droneCycleReduction: null,
droneEnergyReduction: null,
isHalfHeals: null,
isAlwaysFire: null,
isDroneRespawn: null,
deathSpawns: null,
isMobBlockFling: null,
// blockingIce: null,
isPhaseVelocity: null,
waveBeamSpeed: null,
wavePacketAmplitude: null,
isCollisionRealitySwitch: null,
iceIXOnDeath: null,
wimpCount: null,
isAddBlockMass: null,
isMACHO: null,
isHarmMACHO: null,
isSneakAttack: null,
isFallingDamage: null,
harmonics: null,
isStandingWaveExpand: null,
isTokamak: null,
deflectEnergy: null,
superBallDelay: null,
isBlockExplode: null,
isOverHeal: null,
isDroneRadioactive: null,
droneRadioDamage: null,
isDroneTeleport: null,
isDroneFastLook: null,
isBulletTeleport: null,
isResearchBoss: null,
isJunkResearch: null,
junkResearchNumber: null,
laserColor: null,
laserColorAlpha: null,
isLongitudinal: null,
is360Longitudinal: null,
isShotgunReversed: null,
fieldDuplicate: null,
isCloakingDamage: null,
harmonicEnergy: null,
isFieldHarmReduction: null,
isFastTime: null,
isAnthropicTech: null,
isSporeWorm: null,
isSporeFlea: null,
isFoamShot: null,
isIceShot: null,
isBlockRestitution: null,
isZeno: null,
isFieldFree: null,
isExtraGunField: null,
isBigField: null,
isSmartRadius: null,
isFilament: null,
isLargeHarpoon: null,
extraHarpoons: null,
ammoCap: null,
isHarpoonPowerUp: null,
harpoonDensity: null,
isAddRemoveMaxHealth: null,
cloakDuplication: null,
extruderRange: null,
isForeverDrones: null,
nailRecoil: null,
baseJumpForce: null,
baseFx: null,
isNeutronium: null,
isFreeWormHole: null,
isRewindField: null,
isCrouchRegen: null,
isAxion: null,
isDarkStar: null,
isWormholeMapIgnore: null,
isLessDamageReduction: null,
needleTunnel: null,
isBrainstorm: null,
isBrainstormActive: null,
brainStormDelay: null,
wormSize: null,
extraSuperBalls: null,
isTimeCrystals: null,
isGroundState: null,
isRailGun: null,
isGrapple: null,
isImmuneGrapple: null,
isDronesTravel: null,
isTechDebt: null,
isPlasmaBall: null,
plasmaDischarge: null,
isFlipFlopHealth: null,
isRelayEnergy: null,
coyoteTime: null,
missileFireCD: null,
isBotField: null,
isFoamBall: null,
isNoDraftPause: null,
isFoamPressure: null,
foamDamage: null,
isClusterExplode: null,
isCircleExplode: null,
isPetalsExplode: null,
deathSkipTime: null,
isIceMaxHealthLoss: null,
isIceKill: null,
isCritKill: null,
isQuantumEraser: null,
isPhononBlock: null,
isPhononWave: null,
isLaserLens: null,
laserCrit: null,
isSporeColony: null,
isExtraBotOption: null,
isLastHitDamage: null,
isCloakHealLastHit: null,
isRicochet: null,
isCancelCouple: null,
isCouplingPowerUps: null,
isBoostPowerUps: null,
isBoostReplaceAmmo: null,
isInfiniteWaveAmmo: null,
isJunkDNA: null,
buffedGun: 0,
isGunChoice: null,
railChargeRate: null,
isSuperHarm: null,
isZombieMobs: null,
isSuperMine: null,
sentryAmmo: null,
collidePowerUps: null,
isDilate: null,
isDiaphragm: null,
hardLanding: null,
isNoGroundDamage: null,
isSuperBounce: null,
isDivisor: null,
isFoamCavitation: null,
isHealAttract: null,
isLaserField: null,
isHealBrake: null,
isMassProduction: null,
isPrinter: null,
}