Testing Github Actions CI

This commit is contained in:
Anuken
2020-11-19 18:53:02 -05:00
parent 15ef32447c
commit f71b726877
10 changed files with 116 additions and 34 deletions

View File

@@ -257,10 +257,10 @@ public class Waves{
public static Seq<SpawnGroup> generate(float difficulty){
//apply power curve to make starting sectors easier
return generate(new Rand(), Mathf.pow(difficulty, 1.12f));
return generate(Mathf.pow(difficulty, 1.12f), new Rand(), false);
}
public static Seq<SpawnGroup> generate(Rand rand, float difficulty){
public static Seq<SpawnGroup> generate(float difficulty, Rand rand, boolean attack){
UnitType[][] species = {
{dagger, mace, fortress, scepter, reign},
{nova, pulsar, quasar, vela, corvus},
@@ -395,6 +395,21 @@ public class Waves{
effect = StatusEffects.boss;
}});
//add megas to heal the base.
if(attack && difficulty >= 0.5){
int amount = Mathf.random(1, 3 + (int)(difficulty*2));
for(int i = 0; i < amount; i++){
int wave = Mathf.random(3, 20);
out.add(new SpawnGroup(mega){{
unitAmount = 1;
begin = wave;
end = wave;
max = 16;
}});
}
}
//shift back waves on higher difficulty for a harder start
int shift = Math.max((int)(difficulty * 15 - 5), 0);