public class ThreatSwarmAI extends java.lang.Object implements ShipAIPlugin
| Modifier and Type | Class and Description |
|---|---|
static class |
ThreatSwarmAI.FlockingData |
static class |
ThreatSwarmAI.SharedSwarmWingData |
| Constructor and Description |
|---|
ThreatSwarmAI(ShipAPI ship) |
| Modifier and Type | Method and Description |
|---|---|
void |
advance(float amount)
The AI should do its main work here.
|
protected void |
advanceForSpecificSwarmType(float amount) |
void |
cancelCurrentManeuver() |
protected void |
computeDesiredHeading() |
protected void |
doInitialSetup() |
void |
forceCircumstanceEvaluation()
When this is called, the AI should immediately evaluate nearby threats and such,
if it only does it periodically otherwise.
|
ShipwideAIFlags |
getAIFlags() |
ShipAIConfig |
getConfig() |
ThreatSwarmAI.SharedSwarmWingData |
getShared() |
static float |
getShipWeight(ShipAPI ship) |
static float |
getShipWeight(ShipAPI ship,
boolean adjustForNonCombat) |
protected void |
giveMovementCommands() |
static boolean |
isAttackSwarm(ShipAPI ship) |
static boolean |
isConstructionSwarm(ShipAPI ship) |
static boolean |
isReclamationSwarm(ShipAPI ship) |
boolean |
needsRefit()
Only called for fighters, not regular ships or drones.
|
protected void |
pickPriorityTarget() |
void |
setDoNotFireDelay(float amount)
Advise the AI not to fire for amount seconds.
|
protected void |
toggleOff(int groupNum) |
protected void |
toggleOn(int groupNum) |
protected void |
updateAttackRangeMult() |
protected void |
updateFlockingData() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitsetTargetOverridepublic static float ATTRACTOR_RANGE_MAX_SAME_WING
public static float ATTRACTOR_RANGE_MAX
public static float COHESION_RANGE_MIN
public static float COHESION_RANGE_MAX
public static float REPEL_RANGE_MIN
public static float REPEL_RANGE_MAX
public static float MAX_TARGET_RANGE
public static float PROB_ENABLE_OTHER_GROUP
protected ShipwideAIFlags flags
protected IntervalUtil updateInterval
protected IntervalUtil headingInterval
protected IntervalUtil attackRangeMultInterval
protected IntervalUtil reclamationReturnInterval
protected float sinceTurnedOffFlash
protected ShipAPI fabricator
protected java.util.List<ThreatSwarmAI.FlockingData> flockingData
protected float desiredHeading
protected float headingChangeRate
protected float elapsedSincePrevHeadingUpdate
protected float attackRangeMult
protected IntervalUtil enableOtherWeaponInterval
protected IntervalUtil priorityTargetPickerInterval
protected float enableOtherWeaponDuration
protected float elapsed
protected boolean startedConstruction
protected boolean attackSwarm
protected boolean constructionSwarm
protected boolean reclamationSwarm
public ThreatSwarmAI(ShipAPI ship)
public static boolean isAttackSwarm(ShipAPI ship)
public static boolean isConstructionSwarm(ShipAPI ship)
public static boolean isReclamationSwarm(ShipAPI ship)
public ThreatSwarmAI.SharedSwarmWingData getShared()
protected void doInitialSetup()
protected void toggleOn(int groupNum)
protected void toggleOff(int groupNum)
protected void advanceForSpecificSwarmType(float amount)
protected void pickPriorityTarget()
protected void updateAttackRangeMult()
public void advance(float amount)
ShipAIPluginadvance in interface ShipAIPluginprotected void giveMovementCommands()
protected void computeDesiredHeading()
protected void updateFlockingData()
public ShipwideAIFlags getAIFlags()
getAIFlags in interface ShipAIPluginpublic static float getShipWeight(ShipAPI ship)
public static float getShipWeight(ShipAPI ship, boolean adjustForNonCombat)
public void setDoNotFireDelay(float amount)
ShipAIPluginsetDoNotFireDelay in interface ShipAIPluginpublic void forceCircumstanceEvaluation()
ShipAIPluginforceCircumstanceEvaluation in interface ShipAIPluginpublic boolean needsRefit()
ShipAIPluginneedsRefit in interface ShipAIPluginpublic void cancelCurrentManeuver()
cancelCurrentManeuver in interface ShipAIPluginpublic ShipAIConfig getConfig()
getConfig in interface ShipAIPlugin