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

@@ -499,6 +499,7 @@ const game = {
mod.setupAllMods(); //sets mods to default values
b.setFireCD();
game.updateModHUD();
powerUps.totalPowerUps = 0;
powerUps.reroll.rerolls = 0;
mech.maxHealth = 1
mech.maxEnergy = 1
@@ -645,21 +646,19 @@ const game = {
}
}
if (mod.isMutualism) {
if (mod.isMutualism && !mod.isEnergyHealth) {
for (let i = 0; i < bullet.length; i++) {
if (bullet[i].isMutualismActive) {
if (mod.isEnergyHealth) {
mech.energy += 0.01;
} else {
mech.health += 0.01
if (mech.health > mech.maxHealth) mech.health = mech.maxHealth;
mod.onHealthChange();
mech.displayHealth();
}
mech.health += 0.01
if (mech.health > mech.maxHealth) mech.health = mech.maxHealth;
mod.onHealthChange();
mech.displayHealth();
}
}
}
powerUps.totalPowerUps = powerUp.length
//if player is holding something this remembers it before it gets deleted
let holdTarget;
if (mech.holdingTarget) {