bubble fusion

This commit is contained in:
landgreen
2020-06-23 14:05:34 -07:00
parent d1cb3aff15
commit ffc5aa3e1e
6 changed files with 68 additions and 27 deletions

View File

@@ -991,7 +991,7 @@ const mobs = {
this.alive = false; //triggers mob removal in mob[i].replace(i)
if (this.dropPowerUp) {
if (mod.isEnergyLoss) mech.energy *= 0.66;
powerUps.spawnRandomPowerUp(this.position.x, this.position.y, this.mass, radius);
powerUps.spawnRandomPowerUp(this.position.x, this.position.y);
mech.lastKillCycle = mech.cycle; //tracks the last time a kill was made, mostly used in game.checks()
if (Math.random() < mod.sporesOnDeath) {
const len = Math.min(30, Math.floor(4 + this.mass * Math.random()))
@@ -1011,6 +1011,17 @@ const mobs = {
}
if (mod.isExplodeMob) b.explosion(this.position, Math.min(450, Math.sqrt(this.mass + 3) * 80))
if (mod.nailsDeathMob) b.targetedNail(this.position, mod.nailsDeathMob)
} else if (mod.isShieldAmmo && this.shield) {
let type = "ammo"
if (Math.random() < 0.33 || mod.bayesian) {
type = "heal"
} else if (Math.random() < 0.5 && !mod.isSuperDeterminism) {
type = "reroll"
}
for (let i = 0; i < 3; i++) {
powerUps.spawn(this.position.x, this.position.y, type);
if (Math.random() < mod.bayesian) powerUps.spawn(this.position.x, this.position.y, type);
}
}
},
removeConsBB() {