Unfinished generation tool

This commit is contained in:
Anuken
2019-03-15 00:13:54 -04:00
parent 43bcf0cf3b
commit 7d1a8f5404
28 changed files with 575 additions and 156 deletions
+130 -131
View File
@@ -9,159 +9,158 @@ import io.anuke.mindustry.type.ItemStack;
public class DefaultWaves{
private static Array<SpawnGroup> spawns;
public static Array<SpawnGroup> getDefaultSpawns(){
public static Array<SpawnGroup> get(){
if(spawns == null && UnitTypes.dagger != null){
spawns = Array.with(
new SpawnGroup(UnitTypes.dagger){{
end = 8;
unitScaling = 2;
}},
new SpawnGroup(UnitTypes.dagger){{
end = 8;
unitScaling = 2;
}},
new SpawnGroup(UnitTypes.wraith){{
begin = 12;
end = 14;
unitScaling = 2;
}},
new SpawnGroup(UnitTypes.wraith){{
begin = 12;
end = 14;
unitScaling = 2;
}},
new SpawnGroup(UnitTypes.dagger){{
begin = 11;
unitScaling = 2;
spacing = 2;
max = 4;
}},
new SpawnGroup(UnitTypes.dagger){{
begin = 11;
unitScaling = 2;
spacing = 2;
max = 4;
}},
new SpawnGroup(UnitTypes.titan){{
begin = 9;
spacing = 3;
unitScaling = 2;
new SpawnGroup(UnitTypes.titan){{
begin = 9;
spacing = 3;
unitScaling = 2;
end = 30;
}},
end = 30;
}},
new SpawnGroup(UnitTypes.dagger){{
begin = 10;
unitScaling = 2;
unitAmount = 1;
spacing = 2;
end = 30;
}},
new SpawnGroup(UnitTypes.dagger){{
begin = 8;
unitScaling = 1;
unitAmount = 1;
spacing = 2;
end = 30;
}},
new SpawnGroup(UnitTypes.titan){{
begin = 28;
spacing = 3;
unitScaling = 1;
end = 40;
}},
new SpawnGroup(UnitTypes.titan){{
begin = 28;
spacing = 3;
unitScaling = 1;
end = 40;
}},
new SpawnGroup(UnitTypes.titan){{
begin = 45;
spacing = 3;
unitScaling = 2;
effect = StatusEffects.overdrive;
}},
new SpawnGroup(UnitTypes.titan){{
begin = 45;
spacing = 3;
unitScaling = 2;
effect = StatusEffects.overdrive;
}},
new SpawnGroup(UnitTypes.titan){{
begin = 120;
spacing = 2;
unitScaling = 3;
unitAmount = 5;
effect = StatusEffects.overdrive;
}},
new SpawnGroup(UnitTypes.titan){{
begin = 120;
spacing = 2;
unitScaling = 3;
unitAmount = 5;
effect = StatusEffects.overdrive;
}},
new SpawnGroup(UnitTypes.wraith){{
begin = 16;
unitScaling = 2;
spacing = 2;
new SpawnGroup(UnitTypes.wraith){{
begin = 16;
unitScaling = 1;
spacing = 2;
end = 39;
max = 7;
}},
max = 7;
}},
new SpawnGroup(UnitTypes.dagger){{
begin = 82;
spacing = 3;
unitAmount = 4;
unitScaling = 3;
effect = StatusEffects.overdrive;
}},
new SpawnGroup(UnitTypes.dagger){{
begin = 82;
spacing = 3;
unitAmount = 4;
unitScaling = 3;
effect = StatusEffects.overdrive;
}},
new SpawnGroup(UnitTypes.dagger){{
begin = 41;
spacing = 5;
unitAmount = 1;
unitScaling = 3;
effect = StatusEffects.shielded;
max = 10;
}},
new SpawnGroup(UnitTypes.dagger){{
begin = 41;
spacing = 5;
unitAmount = 1;
unitScaling = 3;
effect = StatusEffects.shielded;
max = 10;
}},
new SpawnGroup(UnitTypes.fortress){{
begin = 40;
spacing = 5;
unitAmount = 2;
unitScaling = 3;
max = 10;
}},
new SpawnGroup(UnitTypes.fortress){{
begin = 40;
spacing = 5;
unitAmount = 2;
unitScaling = 3;
max = 10;
}},
new SpawnGroup(UnitTypes.dagger){{
begin = 35;
spacing = 3;
unitAmount = 4;
effect = StatusEffects.overdrive;
items = new ItemStack(Items.blastCompound, 60);
end = 60;
}},
new SpawnGroup(UnitTypes.dagger){{
begin = 35;
spacing = 3;
unitAmount = 4;
effect = StatusEffects.overdrive;
items = new ItemStack(Items.blastCompound, 60);
end = 60;
}},
new SpawnGroup(UnitTypes.dagger){{
begin = 42;
spacing = 3;
unitAmount = 4;
effect = StatusEffects.overdrive;
items = new ItemStack(Items.pyratite, 100);
end = 130;
}},
new SpawnGroup(UnitTypes.dagger){{
begin = 42;
spacing = 3;
unitAmount = 4;
effect = StatusEffects.overdrive;
items = new ItemStack(Items.pyratite, 100);
end = 130;
}},
new SpawnGroup(UnitTypes.ghoul){{
begin = 40;
unitAmount = 2;
spacing = 2;
unitScaling = 3;
max = 8;
}},
new SpawnGroup(UnitTypes.ghoul){{
begin = 40;
unitAmount = 2;
spacing = 2;
unitScaling = 3;
max = 8;
}},
new SpawnGroup(UnitTypes.wraith){{
begin = 50;
unitAmount = 4;
unitScaling = 3;
spacing = 5;
effect = StatusEffects.overdrive;
max = 8;
}},
new SpawnGroup(UnitTypes.wraith){{
begin = 50;
unitAmount = 4;
unitScaling = 3;
spacing = 5;
effect = StatusEffects.overdrive;
max = 8;
}},
new SpawnGroup(UnitTypes.revenant){{
begin = 50;
unitAmount = 2;
unitScaling = 3;
spacing = 5;
max = 8;
}},
new SpawnGroup(UnitTypes.revenant){{
begin = 50;
unitAmount = 2;
unitScaling = 3;
spacing = 5;
max = 8;
}},
new SpawnGroup(UnitTypes.ghoul){{
begin = 53;
unitAmount = 2;
unitScaling = 3;
spacing = 4;
max = 8;
end = 74;
}},
new SpawnGroup(UnitTypes.ghoul){{
begin = 53;
unitAmount = 2;
unitScaling = 3;
spacing = 4;
max = 8;
end = 74;
}},
new SpawnGroup(UnitTypes.ghoul){{
begin = 53;
unitAmount = 2;
unitScaling = 3;
spacing = 4;
max = 8;
end = 74;
}}
new SpawnGroup(UnitTypes.ghoul){{
begin = 53;
unitAmount = 2;
unitScaling = 3;
spacing = 4;
max = 8;
end = 74;
}}
);
}
return spawns == null ? new Array<>() : spawns;
@@ -9,13 +9,13 @@ public enum RulePreset{
waveTimer = true;
waves = true;
unitDrops = true;
spawns = DefaultWaves.getDefaultSpawns();
spawns = DefaultWaves.get();
}}),
sandbox(() -> new Rules(){{
infiniteResources = true;
waves = true;
waveTimer = false;
spawns = DefaultWaves.getDefaultSpawns();
spawns = DefaultWaves.get();
}}),
attack(() -> new Rules(){{
enemyCheat = true;
+1 -1
View File
@@ -28,5 +28,5 @@ public class Rules{
/**Zone ID, -1 for invalid zone.*/
public byte zone = -1;
/**Spawn layout. Since only zones modify this, it should be assigned on save load.*/
public transient Array<SpawnGroup> spawns = DefaultWaves.getDefaultSpawns();
public transient Array<SpawnGroup> spawns = DefaultWaves.get();
}