Class Collision
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanReturns whetherdestinationis reachable from the local player using only loaded local-world collision.static booleanreachable(Coord destination, Collection<Coord> dangerous, Collection<Coord> impassible) Returns whetherdestinationis reachable while avoiding dangerous and impassible tiles.static booleanreachable(Coord destination, Collection<Coord> dangerous, Collection<Coord> impassible, Collection<Coord> walkable) Returns whetherdestinationis reachable withinwalkable, while avoiding dangerous and impassible tiles.static booleanReturns whetherunitcan be reached from the local player using only loaded local-world collision.static booleanreachable(Unit unit, Collection<Coord> dangerous, Collection<Coord> impassible) Returns whetherunitis reachable while avoiding dangerous and impassible tiles.static booleanreachable(Unit unit, Collection<Coord> dangerous, Collection<Coord> impassible, Collection<Coord> walkable) Returns whetherunitis reachable withinwalkable, while avoiding dangerous and impassible tiles.static booleanreachable(SceneObject object) Returns whetherobjectcan be interacted with from a reachable tile.static booleanreachableWithin(Coord destination, int maxDistance) Returns whetherdestinationis reachable withinmaxDistancelocal movement steps.static booleanreachableWithin(Unit unit, int maxDistance) Returns whetherunitis reachable withinmaxDistancelocal movement steps.
-
Constructor Details
-
Collision
public Collision()
-
-
Method Details
-
reachable
Returns whetherdestinationis reachable from the local player using only loaded local-world collision. -
reachableWithin
Returns whetherdestinationis reachable withinmaxDistancelocal movement steps. -
reachableWithin
Returns whetherunitis reachable withinmaxDistancelocal movement steps. -
reachable
public static boolean reachable(Coord destination, Collection<Coord> dangerous, Collection<Coord> impassible) Returns whetherdestinationis reachable while avoiding dangerous and impassible tiles.Dangerous tiles are physically walkable tiles that should be avoided, such as temporary hazard or damage tiles. Impassible tiles are additional hard blockers that should be treated as unwalkable even if collision allows them.
-
reachable
public static boolean reachable(Coord destination, Collection<Coord> dangerous, Collection<Coord> impassible, Collection<Coord> walkable) Returns whetherdestinationis reachable withinwalkable, while avoiding dangerous and impassible tiles.Dangerous tiles are physically walkable tiles that should be avoided, such as temporary hazard or damage tiles. Impassible tiles are additional hard blockers that should be treated as unwalkable even if collision allows them. Walkable tiles restrict the search space; tiles outside this collection are not considered.
-
reachable
Returns whetherunitcan be reached from the local player using only loaded local-world collision. -
reachable
Returns whetherobjectcan be interacted with from a reachable tile. -
reachable
public static boolean reachable(Unit unit, Collection<Coord> dangerous, Collection<Coord> impassible) Returns whetherunitis reachable while avoiding dangerous and impassible tiles.Dangerous tiles are physically walkable tiles that should be avoided, such as temporary hazard or damage tiles. Impassible tiles are additional hard blockers that should be treated as unwalkable even if collision allows them.
-
reachable
public static boolean reachable(Unit unit, Collection<Coord> dangerous, Collection<Coord> impassible, Collection<Coord> walkable) Returns whetherunitis reachable withinwalkable, while avoiding dangerous and impassible tiles.Dangerous tiles are physically walkable tiles that should be avoided, such as temporary hazard or damage tiles. Impassible tiles are additional hard blockers that should be treated as unwalkable even if collision allows them. Walkable tiles restrict the search space; tiles outside this collection are not considered.
-