Class SupportTank

All Implemented Interfaces:
Serializable, ICarryable, Transporter, InGameObject, CombatRole, ForceAssignable, ITechnology, ITurnOrdered, PhaseUpdated, RoundUpdated, BTObject, Deployable, Fortifiable, RubbleClearer, Targetable
Direct Known Subclasses:
LargeSupportTank

public class SupportTank extends Tank
This is a support vehicle
See Also:
  • Constructor Details

    • SupportTank

      public SupportTank()
  • Method Details

    • setBARRating

      public void setBARRating(int rating, int loc)
      Description copied from class: Entity
      Sets the barrier armor rating in a specific location for support vehicles. Has no effect on other unit types.
      Overrides:
      setBARRating in class Entity
      Parameters:
      rating - The BAR
      loc - The location index
    • setBARRating

      public void setBARRating(int rating)
      Description copied from class: Entity
      Sets the barrier armor rating for support vehicles. Has no effect on other unit types.
      Overrides:
      setBARRating in class Entity
      Parameters:
      rating - The BAR
    • getBARRating

      public int getBARRating(int loc)
      Description copied from class: Entity
      Return the BAR-rating of this Entity's armor
      Overrides:
      getBARRating in class Entity
      Returns:
      the BAR rating
    • hasBARArmor

      public boolean hasBARArmor(int loc)
      Overrides:
      hasBARArmor in class Entity
      Returns:
      True if this unit has BAR armor of a rating of less than 10 in the given location.
    • hasArmoredChassis

      public boolean hasArmoredChassis()
      Overrides:
      hasArmoredChassis in class Entity
      Returns:
      True if this entity has an armored chassis.
    • getConstructionTechAdvancement

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

      public static TechAdvancement getConstructionTechAdvancement(EntityMovementMode movementMode, int weightClass)
    • isLocationProhibited

      public boolean isLocationProhibited(Coords c, int testBoardId, int currElevation)
      Description copied from class: Tank
      Tanks have all sorts of prohibited terrain.
      Overrides:
      isLocationProhibited in class Tank
      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:
    • isMonoCycleOrBicycle

      public boolean isMonoCycleOrBicycle()
    • getTotalCommGearTons

      public int getTotalCommGearTons()
      Overrides:
      getTotalCommGearTons in class Tank
      Returns:
      the total tonnage of communications gear in this entity
    • getBaseChassisValue

      public double getBaseChassisValue()
      Overrides:
      getBaseChassisValue in class Entity
      Returns:
      the base chassis value for support vehicles, see TM pg 120. Non-support vehicle entities will return 0.
    • getBaseEngineValue

      public double getBaseEngineValue()
      Overrides:
      getBaseEngineValue in class Entity
      Returns:
      the base engine value for support vehicles, see TM pg 120. Non-support vehicle entities will return 0.
    • getFuelTonnage

      public double getFuelTonnage()
      Description copied from class: Tank
      Returns the mass of the fuel, which is used for calculating operating range. For combat vehicles this is considered part of the engine weight. For support vehicles it is in addition to the engine weight.
      Overrides:
      getFuelTonnage in class Tank
      Returns:
      fuel tonnage
    • setFuelTonnage

      public void setFuelTonnage(double fuel)
      Description copied from class: Tank
      Sets the fuel mass for support vehicles. Has no effect on combat vehicles.
      Overrides:
      setFuelTonnage in class Tank
      Parameters:
      fuel - The mass of the fuel in tons
    • getTotalSlots

      public int getTotalSlots()
      Description copied from class: Tank
      get the total amount of item slots available for this tank
      Overrides:
      getTotalSlots in class Tank
    • getEntityType

      public long getEntityType()
      Overrides:
      getEntityType in class Tank
    • isSupportVehicle

      public boolean isSupportVehicle()
      Description copied from interface: BTObject
      Returns true when this object is a Support Vehicle of any kind (including ground and aerospace). Returns false for any type of unit group even if it is of the right type.
      Returns:
      True when this is a Support Vehicle
    • isTractor

      public boolean isTractor()
      Description copied from class: Tank
      Used to determine if this vehicle can be the engine/tractor for a bunch of trailers
      Overrides:
      isTractor in class Tank
    • isTrailer

      public boolean isTrailer()
      Description copied from class: Tank
      Used to determine if this vehicle can be towed by a tractor
      Overrides:
      isTrailer in class Tank
      Returns:
      Whether the unit is constructed as a trailer
    • 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 Tank
      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 Tank
      Returns:
      The recovery time in minutes. The default implementation returns 60 minutes.