Merge branch 'master' of https://github.com/Anuken/Mindustry into 7.0-features

 Conflicts:
	core/src/mindustry/type/UnitType.java
This commit is contained in:
Anuken
2021-10-01 09:41:33 -04:00
20 changed files with 236 additions and 58 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: