From 879fb8194f260afae9695009b5c1632e408d855a Mon Sep 17 00:00:00 2001 From: Anuken Date: Tue, 7 Aug 2018 19:01:23 -0400 Subject: [PATCH] Further nerfed AI --- core/src/io/anuke/mindustry/Vars.java | 2 +- .../maps/generation/FortressGenerator.java | 16 ++++++++++------ .../mindustry/world/blocks/units/UnitPad.java | 2 +- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/core/src/io/anuke/mindustry/Vars.java b/core/src/io/anuke/mindustry/Vars.java index fecf0ba143..1ac28ece7a 100644 --- a/core/src/io/anuke/mindustry/Vars.java +++ b/core/src/io/anuke/mindustry/Vars.java @@ -90,7 +90,7 @@ public class Vars{ //whether turrets have infinite ammo (only with debug) public static boolean infiniteAmmo = true; //whether to show paths of enemies - public static boolean showPaths = true; + public static boolean showPaths = false; //if false, player is always hidden public static boolean showPlayer = true; //whether to hide ui, only on debug diff --git a/core/src/io/anuke/mindustry/maps/generation/FortressGenerator.java b/core/src/io/anuke/mindustry/maps/generation/FortressGenerator.java index 129487e77e..ac319d5545 100644 --- a/core/src/io/anuke/mindustry/maps/generation/FortressGenerator.java +++ b/core/src/io/anuke/mindustry/maps/generation/FortressGenerator.java @@ -150,9 +150,10 @@ public class FortressGenerator{ for(int y = 0; y < base.height(); y++){ Tile tile = gen.tiles[enemyX - base.width()/2 + x][enemyY - base.height()/2 + y]; StructBlock block = base.layout[x][y]; + Block result = fixBlock(block.block); tile.setElevation(elev); tile.setRotation(block.rotation); - tile.setBlock(block.block, team); + tile.setBlock(result, team); } } @@ -177,11 +178,7 @@ public class FortressGenerator{ StructBlock block = struct.layout[cx][cy]; Tile tile = world.tile(wx, wy); - Block result = block.block; - - if(result == UnitBlocks.resupplyPoint) result = DefenseBlocks.tungstenWall; - if(result == UnitBlocks.monsoonPad) result = DefenseBlocks.tungstenWallLarge; - if(result == UnitBlocks.fabricatorPad) result = DefenseBlocks.tungstenWallLarge; + Block result = fixBlock(block.block); //resupply points should not be placed anymore, they confuse units if(result != Blocks.air && tile.block().alwaysReplace){ @@ -199,6 +196,13 @@ public class FortressGenerator{ } } + Block fixBlock(Block result){ + if(result == UnitBlocks.resupplyPoint) result = DefenseBlocks.tungstenWall; + if(result == UnitBlocks.monsoonPad) result = DefenseBlocks.tungstenWallLarge; + if(result == UnitBlocks.fabricatorPad) result = DefenseBlocks.tungstenWallLarge; + return result; + } + void fill(Tile tile){ Block block = tile.block(); diff --git a/core/src/io/anuke/mindustry/world/blocks/units/UnitPad.java b/core/src/io/anuke/mindustry/world/blocks/units/UnitPad.java index 5b7f96e837..dbfb60dcb3 100644 --- a/core/src/io/anuke/mindustry/world/blocks/units/UnitPad.java +++ b/core/src/io/anuke/mindustry/world/blocks/units/UnitPad.java @@ -39,7 +39,7 @@ import java.io.IOException; public class UnitPad extends Block{ protected float gracePeriodMultiplier = 16f; - protected float speedupTime = 60f * 60f * 16; + protected float speedupTime = 60f * 60f * 19; protected float maxSpeedup = 7f; protected UnitType type;