late game bot mods

balance: perimeter defense - 3% harm reduction for each bot (was 5%)

mod: network effect - 2% damage for each bot
mod: commodities exchange - canceling a power up gives 6 rerolls, ammo, or heals
This commit is contained in:
landgreen
2020-11-29 18:42:47 -08:00
parent 5782d82b8d
commit 05e7799417
6 changed files with 72 additions and 37 deletions

View File

@@ -196,14 +196,12 @@ const b = {
dist = Vector.magnitude(sub); dist = Vector.magnitude(sub);
if (dist < radius) { if (dist < radius) {
if (mod.isImmuneExplosion) { if (mod.isImmuneExplosion) {
const mitigate = Math.min(1, Math.max(1 - mech.energy * 0.7, 0)) const mitigate = Math.min(1, Math.max(1 - mech.energy * 0.7, 0))
mech.damage(mitigate * radius * (mod.isExplosionHarm ? 0.0004 : 0.0001)); mech.damage(mitigate * radius * (mod.isExplosionHarm ? 0.0004 : 0.0001));
} else { } else {
mech.damage(radius * (mod.isExplosionHarm ? 0.0004 : 0.0001)); mech.damage(radius * (mod.isExplosionHarm ? 0.0004 : 0.0001));
} }
// if (!(mod.isImmuneExplosion && mech.energy > 0.97)) { // if (!(mod.isImmuneExplosion && mech.energy > 0.97)) {
// if (mod.isExplosionHarm) { // if (mod.isExplosionHarm) {
// mech.damage(radius * 0.0004); //300% more player damage from explosions // mech.damage(radius * 0.0004); //300% more player damage from explosions
@@ -212,11 +210,11 @@ const b = {
// } // }
// mech.drop(); // mech.drop();
// } // }
knock = Vector.mult(Vector.normalise(sub), -Math.sqrt(dmg) * player.mass * 0.015); knock = Vector.mult(Vector.normalise(sub), -Math.sqrt(dmg) * player.mass * 0.013);
player.force.x += knock.x; player.force.x += knock.x;
player.force.y += knock.y; player.force.y += knock.y;
} else if (dist < alertRange) { } else if (dist < alertRange) {
knock = Vector.mult(Vector.normalise(sub), -Math.sqrt(dmg) * player.mass * 0.008); knock = Vector.mult(Vector.normalise(sub), -Math.sqrt(dmg) * player.mass * 0.005);
player.force.x += knock.x; player.force.x += knock.x;
player.force.y += knock.y; player.force.y += knock.y;
} }
@@ -230,7 +228,7 @@ const b = {
body[i].force.x += knock.x; body[i].force.x += knock.x;
body[i].force.y += knock.y; body[i].force.y += knock.y;
} else if (dist < alertRange) { } else if (dist < alertRange) {
knock = Vector.mult(Vector.normalise(sub), (-Math.sqrt(dmg) * body[i].mass) * 0.013); knock = Vector.mult(Vector.normalise(sub), (-Math.sqrt(dmg) * body[i].mass) * 0.011);
body[i].force.x += knock.x; body[i].force.x += knock.x;
body[i].force.y += knock.y; body[i].force.y += knock.y;
} }
@@ -241,11 +239,11 @@ const b = {
sub = Vector.sub(where, powerUp[i].position); sub = Vector.sub(where, powerUp[i].position);
dist = Vector.magnitude(sub); dist = Vector.magnitude(sub);
if (dist < radius) { if (dist < radius) {
knock = Vector.mult(Vector.normalise(sub), (-Math.sqrt(dmg) * powerUp[i].mass) * 0.015); knock = Vector.mult(Vector.normalise(sub), (-Math.sqrt(dmg) * powerUp[i].mass) * 0.013);
powerUp[i].force.x += knock.x; powerUp[i].force.x += knock.x;
powerUp[i].force.y += knock.y; powerUp[i].force.y += knock.y;
} else if (dist < alertRange) { } else if (dist < alertRange) {
knock = Vector.mult(Vector.normalise(sub), (-Math.sqrt(dmg) * powerUp[i].mass) * 0.01); knock = Vector.mult(Vector.normalise(sub), (-Math.sqrt(dmg) * powerUp[i].mass) * 0.007);
powerUp[i].force.x += knock.x; powerUp[i].force.x += knock.x;
powerUp[i].force.y += knock.y; powerUp[i].force.y += knock.y;
} }
@@ -1381,7 +1379,7 @@ const b = {
dmg: 0, // 0.14 //damage done in addition to the damage from momentum dmg: 0, // 0.14 //damage done in addition to the damage from momentum
minDmgSpeed: 2, minDmgSpeed: 2,
lookFrequency: 40 + Math.floor(7 * Math.random()), lookFrequency: 40 + Math.floor(7 * Math.random()),
drainThreshold: mod.isEnergyHealth ? 0.5 : 0.15, drainThreshold: mod.isEnergyHealth ? 0.5 : 0.33,
acceleration: 0.0015 * (1 + 0.3 * Math.random()), acceleration: 0.0015 * (1 + 0.3 * Math.random()),
range: 700 * (1 + 0.1 * Math.random()) + 300 * mod.isLaserBotUpgrade, range: 700 * (1 + 0.1 * Math.random()) + 300 * mod.isLaserBotUpgrade,
followRange: 150 + Math.floor(30 * Math.random()), followRange: 150 + Math.floor(30 * Math.random()),
@@ -1538,7 +1536,7 @@ const b = {
cd: 0, cd: 0,
acceleration: 0.009, acceleration: 0.009,
endCycle: Infinity, endCycle: Infinity,
drainThreshold: mod.isEnergyHealth ? 0.5 : 0.15, drainThreshold: mod.isEnergyHealth ? 0.4 : 0.2,
classType: "bullet", classType: "bullet",
collisionFilter: { collisionFilter: {
category: cat.bullet, category: cat.bullet,

View File

@@ -1052,7 +1052,7 @@ const mobs = {
if (mod.isExplodeMob) b.explosion(this.position, Math.min(550, Math.sqrt(this.mass + 2.5) * 50)) if (mod.isExplodeMob) b.explosion(this.position, Math.min(550, Math.sqrt(this.mass + 2.5) * 50))
if (mod.nailsDeathMob) b.targetedNail(this.position, mod.nailsDeathMob, 40 + 7 * Math.random()) if (mod.nailsDeathMob) b.targetedNail(this.position, mod.nailsDeathMob, 40 + 7 * Math.random())
} else if (mod.isShieldAmmo && this.shield) { } else if (mod.isShieldAmmo && this.shield) {
let type = "ammo" let type = mod.isEnergyNoAmmo ? "heal" : "ammo"
if (Math.random() < 0.4) { if (Math.random() < 0.4) {
type = "heal" type = "heal"
} else if (Math.random() < 0.3 && !mod.isSuperDeterminism) { } else if (Math.random() < 0.3 && !mod.isSuperDeterminism) {

View File

@@ -100,6 +100,7 @@ const mod = {
if (mod.isOneGun && b.inventory.length < 2) dmg *= 1.25 if (mod.isOneGun && b.inventory.length < 2) dmg *= 1.25
if (mod.isNoFireDamage && mech.cycle > mech.fireCDcycle + 120) dmg *= 1.5 if (mod.isNoFireDamage && mech.cycle > mech.fireCDcycle + 120) dmg *= 1.5
if (mod.isSpeedDamage) dmg *= 1 + Math.min(0.33, player.speed * 0.011) if (mod.isSpeedDamage) dmg *= 1 + Math.min(0.33, player.speed * 0.011)
if (mod.isBotDamage) dmg *= 1 + 0.02 * mod.totalBots()
return dmg * mod.slowFire * mod.aimDamage return dmg * mod.slowFire * mod.aimDamage
}, },
duplicationChance() { duplicationChance() {
@@ -715,11 +716,11 @@ const mod = {
}, },
{ {
name: "perimeter defense", name: "perimeter defense",
description: "reduce <strong class='color-harm'>harm</strong> by <strong>5%</strong><br>for each of your permanent <strong>bots</strong>", description: "reduce <strong class='color-harm'>harm</strong> by <strong>3%</strong><br>for each of your permanent <strong>bots</strong>",
maxCount: 1, maxCount: 1,
count: 0, count: 0,
allowed() { allowed() {
return mod.totalBots() > 4 && !mod.isEnergyHealth return mod.totalBots() > 5 && !mod.isEnergyHealth
}, },
requires: "5 or more bots", requires: "5 or more bots",
effect() { effect() {
@@ -728,6 +729,21 @@ const mod = {
remove() { remove() {
mod.isBotArmor = false mod.isBotArmor = false
} }
}, {
name: "network effect",
description: "increase <strong class='color-d'>damage</strong> by <strong>2%</strong><br>for each of your permanent <strong>bots</strong>",
maxCount: 1,
count: 0,
allowed() {
return mod.totalBots() > 6 && !mod.isEnergyHealth
},
requires: "6 or more bots",
effect() {
mod.isBotDamage = true
},
remove() {
mod.isBotDamage = false
}
}, },
{ {
name: "bot replication", name: "bot replication",
@@ -1344,6 +1360,22 @@ const mod = {
if (mod.duplicationChance() === 0) game.draw.powerUp = game.draw.powerUpNormal if (mod.duplicationChance() === 0) game.draw.powerUp = game.draw.powerUpNormal
} }
}, },
{
name: "commodities exchange",
description: "clicking <strong>X</strong> to cancel a <strong class='color-m'>mod</strong>, <strong class='color-f'>field</strong>, or <strong class='color-g'>gun</strong><br>spawns <strong>6</strong> <strong class='color-h'>heals</strong>, <strong class='color-g'>ammo</strong>, or <strong class='color-r'>rerolls</strong>",
maxCount: 1,
count: 0,
allowed() {
return mod.duplicationChance() > 0 && !mod.isDeterminism
},
requires: "a chance to duplicate power ups, not determinism",
effect() {
mod.isCancelRerolls = true
},
remove() {
mod.isCancelRerolls = false
}
},
{ {
name: "reallocation", name: "reallocation",
description: "convert <strong>1</strong> random <strong class='color-m'>mod</strong> into <strong>3</strong> new <strong class='color-g'>guns</strong><br><em>recursive mods lose all stacks</em>", description: "convert <strong>1</strong> random <strong class='color-m'>mod</strong> into <strong>3</strong> new <strong class='color-g'>guns</strong><br><em>recursive mods lose all stacks</em>",
@@ -1589,9 +1621,9 @@ const mod = {
count: 0, count: 0,
isNonRefundable: true, isNonRefundable: true,
allowed() { allowed() {
return !mod.isExtraChoice return !mod.isExtraChoice && !mod.isCancelDuplication && !mod.isCancelRerolls
}, },
requires: "not cardinality", requires: "not cardinality, not futures or commodities exchanges",
effect: () => { effect: () => {
mod.isDeterminism = true; mod.isDeterminism = true;
for (let i = 0; i < 4; i++) { //if you change the six also change it in Born rule for (let i = 0; i < 4; i++) { //if you change the six also change it in Born rule
@@ -1640,7 +1672,7 @@ const mod = {
}, },
{ {
name: "renormalization", name: "renormalization",
description: "consuming a <strong class='color-r'>reroll</strong> for <strong>any</strong> purpose<br>has a <strong>42%</strong> chance to spawn a <strong class='color-r'>reroll</strong>", description: "consuming a <strong class='color-r'>reroll</strong> for <strong>any</strong> purpose<br>has a <strong>37%</strong> chance to spawn a <strong class='color-r'>reroll</strong>",
maxCount: 1, maxCount: 1,
count: 0, count: 0,
allowed() { allowed() {
@@ -3564,5 +3596,7 @@ const mod = {
isPerpetualHeal: null, isPerpetualHeal: null,
isPerpetualStun: null, isPerpetualStun: null,
isCancelDuplication: null, isCancelDuplication: null,
cancelCount: null cancelCount: null,
isCancelRerolls: null,
isBotDamage: null
} }

View File

@@ -479,7 +479,7 @@ const mech = {
if (mod.isSlowFPS) dmg *= 0.85 if (mod.isSlowFPS) dmg *= 0.85
if (mod.isPiezo) dmg *= 0.85 if (mod.isPiezo) dmg *= 0.85
if (mod.isHarmReduce && mech.fieldUpgrades[mech.fieldMode].name === "negative mass field" && mech.isFieldActive) dmg *= 0.6 if (mod.isHarmReduce && mech.fieldUpgrades[mech.fieldMode].name === "negative mass field" && mech.isFieldActive) dmg *= 0.6
if (mod.isBotArmor) dmg *= 0.95 ** mod.totalBots() if (mod.isBotArmor) dmg *= 0.97 ** mod.totalBots()
if (mod.isHarmArmor && mech.lastHarmCycle + 600 > mech.cycle) dmg *= 0.5; if (mod.isHarmArmor && mech.lastHarmCycle + 600 > mech.cycle) dmg *= 0.5;
if (mod.isNoFireDefense && mech.cycle > mech.fireCDcycle + 120) dmg *= 0.6 if (mod.isNoFireDefense && mech.cycle > mech.fireCDcycle + 120) dmg *= 0.6
if (mod.energyRegen === 0) dmg *= 0.4 //0.22 + 0.78 * mech.energy //77% damage reduction at zero energy if (mod.energyRegen === 0) dmg *= 0.4 //0.22 + 0.78 * mech.energy //77% damage reduction at zero energy

View File

@@ -35,10 +35,21 @@ const powerUps = {
game.isChoosing = true; //stops p from un pausing on key down game.isChoosing = true; //stops p from un pausing on key down
build.pauseGrid(true) build.pauseGrid(true)
}, },
endDraft() { endDraft(isCanceled = false) {
if (mod.isCancelDuplication) mod.cancelCount++ if (isCanceled) {
if (mod.isCancelDuplication) mod.cancelCount++
if (mod.isCancelRerolls) {
let type = (mech.health < 0.25 || mod.isEnergyNoAmmo) ? "heal" : "ammo"
if (Math.random() < 0.33) {
type = "heal"
} else if (Math.random() < 0.5 && !mod.isSuperDeterminism) {
type = "reroll"
}
for (let i = 0; i < 6; i++) powerUps.spawn(mech.pos.x + 40 * (Math.random() - 0.5), mech.pos.y + 40 * (Math.random() - 0.5), type, false);
}
}
if (mod.manyWorlds && powerUps.reroll.rerolls < 1) { if (mod.manyWorlds && powerUps.reroll.rerolls < 1) {
powerUps.spawn(mech.pos.x, mech.pos.y, "reroll"); 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-grid").style.display = "none"
document.getElementById("choose-background").style.display = "none" document.getElementById("choose-background").style.display = "none"
@@ -71,7 +82,7 @@ const powerUps = {
b.randomBot() b.randomBot()
if (mod.renormalization) { if (mod.renormalization) {
for (let i = 0; i < limit; i++) { for (let i = 0; i < limit; i++) {
if (Math.random() < 0.42) { if (Math.random() < 0.37) {
mech.fieldCDcycle = mech.cycle + 30; mech.fieldCDcycle = mech.cycle + 30;
powerUps.spawn(mech.pos.x, mech.pos.y, "reroll"); powerUps.spawn(mech.pos.x, mech.pos.y, "reroll");
} }
@@ -82,7 +93,7 @@ const powerUps = {
if (mod.isDeathAvoid && document.getElementById("mod-anthropic")) { if (mod.isDeathAvoid && document.getElementById("mod-anthropic")) {
document.getElementById("mod-anthropic").innerHTML = `-${powerUps.reroll.rerolls}` document.getElementById("mod-anthropic").innerHTML = `-${powerUps.reroll.rerolls}`
} }
if (mod.renormalization && Math.random() < 0.42 && amount < 0) { if (mod.renormalization && Math.random() < 0.37 && amount < 0) {
powerUps.spawn(mech.pos.x, mech.pos.y, "reroll"); powerUps.spawn(mech.pos.x, mech.pos.y, "reroll");
} }
if (mod.isRerollHaste) { if (mod.isRerollHaste) {
@@ -155,7 +166,7 @@ const powerUps = {
}, },
effect() { effect() {
//give ammo to all guns in inventory //give ammo to all guns in inventory
if (mod.isAmmoForGun) { if (mod.isAmmoForGun && b.inventory > 0) {
const target = b.guns[b.activeGun] const target = b.guns[b.activeGun]
target.ammo += Math.ceil(Math.random() * target.ammoPack) + Math.ceil(Math.random() * target.ammoPack) target.ammo += Math.ceil(Math.random() * target.ammoPack) + Math.ceil(Math.random() * target.ammoPack)
} else { } else {
@@ -240,7 +251,7 @@ const powerUps = {
let choice3 = -1 let choice3 = -1
if (choice1 > -1) { if (choice1 > -1) {
let text = "" let text = ""
if (!mod.isDeterminism) text += `<div class='cancel' onclick='powerUps.endDraft()'>✕</div>` if (!mod.isDeterminism) text += `<div class='cancel' onclick='powerUps.endDraft(true)'>✕</div>`
text += `<h3 style = 'color:#fff; text-align:left; margin: 0px;'>choose a field</h3>` text += `<h3 style = 'color:#fff; text-align:left; margin: 0px;'>choose a field</h3>`
text += `<div class="choose-grid-module" onclick="powerUps.choose('field',${choice1})"><div class="grid-title"><div class="circle-grid field"></div> &nbsp; ${mech.fieldUpgrades[choice1].name}</div> ${mech.fieldUpgrades[choice1].description}</div>` text += `<div class="choose-grid-module" onclick="powerUps.choose('field',${choice1})"><div class="grid-title"><div class="circle-grid field"></div> &nbsp; ${mech.fieldUpgrades[choice1].name}</div> ${mech.fieldUpgrades[choice1].description}</div>`
if (!mod.isDeterminism) { if (!mod.isDeterminism) {
@@ -310,7 +321,7 @@ const powerUps = {
} }
let text = "" let text = ""
if (!mod.isDeterminism) text += `<div class='cancel' onclick='powerUps.endDraft()'>✕</div>` if (!mod.isDeterminism) text += `<div class='cancel' onclick='powerUps.endDraft(true)'>✕</div>`
text += `<h3 style = 'color:#fff; text-align:left; margin: 0px;'>choose a mod</h3>` text += `<h3 style = 'color:#fff; text-align:left; margin: 0px;'>choose a mod</h3>`
let choice1 = pick() let choice1 = pick()
let choice2 = -1 let choice2 = -1
@@ -383,7 +394,7 @@ const powerUps = {
let choice3 = -1 let choice3 = -1
if (choice1 > -1) { if (choice1 > -1) {
let text = "" let text = ""
if (!mod.isDeterminism) text += `<div class='cancel' onclick='powerUps.endDraft()'>✕</div>` if (!mod.isDeterminism) text += `<div class='cancel' onclick='powerUps.endDraft(true)'>✕</div>`
text += `<h3 style = 'color:#fff; text-align:left; margin: 0px;'>choose a gun</h3>` text += `<h3 style = 'color:#fff; text-align:left; margin: 0px;'>choose a gun</h3>`
text += `<div class="choose-grid-module" onclick="powerUps.choose('gun',${choice1})"><div class="grid-title"><div class="circle-grid gun"></div> &nbsp; ${b.guns[choice1].name}</div> ${b.guns[choice1].description}</div>` text += `<div class="choose-grid-module" onclick="powerUps.choose('gun',${choice1})"><div class="grid-title"><div class="circle-grid gun"></div> &nbsp; ${b.guns[choice1].name}</div> ${b.guns[choice1].description}</div>`
if (!mod.isDeterminism) { if (!mod.isDeterminism) {

View File

@@ -1,14 +1,8 @@
*********** NEXT PATCH *********** *********** NEXT PATCH ***********
balance: perimeter defense - 3% harm reduction for each bot (was 5%)
all bot upgrade mods are improved by about 33% mod: network effect - 2% damage for each bot
mod superdeterminism - spawns 6 mods (was 3) mod: commodities exchange - canceling a power up gives 6 rerolls, ammo, or heals
mod: futures exchange - canceling power ups increases duplication chance by 4%
mod: monte carlo experiment - spawn 2 mods, but you have a 50% chance to lose a random mod
requires duplication mods, not available in custom
mod: exchange symmetry - spawn 1 mod with double your normal duplication chance
requires duplication mods, not available in custom
************** BUGS ************** ************** BUGS **************
@@ -30,8 +24,6 @@ mod: exchange symmetry - spawn 1 mod with double your normal duplication chance
************** TODO ************** ************** TODO **************
mod: canceling a mod gun or field increases your duplication chance for all power up by 4%
in custom make a top bar that is fixed in custom make a top bar that is fixed
use media rules to make the layout look nice use media rules to make the layout look nice