This commit is contained in:
Anuken
2020-09-22 23:22:53 -04:00
parent cf13717cc8
commit 0058d45352
2 changed files with 9 additions and 4 deletions

View File

@@ -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 */

View File

@@ -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;
}
}