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

@@ -432,6 +432,9 @@ public class Renderer extends RendererModule{
Draw.thickness(3f);
Draw.color(Color.SLATE);
Draw.line(x - len + 1, y, x + len + 1.5f, y);
Draw.thickness(1f);
Draw.color(Color.BLACK);
Draw.line(x - len + 1, y, x + len + 0.5f, y);
Draw.color(color);
if(w >= 1)

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){{

View File

@@ -143,7 +143,9 @@ public class MapEditorDialog extends Dialog{
Core.scene.setScrollFocus(view);
view.clearStack();
Mindustry.platforms.updateRPC();
Timers.runTask(3f, () -> {
Mindustry.platforms.updateRPC();
});
});
hidden(() -> Mindustry.platforms.updateRPC());