diff --git a/core/src/mindustry/Vars.java b/core/src/mindustry/Vars.java index 07843424da..c2acf3841f 100644 --- a/core/src/mindustry/Vars.java +++ b/core/src/mindustry/Vars.java @@ -87,7 +87,7 @@ public class Vars implements Loadable{ /** turns needed to destroy a sector completely */ public static final float sectorDestructionTurns = 3f; /** min armor fraction damage; e.g. 0.05 = at least 5% damage */ - public static final float minArmorDamage = 0.05f; + public static final float minArmorDamage = 0.1f; /** launch animation duration */ public static final float launchDuration = 140f; /** size of tiles in units */ diff --git a/core/src/mindustry/ai/Pathfinder.java b/core/src/mindustry/ai/Pathfinder.java index cc9762ba01..c81b3b53cc 100644 --- a/core/src/mindustry/ai/Pathfinder.java +++ b/core/src/mindustry/ai/Pathfinder.java @@ -43,7 +43,8 @@ public class Pathfinder implements Runnable{ PathTile.health(tile) * 5 + (PathTile.nearSolid(tile) ? 2 : 0) + (PathTile.nearLiquid(tile) ? 6 : 0) + - (PathTile.deep(tile) ? 70 : 0), + (PathTile.deep(tile) ? 70 : 0) + + (PathTile.damages(tile) ? 30 : 0), //legs (team, tile) -> PathTile.legSolid(tile) ? impassable : 1 + @@ -52,7 +53,8 @@ public class Pathfinder implements Runnable{ //water (team, tile) -> PathTile.solid(tile) || !PathTile.liquid(tile) ? 200 : 2 + //TODO cannot go through blocks - pathfinding isn't great (PathTile.nearGround(tile) || PathTile.nearSolid(tile) ? 14 : 0) + - (PathTile.deep(tile) ? -1 : 0) + (PathTile.deep(tile) ? -1 : 0) + + (PathTile.damages(tile) ? 35 : 0) ); //maps team, cost, type to flow field @@ -122,7 +124,8 @@ public class Pathfinder implements Runnable{ nearLiquid, nearGround, nearSolid, - tile.floor().isDeep() + tile.floor().isDeep(), + tile.floor().damageTaken > 0.00001f ); } @@ -514,5 +517,7 @@ public class Pathfinder implements Runnable{ boolean nearSolid; //whether this block is deep / drownable boolean deep; + //whether the floor damages + boolean damages; } }