mod: logistics

added mods to spawn a gun, a field, and rerolls
added mod that gives max health for leftover power ups
   this mod has some interesting interactions with other mods
mod annihilation now uses 20% of base energy and doesn't trigger damage immunity
mod Hawking radiation removed
mod negative temperature: freezed mobs in range of negative mass field, but drain energy
mod: logistics
  ammo power ups are added to your current gun
  spawn 4 ammo immediately
This commit is contained in:
landgreen
2020-06-08 08:55:53 -07:00
parent cea1bcc7a3
commit d9d07b4f5d
9 changed files with 278 additions and 176 deletions

View File

@@ -175,7 +175,9 @@ function collisionChecks(event) {
y: mob[k].velocity.y - 8 * Math.sin(angle)
});
if (mod.isAnnihilation && !mob[k].shield && !mob[k].isShielded) {
if (mod.isAnnihilation && !mob[k].shield && !mob[k].isShielded && mech.energy > 0.2) {
mech.energy -= 0.2
mech.immuneCycle = 0; //player doesn't go immune to collision damage
mob[k].death();
game.drawList.push({
//add dmg to draw queue
@@ -207,6 +209,7 @@ function collisionChecks(event) {
// console.log(obj.dmg / (0.15 * obj.mass * Vector.magnitude(Vector.sub(mob[k].velocity, obj.velocity))))
if (mod.isCrit && !mob[k].seePlayer.recall && !mob[k].shield) dmg *= 5
mob[k].foundPlayer();
console.log(dmg)
mob[k].damage(dmg);
// console.log(dmg)
obj.onDmg(mob[k]); //some bullets do actions when they hits things, like despawn