nano bots

catabolism - 2% (was 2.3%) of max health removed
many worlds - spawns 2 rerolls (was 1)
pilot wave field- now has access to several mods that normally require other fields
  this plus the fragmenting block mod are a big buff for late game pilot wave
  let me know if it is too strong

mod nano-scale: bot prototypes - upgrade a bot type and build 2 of that bot
mod nano-scale: bot manufacturing - build 3 random bots
  these mods don't show up in custom
This commit is contained in:
landgreen
2020-12-11 04:22:30 -08:00
parent 75f6f268eb
commit b6cf21dee9
7 changed files with 287 additions and 213 deletions

View File

@@ -1030,7 +1030,7 @@ const b = {
},
onEnd() {
if (mod.isMutualism && this.isMutualismActive && !mod.isEnergyHealth) {
mech.health += 0.01
mech.health += 0.005
if (mech.health > mech.maxHealth) mech.health = mech.maxHealth;
mech.displayHealth();
}
@@ -1111,7 +1111,7 @@ const b = {
World.add(engine.world, bullet[bIndex]); //add bullet to world
if (mod.isMutualism && mech.health > 0.02) {
mech.health -= 0.01
mech.health -= 0.005
mech.displayHealth();
bullet[bIndex].isMutualismActive = true
}

View File

@@ -108,7 +108,7 @@ function collisionChecks(event) {
return
}
mech.damage(dmg);
if (mod.isPiezo) mech.energy += 200;
if (mod.isPiezo) mech.energy += 2;
if (mod.isBayesian) powerUps.ejectMod()
if (mob[k].onHit) mob[k].onHit(k);
mech.immuneCycle = mech.cycle + mod.collisionImmuneCycles; //player is immune to collision damage for 30 cycles

View File

@@ -588,7 +588,7 @@ const game = {
if (mod.isMutualism && !mod.isEnergyHealth) {
for (let i = 0; i < bullet.length; i++) {
if (bullet[i].isMutualismActive) {
mech.health += 0.01
mech.health += 0.005
if (mech.health > mech.maxHealth) mech.health = mech.maxHealth;
mech.displayHealth();
}

View File

@@ -163,7 +163,7 @@ const mod = {
allowed() {
return mod.isEnergyLoss && mech.maxEnergy === 1 && !mod.isMissileField && !mod.isSporeField && !mod.isRewindAvoidDeath
},
requires: "heat engine, not max energy increase, CPT, missile or spore nano-scale",
requires: "exothermic process, not max energy increase, CPT, missile or spore nano-scale",
effect() {
mod.isMaxEnergyMod = true;
mech.setMaxEnergy()
@@ -181,7 +181,7 @@ const mod = {
allowed() {
return mod.isEnergyLoss && mech.maxEnergy < 1.1
},
requires: "heat engine",
requires: "exothermic process",
effect() {
mod.isLowEnergyDamage = true;
},
@@ -374,7 +374,7 @@ const mod = {
},
{
name: "fragmentation",
description: "detonation or collision ejects <strong>nails</strong><br><em>rail gun, grenades, shotgun slugs, blocks</em>",
description: "detonation or collisions with mobs eject <strong>nails</strong><br><em>blocks, rail gun, grenades, shotgun slugs</em>",
maxCount: 9,
count: 0,
allowed() {
@@ -1113,7 +1113,7 @@ const mod = {
requires: "not mass-energy equivalence",
effect() {
mod.isPiezo = true;
mech.energy += 200;
mech.energy += 2;
},
remove() {
mod.isPiezo = false;
@@ -1635,7 +1635,7 @@ const mod = {
},
{
name: "catabolism",
description: "gain <strong class='color-g'>ammo</strong> when you <strong>fire</strong> while <strong>out</strong> of <strong class='color-g'>ammo</strong><br>drains <strong>2.3%</strong> of <strong>max health</strong>",
description: "gain <strong class='color-g'>ammo</strong> when you <strong>fire</strong> while <strong>out</strong> of <strong class='color-g'>ammo</strong><br>drains <strong>2%</strong> of <strong>max health</strong>",
maxCount: 1,
count: 0,
allowed() {
@@ -1643,7 +1643,7 @@ const mod = {
},
requires: "not mass-energy equivalence<br>not exciton-lattice",
effect: () => {
mod.isAmmoFromHealth = 0.023;
mod.isAmmoFromHealth = 0.02;
},
remove() {
mod.isAmmoFromHealth = 0;
@@ -1739,13 +1739,13 @@ const mod = {
},
{
name: "many-worlds",
description: "if you have no <strong class='color-r'>rerolls</strong> spawn one<br>after choosing a <strong class='color-m'>mod</strong>, <strong class='color-f'>field</strong>, or <strong class='color-g'>gun</strong>",
description: "after choosing a <strong class='color-m'>mod</strong>, <strong class='color-f'>field</strong>, or <strong class='color-g'>gun</strong><br>if you have no <strong class='color-r'>rerolls</strong> spawn <strong>2</strong>",
maxCount: 1,
count: 0,
allowed() {
return powerUps.reroll.rerolls < 3 && !mod.isSuperDeterminism && !mod.isRerollHaste
return powerUps.reroll.rerolls === 0 && !mod.isSuperDeterminism && !mod.isRerollHaste
},
requires: "not superdeterminism or Ψ(t) collapse<br>fewer than 3 rerolls",
requires: "not superdeterminism or Ψ(t) collapse<br>no rerolls",
effect: () => {
mod.manyWorlds = true;
},
@@ -2597,7 +2597,7 @@ const mod = {
},
{
name: "mutualism",
description: "increase <strong class='color-p' style='letter-spacing: 2px;'>spore</strong> <strong class='color-d'>damage</strong> by <strong>100%</strong><br><strong class='color-p' style='letter-spacing: 2px;'>spores</strong> borrow <strong>1</strong> <strong>health</strong> until they <strong>die</strong>",
description: "increase <strong class='color-p' style='letter-spacing: 2px;'>spore</strong> <strong class='color-d'>damage</strong> by <strong>100%</strong><br><strong class='color-p' style='letter-spacing: 2px;'>spores</strong> borrow <strong>0.5</strong> <strong>health</strong> until they <strong>die</strong>",
maxCount: 1,
count: 0,
allowed() {
@@ -2995,6 +2995,40 @@ const mod = {
//************************************************** field
//************************************************** mods
//**************************************************
{
name: "bremsstrahlung radiation",
description: "<strong>blocking</strong> with <strong>standing wave harmonics</strong><br> does <strong class='color-d'>damage</strong> to mobs",
maxCount: 9,
count: 0,
allowed() {
return mech.fieldUpgrades[mech.fieldMode].name === "standing wave harmonics"
},
requires: "standing wave harmonics",
effect() {
mod.blockDmg += 0.75 //if you change this value also update the for loop in the electricity graphics in mech.pushMass
},
remove() {
mod.blockDmg = 0;
}
},
{
name: "frequency resonance",
description: "<strong>standing wave harmonics</strong> shield is retuned<br>increase <strong>size</strong> and <strong>blocking</strong> efficiency by <strong>40%</strong>",
maxCount: 9,
count: 0,
allowed() {
return mech.fieldUpgrades[mech.fieldMode].name === "standing wave harmonics"
},
requires: "standing wave harmonics",
effect() {
mech.fieldRange += 175 * 0.2
mech.fieldShieldingScale *= 0.55
},
remove() {
mech.fieldRange = 175;
mech.fieldShieldingScale = 1;
}
},
{
name: "flux pinning",
description: "blocking with <strong>perfect diamagnetism</strong><br><strong>stuns</strong> mobs for <strong>+1</strong> second",
@@ -3043,196 +3077,91 @@ const mod = {
mod.isCrit = false;
}
},
{
name: "timelike world line",
description: "<strong>time dilation</strong> doubles your relative time <strong>rate</strong><br>and makes you <strong>immune</strong> to <strong class='color-harm'>harm</strong>",
maxCount: 1,
count: 0,
allowed() {
return mech.fieldUpgrades[mech.fieldMode].name === "time dilation field"
},
requires: "time dilation field",
effect() {
mod.isTimeSkip = true;
b.setFireCD();
},
remove() {
mod.isTimeSkip = false;
b.setFireCD();
}
},
{
name: "Lorentz transformation",
description: "permanently increase your relative time rate<br><strong>move</strong>, <strong>jump</strong>, and <strong>shoot</strong> <strong>40%</strong> faster",
maxCount: 1,
count: 0,
allowed() {
return mech.fieldUpgrades[mech.fieldMode].name === "time dilation field"
},
requires: "time dilation field",
effect() {
mod.fastTime = 1.40;
mod.fastTimeJump = 1.11;
mech.setMovement();
b.setFireCD();
},
remove() {
mod.fastTime = 1;
mod.fastTimeJump = 1;
mech.setMovement();
b.setFireCD();
}
},
{
name: "time crystals",
description: "<strong>quadruple</strong> your default <strong class='color-f'>energy</strong> regeneration",
maxCount: 1,
count: 0,
allowed() {
return mech.fieldUpgrades[mech.fieldMode].name === "time dilation field" && mod.energyRegen !== 0;
},
requires: "time dilation field",
effect: () => {
mod.energyRegen = 0.004;
mech.fieldRegen = mod.energyRegen;
},
remove() {
mod.energyRegen = 0.001;
mech.fieldRegen = mod.energyRegen;
}
},
{
name: "plasma jet",
description: "increase <strong class='color-plasma'>plasma</strong> <strong>torch's</strong> range by <strong>27%</strong>",
maxCount: 9,
count: 0,
allowed() {
return mech.fieldUpgrades[mech.fieldMode].name === "plasma torch"
},
requires: "plasma torch",
effect() {
mod.isPlasmaRange += 0.27;
},
remove() {
mod.isPlasmaRange = 1;
}
},
{
name: "plasma-bot",
description: "a bot uses <strong class='color-f'>energy</strong> to emit <strong class='color-plasma'>plasma</strong><br>that <strong class='color-d'>damages</strong> and <strong>pushes</strong> mobs",
maxCount: 1,
count: 0,
allowed() {
return mech.fieldUpgrades[mech.fieldMode].name === "plasma torch"
},
requires: "plasma torch",
effect() {
mod.plasmaBotCount++;
b.plasmaBot();
},
remove() {
mod.plasmaBotCount = 0;
}
},
{
name: "degenerate matter",
description: "reduce <strong class='color-harm'>harm</strong> by <strong>40%</strong><br>while <strong>negative mass field</strong> is active",
maxCount: 1,
count: 0,
allowed() {
return mech.fieldUpgrades[mech.fieldMode].name === "negative mass field"
},
requires: "negative mass field",
effect() {
mod.isHarmReduce = true
},
remove() {
mod.isHarmReduce = false;
// if (mech.fieldUpgrades[mech.fieldMode].name === "negative mass field") mech.setField("negative mass field") //reset harm reduction
}
},
{
name: "annihilation",
description: "after <strong>touching</strong> mobs, they are <strong>annihilated</strong><br>drains <strong>33%</strong> of maximum <strong class='color-f'>energy</strong>",
maxCount: 1,
count: 0,
allowed() {
return mech.fieldUpgrades[mech.fieldMode].name === "negative mass field"
},
requires: "negative mass field",
effect() {
mod.isAnnihilation = true
},
remove() {
mod.isAnnihilation = false;
}
},
{
name: "negative temperature",
description: "<strong>negative mass field</strong> uses <strong class='color-f'>energy</strong><br>to <strong class='color-s'>freeze</strong> each mob caught in it's effect",
maxCount: 1,
count: 0,
allowed() {
return mech.fieldUpgrades[mech.fieldMode].name === "negative mass field"
},
requires: "negative mass field",
effect() {
mod.isFreezeMobs = true;
},
remove() {
mod.isFreezeMobs = false;
}
},
{
name: "bremsstrahlung radiation",
description: "<strong>blocking</strong> with <strong>standing wave harmonics</strong><br> does <strong class='color-d'>damage</strong> to mobs",
maxCount: 9,
count: 0,
allowed() {
return mech.fieldUpgrades[mech.fieldMode].name === "standing wave harmonics"
},
requires: "standing wave harmonics",
effect() {
mod.blockDmg += 0.75 //if you change this value also update the for loop in the electricity graphics in mech.pushMass
},
remove() {
mod.blockDmg = 0;
}
},
{
name: "frequency resonance",
description: "<strong>standing wave harmonics</strong> shield is retuned<br>increase <strong>size</strong> and <strong>blocking</strong> efficiency by <strong>40%</strong>",
maxCount: 9,
count: 0,
allowed() {
return mech.fieldUpgrades[mech.fieldMode].name === "standing wave harmonics"
},
requires: "standing wave harmonics",
effect() {
mech.fieldRange += 175 * 0.2
mech.fieldShieldingScale *= 0.55
},
remove() {
mech.fieldRange = 175;
mech.fieldShieldingScale = 1;
}
},
{
name: "pair production",
description: "<strong>power ups</strong> overload your <strong class='color-f'>energy</strong><br>to <strong>250%</strong> of your maximum <strong class='color-f'>energy</strong>",
description: "<strong>power ups</strong> overfill your <strong class='color-f'>energy</strong> by <strong>300</strong>",
maxCount: 1,
count: 0,
allowed() {
return mech.fieldUpgrades[mech.fieldMode].name === "nano-scale manufacturing" || mech.fieldUpgrades[mech.fieldMode].name === "pilot wave"
},
requires: "nano-scale manufacturing",
effect: () => {
mod.isMassEnergy = true // used in mech.grabPowerUp
mech.energy += 3
},
remove() {
mod.isMassEnergy = false;
}
},
{
name: "bot manufacturing",
description: "use <strong>nano-scale manufacturing</strong><br>to build <strong>3</strong> random <strong>bots</strong>",
maxCount: 1,
count: 0,
isNonRefundable: true,
isCustomHide: true,
allowed() {
return mech.fieldUpgrades[mech.fieldMode].name === "nano-scale manufacturing"
},
requires: "nano-scale manufacturing",
effect: () => {
mod.isMassEnergy = true // used in mech.grabPowerUp
mech.energy += mech.maxEnergy * 2.5
mech.energy = 0.01;
b.randomBot()
b.randomBot()
b.randomBot()
},
remove() {
mod.isMassEnergy = false;
}
remove() {}
},
{
name: "bot prototypes",
description: "use <strong>nano-scale manufacturing</strong> to <strong>upgrade</strong><br>all bots of a random type and <strong>build</strong> <strong>2</strong> of that <strong>bot</strong>",
maxCount: 1,
count: 0,
isNonRefundable: true,
isCustomHide: true,
allowed() {
return mech.fieldUpgrades[mech.fieldMode].name === "nano-scale manufacturing" && !(mod.isNailBotUpgrade && mod.isFoamBotUpgrade && mod.isBoomBotUpgrade && mod.isLaserBotUpgrade && mod.isOrbitBotUpgrade)
},
requires: "nano-scale manufacturing",
effect: () => {
mech.energy = 0.01;
//fill array of available bots
const notUpgradedBots = []
if (!mod.isNailBotUpgrade) {
notUpgradedBots.push(() => {
mod.giveMod("nail-bot upgrade")
for (let i = 0; i < 2; i++) mod.giveMod("nail-bot")
})
}
if (!mod.isFoamBotUpgrade) {
notUpgradedBots.push(() => {
mod.giveMod("foam-bot upgrade")
for (let i = 0; i < 2; i++) mod.giveMod("foam-bot")
})
}
if (!mod.isBoomBotUpgrade) {
notUpgradedBots.push(() => {
mod.giveMod("boom-bot upgrade")
for (let i = 0; i < 2; i++) mod.giveMod("boom-bot")
})
}
if (!mod.isLaserBotUpgrade) {
notUpgradedBots.push(() => {
mod.giveMod("laser-bot upgrade")
for (let i = 0; i < 2; i++) mod.giveMod("laser-bot")
})
}
if (!mod.isOrbitBotUpgrade) {
notUpgradedBots.push(() => {
mod.giveMod("orbital-bot upgrade")
for (let i = 0; i < 2; i++) mod.giveMod("orbital-bot")
})
}
//choose random function from the array and run it
notUpgradedBots[Math.floor(Math.random() * notUpgradedBots.length)]()
},
remove() {}
},
{
name: "mycelium manufacturing",
@@ -3282,6 +3211,146 @@ const mod = {
mod.isIceField = false;
}
},
{
name: "degenerate matter",
description: "reduce <strong class='color-harm'>harm</strong> by <strong>40%</strong><br>while <strong>negative mass field</strong> is active",
maxCount: 1,
count: 0,
allowed() {
return mech.fieldUpgrades[mech.fieldMode].name === "negative mass field"
},
requires: "negative mass field",
effect() {
mod.isHarmReduce = true
},
remove() {
mod.isHarmReduce = false;
// if (mech.fieldUpgrades[mech.fieldMode].name === "negative mass field") mech.setField("negative mass field") //reset harm reduction
}
},
{
name: "annihilation",
description: "after <strong>touching</strong> mobs, they are <strong>annihilated</strong><br>drains <strong>33%</strong> of maximum <strong class='color-f'>energy</strong>",
maxCount: 1,
count: 0,
allowed() {
return mech.fieldUpgrades[mech.fieldMode].name === "negative mass field" || mech.fieldUpgrades[mech.fieldMode].name === "pilot wave"
},
requires: "negative mass field",
effect() {
mod.isAnnihilation = true
},
remove() {
mod.isAnnihilation = false;
}
},
{
name: "negative temperature",
description: "<strong>negative mass field</strong> uses <strong class='color-f'>energy</strong><br>to <strong class='color-s'>freeze</strong> each mob caught in it's effect",
maxCount: 1,
count: 0,
allowed() {
return mech.fieldUpgrades[mech.fieldMode].name === "negative mass field"
},
requires: "negative mass field",
effect() {
mod.isFreezeMobs = true;
},
remove() {
mod.isFreezeMobs = false;
}
},
{
name: "plasma jet",
description: "increase <strong class='color-plasma'>plasma</strong> <strong>torch's</strong> range by <strong>27%</strong>",
maxCount: 9,
count: 0,
allowed() {
return mech.fieldUpgrades[mech.fieldMode].name === "plasma torch"
},
requires: "plasma torch",
effect() {
mod.isPlasmaRange += 0.27;
},
remove() {
mod.isPlasmaRange = 1;
}
},
{
name: "plasma-bot",
description: "a bot uses <strong class='color-f'>energy</strong> to emit <strong class='color-plasma'>plasma</strong><br>that <strong class='color-d'>damages</strong> and <strong>pushes</strong> mobs",
maxCount: 1,
count: 0,
allowed() {
return mech.fieldUpgrades[mech.fieldMode].name === "plasma torch"
},
requires: "plasma torch",
effect() {
mod.plasmaBotCount++;
b.plasmaBot();
},
remove() {
mod.plasmaBotCount = 0;
}
},
{
name: "timelike world line",
description: "<strong>time dilation</strong> doubles your relative time <strong>rate</strong><br>and makes you <strong>immune</strong> to <strong class='color-harm'>harm</strong>",
maxCount: 1,
count: 0,
allowed() {
return mech.fieldUpgrades[mech.fieldMode].name === "time dilation field"
},
requires: "time dilation field",
effect() {
mod.isTimeSkip = true;
b.setFireCD();
},
remove() {
mod.isTimeSkip = false;
b.setFireCD();
}
},
{
name: "Lorentz transformation",
description: "permanently increase your relative time rate<br><strong>move</strong>, <strong>jump</strong>, and <strong>shoot</strong> <strong>40%</strong> faster",
maxCount: 1,
count: 0,
allowed() {
return mech.fieldUpgrades[mech.fieldMode].name === "time dilation field" || mech.fieldUpgrades[mech.fieldMode].name === "pilot wave"
},
requires: "time dilation field",
effect() {
mod.fastTime = 1.40;
mod.fastTimeJump = 1.11;
mech.setMovement();
b.setFireCD();
},
remove() {
mod.fastTime = 1;
mod.fastTimeJump = 1;
mech.setMovement();
b.setFireCD();
}
},
{
name: "time crystals",
description: "<strong>quadruple</strong> your default <strong class='color-f'>energy</strong> regeneration",
maxCount: 1,
count: 0,
allowed() {
return (mech.fieldUpgrades[mech.fieldMode].name === "time dilation field" || mech.fieldUpgrades[mech.fieldMode].name === "pilot wave") && mod.energyRegen !== 0;
},
requires: "time dilation field",
effect: () => {
mod.energyRegen = 0.004;
mech.fieldRegen = mod.energyRegen;
},
remove() {
mod.energyRegen = 0.001;
mech.fieldRegen = mod.energyRegen;
}
},
{
name: "phase decoherence",
description: "become <strong>intangible</strong> while <strong class='color-cloaked'>cloaked</strong><br>but, passing through <strong>mobs</strong> drains your <strong class='color-f'>energy</strong>",
@@ -3320,7 +3389,7 @@ const mod = {
maxCount: 1,
count: 0,
allowed() {
return mech.fieldUpgrades[mech.fieldMode].name === "metamaterial cloaking"
return mech.fieldUpgrades[mech.fieldMode].name === "metamaterial cloaking" || mech.fieldUpgrades[mech.fieldMode].name === "pilot wave"
},
requires: "metamaterial cloaking",
effect() {

View File

@@ -1484,7 +1484,7 @@ const mech = {
mech.energy -= 0.057;
b.iceIX(1)
} else {
mech.energy -= 0.4;
mech.energy -= 0.45;
b.drone(1)
}
}
@@ -2152,7 +2152,7 @@ const mech = {
// },
{
name: "pilot wave",
description: "use <strong class='color-f'>energy</strong> to push <strong>blocks</strong> with your mouse<br>field <strong>radius</strong> decreases out of <strong>line of sight</strong>",
description: "use <strong class='color-f'>energy</strong> to push <strong>blocks</strong> with your mouse<br>field <strong>radius</strong> decreases out of <strong>line of sight</strong><br>allows <strong class='color-m'>mods</strong> that normally require other <strong class='color-f'>fields</strong>",
effect: () => {
game.replaceTextLog = true; //allow text over write
mech.fieldPhase = 0;

View File

@@ -57,8 +57,8 @@ const powerUps = {
game.makeTextLog(`about ${Math.max(0,powerUps.mod.lastTotalChoices - powerUps.mod.banishLog.length)} estimated <strong class='color-m'>mods</strong> left`, 300)
}
}
if (mod.manyWorlds && powerUps.reroll.rerolls < 1) {
powerUps.spawn(mech.pos.x + 40 * (Math.random() - 0.5), mech.pos.y + 40 * (Math.random() - 0.5), "reroll", false);
if (mod.manyWorlds && powerUps.reroll.rerolls === 0) {
for (let i = 0; i < 2; i++) powerUps.spawn(mech.pos.x + 40 * (Math.random() - 0.5), mech.pos.y + 40 * (Math.random() - 0.5), "reroll", false);
}
document.getElementById("choose-grid").style.display = "none"
document.getElementById("choose-background").style.display = "none"
@@ -435,7 +435,7 @@ const powerUps = {
}
},
onPickUp(where) {
if (mod.isMassEnergy && mech.energy < mech.maxEnergy * 2.5) mech.energy = mech.maxEnergy * 2.5;
if (mod.isMassEnergy && mech.energy < mech.maxEnergy * 2.5) mech.energy += 3;
if (mod.isMineDrop) b.mine({
x: where.x,
y: where.y