wormhole
mods ejected from Bayesian statistics can't duplicate the power up boss moves faster, has less health, it will eject one of your mods after a collision and two health power ups mod ammonium nitrate: increase explosion damage and area by 25% also other explosion mods have been rebalanced (damage buffed, but self damage is also higher) field: wormhole - teleport around, bullets teleport too, blocks and power ups get sucked in mobs don't do much in worm hole yet, but that is coming with future mods
This commit is contained in:
@@ -541,6 +541,27 @@ const powerUps = {
|
||||
powerUps.spawnRandomPowerUp(x, y);
|
||||
}
|
||||
},
|
||||
ejectMod() {
|
||||
//find which mods you have
|
||||
const have = []
|
||||
for (let i = 0; i < mod.mods.length; i++) {
|
||||
if (mod.mods[i].count > 0) have.push(i)
|
||||
}
|
||||
if (have.length) {
|
||||
const choose = have[Math.floor(Math.random() * have.length)]
|
||||
game.makeTextLog(`<div class='circle mod'></div> <strong>${mod.mods[choose].name}</strong> ejected by Bayesian statistics`, 600) //message about what mod was lost
|
||||
for (let i = 0; i < mod.mods[choose].count; i++) {
|
||||
powerUps.directSpawn(mech.pos.x, mech.pos.y, "mod");
|
||||
powerUp[powerUp.length - 1].isBonus = true
|
||||
}
|
||||
// remove a random mod from the list of mods you have
|
||||
mod.mods[choose].remove();
|
||||
mod.mods[choose].count = 0;
|
||||
mod.mods[choose].isLost = true;
|
||||
game.updateModHUD();
|
||||
mech.fieldCDcycle = mech.cycle + 30; //disable field so you can't pick up the ejected mod
|
||||
}
|
||||
},
|
||||
directSpawn(x, y, target, moving = true, mode = null, size = powerUps[target].size()) {
|
||||
let index = powerUp.length;
|
||||
target = powerUps[target];
|
||||
|
||||
Reference in New Issue
Block a user