abiogenesis

tech: abiogenesis - spawn a second level boss on each level, but costs 5 research or if you don't have the research add 49 JUNK tech to the pool
  note to level builders I rewrote the add duplicate boss code in all levels: spawn.secondaryBossChance(x,y)

foam tech: uncertainty principle - foam bullets change position randomly, increase foam damage by 66%

throwing blocks now charges faster with reduced fire cooldown
tech renormalization now has a 40% chance to refund a research  (was 37%)
performance- now precalculate player gradient fill
This commit is contained in:
landgreen
2021-06-30 06:40:37 -07:00
parent 5d4ef1994c
commit a2b56d1f7e
9 changed files with 338 additions and 342 deletions

View File

@@ -87,6 +87,19 @@ const spawn = {
// other bosses: suckerBoss, laserBoss, tetherBoss, //these need a particular level to work so they are not included in the random pool
spawn[options[Math.floor(Math.random() * options.length)]](x, y)
},
secondaryBossChance(x, y) {
if (tech.isDuplicateBoss && Math.random() < 2 * tech.duplicationChance()) {
spawn.randomLevelBoss(x, y);
} else if (tech.isResearchBoss) {
if (powerUps.research.count > 4) {
powerUps.research.changeRerolls(-5)
simulation.makeTextLog(`<span class='color-var'>m</span>.<span class='color-r'>research</span> <span class='color-symbol'>-=</span> 5<br>${powerUps.research.count}`)
} else {
tech.addJunkTechToPool(49)
}
spawn.randomLevelBoss(x, y);
}
},
//mob templates *********************************************************************************************
//***********************************************************************************************************
MACHO(x = m.pos.x, y = m.pos.y) { //immortal mob that follows player //if you have the tech it spawns at start of every level at the player