From 5af35b67717c1649184a2400292084ae2032d2f4 Mon Sep 17 00:00:00 2001 From: Anuken Date: Tue, 29 Jan 2019 14:33:41 -0500 Subject: [PATCH] Zone balancing --- .../io/anuke/mindustry/content/Blocks.java | 2 +- .../src/io/anuke/mindustry/content/Zones.java | 49 +++++++++++++++++-- .../mindustry/ui/dialogs/TechTreeDialog.java | 3 +- 3 files changed, 48 insertions(+), 6 deletions(-) diff --git a/core/src/io/anuke/mindustry/content/Blocks.java b/core/src/io/anuke/mindustry/content/Blocks.java index ddd78020ba..80eebf3d49 100644 --- a/core/src/io/anuke/mindustry/content/Blocks.java +++ b/core/src/io/anuke/mindustry/content/Blocks.java @@ -853,7 +853,7 @@ public class Blocks implements ContentList{ alwaysUnlocked = true; health = 1100; - itemCapacity = 1000; + itemCapacity = 2000; }}; vault = new Vault("vault"){{ diff --git a/core/src/io/anuke/mindustry/content/Zones.java b/core/src/io/anuke/mindustry/content/Zones.java index 3b9325a98a..3bd06d8876 100644 --- a/core/src/io/anuke/mindustry/content/Zones.java +++ b/core/src/io/anuke/mindustry/content/Zones.java @@ -110,18 +110,59 @@ public class Zones implements ContentList{ frozenForest = new Zone("frozenForest", new MapGenerator("frozenForest", 2) .decor(new Decoration(Blocks.snow, Blocks.sporeCluster, 0.02))){{ alwaysUnlocked = true; - deployCost = ItemStack.with(Items.copper, 300); - startingItems = ItemStack.with(Items.copper, 200); + deployCost = ItemStack.with(Items.copper, 500); + startingItems = ItemStack.with(Items.copper, 400); conditionWave = 15; zoneRequirements = new Zone[]{craters}; - blockRequirements = new Block[]{Blocks.copperWall}; + itemRequirements = ItemStack.with(Items.copper, 4000, Items.lead, 2000); rules = () -> new Rules(){{ waves = true; waveTimer = true; - waveSpacing = 60 * 60 * 2; + waveSpacing = 60 * 60; spawns = Array.with( + new SpawnGroup(UnitTypes.titan){{ + unitScaling = 3; + end = 9; + }}, + new SpawnGroup(UnitTypes.dagger){{ unitScaling = 2; + begin = 2; + end = 9; + }}, + + new SpawnGroup(UnitTypes.dagger){{ + unitScaling = 2; + begin = 5; + end = 9; + }}, + + new SpawnGroup(UnitTypes.crawler){{ + unitScaling = 0.5f; + begin = 10; + spacing = 10; + unitAmount = 5; + }}, + + new SpawnGroup(UnitTypes.titan){{ + begin = 11; + unitAmount = 2; + unitScaling = 2; + spacing = 2; + }}, + + new SpawnGroup(UnitTypes.dagger){{ + begin = 12; + unitAmount = 2; + unitScaling = 2; + spacing = 2; + }}, + + new SpawnGroup(UnitTypes.crawler){{ + unitScaling = 0.5f; + begin = 35; + spacing = 10; + unitAmount = 6; }} ); }}; diff --git a/core/src/io/anuke/mindustry/ui/dialogs/TechTreeDialog.java b/core/src/io/anuke/mindustry/ui/dialogs/TechTreeDialog.java index 1640cb8ede..4d9b35a832 100644 --- a/core/src/io/anuke/mindustry/ui/dialogs/TechTreeDialog.java +++ b/core/src/io/anuke/mindustry/ui/dialogs/TechTreeDialog.java @@ -157,7 +157,8 @@ public class TechTreeDialog extends FloatingDialog{ button.tapped(() -> moved = false); button.setSize(nodeSize, nodeSize); button.update(() -> { - button.setPosition(node.x + panX + width/2f, node.y + panY + height/2f, Align.center); + float offset = (Core.graphics.getHeight() % 2) / 2f; + button.setPosition(node.x + panX + width/2f, node.y + panY + height/2f + offset, Align.center); button.getStyle().up = Core.scene.skin.getDrawable(!locked(node.node) ? "content-background" : "content-background-locked"); ((TextureRegionDrawable)button.getStyle().imageUp) .setRegion(node.visible ? node.node.block.icon(Icon.medium) : Core.atlas.find("icon-tree-locked"));