perpetual mods

4 new mods: perpetual ammo/rerolls/heals - get that power up at the start of each level
            also perpetual stun: stuns all mobs for 8 seconds at the start
This commit is contained in:
landgreen
2020-11-27 17:20:15 -08:00
parent 6c5928c052
commit dd43d9413b
8 changed files with 106 additions and 31 deletions

View File

@@ -82,6 +82,18 @@ const level = {
powerUps.spawn(mech.pos.x + 60 * (Math.random() - 0.5), mech.pos.y + 60 * (Math.random() - 0.5), "heal", false);
}
}
if (mod.isPerpetualReroll) powerUps.spawn(mech.pos.x + 60 * (Math.random() - 0.5), mech.pos.y + 60 * (Math.random() - 0.5), "reroll", false);
if (mod.isPerpetualAmmo) {
powerUps.spawn(mech.pos.x + 60 * (Math.random() - 0.5), mech.pos.y + 60 * (Math.random() - 0.5), "ammo", false);
powerUps.spawn(mech.pos.x + 60 * (Math.random() - 0.5), mech.pos.y + 60 * (Math.random() - 0.5), "ammo", false);
}
if (mod.isPerpetualHeal) {
powerUps.spawn(mech.pos.x + 60 * (Math.random() - 0.5), mech.pos.y + 60 * (Math.random() - 0.5), "heal", false);
powerUps.spawn(mech.pos.x + 60 * (Math.random() - 0.5), mech.pos.y + 60 * (Math.random() - 0.5), "heal", false);
}
if (mod.isPerpetualStun) {
for (let i = 0; i < mob.length; i++) mobs.statusStun(mob[i], 60 * 8)
}
if (mod.isGunCycle) {
b.inventoryGun++;
if (b.inventoryGun > b.inventory.length - 1) b.inventoryGun = 0;