Interface ASSpecialAbilityCollector

All Known Implementing Classes:
AlphaStrikeElement, ASArcSummary, ASSpecialAbilityCollection, ASTurretSummary, Formation, SBFFormation, SBFUnit

public interface ASSpecialAbilityCollector
This interface is implemented by classes that represent anything that holds AlphaStrike Special Unit Abilities. This is the AlphaStrike element itself (its central abilities such as MHQ, CK23-D2 or ARM). It is also implemented by the ASSpecialAbilityCollection (and subclasses) that represent the abilities inside the TUR special as well as the abilities and damage of a large aero's arcs. The interface contains various methods to retrieve the abilities in a type-safe and convenient way. The default methods should be correct and not be overridden in implementing classes.
  • Method Details

    • hasSUA

      boolean hasSUA(BattleForceSUA sua)
      Returns true when the element, turret or arc has the given Special Unit Ability. When it has and the SUA is associated with some value, this value can be assumed to be non-empty or greater than zero. For example, if an element has MHQ, then MHQ >= 1. If it has IF, then the IF damage is at least 0*.
      Parameters:
      sua - The Special Unit Ability to check
      Returns:
      True when the given Special Unit Ability is present
    • hasAnySUAOf

      default boolean hasAnySUAOf(BattleForceSUA sua, BattleForceSUA... furtherSuas)
      Returns true when this element, turret or arc has any of the given Special Unit Abilities. See hasSUA(BattleForceSUA)
      Parameters:
      sua - The Special Unit Ability to check
      Returns:
      True when this AS element has the given Special Unit Ability
    • getSUA

      Object getSUA(BattleForceSUA sua)
      Returns:
      The value associated with the given Special Unit Ability. Depending on the given sua, this value can be null or of different types. Preferably use the type-safe specific methods such as getLRM() instead of this method.
    • getSpecialsDisplayString

      default String getSpecialsDisplayString(BattleForceSUAFormatter element)
      Returns a formatted SUA string for this AS element. The string is formatted in the way SUAs are printed on an AS element's card or summary with a ', ' between SUAs.
      Returns:
      A formatted Special Unit Ability string
    • getSpecialsDisplayString

      String getSpecialsDisplayString(String delimiter, BattleForceSUAFormatter element)
      Returns a formatted SUA string suitable for gameplay display such as on an AS Card. The given delimiter is inserted between SUAs.
      Returns:
      A formatted Special Unit Ability string
    • getIF

      default ASDamage getIF()
      Returns:
      The IF ability value of this collection or ASDamage.ZERO, if there is no IF.
    • getLRM

      default ASDamageVector getLRM()
      Returns:
      The LRM ability value of this collection or ASDamageVector.ZEROSPECIAL, if there is no LRM.
    • getIATM

      default ASDamageVector getIATM()
      Returns:
      The IATM ability value of this collection or ASDamageVector.ZEROSPECIAL, if there is no IATM.
    • getREAR

      default ASDamageVector getREAR()
      Returns:
      The REAR ability value of this collection or ASDamageVector.ZEROSPECIAL, if there is no REAR.
    • getAC

      default ASDamageVector getAC()
      Returns:
      The AC ability value of this collection or ASDamageVector.ZEROSPECIAL, if there is no AC.
    • getSRM

      default ASDamageVector getSRM()
      Returns:
      The SRM ability value of this collection or ASDamageVector.ZEROSPECIAL, if there is no SRM.
    • getTOR

      default ASDamageVector getTOR()
      Returns:
      The TOR ability value of this collection or ASDamageVector.ZEROSPECIAL, if there is no TOR.
    • getHT

      default ASDamageVector getHT()
      Returns:
      The HT ability value of this collection or ASDamageVector.ZEROSPECIAL, if there is no HT.
    • getFLK

      default ASDamageVector getFLK()
      Returns:
      The FLK ability value of this collection or ASDamageVector.ZEROSPECIAL, if there is no FLK.
    • getTUR

      default ASTurretSummary getTUR()
      Returns:
      The TUR contents of this element (empty if there is no TUR).
    • getLAM

      default Map<String,Integer> getLAM()
      Returns:
      The Map that contains the element's LAM movement ability (or an empty map).
    • getBIM

      default Map<String,Integer> getBIM()
      Returns:
      The Map that contains the element's BIM movement ability (or an empty map).
    • getMHQ

      default int getMHQ()
      Returns:
      The MHQ ability value of this element or 0 if it doesn't have MHQ.
    • getJMPS

      default int getJMPS()
      Returns:
      The JPMS ability value of this element or 0 if it doesn't have JMPS.
    • getSUBS

      default int getSUBS()
      Returns:
      The SUBS ability value of this element or 0 if it doesn't have SUBS.
    • getFUEL

      default int getFUEL()
      Returns:
      The FUEL ability value of this element or 0 if it doesn't have FUEL.
    • getStdDamage

      default ASDamageVector getStdDamage()
      Returns:
      The standard damage of this element or turret or the STD damage of this arc.
    • getCAP

      default ASDamageVector getCAP()
      Returns:
      The capital weapon (CAP) damage of this arc.
    • getSCAP

      default ASDamageVector getSCAP()
      Returns:
      The sub-capital weapon (SCAP) damage of this arc.
    • getMSL

      default ASDamageVector getMSL()
      Returns:
      The capital missile weapon (MSL) damage of this arc.
    • getCT

      default double getCT()
      Returns:
      The CT transport ability value of this element or 0 if it doesn't have CT.
    • getIT

      default double getIT()
      Returns:
      The IT transport ability value of this element or 0 if it doesn't have IT.
    • getCAR

      default int getCAR()
      Returns:
      The CAR ability value of this element or 0 if it doesn't have CAR.