Interface IBomber

All Known Implementing Classes:
Aero, AeroSpaceFighter, ConvFighter, Dropship, EscapePods, FighterSquadron, FixedWingSupport, Jumpship, LandAirMek, SmallCraft, SpaceStation, SupportVTOL, TeleMissile, VTOL, Warship

public interface IBomber
Common interface for all entities capable of carrying bombs and making bomb attacks, including Aero, LandAirMek, and VTOL.
  • Field Details

  • Method Details

    • setUsedInternalBombs

      void setUsedInternalBombs(int b)
      Set count of internal bombs used; this is used to reset, revert, or increase count of internal bombs a unit has dropped during a turn.
    • increaseUsedInternalBombs

      void increaseUsedInternalBombs(int b)
      Increase count of internal bombs used this turn.
    • getUsedInternalBombs

      int getUsedInternalBombs()
      Returns:
      the number of internal bombs used by this bomber during a turn, for IBB internal hit calculations.
    • getMaxBombPoints

      int getMaxBombPoints()
      Returns:
      The total number of bomb points that the bomber can carry.
    • getMaxIntBombSize

      default int getMaxIntBombSize()
      Fighters and VTOLs can carry any size bomb up to the maximum number of points per location (internal/external), but LAMs are limited to the number of bays in a single location.
      Returns:
      The largest single bomb that can be carried internally.
    • getMaxExtBombSize

      default int getMaxExtBombSize()
      Returns:
      The largest single bomb that can be carried externally.
    • getIntBombChoices

      BombLoadout getIntBombChoices()
      Returns:
      The number of each internally-mounted bomb type that was selected prior to deployment
    • getExtBombChoices

      BombLoadout getExtBombChoices()
      Returns:
      The number of each externally-mounted bomb type that was selected prior to deployment
    • setIntBombChoices

      void setIntBombChoices(BombLoadout bc)
      Sets the bomb type selections prior to deployment.
      Parameters:
      bc - An array with the count of each bomb type as the value of the bomb type's index
    • setExtBombChoices

      void setExtBombChoices(BombLoadout bc)
      Sets the bomb type selections for external mounts.
      Parameters:
      bc - An array with the count of each bomb type as the value of the bomb type's index
    • getBombChoices

      default BombLoadout getBombChoices()
      Returns:
      summed combination of internal and external choices
    • setBombChoices

      default void setBombChoices(BombLoadout ebc)
      Backwards compatibility bomb choice setter that only affects external stores.
    • clearBombChoices

      void clearBombChoices()
      Sets the count of each bomb to zero
    • reduceMPByBombLoad

      int reduceMPByBombLoad(int t)
      Returns:
      The calculates movement factoring in the load of bombs currently on unit, t is current movement
    • availableBombLocation

      int availableBombLocation(int cost)
      Parameters:
      cost - The cost of the bomb to be mounted
      Returns:
      A location with sufficient space to mount the bomb, or Entity.LOC_NONE if the unit does not have the space.
    • setVTOLBombTarget

      default void setVTOLBombTarget(Targetable target)
      Used by VTOLs and LAMs in AirMek mode to declare the target hex for a bomb attack during the movement phase.
    • getVTOLBombTarget

      default Targetable getVTOLBombTarget()
    • isVTOLBombing

      default boolean isVTOLBombing()
    • getBombs

      List<BombMounted> getBombs()
    • getBombPoints

      default int getBombPoints()
      Returns:
      the number of total bomb points for this unit
    • getExternalBombPoints

      default int getExternalBombPoints()
      Returns:
      the number of externally-mounted ordnance points (useful for MP calculations)
    • getInternalBombsDamageTotal

      default int getInternalBombsDamageTotal()
      Returns:
      total damage from remaining bombs
    • getBombPoints

      default int getBombPoints(boolean externalOnly)
      Returns:
      The number of points taken up by all mounted bombs, or just external
    • applyBombs

      default void applyBombs()
      Iterate through the bomb choices that were configured prior to deployment and add the corresponding equipment.
    • clearBombs

      void clearBombs()
    • getMaxExtBombPoints

      int getMaxExtBombPoints()
      Returns:
      maximum number of bomb points this bomber can mount externally
    • getMaxIntBombPoints

      int getMaxIntBombPoints()
      Returns:
      maximum number of bomb points this bomber can mount internally