Class Dropship

All Implemented Interfaces:
Serializable, ICarryable, Transporter, InGameObject, CombatRole, ForceAssignable, ITechnology, ITurnOrdered, PhaseUpdated, RoundUpdated, ActiveHeatSinkController, BTObject, Deployable, IAero, IBomber, Targetable

public class Dropship extends SmallCraft
Since:
Jun 17, 2007
See Also:
  • Field Details

    • COLLAR_STANDARD

      public static final int COLLAR_STANDARD
      Primitive DropShips may be constructed with no docking collar, or with a pre-boom collar.
      See Also:
    • COLLAR_PROTOTYPE

      public static final int COLLAR_PROTOTYPE
      See Also:
    • COLLAR_NO_BOOM

      public static final int COLLAR_NO_BOOM
      See Also:
    • BOOM_STANDARD

      public static final int BOOM_STANDARD
      See Also:
    • BOOM_PROTOTYPE

      public static final int BOOM_PROTOTYPE
      See Also:
    • TA_DROPSHIP

      protected static final TechAdvancement TA_DROPSHIP
    • TA_DROPSHIP_PRIMITIVE

      protected static final TechAdvancement TA_DROPSHIP_PRIMITIVE
  • Constructor Details

    • Dropship

      public Dropship()
  • Method Details

    • canHide

      public boolean canHide()
      A DropShip is far too large to be hidden (hidden units, TW pg 259).
      Overrides:
      canHide in class Entity
    • setASEWAffected

      public void setASEWAffected(int arc, int turns)
      Sets the number of rounds a specified firing arc is affected by an ASEW missile
      Parameters:
      arc - - integer representing the desired firing arc
      turns - - integer specifying the number of end phases that the effects last through Technically, about 1.5 turns elapse per the rules for ASEW missiles in TO
    • getASEWAffected

      public int getASEWAffected(int arc)
      Returns the number of rounds a specified firing arc is affected by an ASEW missile
      Parameters:
      arc - - integer representing the desired firing arc
    • tracksHeat

      public boolean tracksHeat()
      Description copied from interface: Targetable
      Used to identify a target that tracks heat buildup (Meks, ASFs, and small craft).
      Specified by:
      tracksHeat in interface Targetable
      Overrides:
      tracksHeat in class Aero
      Returns:
      Whether the target tracks heat buildup.
    • getUnitType

      public int getUnitType()
      Overrides:
      getUnitType in class SmallCraft
      See Also:
    • isSmallCraft

      public boolean isSmallCraft()
      Description copied from interface: BTObject
      Returns true when this object is a SmallCraft (not a DropShip). Returns false for any type of unit group.
      Specified by:
      isSmallCraft in interface BTObject
      Overrides:
      isSmallCraft in class SmallCraft
      Returns:
      True when this is a SmallCraft
    • isDropShip

      public boolean isDropShip()
      Description copied from interface: BTObject
      Returns true when this object is a DropShip. Returns false for any type of unit group.
      Returns:
      True when this is a DropShip
    • defaultCrewType

      public CrewType defaultCrewType()
      Overrides:
      defaultCrewType in class Entity
    • isDockCollarDamaged

      public boolean isDockCollarDamaged()
    • getCollarType

      public int getCollarType()
    • setCollarType

      public void setCollarType(int collarType)
    • getCollarName

      @Deprecated(since="0.51.0", forRemoval=true) public String getCollarName()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getCollarName

      @Deprecated(since="0.51.0", forRemoval=true) public static String getCollarName(int type)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getCollarTA

      public static TechAdvancement getCollarTA()
    • isKFBoomDamaged

      public boolean isKFBoomDamaged()
    • getBoomType

      public int getBoomType()
    • setBoomType

      @Deprecated(since="0.51.0", forRemoval=true) public void setBoomType(int boomType)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • getCritDamageString

      public String getCritDamageString()
      Overrides:
      getCritDamageString in class Aero
    • isLocationProhibited

      public boolean isLocationProhibited(Coords c, int testBoardId, int currElevation)
      Description copied from class: Entity
      Returns true when the given location cannot legally be entered or deployed into by this unit at the given elevation or altitude. Also returns true when the location doesn't exist. Even when this method returns true, the location need not be deadly to the unit.
      Overrides:
      isLocationProhibited in class Aero
      Parameters:
      c - The position to test
      testBoardId - The board to test
      currElevation - The elevation or altitude to test
      Returns:
      True when the location is illegal to be in for this unit, regardless of elevation
      See Also:
    • setDamageDockCollar

      public void setDamageDockCollar(boolean b)
    • setDamageKFBoom

      public void setDamageKFBoom(boolean b)
    • getFuelPointsPerTon

      public double getFuelPointsPerTon()
      Specified by:
      getFuelPointsPerTon in interface IAero
      Overrides:
      getFuelPointsPerTon in class Aero
    • getStrategicFuelUse

      public double getStrategicFuelUse()
      Description copied from class: Aero
      Used by SmallCraft and Jumpship and their child classes.
      Overrides:
      getStrategicFuelUse in class SmallCraft
      Returns:
      The tons of fuel burned in a day at 1G using strategic movement.
    • primitiveFuelFactor

      public double primitiveFuelFactor()
      Description copied from class: Aero
      Some primitive aerospace units have their fuel efficiency reduced by a factor based on construction year.
      Overrides:
      primitiveFuelFactor in class SmallCraft
      Returns:
      The primitive fuel factor for the build year.
    • getConstructionTechAdvancement

      public TechAdvancement getConstructionTechAdvancement()
      Description copied from class: Entity
      return - the base construction option tech advancement
      Overrides:
      getConstructionTechAdvancement in class SmallCraft
    • addSystemTechAdvancement

      protected void addSystemTechAdvancement(CompositeTechLevel techLevel)
      Description copied from class: Entity
      Incorporate dates for components that are not in the equipment list, such as engines and structure.
      Overrides:
      addSystemTechAdvancement in class Aero
    • getCost

      public double getCost(CalculationReport calcReport, boolean ignoreAmmo)
      Description copied from class: Entity
      Calculates and returns the C-bill cost of the unit. The parameter ignoreAmmo can be used to include or exclude ("dry cost") the cost of ammunition on the unit. A report for the cost calculation will be written to the given calcReport.
      Overrides:
      getCost in class SmallCraft
      Parameters:
      calcReport - A CalculationReport to write the report for the cost calculation to
      ignoreAmmo - When true, the cost of ammo on the unit will be excluded from the cost
      Returns:
      The cost in C-Bills of the 'Mek in question.
    • getPriceMultiplier

      public double getPriceMultiplier()
      Description copied from class: Entity
      Returns a multiplier that combines multiplicative construction cost modifiers for this Entity.

      This includes only modifiers that apply to an Entity's final, total cost (e.g. - the 1.25x modifier for being an omni-unit, or the 32.0x for being an aerodyne DropShip). It does NOT include multipliers that only apply to a sub-part of the unit (e.g. the weight based multiplier that applies to a vehicle's internal structure cost).

      This allows MekHQ to scale the price of a Unit's Parts in a more appropriate manner.

      Defaults to 1.0

      Overrides:
      getPriceMultiplier in class SmallCraft
    • loadWeapon

      public boolean loadWeapon(WeaponMounted mounted, AmmoMounted mountedAmmo)
      need to check bay location before loading ammo
      Overrides:
      loadWeapon in class SmallCraft
    • getHQIniBonus

      public int getHQIniBonus()
      Overrides:
      getHQIniBonus in class Entity
      Returns:
      the initiative bonus this Entity grants for HQ
    • hasActiveECM

      public boolean hasActiveECM()
      All military dropships automatically have ECM if in space
      Overrides:
      hasActiveECM in class SmallCraft
    • getECMRange

      public int getECMRange()
      What's the range of the ECM equipment?
      Overrides:
      getECMRange in class SmallCraft
      Returns:
      the int range of this unit's ECM. This value will be Entity.NONE if no ECM is active.
    • height

      public int height()
      Return the height of this dropship above the terrain.
      Specified by:
      height in interface IAero
      Overrides:
      height in class SmallCraft
    • getWalkMP

      public int getWalkMP(MPCalculationSetting mpCalculationSetting)
      Overrides:
      getWalkMP in class Aero
    • setPosition

      public void setPosition(Coords position)
      Overrides:
      setPosition in class Entity
    • setAltitude

      public void setAltitude(int altitude)
      Overrides:
      setAltitude in class Entity
    • setFacing

      public void setFacing(int facing)
      Description copied from class: Entity
      Sets the primary facing.
      Overrides:
      setFacing in class Entity
    • getLandingLength

      public int getLandingLength()
      Specified by:
      getLandingLength in interface IAero
      Overrides:
      getLandingLength in class SmallCraft
    • hasRoomForVerticalLanding

      public String hasRoomForVerticalLanding()
    • usesWeaponBays

      public boolean usesWeaponBays()
      Overrides:
      usesWeaponBays in class Entity
      Returns:
      True if this unit is using weapons bays
    • rollHitLocation

      public HitData rollHitLocation(int table, int side)
      Description copied from class: Entity
      Rolls up a hit location
      Overrides:
      rollHitLocation in class SmallCraft
    • getLocationAbbr

      public String getLocationAbbr(int loc)
      Description copied from class: Entity
      Returns the abbreviated name of the location specified.
      Overrides:
      getLocationAbbr in class Entity
    • getEntityType

      public long getEntityType()
      Overrides:
      getEntityType in class SmallCraft
    • canChangeSecondaryFacing

      public boolean canChangeSecondaryFacing()
      Description copied from class: Entity
      Can this entity change secondary facing at all?
      Overrides:
      canChangeSecondaryFacing in class Aero
    • isValidSecondaryFacing

      public boolean isValidSecondaryFacing(int dir)
      Can this dropship "torso twist" in the given direction?
      Overrides:
      isValidSecondaryFacing in class Aero
    • clipSecondaryFacing

      public int clipSecondaryFacing(int dir)
      Return the nearest valid direction to "torso twist" in
      Overrides:
      clipSecondaryFacing in class Aero
      Returns:
      the closest valid secondary facing.
    • newRound

      public void newRound(int roundNumber)
      Description copied from class: Entity
      Start a new round
      Specified by:
      newRound in interface RoundUpdated
      Overrides:
      newRound in class Aero
      Parameters:
      roundNumber - the int number of the new round
    • postProcessFacingChange

      public void postProcessFacingChange()
      Utility function that handles situations where a facing change has some kind of permanent effect on the entity.
      Overrides:
      postProcessFacingChange in class Entity
    • canLandVertically

      public boolean canLandVertically()
      Depsite being VSTOL in other respects, aerodyne dropships are explicitly forbidden from vertical landings in atmosphere.
    • canTakeOffVertically

      public boolean canTakeOffVertically()
      Depsite being VSTOL in other respects, aerodyne dropships are explicitly forbidden from vertical takeoff in atmosphere.
    • getGenericBattleValue

      public int getGenericBattleValue()
      Description copied from class: Entity
      Calculates a "generic" Battle Value that is based on the average of all units of this type and tonnage. The purpose of this generic Battle Value is to allow a comparison of this unit's actual BV to that for units of its class. This can be used to balance forces without respect to unit or pilot quality.

      The generic BV values are calculated by a statistical elasticity model based on all data from the MegaMek database.

      Overrides:
      getGenericBattleValue in class SmallCraft
      Returns:
      The generic Battle value for this unit based on its tonnage and type
    • getRecoveryTime

      public int getRecoveryTime()
      Description copied from class: Entity
      Returns the recovery time for this entity in minutes.

      This method provides the base recovery time required for this entity type. The recovery time represents the duration needed to recover, repair, or prepare the entity after deployment or damage.

      Subclasses should override this method to provide entity-specific recovery times based on their type, weight class, or other relevant characteristics.

      Manual Reference: CamOps pg 214

      Overrides:
      getRecoveryTime in class SmallCraft
      Returns:
      The recovery time in minutes. The default implementation returns 60 minutes.
    • canPerformSpaceSalvageOperations

      public boolean canPerformSpaceSalvageOperations()
      Description copied from class: Entity
      Determines whether salvage operations can be performed in space scenarios.

      The default implementation returns false, indicating that salvage operations are not permitted. Subclasses should override this method to provide specific logic for determining salvage eligibility based on scenario conditions, campaign settings, or other relevant factors.

      Overrides:
      canPerformSpaceSalvageOperations in class Entity
      Returns:
      true if salvage operations can be performed, false otherwise. The default implementation always returns false.