From f00d1f95055884e7ec199a888646a22bd07879f5 Mon Sep 17 00:00:00 2001 From: Anuken Date: Fri, 1 Feb 2019 13:14:42 -0500 Subject: [PATCH] Added missing tech tree blocks / Zone improvements --- core/assets/bundles/bundle.properties | 1 + .../io/anuke/mindustry/content/Blocks.java | 3 +- .../io/anuke/mindustry/content/TechTree.java | 37 ++++++---- .../io/anuke/mindustry/content/UnitTypes.java | 17 ++++- .../io/anuke/mindustry/content/Weapons.java | 10 ++- .../src/io/anuke/mindustry/content/Zones.java | 74 ++++++++++++++++--- .../entities/units/types/Eruptor.java | 6 ++ 7 files changed, 121 insertions(+), 27 deletions(-) create mode 100644 core/src/io/anuke/mindustry/entities/units/types/Eruptor.java diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index 926b341d47..8d534ce4fe 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -671,6 +671,7 @@ unit.fortress.name = Fortress unit.fortress.description = A heavy artillery ground unit. unit.revenant.name = Revenant unit.revenant.description = A heavy laser platform. +unit.eruptor.name = Eruptor tutorial.begin = Your mission here is to eradicate the[LIGHT_GRAY] enemy[].\n\nBegin by[accent] mining copper[]. Tap a copper ore vein near your core to do this. tutorial.drill = Mining manually is inefficient.\n[accent]Drills []can mine automatically.\nPlace one on a copper vein. tutorial.conveyor = [accent]Conveyors[] are used to transport items to the core.\nMake a line of conveyors from the drill to the core. diff --git a/core/src/io/anuke/mindustry/content/Blocks.java b/core/src/io/anuke/mindustry/content/Blocks.java index 4affbd5587..c86ea28de3 100644 --- a/core/src/io/anuke/mindustry/content/Blocks.java +++ b/core/src/io/anuke/mindustry/content/Blocks.java @@ -319,6 +319,7 @@ public class Blocks implements ContentList{ size = 2; hasItems = true; hasLiquids = true; + hasPower = true; consumes.power(2f); consumes.item(Items.coal, 2); @@ -344,7 +345,7 @@ public class Blocks implements ContentList{ output = Items.metaglass; craftTime = 30f; size = 2; - hasLiquids = false; + hasPower = hasItems = true; flameColor = Color.valueOf("ffc099"); consumes.items(new ItemStack(Items.lead, 1), new ItemStack(Items.sand, 1)); diff --git a/core/src/io/anuke/mindustry/content/TechTree.java b/core/src/io/anuke/mindustry/content/TechTree.java index c2f216090c..cdb67459f4 100644 --- a/core/src/io/anuke/mindustry/content/TechTree.java +++ b/core/src/io/anuke/mindustry/content/TechTree.java @@ -31,11 +31,12 @@ public class TechTree implements ContentList{ }); }); - }); - node(titaniumConveyor, () -> { - node(phaseConveyor, () -> { - node(massDriver, () -> { + node(titaniumConveyor, () -> { + node(phaseConveyor, () -> { + node(massDriver, () -> { + + }); }); }); }); @@ -127,6 +128,10 @@ public class TechTree implements ContentList{ node(siliconSmelter, () -> { node(biomatterCompressor, () -> { + node(multiPress, () -> { + + }); + node(plastaniumCompressor, () -> { node(phaseWeaver, () -> { @@ -134,20 +139,22 @@ public class TechTree implements ContentList{ }); }); - node(incinerator, () -> { - node(melter, () -> { - node(surgeSmelter, () -> { - - }); - - node(separator, () -> { - node(pulverizer, () -> { + node(kiln, () -> { + node(incinerator, () -> { + node(melter, () -> { + node(surgeSmelter, () -> { }); - }); - node(cryofluidMixer, () -> { + node(separator, () -> { + node(pulverizer, () -> { + }); + }); + + node(cryofluidMixer, () -> { + + }); }); }); }); @@ -185,7 +192,9 @@ public class TechTree implements ContentList{ node(powerNodeLarge, () -> { node(battery, () -> { node(batteryLarge, () -> { + node(surgeTower, () -> { + }); }); }); diff --git a/core/src/io/anuke/mindustry/content/UnitTypes.java b/core/src/io/anuke/mindustry/content/UnitTypes.java index 680f94f46e..71987ca3d4 100644 --- a/core/src/io/anuke/mindustry/content/UnitTypes.java +++ b/core/src/io/anuke/mindustry/content/UnitTypes.java @@ -9,7 +9,7 @@ public class UnitTypes implements ContentList{ public static UnitType spirit, phantom, wraith, ghoul, revenant, - dagger, crawler, titan, fortress; + dagger, crawler, titan, fortress, eruptor; @Override public void load(){ @@ -55,7 +55,7 @@ public class UnitTypes implements ContentList{ }}; fortress = new UnitType("fortress", Fortress.class, Fortress::new){{ - maxVelocity = 0.8f; + maxVelocity = 0.78f; speed = 0.15f; drag = 0.4f; mass = 5f; @@ -67,6 +67,19 @@ public class UnitTypes implements ContentList{ health = 800; }}; + eruptor = new UnitType("eruptor", Eruptor.class, Eruptor::new){{ + maxVelocity = 0.81f; + speed = 0.17f; + drag = 0.4f; + mass = 5f; + hitsize = 9f; + rotatespeed = 0.07f; + weaponOffsetX = 1; + targetAir = false; + weapon = Weapons.eruption; + health = 600; + }}; + wraith = new UnitType("wraith", Wraith.class, Wraith::new){{ speed = 0.3f; maxVelocity = 1.9f; diff --git a/core/src/io/anuke/mindustry/content/Weapons.java b/core/src/io/anuke/mindustry/content/Weapons.java index 53587abff8..2c1949b3fc 100644 --- a/core/src/io/anuke/mindustry/content/Weapons.java +++ b/core/src/io/anuke/mindustry/content/Weapons.java @@ -5,10 +5,18 @@ import io.anuke.mindustry.type.Weapon; public class Weapons implements ContentList{ public static Weapon blaster, blasterSmall, glaiveBlaster, droneBlaster, healBlaster, healBlasterDrone, chainBlaster, shockgun, - swarmer, bomber, bomberTrident, flakgun, flamethrower, missiles, artillery, laserBurster, healBlasterDrone2, suicideBomb; + swarmer, bomber, bomberTrident, flakgun, flamethrower, missiles, artillery, laserBurster, healBlasterDrone2, suicideBomb, + eruption; @Override public void load(){ + eruption = new Weapon("eruption"){{ + length = 1.5f; + reload = 14f; + roundrobin = true; + ejectEffect = Fx.none; + ammo = Bullets.slagShot; + }}; blaster = new Weapon("blaster"){{ length = 1.5f; diff --git a/core/src/io/anuke/mindustry/content/Zones.java b/core/src/io/anuke/mindustry/content/Zones.java index b1b23e32b1..b740e76001 100644 --- a/core/src/io/anuke/mindustry/content/Zones.java +++ b/core/src/io/anuke/mindustry/content/Zones.java @@ -317,26 +317,81 @@ public class Zones implements ContentList{ .decor( new Decoration(Blocks.snow, Blocks.sporeCluster, 0.01), new Decoration(Blocks.metalFloor, Blocks.metalFloorDamaged, 0.02)) - ){{ //TODO implement - deployCost = ItemStack.with(Items.copper, 4000); - startingItems = ItemStack.with(Items.copper, 200); - conditionWave = 15; + ){{ + deployCost = ItemStack.with(Items.copper, 2500, Items.lead, 1000, Items.silicon, 300); + startingItems = ItemStack.with(Items.copper, 2000, Items.lead, 500, Items.silicon, 200); + itemRequirements = ItemStack.with(Items.silicon, 8000, Items.titanium, 6000, Items.graphite, 4000); + conditionWave = 20; zoneRequirements = new Zone[]{stainedMountains}; - blockRequirements = new Block[]{Blocks.launchPad}; + blockRequirements = new Block[]{Blocks.launchPad, Blocks.unloader, Blocks.container}; rules = () -> new Rules(){{ waves = true; waveTimer = true; - waveSpacing = 60 * 80; + waveSpacing = 60 * 60; + + spawns = Array.with( + new SpawnGroup(UnitTypes.titan){{ + unitScaling = 2; + spacing = 2; + end = 10; + }}, + + new SpawnGroup(UnitTypes.dagger){{ + begin = 2; + unitScaling = 1; + spacing = 2; + }}, + + new SpawnGroup(UnitTypes.dagger){{ + begin = 10; + spacing = 2; + unitScaling = 2; + unitAmount = 2; + }}, + + new SpawnGroup(UnitTypes.ghoul){{ + begin = 5; + unitScaling = 0.5f; + unitAmount = 1; + spacing = 5; + }}, + + new SpawnGroup(UnitTypes.wraith){{ + begin = 10; + unitScaling = 1f; + unitAmount = 1; + spacing = 5; + }}, + + new SpawnGroup(UnitTypes.dagger){{ + begin = 2; + unitScaling = 1; + spacing = 2; + }}, + + new SpawnGroup(UnitTypes.wraith){{ + begin = 23; + unitScaling = 1f; + unitAmount = 1; + spacing = 2; + }}, + + new SpawnGroup(UnitTypes.crawler){{ + begin = 20; + unitScaling = 1; + spacing = 10; + unitScaling = 0.5f; + unitAmount = 10; + }} + ); }}; }}; - /* - desolateRift = new Zone("desolateRift", new MapGenerator("groundZero", 1)){{ //TODO implement deployCost = ItemStack.with(Items.copper, 300); startingItems = ItemStack.with(Items.copper, 200); conditionWave = 15; - zoneRequirements = new Zone[]{frozenForest}; + zoneRequirements = new Zone[]{stainedMountains}; blockRequirements = new Block[]{Blocks.copperWall}; rules = () -> new Rules(){{ waves = true; @@ -345,6 +400,7 @@ public class Zones implements ContentList{ }}; }}; + /* arcticDesert = new Zone("arcticDesert", new MapGenerator("groundZero", 1)){{ //TODO implement deployCost = ItemStack.with(Items.copper, 300); startingItems = ItemStack.with(Items.copper, 200); diff --git a/core/src/io/anuke/mindustry/entities/units/types/Eruptor.java b/core/src/io/anuke/mindustry/entities/units/types/Eruptor.java new file mode 100644 index 0000000000..e7daaf1273 --- /dev/null +++ b/core/src/io/anuke/mindustry/entities/units/types/Eruptor.java @@ -0,0 +1,6 @@ +package io.anuke.mindustry.entities.units.types; + +import io.anuke.mindustry.entities.units.GroundUnit; + +public class Eruptor extends GroundUnit{ +}