mod - bot fab

bubble fusion drops 2-3 power ups  (down from 3)
perturbation theory: damage is 5% (down from 6%) per reroll
  but the mod will not show up until you have 4 rerolls stockpiled
sporeangium grow faster when stuck to a mob

mod: liquid cooling - freeze all mobs for 6 seconds after receiving harm
mod: perimeter defense - gain 6% harm reduction for each bot
mod: bot fabrication - anytime you have 3 rerolls, convert them into a random bot
mod: Ψ(x) collapse - 33% haste, if you have no rerolls
mod: mine synthesis - drop a mine after picking up a power up
This commit is contained in:
landgreen
2020-07-14 13:13:37 -07:00
parent 92f174983a
commit cef5f4d8d0
8 changed files with 258 additions and 129 deletions

View File

@@ -84,7 +84,7 @@ const b = {
},
fireCD: 1,
setFireCD() {
b.fireCD = mod.fireRate * mod.slowFire / mod.fastTime
b.fireCD = mod.fireRate * mod.slowFire * mod.rerollHaste / mod.fastTime
},
fireAttributes(dir, rotate = true) {
if (rotate) {
@@ -458,7 +458,7 @@ const b = {
},
onEnd() {
if (this.isArmed) {
b.targetedNail(this.position, 14)
b.targetedNail(this.position, 15)
}
if (isAmmoBack) { //get ammo back from mod.isMineAmmoBack
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
@@ -727,7 +727,7 @@ const b = {
}
}
}
if (!this.lockedOn && !mod.isAmmoFromHealth) {
if (!this.lockedOn && !mod.isArmorFromPowerUps) {
//grab a power up if it is (ammo) or (a heal when player is low)
let closeDist = Infinity;
for (let i = 0, len = powerUp.length; i < len; ++i) {
@@ -965,6 +965,24 @@ const b = {
};
bullet[me].do = function () {};
},
randomBot(where = mech.pos, isKeep = true) {
if (Math.random() < 0.05) { //very low chance of plasma bot
b.plasmaBot(where)
if (isKeep) mod.plasmaBotCount++;
} else if (Math.random() < 0.25) {
b.nailBot(where)
if (isKeep) mod.nailBotCount++;
} else if (Math.random() < 0.33) {
b.laserBot(where)
if (isKeep) mod.laserBotCount++;
} else if (Math.random() < 0.5) {
b.foamBot(where)
if (isKeep) mod.foamBotCount++;
} else {
b.boomBot(where)
if (isKeep) mod.boomBotCount++;
}
},
nailBot(position = mech.pos) {
const me = bullet.length;
const dir = mech.angle;
@@ -1965,8 +1983,8 @@ const b = {
name: "flak",
description: "fire a <strong>cluster</strong> of short range <strong>projectiles</strong><br><strong class='color-e'>explodes</strong> on <strong>contact</strong> or after half a second",
ammo: 0,
ammoPack: 9,
defaultAmmoPack: 9, //use to revert ammoPack after mod changes drop rate
ammoPack: 7,
defaultAmmoPack: 7, //use to revert ammoPack after mod changes drop rate
have: false,
isEasyToAim: false,
fire() {
@@ -2361,7 +2379,7 @@ const b = {
x: speed * Math.cos(mech.angle),
y: speed * Math.sin(mech.angle)
}, 0, mod.isMineAmmoBack)
mech.fireCDcycle = mech.cycle + Math.floor((mech.crouch ? 70 : 45) * b.fireCD); // cool down
mech.fireCDcycle = mech.cycle + Math.floor((mech.crouch ? 60 : 20) * b.fireCD); // cool down
}
},
{
@@ -2460,9 +2478,10 @@ const b = {
bullet[me].grow = function () {
this.stuck(); //runs different code based on what the bullet is stuck to
if (!mech.isBodiesAsleep) {
const SCALE = 1.013
Matter.Body.scale(this, SCALE, SCALE);
this.radius *= SCALE
let scale = 1.01
if (this.stuckTo && this.stuckTo.alive) scale = 1.03
Matter.Body.scale(this, scale, scale);
this.radius *= scale
if (this.radius > this.maxRadius) this.endCycle = 0;
}

View File

@@ -222,7 +222,7 @@ function collisionChecks(event) {
if (obj.classType === "body" && obj.speed > 6) {
const v = Vector.magnitude(Vector.sub(mob[k].velocity, obj.velocity));
if (v > 9) {
let dmg = b.dmgScale * (v * obj.mass * 0.07) * mod.throwChargeRate;
let dmg = b.dmgScale * v * obj.mass * 0.065 * mod.throwChargeRate;
if (mod.isCrit && !mob[k].seePlayer.recall && !mob[k].shield) dmg *= 5
if (mob[k].isShielded) dmg *= 0.5
mob[k].damage(dmg, true);

View File

@@ -11,15 +11,15 @@ const level = {
start() {
if (build.isURLBuild && level.levelsCleared === 0) build.onLoadPowerUps();
if (level.levelsCleared === 0) { //this code only runs on the first level
// game.enableConstructMode() //used to build maps in testing mode
// level.difficultyIncrease(4)
// game.enableConstructMode() //used to build maps in testing mode
// mech.isStealth = true;
// mod.giveMod("superfluidity");
// b.giveGuns("ice IX")
// mech.setField("plasma torch")
level.intro(); //starting level
// level.sewer()
// level.sewers();
// level.testing();
// level.template()
// level.bosses();
@@ -64,20 +64,26 @@ const level = {
mech.maxHealth += 0.05 * powerUps.totalPowerUps
if (powerUps.totalPowerUps) game.makeTextLog("<span style='font-size:115%;'> max health increased by " + (0.05 * powerUps.totalPowerUps * 100).toFixed(0) + "%</span>", 300)
}
if (mod.isHealLowHealth && mech.health < mech.maxHealth * 0.5 * game.healScale) {
mech.health = mech.maxHealth * 0.5 * game.healScale
mech.displayHealth();
}
},
//******************************************************************************************************************
//******************************************************************************************************************
//******************************************************************************************************************
//******************************************************************************************************************
rotor(x, y, rotate = 0, radius = 900, width = 50, density = 0.001) {
rotor(x, y, rotate = 0, radius = 900, width = 50, density = 0.0005) {
const rotor1 = Matter.Bodies.rectangle(x, y, width, radius, {
density: density,
isNotSticky: true
isNotSticky: true,
isNotHoldable: true
});
const rotor2 = Matter.Bodies.rectangle(x, y, width, radius, {
angle: Math.PI / 2,
density: density,
isNotSticky: true
isNotSticky: true,
isNotHoldable: true
});
rotor = Body.create({ //combine rotor1 and rotor2
parts: [rotor1, rotor2],
@@ -129,7 +135,6 @@ const level = {
},
button(x, y, width = 70, height = 20) {
spawn.mapVertex(x + 35, y + 27, "70 10 -70 10 -40 -10 40 -10");
// map[map.length - 1].friction = 1;
return {
isUp: false,
min: {
@@ -174,7 +179,7 @@ const level = {
height: height,
maxHeight: height,
query() {
if (this.height > 0 && Matter.Query.region([player], this).length) {
if (this.height > 0 && Matter.Query.region([player], this).length && !mech.isStealth) {
mech.damage(damage)
const drain = 0.005
if (mech.energy > drain) mech.energy -= drain
@@ -242,11 +247,11 @@ const level = {
color: "hsl(138, 10%, 80%)" //c4f4f4
});
spawn.mapRect(-400, -500, 100, 600); //left entrance wall
spawn.mapRect(-400, -500, 3550, 100); //ceiling
spawn.mapRect(-400, 0, 3000, 100); //floor
spawn.mapRect(300, -500, 100, 400); //right entrance wall
spawn.bodyRect(340, -100, 25, 100);
spawn.mapRect(-500, -600, 200, 800); //left entrance wall
spawn.mapRect(-400, -600, 3550, 200); //ceiling
spawn.mapRect(-400, 0, 3000, 200); //floor
spawn.mapRect(300, -500, 50, 400); //right entrance wall
spawn.bodyRect(312, -100, 25, 100);
spawn.bodyRect(1450, -300, 150, 50);
const xPos = shuffle([600, 1250, 2000]);
@@ -257,9 +262,9 @@ const level = {
spawn.bodyRect(3100, 410, 75, 100);
spawn.bodyRect(2450, -25, 250, 25);
spawn.mapRect(3050, -500, 100, 700); //right down tube wall
spawn.mapRect(3050, 100, 1250, 100); //tube right exit ceiling
spawn.mapRect(4200, 100, 100, 1800);
spawn.mapRect(3050, -600, 200, 800); //right down tube wall
spawn.mapRect(3100, 0, 1200, 200); //tube right exit ceiling
spawn.mapRect(4200, 0, 200, 1900);
spawn.mapRect(3000, 400, 1000, 1250);
spawn.mapRect(3000, 1925, 1000, 150);
@@ -268,21 +273,20 @@ const level = {
spawn.mapRect(3100, 350, 800, 100);
spawn.mapRect(3100, 2025, 800, 100);
spawn.mapRect(2500, 0, 100, 1950); //left down tube wall
spawn.mapRect(600, 2300, 3750, 100);
spawn.mapRect(2400, 0, 200, 1950); //left down tube wall
spawn.mapRect(600, 2300, 3750, 200);
spawn.bodyRect(3800, 275, 125, 125);
spawn.mapRect(4200, 1800, 5000, 100);
spawn.mapRect(4250, 2300, 100, 400);
spawn.mapRect(4250, 2300, 100, 400);
spawn.mapRect(4200, 1700, 5000, 200);
spawn.mapRect(4150, 2300, 200, 400);
spawn.mapRect(600, 1800, 2000, 100); //bottom left room ceiling
spawn.mapRect(600, 1800, 100, 600); //left wall
spawn.mapRect(600, 1700, 2000, 200); //bottom left room ceiling
spawn.mapRect(500, 1700, 200, 800); //left wall
spawn.mapRect(1775, 2225, 550, 125);
spawn.mapRect(675, 1875, 325, 150);
spawn.mapRect(4450, 2900, 4900, 100); //boss room floor
spawn.mapRect(4250, 2600, 300, 400);
spawn.mapRect(4450, 2900, 4900, 200); //boss room floor
spawn.mapRect(4150, 2600, 400, 500);
spawn.mapRect(6250, 2675, 700, 325);
spawn.mapRect(8000, 2600, 600, 400);
spawn.bodyRect(5875, 2725, 200, 200);
@@ -293,30 +297,33 @@ const level = {
spawn.mapRect(6250, 1875, 700, 150);
spawn.mapRect(8000, 1875, 600, 150);
spawn.mapRect(9100, 1800, 900, 400); //exit
spawn.mapRect(9100, 2600, 900, 400);
spawn.mapRect(9900, 2125, 100, 575); //back wall
spawn.mapRect(9100, 1700, 900, 500); //exit
spawn.mapRect(9100, 2600, 900, 500);
spawn.mapRect(9900, 1700, 200, 1400); //back wall
spawn.mapRect(9300, 2150, 50, 250);
spawn.mapRect(9300, 2590, 650, 25);
spawn.mapRect(9700, 2580, 100, 50);
spawn.randomBoss(1300, 2100, 0.6);
spawn.randomMob(8300, 2100, 0.3);
spawn.randomSmallMob(2575, -75, 0.3); //entrance
spawn.randomMob(8125, 2450, 0.3);
spawn.randomSmallMob(3200, 250, 0.4);
spawn.randomMob(2425, 2150, 0.4);
spawn.randomSmallMob(3825, 300, 0.4);
spawn.randomMob(3800, 2175, 0.5);
spawn.randomSmallMob(1100, -300, 0.5); //entrance
spawn.randomMob(4450, 2500, 0.6);
spawn.randomMob(6350, 2525, 0.6);
spawn.randomBoss(9200, 2400, 0.5);
spawn.randomSmallMob(1900, -250, 0.7); //entrance
spawn.randomMob(1500, 2100, 0.8);
spawn.randomSmallMob(1700, -150, 0.8); //entrance
spawn.randomMob(8800, 2725, 0.9);
if (game.difficulty > 3) spawn.randomLevelBoss(6000, 2300, ["shooterBoss", "spiderBoss", "launcherBoss", "laserTargetingBoss"]);
spawn.randomBoss(1300, 2100, 0.5);
spawn.randomMob(8300, 2100, 0.2);
spawn.randomSmallMob(2575, -75, 0.2); //entrance
spawn.randomMob(8125, 2450, 0.25);
spawn.randomSmallMob(3200, 250, 0.3);
spawn.randomMob(2425, 2150, 0.3);
spawn.randomSmallMob(3500, 250, 0.4);
spawn.randomMob(3800, 2175, 0.4);
spawn.randomSmallMob(1100, -300, 0.4); //entrance
spawn.randomMob(4450, 2500, 0.5);
spawn.randomMob(6350, 2525, 0.5);
spawn.randomBoss(9200, 2400, 0.6);
spawn.randomSmallMob(1900, -250, 0.6); //entrance
spawn.randomMob(1500, 2100, 0.7);
spawn.randomSmallMob(1700, -150, 0.7); //entrance
spawn.randomMob(8800, 2725, 0.8);
spawn.randomMob(7300, 2200, 0.8);
spawn.randomMob(2075, 2025, 0.8);
spawn.randomMob(3475, 2175, 0.8);
if (game.difficulty > 3) spawn.randomLevelBoss(6000, 2300, ["spiderBoss", "launcherBoss", "laserTargetingBoss"]);
},
template() {
level.custom = () => {
@@ -2167,10 +2174,6 @@ const level = {
level.difficultyIncrease(game.difficultyMode) //increase difficulty based on modes
if (game.isEasyMode && level.levelsCleared % 2) level.difficultyDecrease(1);
game.clearNow = true; //triggers in game.clearMap to remove all physics bodies and setup for new map
if (mod.isHealLowHealth && mech.health < mech.maxHealth * 0.5) {
mech.health = mech.maxHealth * 0.5
mech.displayHealth();
}
},
playerExitCheck() {
if (

View File

@@ -1016,20 +1016,7 @@ const mobs = {
b.spore(this.position)
}
}
if (Math.random() < mod.isBotSpawner) {
if (Math.random() < 0.1) { //very low chance of plasma bot
b.plasmaBot(this.position)
} else if (Math.random() < 0.25) {
b.nailBot(this.position)
} else if (Math.random() < 0.33) {
b.laserBot(this.position)
} else if (Math.random() < 0.5) {
b.foamBot(this.position)
} else {
b.boomBot(this.position)
}
// if (mech.energy > 0.33) mech.energy -= 0.33
}
if (Math.random() < mod.isBotSpawner) b.randomBot(this.position, false)
if (mod.isExplodeMob) b.explosion(this.position, Math.min(450, Math.sqrt(this.mass + 3) * 80))
if (mod.nailsDeathMob) b.targetedNail(this.position, mod.nailsDeathMob)
} else if (mod.isShieldAmmo && this.shield) {
@@ -1039,7 +1026,7 @@ const mobs = {
} else if (Math.random() < 0.5 && !mod.isSuperDeterminism) {
type = "reroll"
}
for (let i = 0; i < 3; i++) {
for (let i = 0, len = 1 + Math.ceil(2 * Math.random()); i < len; i++) {
powerUps.spawn(this.position.x, this.position.y, type);
if (Math.random() < mod.bayesian) powerUps.spawn(this.position.x, this.position.y, type);
}

View File

@@ -78,9 +78,12 @@ const mod = {
if (mod.isRest && player.speed < 1) dmg *= 1.20;
if (mod.isEnergyDamage) dmg *= 1 + mech.energy / 5.5;
if (mod.isDamageFromBulletCount) dmg *= 1 + bullet.length * 0.006
if (mod.isRerollDamage) dmg *= 1 + 0.06 * powerUps.reroll.rerolls
if (mod.isRerollDamage) dmg *= 1 + 0.05 * powerUps.reroll.rerolls
return dmg * mod.slowFire
},
totalBots() {
return mod.foamBotCount + mod.nailBotCount + mod.laserBotCount + mod.boomBotCount + mod.plasmaBotCount
},
mods: [{
name: "capacitor",
// nameInfo: "<span id='mod-capacitor'></span>",
@@ -131,22 +134,6 @@ const mod = {
mod.isRest = false;
}
},
{
name: "perturbation theory",
description: "increase <strong class='color-d'>damage</strong> by <strong>6%</strong><br>for each <strong class='color-r'>reroll</strong> in your inventory",
maxCount: 1,
count: 0,
allowed() {
return powerUps.reroll.rerolls > 1 || build.isCustomSelection
},
requires: "at least 2 rerolls",
effect() {
mod.isRerollDamage = true;
},
remove() {
mod.isRerollDamage = false;
}
},
{
name: "kinetic bombardment",
description: "increase <strong class='color-d'>damage</strong> by up to <strong>33%</strong><br>at a <strong>distance</strong> of 40 steps from the target",
@@ -227,6 +214,42 @@ const mod = {
mod.isHarmDamage = false;
}
},
{
name: "perturbation theory",
description: "increase <strong class='color-d'>damage</strong> by <strong>5%</strong><br>for each of your <strong class='color-r'>rerolls</strong>",
maxCount: 1,
count: 0,
allowed() {
return powerUps.reroll.rerolls > 3 || build.isCustomSelection
},
requires: "at least 4 rerolls",
effect() {
mod.isRerollDamage = true;
},
remove() {
mod.isRerollDamage = false;
}
},
{
name: "Ψ(t) collapse",
description: "<strong>33%</strong> decreased <strong>delay</strong> after firing<br>if you have no <strong class='color-r'>rerolls</strong>",
maxCount: 1,
count: 0,
allowed() {
return powerUps.reroll.rerolls === 0
},
requires: "no rerolls",
effect() {
mod.isRerollHaste = true;
mod.rerollHaste = 0.666;
b.setFireCD();
},
remove() {
mod.isRerollHaste = false;
mod.rerollHaste = 1;
b.setFireCD();
}
},
{
name: "electrostatic discharge",
description: "increase <strong class='color-d'>damage</strong> by <strong>25%</strong><br><strong>25%</strong> increased <strong>delay</strong> after firing",
@@ -435,13 +458,29 @@ const mod = {
mod.plasmaBotCount = 0;
}
},
{
name: "bot fabrication",
description: "anytime you collect <strong>3</strong> <strong class='color-r'>rerolls</strong><br>use them to build a random <strong>bot</strong>",
maxCount: 1,
count: 0,
allowed() {
return powerUps.reroll.rerolls > 2 || build.isCustomSelection
},
requires: "at least 3 rerolls",
effect() {
mob.isRerollBots = true;
},
remove() {
mob.isRerollBots = false;
}
},
{
name: "scrap bots",
description: "<strong>12%</strong> chance to build a <strong>bot</strong> after killing a mob<br>the bot only functions until the end of the level",
maxCount: 6,
count: 0,
allowed() {
return mod.foamBotCount + mod.nailBotCount + mod.laserBotCount + mod.boomBotCount + mod.plasmaBotCount > 0
return mod.totalBots() > 0
},
requires: "a bot",
effect() {
@@ -451,6 +490,22 @@ const mod = {
mod.isBotSpawner = 0;
}
},
{
name: "perimeter defense",
description: "reduce <strong class='color-harm'>harm</strong> by <strong>6%</strong><br>for each of your permanent <strong>bots</strong>",
maxCount: 1,
count: 0,
allowed() {
return mod.totalBots() > 1
},
requires: "2 or more bots",
effect() {
mod.isBotArmor = true
},
remove() {
mod.isBotArmor = false
}
},
{
name: "bot replication",
description: "<strong>duplicate</strong> your permanent <strong>bots</strong><br>remove <strong>90%</strong> of your <strong class='color-g'>ammo</strong>",
@@ -458,7 +513,7 @@ const mod = {
count: 0,
// isNonRefundable: true,
allowed() {
return mod.foamBotCount + mod.nailBotCount + mod.laserBotCount + mod.boomBotCount + mod.plasmaBotCount > 1
return mod.totalBots() > 1
},
requires: "2 or more bots",
effect() {
@@ -468,7 +523,6 @@ const mod = {
b.guns[i].ammo = Math.floor(b.guns[i].ammo * 0.1);
}
}
//double bots
for (let i = 0; i < mod.nailBotCount; i++) {
b.nailBot();
@@ -493,29 +547,6 @@ const mod = {
},
remove() {}
},
// {
// name: "ablative mines",
// description: "rebuild your broken parts as a <strong>mine</strong><br>chance to occur after being <strong>harmed</strong>",
// maxCount: 1,
// count: 0,
// allowed() {
// return true
// },
// requires: "",
// effect() {
// mod.isMineOnDamage = true;
// b.mine({
// x: mech.pos.x,
// y: mech.pos.y - 80
// }, {
// x: 0,
// y: 0
// })
// },
// remove() {
// mod.isMineOnDamage = false;
// }
// },
{
name: "ablative drones",
description: "rebuild your broken parts as <strong>drones</strong><br>chance to occur after receiving <strong class='color-harm'>harm</strong>",
@@ -535,6 +566,22 @@ const mod = {
mod.isDroneOnDamage = false;
}
},
{
name: "mine synthesis",
description: "drop a <strong>mine</strong> after picking up a <strong>power up</strong>",
maxCount: 1,
count: 0,
allowed() {
return true
},
requires: "",
effect() {
mod.isMineDrop = true;
},
remove() {
mod.isMineDrop = false;
}
},
{
name: "squirrel-cage rotor",
description: "<strong>jump</strong> higher and <strong>move</strong> faster",
@@ -557,7 +604,7 @@ const mod = {
},
{
name: "Pauli exclusion",
description: `after receiving <strong class='color-harm'>harm</strong> from a collision<br><strong>immune</strong> to <strong class='color-harm'>harm</strong> for <strong>1</strong> second`,
description: `<strong>immune</strong> to <strong class='color-harm'>harm</strong> for <strong>1</strong> second<br>after receiving <strong class='color-harm'>harm</strong> from a collision`,
maxCount: 9,
count: 0,
allowed() {
@@ -604,6 +651,22 @@ const mod = {
mod.isSlowFPS = false;
}
},
{
name: "liquid cooling",
description: `<strong class='color-s'>freeze</strong> all mobs for <strong>6</strong> seconds<br>after receiving <strong class='color-harm'>harm</strong>`,
maxCount: 1,
count: 0,
allowed() {
return mod.isSlowFPS
},
requires: "clock gating",
effect() {
mod.isHarmFreeze = true;
},
remove() {
mod.isHarmFreeze = false;
}
},
{
name: "entanglement",
nameInfo: "<span id = 'mod-entanglement'></span>",
@@ -790,7 +853,7 @@ const mod = {
{
name: "negentropy",
description: "at the start of each <strong>level</strong><br><strong class='color-h'>heal</strong> up to <strong>50%</strong> of <strong>maximum health</strong>",
maxCount: 9,
maxCount: 1,
count: 0,
allowed() {
return mech.maxHealth > 1 || mod.isArmorFromPowerUps
@@ -843,7 +906,7 @@ const mod = {
powerUps.reroll.changeRerolls(0)
}, 1000);
},
description: "<strong class='color-h'>heal</strong> to <strong>60%</strong> health instead of <strong>dying</strong><br>consumes <strong>1</strong> <strong class='color-r'>reroll</strong>",
description: "<strong class='color-h'>heal</strong> to full <strong>health</strong> instead of <strong>dying</strong><br>consumes <strong>1</strong> <strong class='color-r'>reroll</strong>",
maxCount: 1,
count: 0,
allowed() {
@@ -862,7 +925,7 @@ const mod = {
},
{
name: "bubble fusion",
description: "after destroying a mob's <strong>shield</strong><br>spawn <strong>3</strong> <strong class='color-h'>heals</strong>, <strong class='color-g'>ammo</strong>, or <strong class='color-r'>rerolls</strong>",
description: "after destroying a mob's <strong>shield</strong><br>spawn <strong>2-3</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() {
@@ -894,7 +957,7 @@ const mod = {
},
{
name: "logistics",
description: "<strong class='color-g'>ammo</strong> power ups add to your <strong>current gun</strong><br>spawn <strong>5 ammo</strong>",
description: "<strong class='color-g'>ammo</strong> power ups add to your <strong>current gun</strong><br>spawn <strong>6 ammo</strong>",
maxCount: 1,
count: 0,
allowed() {
@@ -903,7 +966,7 @@ const mod = {
requires: "at least 2 guns",
effect() {
mod.isAmmoForGun = true;
for (let i = 0; i < 5; i++) {
for (let i = 0; i < 6; i++) {
powerUps.spawn(mech.pos.x, mech.pos.y, "ammo");
if (Math.random() < mod.bayesian) powerUps.spawn(mech.pos.x, mech.pos.y, "ammo");
}
@@ -2313,5 +2376,11 @@ const mod = {
isAoESlow: null,
isHarmArmor: null,
isTurret: null,
isRerollDamage: null
isRerollDamage: null,
isHarmFreeze: null,
isBotArmor: null,
isRerollHaste: null,
rerollHaste: null,
isMineDrop: null,
isRerollBots: null
}

View File

@@ -306,6 +306,7 @@ const mech = {
if (mod.mods[i].count < mod.mods[i].maxCount &&
!mod.mods[i].isNonRefundable &&
mod.mods[i].name !== "quantum immortality" &&
mod.mods[i].name !== "Born rule" &&
mod.mods[i].allowed()
) options.push(i);
}
@@ -440,6 +441,7 @@ const mech = {
let dmg = 1
dmg *= mech.fieldHarmReduction
dmg *= mod.isSlowFPS ? 0.85 : 1
if (mod.isBotArmor) dmg *= 0.94 ** mod.totalBots()
if (mod.isHarmArmor && mech.lastHarmCycle + 600 > mech.cycle) dmg *= 0.5;
if (mod.energyRegen === 0) dmg *= 0.5 //0.22 + 0.78 * mech.energy //77% damage reduction at zero energy
if (mod.isTurret && mech.crouch) dmg /= 2;
@@ -467,7 +469,7 @@ const mech = {
if (mod.isDeathAvoid && powerUps.reroll.rerolls) { //&& Math.random() < 0.5
powerUps.reroll.changeRerolls(-1)
mech.energy = mech.maxEnergy * 0.6
mech.energy = mech.maxEnergy
// if (mech.energy < 0.05) mech.energy = 0.05
mech.immuneCycle = mech.cycle + 120 //disable this.immuneCycle bonus seconds
game.makeTextLog("<span style='font-size:115%;'> <strong>death</strong> avoided<br><strong>1</strong> <strong class='color-r'>reroll</strong> consumed</span>", 420)
@@ -496,7 +498,7 @@ const mech = {
if (mech.health < 0 || isNaN(mech.health)) {
if (mod.isDeathAvoid && powerUps.reroll.rerolls > 0) { //&& Math.random() < 0.5
powerUps.reroll.changeRerolls(-1)
mech.health = mech.maxHealth * 0.6
mech.health = mech.maxHealth * game.healScale
// if (mech.health < 0.05) mech.health = 0.05
mech.immuneCycle = mech.cycle + 120 //disable this.immuneCycle bonus seconds
game.makeTextLog("<span style='font-size:115%;'> <strong>death</strong> avoided<br><strong>1</strong> <strong class='color-r'>reroll</strong> consumed</span>", 420)
@@ -540,6 +542,11 @@ const mech = {
game.fpsInterval = 1000 / game.fpsCap;
//how long to wait to return to normal fps
mech.defaultFPSCycle = mech.cycle + 20 + Math.min(90, Math.floor(200 * dmg))
if (mod.isHarmFreeze) { //freeze all mobs
for (let i = 0, len = mob.length; i < len; i++) {
mobs.statusSlow(mob[i], 360)
}
}
} else {
if (dmg > 0.05) { // freeze game for high damage hits
game.fpsCap = 4 //40 - Math.min(25, 100 * dmg)
@@ -938,6 +945,13 @@ const mech = {
});
if (dist2 < 5000 && !game.isChoosing) { //use power up if it is close enough
if (mod.isMassEnergy) mech.energy = mech.maxEnergy * 3;
if (mod.isMineDrop) b.mine({
x: mech.pos.x,
y: mech.pos.y
}, {
x: 0,
y: 0
}, 0, mod.isMineAmmoBack)
Matter.Body.setVelocity(player, { //player knock back, after grabbing power up
x: player.velocity.x + ((powerUp[i].velocity.x * powerUp[i].mass) / player.mass) * 0.3,
y: player.velocity.y + ((powerUp[i].velocity.y * powerUp[i].mass) / player.mass) * 0.3

View File

@@ -54,9 +54,27 @@ const powerUps = {
changeRerolls(amount) {
powerUps.reroll.rerolls += amount
if (powerUps.reroll.rerolls < 0) powerUps.reroll.rerolls = 0
if (mob.isRerollBots) {
const limit = 3
for (; powerUps.reroll.rerolls > limit - 1; powerUps.reroll.rerolls -= limit) {
b.randomBot()
}
}
if (mod.isDeathAvoid && document.getElementById("mod-anthropic")) {
document.getElementById("mod-anthropic").innerHTML = `(${powerUps.reroll.rerolls})`
}
if (mod.isRerollHaste) {
if (powerUps.reroll.rerolls === 0) {
mod.rerollHaste = 0.66;
b.setFireCD();
} else {
mod.rerollHaste = 1;
b.setFireCD();
}
}
},
diceText() {
const r = powerUps.reroll.rerolls

View File

@@ -1,15 +1,34 @@
bubble fusion drops 2-3 power ups (down from 3)
perturbation theory: damage is 5% (down from 6%) per reroll
but the mod will not show up until you have 4 rerolls stockpiled
sporeangium grow faster when stuck to a mob
mod: liquid cooling - freeze all mobs for 6 seconds after receiving harm
mod: perimeter defense - gain 6% harm reduction for each bot
mod: bot fabrication - anytime you have 3 rerolls, convert them into a random bot
mod: Ψ(x) collapse - 33% haste, if you have no rerolls
mod: mine synthesis - drop a mine after picking up a power up
************** TODO - n-gon **************
mod: taking damage slows (or stuns) all mobs on the map
requires the mod that slows time, overclock
map: laboratory
rooms with switches that change physics
gravity room
portal room
laser room
radiation room
map: prison
doors linked to buttons
mobs inside the doors?
button: blocks that are on the button at an angle will slowly slide off the button
maybe just avoid long blocks near the button?
maybe actively hold the button in place?
hazards should affect blocks, bullets, mobs
and do mob damage?
hazards should slow blocks, bullets, mobs?
mob damage?
rotor doesn't work with
plasma torch