Removed tierScaleBack, fixed waves spawning with very few enemies

This commit is contained in:
Anuken
2018-01-20 22:06:37 -05:00
parent 12efe4a509
commit bf83ccd636
4 changed files with 10 additions and 5 deletions

View File

@@ -15,8 +15,8 @@ public class EnemySpawn{
protected int spacing = 1;
/**How many waves need to pass after the start of this spawn for the tier to increase by one*/
protected int tierscale = 14;
/**How many less enemies there are, every time the tier increases*/
protected int tierscaleback = 1;
/**How many more enemies there are, every time the tier increases*/
protected int tierscaleback = 0;
/**The tier this spawn starts at.*/
protected int tier = 1;
/**Maximum amount of enemies that spawn*/
@@ -36,7 +36,7 @@ public class EnemySpawn{
}
float scaling = this.scaling * Vars.control.getDifficulty().enemyScaling;
return Math.min(amount-1 + Math.max((int)((wave / spacing) / scaling), 1) - (tier(wave, lane)-1) * tierscaleback, max);
return Math.min(amount-1 + Math.max((int)((wave / spacing) / scaling), 1) + (tier(wave, lane)-1) * tierscaleback, max);
}
public int tier(int wave, int lane){

View File

@@ -26,7 +26,7 @@ public class WaveCreator{
amount = 2;
spacing = 5;
scaling = 2;
tierscaleback = 0;
tierscaleback = 1;
}},
new EnemySpawn(EnemyTypes.tank){{