Zone balancing
This commit is contained in:
@@ -37,14 +37,13 @@ public class Zones implements ContentList{
|
||||
conditionWave = 20;
|
||||
launchPeriod = 10;
|
||||
loadout = Loadouts.advancedShard;
|
||||
zoneRequirements = ZoneRequirement.with(groundZero, 15);
|
||||
blockRequirements = new Block[]{Blocks.router};
|
||||
zoneRequirements = ZoneRequirement.with(groundZero, 20);
|
||||
resources = new Item[]{Items.copper, Items.lead, Items.coal, Items.sand};
|
||||
rules = () -> new Rules(){{
|
||||
waves = true;
|
||||
waveTimer = true;
|
||||
launchWaveMultiplier = 3f;
|
||||
waveSpacing = 60 * 30f;
|
||||
waveSpacing = 60 * 50f;
|
||||
spawns = Array.with(
|
||||
new SpawnGroup(UnitTypes.crawler){{
|
||||
unitScaling = 3f;
|
||||
@@ -59,13 +58,19 @@ public class Zones implements ContentList{
|
||||
begin = 11;
|
||||
spacing = 3;
|
||||
}},
|
||||
new SpawnGroup(UnitTypes.ghoul){{
|
||||
new SpawnGroup(UnitTypes.eruptor){{
|
||||
unitScaling = 3f;
|
||||
begin = 22;
|
||||
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;
|
||||
effect = StatusEffects.boss;
|
||||
begin = 41;
|
||||
@@ -139,7 +144,7 @@ public class Zones implements ContentList{
|
||||
startingItems = ItemStack.list(Items.copper, 400);
|
||||
conditionWave = 20;
|
||||
launchPeriod = 20;
|
||||
zoneRequirements = ZoneRequirement.with(desertWastes, 30, craters, 15);
|
||||
zoneRequirements = ZoneRequirement.with(desertWastes, 20, craters, 15);
|
||||
blockRequirements = new Block[]{Blocks.graphitePress, Blocks.combustionGenerator};
|
||||
resources = new Item[]{Items.copper, Items.scrap, Items.lead, Items.coal, Items.sand};
|
||||
rules = () -> new Rules(){{
|
||||
@@ -157,7 +162,7 @@ public class Zones implements ContentList{
|
||||
zoneRequirements = new Zone[]{frozenForest};
|
||||
blockRequirements = new Block[]{Blocks.copperWall};
|
||||
rules = () -> new Rules(){{
|
||||
waves = true;
|
||||
waves = true;]
|
||||
waveTimer = true;
|
||||
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){
|
||||
//don't waste time for empty groups
|
||||
if(isEmpty()) return;
|
||||
|
||||
@@ -2,10 +2,12 @@ package io.anuke.mindustry.io.versions;
|
||||
|
||||
import io.anuke.arc.collection.ObjectMap;
|
||||
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.io.SaveFileVersion;
|
||||
import io.anuke.mindustry.maps.Map;
|
||||
import io.anuke.mindustry.type.ContentType;
|
||||
import io.anuke.mindustry.type.Zone;
|
||||
|
||||
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);
|
||||
world.setMap(map);
|
||||
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();
|
||||
float wavetime = stream.readFloat();
|
||||
|
||||
@@ -127,6 +127,7 @@ public class Zone extends UnlockableContent{
|
||||
generator.init(loadout);
|
||||
Arrays.sort(resources);
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
Array<ItemStack> arr = Core.settings.getObject(name + "-starting-items", Array.class, () -> null);
|
||||
if(arr != null){
|
||||
startingItems = arr;
|
||||
|
||||
Reference in New Issue
Block a user