diff --git a/core/src/io/anuke/mindustry/content/Blocks.java b/core/src/io/anuke/mindustry/content/Blocks.java index a0ef28f4b8..78a6aa9285 100644 --- a/core/src/io/anuke/mindustry/content/Blocks.java +++ b/core/src/io/anuke/mindustry/content/Blocks.java @@ -1646,13 +1646,13 @@ public class Blocks implements ContentList{ }}; phantomFactory = new UnitFactory("phantom-factory"){{ - requirements(Category.units, ItemStack.with(Items.titanium, 45, Items.thorium, 40, Items.lead, 55, Items.silicon, 105)); + requirements(Category.units, ItemStack.with(Items.titanium, 50, Items.thorium, 60, Items.lead, 65, Items.silicon, 105)); type = UnitTypes.phantom; - produceTime = 3650; + produceTime = 4400; size = 2; - maxSpawn = 2; - consumes.power(2f); - consumes.items(new ItemStack(Items.silicon, 30), new ItemStack(Items.lead, 20), new ItemStack(Items.titanium, 10)); + maxSpawn = 1; + consumes.power(2.5f); + consumes.items(new ItemStack(Items.silicon, 50), new ItemStack(Items.lead, 30), new ItemStack(Items.titanium, 20)); }}; commandCenter = new CommandCenter("command-center"){{ diff --git a/core/src/io/anuke/mindustry/content/UnitTypes.java b/core/src/io/anuke/mindustry/content/UnitTypes.java index a3b598efdd..f632fcee19 100644 --- a/core/src/io/anuke/mindustry/content/UnitTypes.java +++ b/core/src/io/anuke/mindustry/content/UnitTypes.java @@ -61,9 +61,8 @@ public class UnitTypes implements ContentList{ maxVelocity = 1.9f; range = 70f; itemCapacity = 70; - health = 220; - buildPower = 0.9f; - minePower = 1.1f; + health = 400; + buildPower = 1f; engineOffset = 6.5f; toMine = ObjectSet.with(Items.lead, Items.copper, Items.titanium); weapon = new Weapon("heal-blaster"){{ diff --git a/core/src/io/anuke/mindustry/core/Logic.java b/core/src/io/anuke/mindustry/core/Logic.java index 3894608a9f..750c6459b5 100644 --- a/core/src/io/anuke/mindustry/core/Logic.java +++ b/core/src/io/anuke/mindustry/core/Logic.java @@ -16,6 +16,7 @@ import io.anuke.mindustry.type.*; import io.anuke.mindustry.world.*; import io.anuke.mindustry.world.blocks.*; import io.anuke.mindustry.world.blocks.BuildBlock.*; +import io.anuke.mindustry.world.blocks.power.*; import static io.anuke.mindustry.Vars.*; @@ -43,8 +44,10 @@ public class Logic implements ApplicationListener{ //blocks that get broken are appended to the team's broken block queue Tile tile = event.tile; Block block = tile.block(); - if(tile.entity == null) return; - if(block instanceof BuildBlock ){ + //skip null entities or nukes, for obvious reasons + if(tile.entity == null || tile.block() instanceof NuclearReactor) return; + + if(block instanceof BuildBlock){ BuildEntity entity = tile.entity(); diff --git a/core/src/io/anuke/mindustry/entities/type/base/BuilderDrone.java b/core/src/io/anuke/mindustry/entities/type/base/BuilderDrone.java index fc0cd189f2..dc91e18881 100644 --- a/core/src/io/anuke/mindustry/entities/type/base/BuilderDrone.java +++ b/core/src/io/anuke/mindustry/entities/type/base/BuilderDrone.java @@ -96,9 +96,9 @@ public class BuilderDrone extends BaseDrone implements BuilderTrait{ incDrones(playerTarget); TargetTrait prev = target; target = playerTarget; - float dst = 90f + (id % 4)*30; + float dst = 90f + (id % 10)*3; float tdst = dst(target); - float scale = (Mathf.lerp(1f, 0.77f, 1f - Mathf.clamp((tdst - dst) / dst))); + float scale = (Mathf.lerp(1f, 0.2f, 1f - Mathf.clamp((tdst - dst) / dst))); circle(dst); velocity.scl(scale); target = prev; @@ -148,8 +148,7 @@ public class BuilderDrone extends BaseDrone implements BuilderTrait{ } boolean canRebuild(){ - //disabled until further notice, reason being that it's too annoying when playing enemies and too broken for ally use - return timer.get(timerTarget, 80) && Units.closestEnemy(getTeam(), x, y, 100f, u -> !(u instanceof BaseDrone)) == null; + return true; } @Override @@ -184,7 +183,7 @@ public class BuilderDrone extends BaseDrone implements BuilderTrait{ } } - if(canRebuild() && !isBuilding()){ + if(timer.get(timerTarget, 80) && Units.closestEnemy(getTeam(), x, y, 100f, u -> !(u instanceof BaseDrone)) == null && !isBuilding()){ TeamData data = Vars.state.teams.get(team); if(!data.brokenBlocks.isEmpty()){ BrokenBlock block = data.brokenBlocks.removeLast(); diff --git a/core/src/io/anuke/mindustry/world/blocks/power/PowerNode.java b/core/src/io/anuke/mindustry/world/blocks/power/PowerNode.java index 2ff8e6c031..2896de80fa 100644 --- a/core/src/io/anuke/mindustry/world/blocks/power/PowerNode.java +++ b/core/src/io/anuke/mindustry/world/blocks/power/PowerNode.java @@ -105,7 +105,12 @@ public class PowerNode extends PowerBlock{ } }else if(linkValid(tile, other) && valid && entity.power.links.size < maxNodes){ + if(!entity.power.links.contains(other.pos())){ + entity.power.links.add(other.pos()); + } + if(other.getTeamID() == tile.getTeamID()){ + if(!other.entity.power.links.contains(tile.pos())){ other.entity.power.links.add(tile.pos()); }