many worlds renamed to ansatz
new tech many-worlds: at the start of each new level switch realities

removed tech: electroactive polymers - convert bots to the same type on weapon swap
all bot upgrades convert current bots to the upgraded type
  only one bot upgrade allowed
This commit is contained in:
landgreen
2021-02-20 16:37:32 -08:00
parent c085b30af4
commit 10b5616460
9 changed files with 365 additions and 268 deletions

View File

@@ -362,26 +362,6 @@ const simulation = {
b.activeGun = b.inventory[b.inventoryGun];
simulation.updateGunHUD();
simulation.boldActiveGunHUD();
if (tech.isBotSwap) {
//get total count
const countPermanent = tech.dynamoBotCount + tech.laserBotCount + tech.nailBotCount + tech.foamBotCount + tech.boomBotCount + tech.orbitBotCount
//remove all bots
tech.dynamoBotCount = 0
tech.laserBotCount = 0
tech.nailBotCount = 0
tech.foamBotCount = 0
tech.boomBotCount = 0
tech.orbitBotCount = 0
for (let i = 0; i < bullet.length; i++) {
if (bullet[i].botType && bullet[i].endCycle === Infinity) bullet[i].endCycle = 0 //don't remove temp bots
}
//set to a new type
options = [() => { tech.laserBotCount = countPermanent }, () => { tech.nailBotCount = countPermanent }, () => { tech.foamBotCount = countPermanent }, () => { tech.boomBotCount = countPermanent }, () => { tech.orbitBotCount = countPermanent }, () => { tech.dynamoBotCount = countPermanent }, ]
options[tech.botSwapCycleIndex]()
tech.botSwapCycleIndex++
if (tech.botSwapCycleIndex > options.length - 1) tech.botSwapCycleIndex = 0
b.respawnBots()
}
},
zoom: null,
zoomScale: 1000,