reroll damage mod

This commit is contained in:
landgreen
2020-07-11 19:25:15 -07:00
parent 4af6e26975
commit 92f174983a
5 changed files with 42 additions and 28 deletions

View File

@@ -1965,8 +1965,8 @@ const b = {
name: "flak", 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", 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, ammo: 0,
ammoPack: 8, ammoPack: 9,
defaultAmmoPack: 8, //use to revert ammoPack after mod changes drop rate defaultAmmoPack: 9, //use to revert ammoPack after mod changes drop rate
have: false, have: false,
isEasyToAim: false, isEasyToAim: false,
fire() { fire() {

View File

@@ -675,6 +675,8 @@ const game = {
consBB = []; consBB = [];
removeAll(bullet); removeAll(bullet);
bullet = []; bullet = [];
removeAll(composite);
composite = [];
// if player was holding something this makes a new copy to hold // if player was holding something this makes a new copy to hold
if (holdTarget) { if (holdTarget) {
len = body.length; len = body.length;

View File

@@ -2,6 +2,7 @@ let body = []; //non static bodies
let map = []; //all static bodies let map = []; //all static bodies
let cons = []; //all constraints between a point and a body let cons = []; //all constraints between a point and a body
let consBB = []; //all constraints between two bodies let consBB = []; //all constraints between two bodies
let composite = [] //rotors and other map elements that don't fit
const level = { const level = {
defaultZoom: 1400, defaultZoom: 1400,
onLevel: 0, onLevel: 0,
@@ -78,7 +79,7 @@ const level = {
density: density, density: density,
isNotSticky: true isNotSticky: true
}); });
const rotor = Body.create({ //combine rotor1 and rotor2 rotor = Body.create({ //combine rotor1 and rotor2
parts: [rotor1, rotor2], parts: [rotor1, rotor2],
restitution: 0, restitution: 0,
collisionFilter: { collisionFilter: {
@@ -123,7 +124,7 @@ const level = {
} }
} }
} }
composite[composite.length] = rotor
return rotor return rotor
}, },
button(x, y, width = 70, height = 20) { button(x, y, width = 70, height = 20) {
@@ -299,22 +300,22 @@ const level = {
spawn.mapRect(9300, 2590, 650, 25); spawn.mapRect(9300, 2590, 650, 25);
spawn.mapRect(9700, 2580, 100, 50); spawn.mapRect(9700, 2580, 100, 50);
spawn.randomBoss(1300, 2100, 0.7); spawn.randomBoss(1300, 2100, 0.6);
spawn.randomMob(8300, 2225, 0.5); spawn.randomMob(8300, 2100, 0.3);
spawn.randomSmallMob(2575, -75, 0.5); //entrance spawn.randomSmallMob(2575, -75, 0.3); //entrance
spawn.randomMob(8125, 2450, 0.5); spawn.randomMob(8125, 2450, 0.3);
spawn.randomSmallMob(3200, 250, 0.5); spawn.randomSmallMob(3200, 250, 0.4);
spawn.randomMob(2425, 2150, 0.5); spawn.randomMob(2425, 2150, 0.4);
spawn.randomSmallMob(3825, 300, 0.5); spawn.randomSmallMob(3825, 300, 0.4);
spawn.randomMob(3800, 2175, 0.5); spawn.randomMob(3800, 2175, 0.5);
spawn.randomSmallMob(1100, -300, 0.5); //entrance spawn.randomSmallMob(1100, -300, 0.5); //entrance
spawn.randomMob(4450, 2500, 0.5); spawn.randomMob(4450, 2500, 0.6);
spawn.randomMob(6350, 2525, 0.5); spawn.randomMob(6350, 2525, 0.6);
spawn.randomSmallMob(1900, -250, 0.5); //entrance spawn.randomBoss(9200, 2400, 0.5);
spawn.randomSmallMob(1900, -250, 0.7); //entrance
spawn.randomMob(1500, 2100, 0.8); spawn.randomMob(1500, 2100, 0.8);
spawn.randomSmallMob(1700, -150, 0.5); //entrance spawn.randomSmallMob(1700, -150, 0.8); //entrance
spawn.randomMob(8800, 2725, 0.5); spawn.randomMob(8800, 2725, 0.9);
spawn.randomBoss(8650, 2275, 0.5);
if (game.difficulty > 3) spawn.randomLevelBoss(6000, 2300, ["shooterBoss", "spiderBoss", "launcherBoss", "laserTargetingBoss"]); if (game.difficulty > 3) spawn.randomLevelBoss(6000, 2300, ["shooterBoss", "spiderBoss", "launcherBoss", "laserTargetingBoss"]);
}, },
template() { template() {
@@ -2107,7 +2108,7 @@ const level = {
spawn.randomBoss(2350, -850, 1); spawn.randomBoss(2350, -850, 1);
spawn.randomBoss(100, -450, 0.9); spawn.randomBoss(100, -450, 0.9);
if (game.difficulty > 3) spawn.randomLevelBoss(1850, -1400, 1); if (game.difficulty > 3) spawn.randomLevelBoss(1850, -1400);
}, },
//****************************************************************************************************************** //******************************************************************************************************************
//****************************************************************************************************************** //******************************************************************************************************************

View File

@@ -78,6 +78,7 @@ const mod = {
if (mod.isRest && player.speed < 1) dmg *= 1.20; if (mod.isRest && player.speed < 1) dmg *= 1.20;
if (mod.isEnergyDamage) dmg *= 1 + mech.energy / 5.5; if (mod.isEnergyDamage) dmg *= 1 + mech.energy / 5.5;
if (mod.isDamageFromBulletCount) dmg *= 1 + bullet.length * 0.006 if (mod.isDamageFromBulletCount) dmg *= 1 + bullet.length * 0.006
if (mod.isRerollDamage) dmg *= 1 + 0.06 * powerUps.reroll.rerolls
return dmg * mod.slowFire return dmg * mod.slowFire
}, },
mods: [{ mods: [{
@@ -130,6 +131,22 @@ const mod = {
mod.isRest = false; 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", 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", 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",
@@ -1035,7 +1052,6 @@ const mod = {
mod.manyWorlds = false; mod.manyWorlds = false;
} }
}, },
{ {
name: "quantum immortality", name: "quantum immortality",
description: "after <strong>dying</strong>, continue in an <strong>alternate reality</strong><br>spawn <strong>5</strong> <strong class='color-r'>rerolls</strong>", description: "after <strong>dying</strong>, continue in an <strong>alternate reality</strong><br>spawn <strong>5</strong> <strong class='color-r'>rerolls</strong>",
@@ -1482,7 +1498,7 @@ const mod = {
requires: "flak", requires: "flak",
effect() { effect() {
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
if (b.guns[i].name === "flak") b.guns[i].ammoPack = b.guns[i].defaultAmmoPack * (3 * this.count); if (b.guns[i].name === "flak") b.guns[i].ammoPack = b.guns[i].defaultAmmoPack * (3 * (1 + this.count));
} }
}, },
remove() { remove() {
@@ -2296,5 +2312,6 @@ const mod = {
isHealLowHealth: null, isHealLowHealth: null,
isAoESlow: null, isAoESlow: null,
isHarmArmor: null, isHarmArmor: null,
isTurret: null isTurret: null,
isRerollDamage: null
} }

View File

@@ -1,12 +1,6 @@
new level, sewers
flak ammo buff
************** TODO - n-gon ************** ************** TODO - n-gon **************
mod: do more damage for each reroll you are holding
do more damage for the ammo/ammoPack ratio?
mod: taking damage slows (or stuns) all mobs on the map mod: taking damage slows (or stuns) all mobs on the map
requires the mod that slows time, overclock requires the mod that slows time, overclock
@@ -14,7 +8,7 @@ button: blocks that are on the button at an angle will slowly slide off the butt
maybe just avoid long blocks near the button? maybe just avoid long blocks near the button?
maybe actively hold the button in place? maybe actively hold the button in place?
slime should affect blocks, bullets, mobs hazards should affect blocks, bullets, mobs
and do mob damage? and do mob damage?
rotor doesn't work with rotor doesn't work with