This commit is contained in:
Anuken
2020-09-26 11:59:14 -04:00
parent d4d3b71d7d
commit 0f420b625a
4 changed files with 47 additions and 32 deletions

View File

@@ -170,13 +170,13 @@ public class Weathers implements ContentList{
sandstorm = new Weather("sandstorm"){
TextureRegion region;
float size = 140f, padding = size, invDensity = 1500f, baseSpeed = 6.1f;
float force = 0.4f;
float force = 0.4f * 0;
Color color = Color.valueOf("f7cba4");
Texture noise;
{
attrs.set(Attribute.light, -0.1f);
opacityMultiplier = 0.85f;
opacityMultiplier = 0.8f;
}
@Override
@@ -251,7 +251,7 @@ public class Weathers implements ContentList{
sporestorm = new Weather("sporestorm"){
TextureRegion region;
float size = 5f, padding = size, invDensity = 2000f, baseSpeed = 4.3f, force = 0.28f;
float size = 5f, padding = size, invDensity = 2000f, baseSpeed = 4.3f, force = 0.28f * 0;
Color color = Color.valueOf("7457ce");
Texture noise;
@@ -260,6 +260,7 @@ public class Weathers implements ContentList{
attrs.set(Attribute.light, -0.15f);
status = StatusEffects.sporeSlowed;
statusGround = false;
opacityMultiplier = 0.85f;
}
@Override

View File

@@ -257,6 +257,7 @@ public class MapEditorDialog extends Dialog implements Disposable{
player.set(world.width() * tilesize/2f, world.height() * tilesize/2f);
player.clearUnit();
Groups.unit.clear();
Groups.build.clear();
logic.play();
});
}

View File

@@ -1,47 +1,49 @@
package mindustry.game;
import arc.struct.Seq;
import arc.struct.*;
import mindustry.content.*;
import mindustry.type.ItemStack;
import mindustry.type.*;
import static mindustry.content.UnitTypes.*;
public class DefaultWaves{
private Seq<SpawnGroup> spawns;
public Seq<SpawnGroup> get(){
if(spawns == null && UnitTypes.dagger != null){
if(spawns == null && dagger != null){
spawns = Seq.with(
new SpawnGroup(UnitTypes.dagger){{
new SpawnGroup(dagger){{
end = 10;
unitScaling = 2f;
}},
new SpawnGroup(UnitTypes.crawler){{
new SpawnGroup(crawler){{
begin = 4;
end = 13;
unitAmount = 2;
unitScaling = 1.5f;
}},
new SpawnGroup(UnitTypes.flare){{
new SpawnGroup(flare){{
begin = 12;
end = 16;
unitScaling = 1f;
}},
new SpawnGroup(UnitTypes.dagger){{
new SpawnGroup(dagger){{
begin = 11;
unitScaling = 1.7f;
spacing = 2;
max = 4;
}},
new SpawnGroup(UnitTypes.pulsar){{
new SpawnGroup(pulsar){{
begin = 13;
spacing = 3;
unitScaling = 0.5f;
}},
new SpawnGroup(UnitTypes.mace){{
new SpawnGroup(mace){{
begin = 7;
spacing = 3;
unitScaling = 2;
@@ -49,28 +51,28 @@ public class DefaultWaves{
end = 30;
}},
new SpawnGroup(UnitTypes.dagger){{
new SpawnGroup(dagger){{
begin = 8;
unitScaling = 1;
unitAmount = 4;
spacing = 2;
}},
new SpawnGroup(UnitTypes.mace){{
new SpawnGroup(mace){{
begin = 28;
spacing = 3;
unitScaling = 1;
end = 40;
}},
new SpawnGroup(UnitTypes.mace){{
new SpawnGroup(mace){{
begin = 45;
spacing = 3;
unitScaling = 2;
effect = StatusEffects.overdrive;
}},
new SpawnGroup(UnitTypes.mace){{
new SpawnGroup(mace){{
begin = 120;
spacing = 2;
unitScaling = 3;
@@ -78,13 +80,13 @@ public class DefaultWaves{
effect = StatusEffects.overdrive;
}},
new SpawnGroup(UnitTypes.flare){{
new SpawnGroup(flare){{
begin = 16;
unitScaling = 1;
spacing = 2;
}},
new SpawnGroup(UnitTypes.dagger){{
new SpawnGroup(dagger){{
begin = 82;
spacing = 3;
unitAmount = 4;
@@ -92,7 +94,7 @@ public class DefaultWaves{
effect = StatusEffects.overdrive;
}},
new SpawnGroup(UnitTypes.dagger){{
new SpawnGroup(dagger){{
begin = 41;
spacing = 5;
unitAmount = 1;
@@ -100,7 +102,7 @@ public class DefaultWaves{
effect = StatusEffects.shielded;
}},
new SpawnGroup(UnitTypes.fortress){{
new SpawnGroup(fortress){{
begin = 40;
spacing = 5;
unitAmount = 2;
@@ -108,7 +110,7 @@ public class DefaultWaves{
max = 20;
}},
new SpawnGroup(UnitTypes.dagger){{
new SpawnGroup(dagger){{
begin = 35;
spacing = 3;
unitAmount = 4;
@@ -117,7 +119,7 @@ public class DefaultWaves{
end = 60;
}},
new SpawnGroup(UnitTypes.dagger){{
new SpawnGroup(dagger){{
begin = 42;
spacing = 3;
unitAmount = 4;
@@ -126,14 +128,14 @@ public class DefaultWaves{
end = 130;
}},
new SpawnGroup(UnitTypes.horizon){{
new SpawnGroup(horizon){{
begin = 40;
unitAmount = 2;
spacing = 2;
unitScaling = 2;
}},
new SpawnGroup(UnitTypes.flare){{
new SpawnGroup(flare){{
begin = 50;
unitAmount = 4;
unitScaling = 3;
@@ -141,7 +143,7 @@ public class DefaultWaves{
effect = StatusEffects.overdrive;
}},
new SpawnGroup(UnitTypes.zenith){{
new SpawnGroup(zenith){{
begin = 50;
unitAmount = 2;
unitScaling = 3;
@@ -149,42 +151,42 @@ public class DefaultWaves{
max = 16;
}},
new SpawnGroup(UnitTypes.horizon){{
new SpawnGroup(horizon){{
begin = 53;
unitAmount = 2;
unitScaling = 3;
spacing = 4;
}},
new SpawnGroup(UnitTypes.atrax){{
new SpawnGroup(atrax){{
begin = 31;
unitAmount = 4;
unitScaling = 1;
spacing = 3;
}},
new SpawnGroup(UnitTypes.scepter){{
new SpawnGroup(scepter){{
begin = 41;
unitAmount = 1;
unitScaling = 1;
spacing = 30;
}},
new SpawnGroup(UnitTypes.reign){{
new SpawnGroup(reign){{
begin = 81;
unitAmount = 1;
unitScaling = 1;
spacing = 40;
}},
new SpawnGroup(UnitTypes.antumbra){{
new SpawnGroup(antumbra){{
begin = 131;
unitAmount = 1;
unitScaling = 1;
spacing = 40;
}},
new SpawnGroup(UnitTypes.horizon){{
new SpawnGroup(horizon){{
begin = 90;
unitAmount = 2;
unitScaling = 3;
@@ -194,4 +196,15 @@ public class DefaultWaves{
}
return spawns == null ? new Seq<>() : spawns;
}
private static void generate(){
UnitType[][] species = {
{dagger, mace, fortress, scepter, reign},
{nova, pulsar, quasar, vela, corvus},
{crawler, atrax, spiroct, arkyid, toxopid},
//{risso, minke, bryde, sei, omura}, //questionable choices
//{mono, poly, mega, quad, oct}, //do not attack
{flare, horizon, zenith, antumbra, eclipse}
};
}
}