diff --git a/core/assets/bundles/bundle.properties b/core/assets/bundles/bundle.properties index 2f3925773c..725e30b477 100644 --- a/core/assets/bundles/bundle.properties +++ b/core/assets/bundles/bundle.properties @@ -900,6 +900,7 @@ ability.statusfield = {0} Status Field ability.unitspawn = {0} Factory ability.shieldregenfield = Shield Regen Field ability.movelightning = Movement Lightning +ability.shieldarc = Shield Arc ability.energyfield = Energy Field: [accent]{0}[] damage ~ [accent]{1}[] blocks / [accent]{2}[] targets bar.onlycoredeposit = Only Core Depositing Allowed diff --git a/core/src/mindustry/ai/ControlPathfinder.java b/core/src/mindustry/ai/ControlPathfinder.java index 2d590f0088..6113faaa9e 100644 --- a/core/src/mindustry/ai/ControlPathfinder.java +++ b/core/src/mindustry/ai/ControlPathfinder.java @@ -22,7 +22,7 @@ public class ControlPathfinder{ private static final long maxUpdate = Time.millisToNanos(30); private static final int updateFPS = 60; private static final int updateInterval = 1000 / updateFPS; - private static final int wallImpassableCap = 100_000; + private static final int wallImpassableCap = 1_000_000; public static final PathCost @@ -134,13 +134,17 @@ public class ControlPathfinder{ } } }else{ + var view = Core.camera.bounds(Tmp.r1); int len = req.frontier.size; float[] weights = req.frontier.weights; int[] poses = req.frontier.queue; - for(int i = 0; i < len; i++){ - Draw.color(Tmp.c1.set(Color.white).fromHsv((weights[i] * 4f) % 360f, 1f, 0.9f)); + for(int i = 0; i < Math.min(len, 1000); i++){ int pos = poses[i]; - Lines.square(pos % wwidth * tilesize, pos / wwidth * tilesize, 4f); + if(view.contains(pos % wwidth * tilesize, pos / wwidth * tilesize)){ + Draw.color(Tmp.c1.set(Color.white).fromHsv((weights[i] * 4f) % 360f, 1f, 0.9f)); + + Lines.square(pos % wwidth * tilesize, pos / wwidth * tilesize, 4f); + } } } Draw.reset(); @@ -529,6 +533,8 @@ public class ControlPathfinder{ float add = tileCost(team, cost, current, next); float currentCost = costs.get(current); + if(add < 0) continue; + //the cost can include an impassable enemy wall, so cap the cost if so and add the base cost instead //essentially this means that any path with enemy walls will only count the walls once, preventing strange behavior like avoiding based on wall count float newCost = currentCost >= wallImpassableCap && add >= wallImpassableCap ? currentCost + add - wallImpassableCap : currentCost + add; diff --git a/core/src/mindustry/content/Blocks.java b/core/src/mindustry/content/Blocks.java index b87623e80c..19dc1f0c2f 100644 --- a/core/src/mindustry/content/Blocks.java +++ b/core/src/mindustry/content/Blocks.java @@ -4367,10 +4367,10 @@ public class Blocks{ lustre = new ContinuousTurret("lustre"){{ requirements(Category.turret, with(Items.silicon, 250, Items.graphite, 200, Items.oxide, 50, Items.carbide, 90)); - range = 100f; + range = 130f; shootType = new PointLaserBulletType(){{ - damage = 140f; + damage = 180f; buildingDamageMultiplier = 0.3f; hitColor = Color.valueOf("fda981"); }};