Merge branch 'master' of https://github.com/Anuken/Mindustry into v116
This commit is contained in:
Binary file not shown.
@@ -40,8 +40,6 @@ public class Planets implements ContentList{
|
||||
startSector = 10;
|
||||
atmosphereRadIn = -0.01f;
|
||||
atmosphereRadOut = 0.3f;
|
||||
accessible = false;
|
||||
visible = false;
|
||||
}};*/
|
||||
|
||||
serpulo = new Planet("serpulo", sun, 3, 1){{
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -439,7 +439,7 @@ public class SerpuloPlanetGenerator extends PlanetGenerator{
|
||||
state.rules.waves = sector.info.waves = true;
|
||||
state.rules.enemyCoreBuildRadius = 600f;
|
||||
|
||||
state.rules.spawns = Waves.generate(difficulty);
|
||||
state.rules.spawns = Waves.generate(difficulty, new Rand(), state.rules.attackMode);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -15,7 +15,7 @@ public class TantrosPlanetGenerator extends PlanetGenerator{
|
||||
|
||||
@Override
|
||||
public Color getColor(Vec3 position){
|
||||
float depth = (float)noise.octaveNoise3D(2, 0.56, 1.7f, position.x, position.y, position.z) / 1.7f;
|
||||
float depth = (float)noise.octaveNoise3D(2, 0.56, 1.7f, position.x, position.y, position.z) / 2f;
|
||||
return c1.write(out).lerp(c2, Mathf.clamp(Mathf.round(depth, 0.15f))).a(0.6f);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -629,7 +629,7 @@ public class Mods implements Loadable{
|
||||
}
|
||||
|
||||
//make sure the main class exists before loading it; if it doesn't just don't put it there
|
||||
if(mainFile.exists() && Core.settings.getBool("mod-" + meta.name.toLowerCase().replace(" ", "-") + "-enabled", true)){
|
||||
if(mainFile.exists() && Core.settings.getBool("mod-" + baseName + "-enabled", true)){
|
||||
//mobile versions don't support class mods
|
||||
if(ios){
|
||||
throw new IllegalArgumentException("Java class mods are not supported on iOS.");
|
||||
|
||||
Reference in New Issue
Block a user