Zone balancing
This commit is contained in:
@@ -37,14 +37,13 @@ public class Zones implements ContentList{
|
|||||||
conditionWave = 20;
|
conditionWave = 20;
|
||||||
launchPeriod = 10;
|
launchPeriod = 10;
|
||||||
loadout = Loadouts.advancedShard;
|
loadout = Loadouts.advancedShard;
|
||||||
zoneRequirements = ZoneRequirement.with(groundZero, 15);
|
zoneRequirements = ZoneRequirement.with(groundZero, 20);
|
||||||
blockRequirements = new Block[]{Blocks.router};
|
|
||||||
resources = new Item[]{Items.copper, Items.lead, Items.coal, Items.sand};
|
resources = new Item[]{Items.copper, Items.lead, Items.coal, Items.sand};
|
||||||
rules = () -> new Rules(){{
|
rules = () -> new Rules(){{
|
||||||
waves = true;
|
waves = true;
|
||||||
waveTimer = true;
|
waveTimer = true;
|
||||||
launchWaveMultiplier = 3f;
|
launchWaveMultiplier = 3f;
|
||||||
waveSpacing = 60 * 30f;
|
waveSpacing = 60 * 50f;
|
||||||
spawns = Array.with(
|
spawns = Array.with(
|
||||||
new SpawnGroup(UnitTypes.crawler){{
|
new SpawnGroup(UnitTypes.crawler){{
|
||||||
unitScaling = 3f;
|
unitScaling = 3f;
|
||||||
@@ -59,13 +58,19 @@ public class Zones implements ContentList{
|
|||||||
begin = 11;
|
begin = 11;
|
||||||
spacing = 3;
|
spacing = 3;
|
||||||
}},
|
}},
|
||||||
new SpawnGroup(UnitTypes.ghoul){{
|
new SpawnGroup(UnitTypes.eruptor){{
|
||||||
unitScaling = 3f;
|
unitScaling = 3f;
|
||||||
begin = 22;
|
begin = 22;
|
||||||
unitAmount = 1;
|
unitAmount = 1;
|
||||||
spacing = 3;
|
spacing = 4;
|
||||||
}},
|
}},
|
||||||
new SpawnGroup(UnitTypes.lich){{
|
new SpawnGroup(UnitTypes.titan){{
|
||||||
|
unitScaling = 3f;
|
||||||
|
begin = 37;
|
||||||
|
unitAmount = 2;
|
||||||
|
spacing = 4;
|
||||||
|
}},
|
||||||
|
new SpawnGroup(UnitTypes.fortress){{
|
||||||
unitScaling = 2f;
|
unitScaling = 2f;
|
||||||
effect = StatusEffects.boss;
|
effect = StatusEffects.boss;
|
||||||
begin = 41;
|
begin = 41;
|
||||||
@@ -139,7 +144,7 @@ public class Zones implements ContentList{
|
|||||||
startingItems = ItemStack.list(Items.copper, 400);
|
startingItems = ItemStack.list(Items.copper, 400);
|
||||||
conditionWave = 20;
|
conditionWave = 20;
|
||||||
launchPeriod = 20;
|
launchPeriod = 20;
|
||||||
zoneRequirements = ZoneRequirement.with(desertWastes, 30, craters, 15);
|
zoneRequirements = ZoneRequirement.with(desertWastes, 20, craters, 15);
|
||||||
blockRequirements = new Block[]{Blocks.graphitePress, Blocks.combustionGenerator};
|
blockRequirements = new Block[]{Blocks.graphitePress, Blocks.combustionGenerator};
|
||||||
resources = new Item[]{Items.copper, Items.scrap, Items.lead, Items.coal, Items.sand};
|
resources = new Item[]{Items.copper, Items.scrap, Items.lead, Items.coal, Items.sand};
|
||||||
rules = () -> new Rules(){{
|
rules = () -> new Rules(){{
|
||||||
@@ -157,7 +162,7 @@ public class Zones implements ContentList{
|
|||||||
zoneRequirements = new Zone[]{frozenForest};
|
zoneRequirements = new Zone[]{frozenForest};
|
||||||
blockRequirements = new Block[]{Blocks.copperWall};
|
blockRequirements = new Block[]{Blocks.copperWall};
|
||||||
rules = () -> new Rules(){{
|
rules = () -> new Rules(){{
|
||||||
waves = true;
|
waves = true;]
|
||||||
waveTimer = true;
|
waveTimer = true;
|
||||||
waveSpacing = 60 * 80;
|
waveSpacing = 60 * 80;
|
||||||
}};
|
}};
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ public class EntityGroup<T extends Entity>{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
public void intersect(float x, float y, float width, float height, Consumer<? super T> out){
|
public void intersect(float x, float y, float width, float height, Consumer<? super T> out){
|
||||||
//don't waste time for empty groups
|
//don't waste time for empty groups
|
||||||
if(isEmpty()) return;
|
if(isEmpty()) return;
|
||||||
|
|||||||
@@ -2,10 +2,12 @@ package io.anuke.mindustry.io.versions;
|
|||||||
|
|
||||||
import io.anuke.arc.collection.ObjectMap;
|
import io.anuke.arc.collection.ObjectMap;
|
||||||
import io.anuke.arc.util.Time;
|
import io.anuke.arc.util.Time;
|
||||||
import io.anuke.mindustry.game.Version;
|
import io.anuke.mindustry.game.*;
|
||||||
import io.anuke.mindustry.gen.Serialization;
|
import io.anuke.mindustry.gen.Serialization;
|
||||||
import io.anuke.mindustry.io.SaveFileVersion;
|
import io.anuke.mindustry.io.SaveFileVersion;
|
||||||
import io.anuke.mindustry.maps.Map;
|
import io.anuke.mindustry.maps.Map;
|
||||||
|
import io.anuke.mindustry.type.ContentType;
|
||||||
|
import io.anuke.mindustry.type.Zone;
|
||||||
|
|
||||||
import java.io.*;
|
import java.io.*;
|
||||||
|
|
||||||
@@ -30,6 +32,12 @@ public class Save1 extends SaveFileVersion{
|
|||||||
if(map == null) map = new Map(customMapDirectory.child(mapname), 1, 1, new ObjectMap<>(), true);
|
if(map == null) map = new Map(customMapDirectory.child(mapname), 1, 1, new ObjectMap<>(), true);
|
||||||
world.setMap(map);
|
world.setMap(map);
|
||||||
state.rules.spawns = map.getWaves();
|
state.rules.spawns = map.getWaves();
|
||||||
|
if(content.getByID(ContentType.zone, state.rules.zone) != null){
|
||||||
|
Rules rules = content.<Zone>getByID(ContentType.zone, state.rules.zone).rules.get();
|
||||||
|
if(rules.spawns != DefaultWaves.get()){
|
||||||
|
state.rules.spawns = rules.spawns;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int wave = stream.readInt();
|
int wave = stream.readInt();
|
||||||
float wavetime = stream.readFloat();
|
float wavetime = stream.readFloat();
|
||||||
|
|||||||
@@ -127,6 +127,7 @@ public class Zone extends UnlockableContent{
|
|||||||
generator.init(loadout);
|
generator.init(loadout);
|
||||||
Arrays.sort(resources);
|
Arrays.sort(resources);
|
||||||
|
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
Array<ItemStack> arr = Core.settings.getObject(name + "-starting-items", Array.class, () -> null);
|
Array<ItemStack> arr = Core.settings.getObject(name + "-starting-items", Array.class, () -> null);
|
||||||
if(arr != null){
|
if(arr != null){
|
||||||
startingItems = arr;
|
startingItems = arr;
|
||||||
|
|||||||
Reference in New Issue
Block a user