public class AIUtils
extends Object
Modifier and Type | Method and Description |
---|---|
static boolean |
canUseSystemThisFrame(ShipAPI ship)
Check if a ship's system can be used/toggled this frame.
|
static List<ShipAPI> |
getAlliesOnMap(CombatEntityAPI entity)
Find all present allies of an entity.
|
static List<ShipAPI> |
getEnemiesOnMap(CombatEntityAPI entity)
Find all present enemies of an entity.
|
static List<MissileAPI> |
getEnemyMissilesOnMap(CombatEntityAPI entity)
Find all present enemy missiles of an entity.
|
static List<ShipAPI> |
getNearbyAllies(CombatEntityAPI entity,
float range)
Finds all allies within a certain range around an entity.
|
static List<ShipAPI> |
getNearbyEnemies(CombatEntityAPI entity,
float range)
Finds all enemies within a certain range around an entity.
|
static List<MissileAPI> |
getNearbyEnemyMissiles(CombatEntityAPI entity,
float range)
Finds all enemy missiles within a certain range around an entity.
|
static ShipAPI |
getNearestAlly(CombatEntityAPI entity)
Find the closest ally of an entity.
|
static ShipAPI |
getNearestEnemy(CombatEntityAPI entity)
Find the closest enemy of an entity.
|
static MissileAPI |
getNearestEnemyMissile(CombatEntityAPI entity)
Find the closest enemy missile near an entity.
|
static MissileAPI |
getNearestMissile(CombatEntityAPI entity)
Find the closest missile near entity.
|
static BattleObjectiveAPI |
getNearestObjective(CombatEntityAPI entity)
Find the closest
BattleObjectiveAPI to an entity. |
static ShipAPI |
getNearestShip(CombatEntityAPI entity)
Find the closest ship near entity.
|
public static BattleObjectiveAPI getNearestObjective(CombatEntityAPI entity)
BattleObjectiveAPI
to an entity.entity
- The CombatEntityAPI
to search around.
BattleObjectiveAPI
closest to entity
.
public static ShipAPI getNearestEnemy(CombatEntityAPI entity)
entity
- The CombatEntityAPI
to search around.
entity
.
public static ShipAPI getNearestAlly(CombatEntityAPI entity)
entity
- The CombatEntityAPI
to search around.
entity
.
public static ShipAPI getNearestShip(CombatEntityAPI entity)
entity
- The CombatEntityAPI
to search around.
entity
.
public static MissileAPI getNearestMissile(CombatEntityAPI entity)
entity
- The CombatEntityAPI
to search around.
MissileAPI
closest to entity
.
public static List<ShipAPI> getEnemiesOnMap(CombatEntityAPI entity)
entity
- The CombatEntityAPI
to search around.
entity
on the battle map.
public static List<ShipAPI> getNearbyEnemies(CombatEntityAPI entity, float range)
entity
- The entity to search around.range
- How far around entity
to search.
List
containing all enemy ships within range.
public static List<ShipAPI> getAlliesOnMap(CombatEntityAPI entity)
entity
- The CombatEntityAPI
to search around.
entity
on the battle map.
public static List<ShipAPI> getNearbyAllies(CombatEntityAPI entity, float range)
entity
- The entity to search around.range
- How far around entity
to search.
List
containing all allied ships within range.
public static MissileAPI getNearestEnemyMissile(CombatEntityAPI entity)
entity
- The CombatEntityAPI
to search around.
MissileAPI
closest to entity
.
public static List<MissileAPI> getEnemyMissilesOnMap(CombatEntityAPI entity)
entity
- The CombatEntityAPI
to search around.
MissileAPI
s of entity
on the battle
map.
public static List<MissileAPI> getNearbyEnemyMissiles(CombatEntityAPI entity, float range)
entity
- The entity to search around.range
- How far around entity
to search.
List
containing all enemy missiles within range.
public static boolean canUseSystemThisFrame(ShipAPI ship)
ship
- The ship to check the system of.
true
if ship
can use its system, false
otherwise.