From 4fbeae1afce2745a1034781afdba4e35193af2e8 Mon Sep 17 00:00:00 2001 From: Anuken Date: Sat, 25 Dec 2021 22:17:18 -0500 Subject: [PATCH] Erekir tech sector requirements --- core/assets/bundles/bundle.properties | 1 + core/src/mindustry/ai/types/FlyingAI.java | 2 +- core/src/mindustry/content/Blocks.java | 4 ++-- core/src/mindustry/content/Bullets.java | 10 ++++----- .../src/mindustry/content/ErekirTechTree.java | 22 ++++++++++--------- core/src/mindustry/game/Objectives.java | 20 +++++++++++++++++ .../world/blocks/payloads/PayloadBlock.java | 2 +- .../blocks/payloads/PayloadConveyor.java | 2 +- 8 files changed, 43 insertions(+), 20 deletions(-) diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index 14f39467fa..10d72f7b64 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -552,6 +552,7 @@ requirement.core = Destroy Enemy Core in {0} requirement.research = Research {0} requirement.produce = Produce {0} requirement.capture = Capture {0} +requirement.onplanet = Control Sector On {0} launch.text = Launch research.multiplayer = Only the host can research items. map.multiplayer = Only the host can view sectors. diff --git a/core/src/mindustry/ai/types/FlyingAI.java b/core/src/mindustry/ai/types/FlyingAI.java index 225ace963d..01065aa7fb 100644 --- a/core/src/mindustry/ai/types/FlyingAI.java +++ b/core/src/mindustry/ai/types/FlyingAI.java @@ -23,7 +23,7 @@ public class FlyingAI extends AIController{ } if(target == null && command() == UnitCommand.attack && state.rules.waves && unit.team == state.rules.defaultTeam){ - moveTo(getClosestSpawner(), state.rules.dropZoneRadius + 120f); + moveTo(getClosestSpawner(), state.rules.dropZoneRadius + 130f); } if(command() == UnitCommand.rally){ diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 70bbc4711a..791d49efd1 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -2377,7 +2377,7 @@ public class Blocks{ coreCitadel = new CoreBlock("core-citadel"){{ //TODO cost - requirements(Category.effect, with(Items.beryllium, 7000, Items.graphite, 7000, Items.tungsten, 5000, Items.carbide, 5000)); + requirements(Category.effect, with(Items.silicon, 5000, Items.beryllium, 7000, Items.tungsten, 5000, Items.carbide, 5000)); unitType = UnitTypes.incite; health = 18000; @@ -2391,7 +2391,7 @@ public class Blocks{ coreAcropolis = new CoreBlock("core-acropolis"){{ //TODO cost - requirements(Category.effect, with(Items.beryllium, 11000, Items.graphite, 11000, Items.tungsten, 9000, Items.carbide, 10000)); + requirements(Category.effect, with(Items.beryllium, 11000, Items.silicon, 11000, Items.tungsten, 9000, Items.carbide, 10000, Items.oxide, 8000)); unitType = UnitTypes.emanate; health = 30000; diff --git a/core/src/mindustry/content/Bullets.java b/core/src/mindustry/content/Bullets.java index cdef552d1a..e21d7e3f10 100644 --- a/core/src/mindustry/content/Bullets.java +++ b/core/src/mindustry/content/Bullets.java @@ -103,7 +103,7 @@ public class Bullets{ width = height = 13f; collidesTiles = false; splashDamageRadius = 25f * 0.75f; - splashDamage = 35f; + splashDamage = 40f; status = StatusEffects.burning; statusDuration = 60f * 12f; frontColor = Pal.lightishOrange; @@ -268,7 +268,7 @@ public class Bullets{ shrinkY = 0f; homingPower = 0.08f; splashDamageRadius = 20f; - splashDamage = 20f * 1.5f; + splashDamage = 30f * 1.5f; makeFire = true; ammoMultiplier = 5f; hitEffect = Fx.blastExplosion; @@ -334,7 +334,7 @@ public class Bullets{ ammoMultiplier = 5; - splashDamage = 10f; + splashDamage = 12f; splashDamageRadius = 22f; makeFire = true; @@ -375,8 +375,8 @@ public class Bullets{ pierceBuilding = true; knockback = 0.6f; ammoMultiplier = 3; - splashDamage = 15f; - splashDamageRadius = 24f; + splashDamage = 20f; + splashDamageRadius = 25f; }}; fireball = new FireBulletType(1f, 4); diff --git a/core/src/mindustry/content/ErekirTechTree.java b/core/src/mindustry/content/ErekirTechTree.java index 762a73317e..34a2d33cdf 100644 --- a/core/src/mindustry/content/ErekirTechTree.java +++ b/core/src/mindustry/content/ErekirTechTree.java @@ -1,11 +1,16 @@ package mindustry.content; +import arc.struct.*; +import mindustry.game.Objectives.*; + import static mindustry.content.Blocks.*; import static mindustry.content.TechTree.*; public class ErekirTechTree{ public static void load(){ + Seq erekirSector = Seq.with(new OnPlanet(Planets.erekir)); + Planets.erekir.techTree = nodeRoot("erekir", coreBastion, true, () -> { node(duct, () -> { node(ductRouter, () -> { @@ -34,7 +39,7 @@ public class ErekirTechTree{ }); }); - node(constructor, () -> { + node(constructor, erekirSector, () -> { node(payloadLoader, () -> { node(payloadUnloader, () -> { node(payloadPropulsionTower, () -> { @@ -57,7 +62,7 @@ public class ErekirTechTree{ node(turbineCondenser, () -> { node(beamNode, () -> { - node(ventCondenser, () -> { + node(ventCondenser, erekirSector, () -> { node(chemicalCombustionChamber, () -> { node(pyrolysisGenerator, () -> { @@ -81,7 +86,7 @@ public class ErekirTechTree{ node(siliconArcFurnace, () -> { node(cliffCrusher, () -> { - node(electrolyzer, () -> { + node(electrolyzer, erekirSector, () -> { node(oxidationChamber, () -> { node(electricHeater, () -> { node(heatRedirector, () -> { @@ -123,16 +128,14 @@ public class ErekirTechTree{ //TODO move into turbine condenser? node(plasmaBore, () -> { - node(largePlasmaBore, () -> { - - }); - - node(impactDrill, () -> { + node(impactDrill, erekirSector, () -> { + node(largePlasmaBore, () -> { + }); }); }); - node(reinforcedConduit, () -> { + node(reinforcedConduit, erekirSector, () -> { node(reinforcedPump, () -> { //TODO T2 pump }); @@ -174,7 +177,6 @@ public class ErekirTechTree{ }); }); - //TODO requirements for these node(coreCitadel, () -> { node(coreAcropolis, () -> { diff --git a/core/src/mindustry/game/Objectives.java b/core/src/mindustry/game/Objectives.java index 31fc92e1b3..af86520fd2 100644 --- a/core/src/mindustry/game/Objectives.java +++ b/core/src/mindustry/game/Objectives.java @@ -68,6 +68,26 @@ public class Objectives{ } } + public static class OnPlanet implements Objective{ + public Planet planet; + + public OnPlanet(Planet planet){ + this.planet = planet; + } + + protected OnPlanet(){} + + @Override + public boolean complete(){ + return planet.sectors.contains(Sector::hasBase); + } + + @Override + public String display(){ + return Core.bundle.format("requirement.onplanet", planet.localizedName); + } + } + /** Defines a specific objective for a game. */ public interface Objective{ diff --git a/core/src/mindustry/world/blocks/payloads/PayloadBlock.java b/core/src/mindustry/world/blocks/payloads/PayloadBlock.java index e52c4b96a4..f1e1869061 100644 --- a/core/src/mindustry/world/blocks/payloads/PayloadBlock.java +++ b/core/src/mindustry/world/blocks/payloads/PayloadBlock.java @@ -26,7 +26,7 @@ public class PayloadBlock extends Block{ update = true; sync = true; group = BlockGroup.payloads; - envEnabled |= Env.space; + envEnabled |= Env.space | Env.underwater; } public static boolean blends(Building build, int direction){ diff --git a/core/src/mindustry/world/blocks/payloads/PayloadConveyor.java b/core/src/mindustry/world/blocks/payloads/PayloadConveyor.java index 99df295cca..1e682f2824 100644 --- a/core/src/mindustry/world/blocks/payloads/PayloadConveyor.java +++ b/core/src/mindustry/world/blocks/payloads/PayloadConveyor.java @@ -29,7 +29,7 @@ public class PayloadConveyor extends Block{ update = true; outputsPayload = true; noUpdateDisabled = true; - envEnabled |= Env.space; + envEnabled |= Env.space | Env.underwater; sync = true; }