Serpulo naval wave support

This commit is contained in:
Anuken
2021-09-30 18:22:50 -04:00
parent 9939d6065a
commit 0483e3f900
5 changed files with 139 additions and 27 deletions

View File

@@ -265,10 +265,16 @@ public class Waves{
}
public static Seq<SpawnGroup> generate(float difficulty, Rand rand, boolean attack, boolean airOnly){
return generate(difficulty, rand, attack, airOnly, false);
}
public static Seq<SpawnGroup> generate(float difficulty, Rand rand, boolean attack, boolean airOnly, boolean naval){
UnitType[][] species = {
{dagger, mace, fortress, scepter, reign},
{nova, pulsar, quasar, vela, corvus},
{crawler, atrax, spiroct, arkyid, toxopid},
{risso, minke, bryde, sei, omura},
{risso, oxynoe, cyerce, aegires, navanax}, //retusa intentionally left out as it cannot damage the core properly
{flare, horizon, zenith, rand.chance(0.5) ? quad : antumbra, rand.chance(0.1) ? quad : eclipse}
};
@@ -276,6 +282,12 @@ public class Waves{
species = Structs.filter(UnitType[].class, species, v -> v[0].flying);
}
if(naval){
species = Structs.filter(UnitType[].class, species, v -> v[0].flying || v[0].naval);
}else{
species = Structs.filter(UnitType[].class, species, v -> v[0].flying && !v[0].naval);
}
UnitType[][] fspec = species;
//required progression: