@@ -114,30 +114,30 @@ export class Level {
114
114
}
115
115
}
116
116
117
- // Poppers
118
- const popperLevels = [ 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 ] ;
119
- if ( popperLevels . indexOf ( this . number ) >= 0 ) {
120
- const popperCount = Math . max ( 1 , Math . min ( 2 , this . number - 5 ) ) ;
121
- for ( let i = 0 ; i < popperCount ; i ++ ) {
122
- initialEnemies . push (
123
- this . popperSpawner . spawnWithoutIntersecting ( initialEnemies )
124
- ) ;
117
+ // Towers
118
+ const towerLevels = [ 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 ] ;
119
+ if ( towerLevels . indexOf ( this . number ) >= 0 ) {
120
+ const towerCount = Math . max ( 1 , Math . min ( 3 , this . number - 6 ) ) ;
121
+ for ( let i = 0 ; i < towerCount ; i ++ ) {
122
+ initialEnemies . push ( this . towerSpawner . spawnWithoutIntersecting ( initialEnemies ) ) ;
125
123
}
126
124
}
127
125
128
- // Dumper
129
- const dumperLevels = [ 4 , 5 , 6 , 7 , 8 , 9 , 10 ] ;
130
- if ( dumperLevels . indexOf ( this . number ) >= 0 ) {
131
- const dumperCount = Math . max ( 1 , Math . min ( 3 , this . number - 6 ) ) ;
132
- for ( let i = 0 ; i < dumperCount ; i ++ ) {
126
+ // Pounder
127
+ const pounderLevels = [ 4 , 5 , 6 , 7 , 8 , 9 , 10 ] ;
128
+ if ( pounderLevels . indexOf ( this . number ) >= 0 ) {
129
+ const pounderCount = Math . max ( 1 , Math . min ( 3 , this . number - 6 ) ) ;
130
+ for ( let i = 0 ; i < pounderCount ; i ++ ) {
133
131
initialEnemies . push (
134
- this . dumperSpawner . spawnWithoutIntersecting ( initialEnemies )
132
+ this . pounderSpawner . spawnWithoutIntersecting ( initialEnemies )
135
133
) ;
136
134
}
137
135
}
136
+
138
137
}
139
138
140
139
if ( this . world . number === 2 ) {
140
+
141
141
// Tanks
142
142
const tankLevels = [ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 ] ;
143
143
if ( tankLevels . indexOf ( this . number ) >= 0 ) {
@@ -158,21 +158,22 @@ export class Level {
158
158
}
159
159
}
160
160
161
- // Pounder
162
- const pounderLevels = [ 4 , 5 , 6 , 7 , 8 , 9 , 10 ] ;
163
- if ( pounderLevels . indexOf ( this . number ) >= 0 ) {
164
- const pounderCount = Math . max ( 1 , Math . min ( 3 , this . number - 6 ) ) ;
165
- for ( let i = 0 ; i < pounderCount ; i ++ ) {
161
+ // Dumper
162
+ const dumperLevels = [ 4 , 5 , 6 , 7 , 8 , 9 , 10 ] ;
163
+ if ( dumperLevels . indexOf ( this . number ) >= 0 ) {
164
+ const dumperCount = Math . max ( 1 , Math . min ( 3 , this . number - 6 ) ) ;
165
+ for ( let i = 0 ; i < dumperCount ; i ++ ) {
166
166
initialEnemies . push (
167
- this . pounderSpawner . spawnWithoutIntersecting ( initialEnemies )
167
+ this . dumperSpawner . spawnWithoutIntersecting ( initialEnemies )
168
168
) ;
169
169
}
170
170
}
171
171
}
172
172
173
173
if ( this . world . number === 3 ) {
174
+
174
175
// Zamboney
175
- const zamboneyLevels = [ 1 , 2 , 4 , 5 , 6 , 7 , 8 , 9 , 10 ] ;
176
+ const zamboneyLevels = [ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 ] ;
176
177
if ( zamboneyLevels . indexOf ( this . number ) >= 0 ) {
177
178
const zamboneyCount = Math . max ( 1 , Math . min ( 4 , this . number - 6 ) ) ;
178
179
for ( let i = 0 ; i < zamboneyCount ; i ++ ) {
@@ -182,12 +183,14 @@ export class Level {
182
183
}
183
184
}
184
185
185
- // Towers
186
- const towerLevels = [ 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 ] ;
187
- if ( towerLevels . indexOf ( this . number ) >= 0 ) {
188
- const towerCount = Math . max ( 1 , Math . min ( 3 , this . number - 6 ) ) ;
189
- for ( let i = 0 ; i < towerCount ; i ++ ) {
190
- initialEnemies . push ( this . towerSpawner . spawnWithoutIntersecting ( initialEnemies ) ) ;
186
+ // Poppers
187
+ const popperLevels = [ 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 ] ;
188
+ if ( popperLevels . indexOf ( this . number ) >= 0 ) {
189
+ const popperCount = Math . max ( 1 , Math . min ( 2 , this . number - 5 ) ) ;
190
+ for ( let i = 0 ; i < popperCount ; i ++ ) {
191
+ initialEnemies . push (
192
+ this . popperSpawner . spawnWithoutIntersecting ( initialEnemies )
193
+ ) ;
191
194
}
192
195
}
193
196
@@ -204,6 +207,7 @@ export class Level {
204
207
}
205
208
206
209
if ( this . world . number === 4 ) {
210
+
207
211
// Chasers
208
212
const chaserLevels = [ 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 10 ] ;
209
213
if ( chaserLevels . indexOf ( this . number ) >= 0 ) {
@@ -238,7 +242,7 @@ export class Level {
238
242
239
243
if ( this . world . number === 5 ) {
240
244
if ( this . number === 1 ) {
241
- const chaserCount = 6 ;
245
+ const chaserCount = 7 ;
242
246
for ( let i = 0 ; i < chaserCount ; i ++ ) {
243
247
initialEnemies . push (
244
248
this . chaserSpawner . spawnWithoutIntersecting ( initialEnemies )
@@ -278,7 +282,7 @@ export class Level {
278
282
if ( this . number === 4 ) {
279
283
initialEnemies . push ( this . turrentSpawner . spawnWithoutIntersecting ( initialEnemies ) ) ;
280
284
initialEnemies . push ( this . zamboneySpawner . spawnWithoutIntersecting ( initialEnemies ) ) ;
281
- const pounderCount = 2 ;
285
+ const pounderCount = 3 ;
282
286
for ( let i = 0 ; i < pounderCount ; i ++ ) {
283
287
initialEnemies . push (
284
288
this . pounderSpawner . spawnWithoutIntersecting ( initialEnemies )
@@ -396,7 +400,7 @@ export class Level {
396
400
const collectables = [ ] ;
397
401
398
402
// Gems
399
- const gemCount = Math . min ( Level . MAX_GEMS , Math . ceil ( this . world . number + this . number * 0.5 ) ) ;
403
+ const gemCount = Math . min ( Level . MAX_GEMS , Math . ceil ( this . world . number + this . number * 0.7 ) ) ;
400
404
const entitiesToAvoid = [ this . game . player , ...this . game . enemies ] ;
401
405
for ( let i = 0 ; i < gemCount ; i ++ ) {
402
406
const gem = this . gemSpawner . spawnWithoutIntersecting ( entitiesToAvoid ) ;
0 commit comments