exciton-lattice

field: perfect diamagnetism is a bit larger
  can now grab power ups from far away

mod: exciton-lattice - reduce harm by 80%, but after taking collision damage eject a random mod
  eject extra mods if you have recursive stacks

power ups have a bit more air friction
power ups must be in line of sight to be pulled by the player
why mode now gets 100% chance for a second boss power up (up from 50%)
  this should let why mode reach more interesting build depth
laser and pulse got a damage and energy use buff
immune to harm for a second after exiting the power up selection menu
This commit is contained in:
landgreen
2020-09-05 06:01:47 -07:00
parent b9aaa4423b
commit 6c51916f04
8 changed files with 289 additions and 165 deletions

View File

@@ -162,6 +162,21 @@ function collisionChecks(event) {
dmg *= 0.85
}
mech.damage(dmg);
if (mod.isEjectMod) {
const have = [] //find which mods you have
for (let i = 0; i < mod.mods.length; i++) {
if (mod.mods[i].count > 0) have.push(i)
}
const choose = have[Math.floor(Math.random() * have.length)]
//message about what mod was lost
game.makeTextLog(`<div class='circle mod'></div> &nbsp; <strong>${mod.mods[choose].name}</strong> ejected by exciton-lattice`, 300)
for (let i = 0; i < mod.mods[choose].count; i++) powerUps.spawn(mech.pos.x, mech.pos.y, "mod");
mod.mods[choose].count = 0;
mod.mods[choose].remove(); // remove a random mod form the list of mods you have
game.updateModHUD();
}
if (mob[k].onHit) mob[k].onHit(k);
//extra kick between player and mob //this section would be better with forces but they don't work...