level elevators

This commit is contained in:
landgreen
2020-07-27 16:00:22 -07:00
parent dd4e66bde8
commit d5b2504283
7 changed files with 292 additions and 206 deletions

View File

@@ -498,12 +498,12 @@ const powerUps = {
}
},
spawnStartingPowerUps(x, y) { //used for map specific power ups, mostly to give player a starting gun
if (level.levelsCleared < 5) {
if (level.levelsCleared < 6) {
if (b.inventory.length === 0) {
powerUps.spawn(x, y, "gun", false);
} else if (mod.totalCount === 0) {
powerUps.spawn(x, y, "mod", false); //starting gun
} else if (b.inventory.length < 2) {
} else if (b.inventory.length < 2 && Math.random() < 0.5) {
powerUps.spawn(x, y, "gun", false);
} else {
powerUps.spawnRandomPowerUp(x, y);