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:
16
js/bullet.js
16
js/bullet.js
@@ -196,14 +196,12 @@ const b = {
|
||||
dist = Vector.magnitude(sub);
|
||||
|
||||
if (dist < radius) {
|
||||
|
||||
if (mod.isImmuneExplosion) {
|
||||
const mitigate = Math.min(1, Math.max(1 - mech.energy * 0.7, 0))
|
||||
mech.damage(mitigate * radius * (mod.isExplosionHarm ? 0.0004 : 0.0001));
|
||||
} else {
|
||||
mech.damage(radius * (mod.isExplosionHarm ? 0.0004 : 0.0001));
|
||||
}
|
||||
|
||||
// if (!(mod.isImmuneExplosion && mech.energy > 0.97)) {
|
||||
// if (mod.isExplosionHarm) {
|
||||
// mech.damage(radius * 0.0004); //300% more player damage from explosions
|
||||
@@ -212,11 +210,11 @@ const b = {
|
||||
// }
|
||||
// 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.y += knock.y;
|
||||
} 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.y += knock.y;
|
||||
}
|
||||
@@ -230,7 +228,7 @@ const b = {
|
||||
body[i].force.x += knock.x;
|
||||
body[i].force.y += knock.y;
|
||||
} 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.y += knock.y;
|
||||
}
|
||||
@@ -241,11 +239,11 @@ const b = {
|
||||
sub = Vector.sub(where, powerUp[i].position);
|
||||
dist = Vector.magnitude(sub);
|
||||
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.y += knock.y;
|
||||
} 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.y += knock.y;
|
||||
}
|
||||
@@ -1381,7 +1379,7 @@ const b = {
|
||||
dmg: 0, // 0.14 //damage done in addition to the damage from momentum
|
||||
minDmgSpeed: 2,
|
||||
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()),
|
||||
range: 700 * (1 + 0.1 * Math.random()) + 300 * mod.isLaserBotUpgrade,
|
||||
followRange: 150 + Math.floor(30 * Math.random()),
|
||||
@@ -1538,7 +1536,7 @@ const b = {
|
||||
cd: 0,
|
||||
acceleration: 0.009,
|
||||
endCycle: Infinity,
|
||||
drainThreshold: mod.isEnergyHealth ? 0.5 : 0.15,
|
||||
drainThreshold: mod.isEnergyHealth ? 0.4 : 0.2,
|
||||
classType: "bullet",
|
||||
collisionFilter: {
|
||||
category: cat.bullet,
|
||||
|
||||
@@ -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.nailsDeathMob) b.targetedNail(this.position, mod.nailsDeathMob, 40 + 7 * Math.random())
|
||||
} else if (mod.isShieldAmmo && this.shield) {
|
||||
let type = "ammo"
|
||||
let type = mod.isEnergyNoAmmo ? "heal" : "ammo"
|
||||
if (Math.random() < 0.4) {
|
||||
type = "heal"
|
||||
} else if (Math.random() < 0.3 && !mod.isSuperDeterminism) {
|
||||
|
||||
46
js/mods.js
46
js/mods.js
@@ -100,6 +100,7 @@ const mod = {
|
||||
if (mod.isOneGun && b.inventory.length < 2) dmg *= 1.25
|
||||
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.isBotDamage) dmg *= 1 + 0.02 * mod.totalBots()
|
||||
return dmg * mod.slowFire * mod.aimDamage
|
||||
},
|
||||
duplicationChance() {
|
||||
@@ -715,11 +716,11 @@ const mod = {
|
||||
},
|
||||
{
|
||||
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,
|
||||
count: 0,
|
||||
allowed() {
|
||||
return mod.totalBots() > 4 && !mod.isEnergyHealth
|
||||
return mod.totalBots() > 5 && !mod.isEnergyHealth
|
||||
},
|
||||
requires: "5 or more bots",
|
||||
effect() {
|
||||
@@ -728,6 +729,21 @@ const mod = {
|
||||
remove() {
|
||||
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",
|
||||
@@ -1344,6 +1360,22 @@ const mod = {
|
||||
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",
|
||||
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,
|
||||
isNonRefundable: true,
|
||||
allowed() {
|
||||
return !mod.isExtraChoice
|
||||
return !mod.isExtraChoice && !mod.isCancelDuplication && !mod.isCancelRerolls
|
||||
},
|
||||
requires: "not cardinality",
|
||||
requires: "not cardinality, not futures or commodities exchanges",
|
||||
effect: () => {
|
||||
mod.isDeterminism = true;
|
||||
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",
|
||||
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,
|
||||
count: 0,
|
||||
allowed() {
|
||||
@@ -3564,5 +3596,7 @@ const mod = {
|
||||
isPerpetualHeal: null,
|
||||
isPerpetualStun: null,
|
||||
isCancelDuplication: null,
|
||||
cancelCount: null
|
||||
cancelCount: null,
|
||||
isCancelRerolls: null,
|
||||
isBotDamage: null
|
||||
}
|
||||
@@ -479,7 +479,7 @@ const mech = {
|
||||
if (mod.isSlowFPS) 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.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.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
|
||||
|
||||
@@ -35,10 +35,21 @@ const powerUps = {
|
||||
game.isChoosing = true; //stops p from un pausing on key down
|
||||
build.pauseGrid(true)
|
||||
},
|
||||
endDraft() {
|
||||
if (mod.isCancelDuplication) mod.cancelCount++
|
||||
endDraft(isCanceled = false) {
|
||||
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) {
|
||||
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-background").style.display = "none"
|
||||
@@ -71,7 +82,7 @@ const powerUps = {
|
||||
b.randomBot()
|
||||
if (mod.renormalization) {
|
||||
for (let i = 0; i < limit; i++) {
|
||||
if (Math.random() < 0.42) {
|
||||
if (Math.random() < 0.37) {
|
||||
mech.fieldCDcycle = mech.cycle + 30;
|
||||
powerUps.spawn(mech.pos.x, mech.pos.y, "reroll");
|
||||
}
|
||||
@@ -82,7 +93,7 @@ const powerUps = {
|
||||
if (mod.isDeathAvoid && document.getElementById("mod-anthropic")) {
|
||||
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");
|
||||
}
|
||||
if (mod.isRerollHaste) {
|
||||
@@ -155,7 +166,7 @@ const powerUps = {
|
||||
},
|
||||
effect() {
|
||||
//give ammo to all guns in inventory
|
||||
if (mod.isAmmoForGun) {
|
||||
if (mod.isAmmoForGun && b.inventory > 0) {
|
||||
const target = b.guns[b.activeGun]
|
||||
target.ammo += Math.ceil(Math.random() * target.ammoPack) + Math.ceil(Math.random() * target.ammoPack)
|
||||
} else {
|
||||
@@ -240,7 +251,7 @@ const powerUps = {
|
||||
let choice3 = -1
|
||||
if (choice1 > -1) {
|
||||
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 += `<div class="choose-grid-module" onclick="powerUps.choose('field',${choice1})"><div class="grid-title"><div class="circle-grid field"></div> ${mech.fieldUpgrades[choice1].name}</div> ${mech.fieldUpgrades[choice1].description}</div>`
|
||||
if (!mod.isDeterminism) {
|
||||
@@ -310,7 +321,7 @@ const powerUps = {
|
||||
|
||||
}
|
||||
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>`
|
||||
let choice1 = pick()
|
||||
let choice2 = -1
|
||||
@@ -383,7 +394,7 @@ const powerUps = {
|
||||
let choice3 = -1
|
||||
if (choice1 > -1) {
|
||||
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 += `<div class="choose-grid-module" onclick="powerUps.choose('gun',${choice1})"><div class="grid-title"><div class="circle-grid gun"></div> ${b.guns[choice1].name}</div> ${b.guns[choice1].description}</div>`
|
||||
if (!mod.isDeterminism) {
|
||||
|
||||
Reference in New Issue
Block a user