tech: pacifist - if you kill a mob lose 2% max health, but gain 2 tech at the end of every level
junk tech: bounce - you bounce, it's kinda annoying
This commit is contained in:
landgreen
2021-09-23 05:27:28 -07:00
parent 0561caf21a
commit 7c2c142b4c
5 changed files with 78 additions and 2 deletions

View File

@@ -1140,6 +1140,17 @@ const mobs = {
bullet[bullet.length - 1].endCycle = simulation.cycle + 840 //14 seconds
this.leaveBody = false; // no body since it turned into the bot
}
if (tech.removeMaxHealthOnKill) {
if (tech.isEnergyHealth) {
if (m.maxEnergy > tech.removeMaxHealthOnKill) {
tech.healMaxEnergyBonus -= tech.removeMaxHealthOnKill
m.setMaxEnergy();
}
} else if (m.maxHealth > tech.removeMaxHealthOnKill) {
tech.extraMaxHealth -= tech.removeMaxHealthOnKill //decrease max health
m.setMaxHealth();
}
}
} else if (tech.isShieldAmmo && this.shield && !this.isExtraShield) {
let type = tech.isEnergyNoAmmo ? "heal" : "ammo"
if (Math.random() < 0.4) {