Class ShroudedVortexAI

java.lang.Object
com.fs.starfarer.api.impl.combat.dweller.ShroudedVortexAI
All Implemented Interfaces:
ShipAIPlugin

public class ShroudedVortexAI extends Object implements ShipAIPlugin
  • Field Details

    • HULL_FRACTION_LOST_PER_SECOND

      public static float HULL_FRACTION_LOST_PER_SECOND
      Loses hitpoints over time, when near zero, blows up.
    • VORTEX_FLOCKING

      public static String VORTEX_FLOCKING
    • ATTRACTOR_RANGE_MAX

      public static float ATTRACTOR_RANGE_MAX
    • COHESION_RANGE_MIN

      public static float COHESION_RANGE_MIN
    • COHESION_RANGE_MAX

      public static float COHESION_RANGE_MAX
    • REPEL_RANGE_MIN

      public static float REPEL_RANGE_MIN
    • REPEL_RANGE_MAX

      public static float REPEL_RANGE_MAX
    • flags

      protected ShipwideAIFlags flags
    • ship

      protected ShipAPI ship
    • exploded

      protected boolean exploded
    • prevVel

      protected org.lwjgl.util.vector.Vector2f prevVel
    • updateInterval

      protected IntervalUtil updateInterval
    • headingInterval

      protected IntervalUtil headingInterval
    • target

      protected ShipAPI target
    • timeOnTarget

      protected float timeOnTarget
    • numCollisions

      protected float numCollisions
    • flockingData

      protected List<ShroudedVortexAI.FlockingData> flockingData
    • desiredHeading

      protected float desiredHeading
  • Constructor Details

    • ShroudedVortexAI

      public ShroudedVortexAI(ShipAPI ship)
  • Method Details

    • doInitialSetup

      protected void doInitialSetup()
    • toggleOn

      protected void toggleOn(int groupNum)
    • toggleOff

      protected void toggleOff(int groupNum)
    • advance

      public void advance(float amount)
      Description copied from interface: ShipAIPlugin
      The AI should do its main work here.
      Specified by:
      advance in interface ShipAIPlugin
    • giveMovementCommands

      protected void giveMovementCommands()
    • getAIFlags

      public ShipwideAIFlags getAIFlags()
      Specified by:
      getAIFlags in interface ShipAIPlugin
    • findTarget

      public ShipAPI findTarget()
    • updateFlockingData

      protected void updateFlockingData()
    • computeDesiredHeading

      protected void computeDesiredHeading()
    • setDoNotFireDelay

      public void setDoNotFireDelay(float amount)
      Description copied from interface: ShipAIPlugin
      Advise the AI not to fire for amount seconds. Used when fighters are taking off from a carrier to prevent bomb/torpedo friendly fire.
      Specified by:
      setDoNotFireDelay in interface ShipAIPlugin
    • forceCircumstanceEvaluation

      public void forceCircumstanceEvaluation()
      Description copied from interface: ShipAIPlugin
      When this is called, the AI should immediately evaluate nearby threats and such, if it only does it periodically otherwise. Called when the autopilot is toggled on.
      Specified by:
      forceCircumstanceEvaluation in interface ShipAIPlugin
    • needsRefit

      public boolean needsRefit()
      Description copied from interface: ShipAIPlugin
      Only called for fighters, not regular ships or drones.
      Specified by:
      needsRefit in interface ShipAIPlugin
      Returns:
      whether the fighter needs refit
    • cancelCurrentManeuver

      public void cancelCurrentManeuver()
      Specified by:
      cancelCurrentManeuver in interface ShipAIPlugin
    • getConfig

      public ShipAIConfig getConfig()
      Specified by:
      getConfig in interface ShipAIPlugin