From 8168d8a3be9065fd9c29fbe6aebbe4c0966eafd6 Mon Sep 17 00:00:00 2001 From: Anuken Date: Thu, 2 Dec 2021 18:33:33 -0500 Subject: [PATCH] Testing waves --- core/src/mindustry/content/Blocks.java | 4 ++-- core/src/mindustry/content/UnitTypes.java | 10 ++++------ core/src/mindustry/core/Logic.java | 1 + .../maps/planet/ErekirPlanetGenerator.java | 15 +++++++++++++-- 4 files changed, 20 insertions(+), 10 deletions(-) diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index 4abbc8cfe3..56c687acf4 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -2770,7 +2770,7 @@ public class Blocks{ breach = new ItemTurret("breach"){{ requirements(Category.turret, with(Items.beryllium, 35, Items.silicon, 20), true); ammo( - Items.beryllium, new BasicBulletType(7f, 30){{ + Items.beryllium, new BasicBulletType(7f, 32){{ width = 8f; height = 14f; shootEffect = Fx.berylSpark; @@ -2795,7 +2795,7 @@ public class Blocks{ outlineColor = Pal.darkOutline; size = 2; envEnabled |= Env.space; - reloadTime = 40f; + reloadTime = 35f; restitution = 0.03f; range = 180; shootCone = 3f; diff --git a/core/src/mindustry/content/UnitTypes.java b/core/src/mindustry/content/UnitTypes.java index 8f5656e23e..416c75da1c 100644 --- a/core/src/mindustry/content/UnitTypes.java +++ b/core/src/mindustry/content/UnitTypes.java @@ -2531,8 +2531,9 @@ public class UnitTypes{ }}; emanate = new UnitType("emanate"){{ - defaultController = BuilderAI::new; - isCounted = false; + //TODO not a real enemy, should not be counted or have flying AI + defaultController = FlyingAI::new; + //isCounted = false; envDisabled = 0; outlineColor = Pal.darkOutline; @@ -2547,7 +2548,7 @@ public class UnitTypes{ rotateSpeed = 3f; accel = 0.11f; itemCapacity = 140; - health = 1500f; + health = 1300f; armor = 3f; hitSize = 36f; commandLimit = 9; @@ -2600,9 +2601,6 @@ public class UnitTypes{ }}; - - //TODO emanate (+ better names) - //endregion //region internal + special diff --git a/core/src/mindustry/core/Logic.java b/core/src/mindustry/core/Logic.java index 3d589573ed..8fb03afe27 100644 --- a/core/src/mindustry/core/Logic.java +++ b/core/src/mindustry/core/Logic.java @@ -101,6 +101,7 @@ public class Logic implements ApplicationListener{ if(state.isCampaign()){ //enable building AI on campaign unless the preset disables it + //TODO should be configurable, I don't want building AI everywhere. if(!(state.getSector().preset != null && !state.getSector().preset.useAI)){ state.rules.waveTeam.rules().ai = true; } diff --git a/core/src/mindustry/maps/planet/ErekirPlanetGenerator.java b/core/src/mindustry/maps/planet/ErekirPlanetGenerator.java index c04b8333fb..8ef53b7eb5 100644 --- a/core/src/mindustry/maps/planet/ErekirPlanetGenerator.java +++ b/core/src/mindustry/maps/planet/ErekirPlanetGenerator.java @@ -184,9 +184,9 @@ public class ErekirPlanetGenerator extends PlanetGenerator{ if(block != Blocks.air){ //TODO use d4 instead of d8 for no out-of-reach ores? if(nearAir(x, y)){ - if(noise(x + 78, y, 4, 0.7f, 35f, 1f) > 0.6f && block == Blocks.carbonWall){ + if(block == Blocks.carbonWall && noise(x + 78, y, 4, 0.7f, 33f, 1f) > 0.59f){ block = Blocks.graphiticWall; - }else if(noise(x + 782, y, 4, 0.8f, 38f, 1f) > 0.68f && block != Blocks.carbonWall){ + }else if(block != Blocks.carbonWall && noise(x + 782, y, 4, 0.8f, 37f, 1f) > 0.68f){ ore = Blocks.wallOreBeryl; } } @@ -242,5 +242,16 @@ public class ErekirPlanetGenerator extends PlanetGenerator{ //TODO this is only for testing state.rules.defaultTeam.items().add(Seq.with(ItemStack.with(Items.beryllium, 200, Items.graphite, 200))); + + //TODO proper waves + state.rules.waves = !OS.hasProp("mindustry.debug"); + state.rules.waveTimer = true; + state.rules.waveSpacing = 60f * 60f * 7.5f; + state.rules.spawns = Seq.with(new SpawnGroup(){{ + type = UnitTypes.emanate; + spacing = 1; + shieldScaling = 60; + unitScaling = 2f; + }}); } }