Class BattleArmor

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

public class BattleArmor extends Infantry
This class represents a squad or point of battle armor equipped infantry, sometimes referred to as "Elementals".
See Also:
  • Field Details

    • MANIPULATOR_NONE

      public static final int MANIPULATOR_NONE
      See Also:
    • MANIPULATOR_ARMORED_GLOVE

      public static final int MANIPULATOR_ARMORED_GLOVE
      See Also:
    • MANIPULATOR_BASIC

      public static final int MANIPULATOR_BASIC
      See Also:
    • MANIPULATOR_BASIC_MINE_CLEARANCE

      public static final int MANIPULATOR_BASIC_MINE_CLEARANCE
      See Also:
    • MANIPULATOR_BATTLE

      public static final int MANIPULATOR_BATTLE
      See Also:
    • MANIPULATOR_BATTLE_MAGNET

      public static final int MANIPULATOR_BATTLE_MAGNET
      See Also:
    • MANIPULATOR_BATTLE_VIBRO

      public static final int MANIPULATOR_BATTLE_VIBRO
      See Also:
    • MANIPULATOR_HEAVY_BATTLE

      public static final int MANIPULATOR_HEAVY_BATTLE
      See Also:
    • MANIPULATOR_HEAVY_BATTLE_MAGNET

      public static final int MANIPULATOR_HEAVY_BATTLE_MAGNET
      See Also:
    • MANIPULATOR_HEAVY_BATTLE_VIBRO

      public static final int MANIPULATOR_HEAVY_BATTLE_VIBRO
      See Also:
    • MANIPULATOR_SALVAGE_ARM

      public static final int MANIPULATOR_SALVAGE_ARM
      See Also:
    • MANIPULATOR_CARGO_LIFTER

      public static final int MANIPULATOR_CARGO_LIFTER
      See Also:
    • MANIPULATOR_INDUSTRIAL_DRILL

      public static final int MANIPULATOR_INDUSTRIAL_DRILL
      See Also:
    • MANIPULATOR_TYPE_STRINGS

      public static final String[] MANIPULATOR_TYPE_STRINGS
      A list of the internal names for the different manipulator types. The indices in this collection correspond to the MANIPULATOR defines in BattleArmor. These names should match the internal name for the manipulator's MiscType entry.
    • MANIPULATOR_NAME_STRINGS

      public static final String[] MANIPULATOR_NAME_STRINGS
      A list of the display names for the different manipulator types. The indices in this collection correspond to the MANIPULATOR defines in BattleArmor. These names should match the name for the manipulator's MiscType entry.
    • CHASSIS_TYPE_BIPED

      public static final int CHASSIS_TYPE_BIPED
      See Also:
    • CHASSIS_TYPE_QUAD

      public static final int CHASSIS_TYPE_QUAD
      See Also:
    • myCost

      protected int myCost
      The cost of this unit. This value should be set when the unit's file is read.
    • DISPOSABLE_SRM2_AMMO

      public static final String DISPOSABLE_SRM2_AMMO
      Internal name of the Inner disposable SRM2 ammo pack.
      See Also:
    • DISPOSABLE_NARC_AMMO

      public static final String DISPOSABLE_NARC_AMMO
      Internal name of the disposable NARC ammo pack.
      See Also:
    • MINE_LAUNCHER

      public static final String MINE_LAUNCHER
      The internal name for the Mine Launcher weapon.
      See Also:
    • ADVANCED_ARMOR

      public static final String ADVANCED_ARMOR
      The internal name for advanced.
    • STANDARD_PROTOTYPE

      public static final String STANDARD_PROTOTYPE
      The internal name for standard Prototype.
    • STEALTH_PROTOTYPE

      public static final String STEALTH_PROTOTYPE
      The internal name for stealth Prototype.
    • BASIC_STEALTH_ARMOR

      public static final String BASIC_STEALTH_ARMOR
      The internal name for basic Stealth armor.
    • STANDARD_STEALTH_ARMOR

      public static final String STANDARD_STEALTH_ARMOR
      The internal name for standard Stealth armor.
    • IMPROVED_STEALTH_ARMOR

      public static final String IMPROVED_STEALTH_ARMOR
      The internal name for improved Stealth armor.
    • MIMETIC_ARMOR

      public static final String MIMETIC_ARMOR
      The internal name for Mimetic armor.
    • FIRE_RESISTANT

      public static final String FIRE_RESISTANT
      The internal name for fire-resistant armor.
    • CAMO_SYSTEM

      public static final String CAMO_SYSTEM
      The internal name for Simple Camo equipment.
      See Also:
    • SINGLE_HEX_ECM

      public static final String SINGLE_HEX_ECM
      The internal name for Single-Hex ECM equipment.
      See Also:
    • BA_MAX_MEN

      public static final int BA_MAX_MEN
      /** The maximum number of men in a battle armor squad.
      See Also:
    • LOC_SQUAD

      public static final int LOC_SQUAD
      The location for infantry equipment.
      See Also:
    • LOC_TROOPER_1

      public static final int LOC_TROOPER_1
      See Also:
    • LOC_TROOPER_2

      public static final int LOC_TROOPER_2
      See Also:
    • LOC_TROOPER_3

      public static final int LOC_TROOPER_3
      See Also:
    • LOC_TROOPER_4

      public static final int LOC_TROOPER_4
      See Also:
    • LOC_TROOPER_5

      public static final int LOC_TROOPER_5
      See Also:
    • LOC_TROOPER_6

      public static final int LOC_TROOPER_6
      See Also:
    • MOUNT_LOC_NONE

      public static final int MOUNT_LOC_NONE
      The location for mounted equipment on BA
      See Also:
    • MOUNT_LOC_BODY

      public static final int MOUNT_LOC_BODY
      See Also:
    • MOUNT_LOC_RIGHT_ARM

      public static final int MOUNT_LOC_RIGHT_ARM
      See Also:
    • MOUNT_LOC_LEFT_ARM

      public static final int MOUNT_LOC_LEFT_ARM
      See Also:
    • MOUNT_LOC_TURRET

      public static final int MOUNT_LOC_TURRET
      See Also:
    • MOUNT_LOC_NAMES

      public static final String[] MOUNT_LOC_NAMES
    • MOUNT_NUM_LOCS

      public static final int MOUNT_NUM_LOCS
      How many mount locations are possible?
      See Also:
    • TA_BATTLEARMOR

      protected static final TechAdvancement[] TA_BATTLEARMOR
  • Constructor Details

    • BattleArmor

      public BattleArmor()
      Generate a new, blank, battle armor unit. Hopefully, we'll be loaded from somewhere.
  • Method Details

    • getLocationAbbreviations

      public String[] getLocationAbbreviations()
      Specified by:
      getLocationAbbreviations in class Entity
    • getBaMountLocName

      public static String getBaMountLocName(int loc)
    • getBaMountLocAbbr

      public static String getBaMountLocAbbr(int loc)
    • getLocationNames

      public String[] getLocationNames()
      Specified by:
      getLocationNames in class Entity
    • locations

      public int locations()
      Returns the number of Troopers in the BattleArmor squad, since locations for BattleArmor correspond to the different suits instead of the actual mount locations for equipment.
      Specified by:
      locations in class Entity
    • getUnitType

      public int getUnitType()
      Specified by:
      getUnitType in class Entity
      See Also:
    • exoskeletonTechAdvancement

      public static TechAdvancement exoskeletonTechAdvancement()
    • getConstructionTechAdvancement

      public static TechAdvancement getConstructionTechAdvancement(int weightClass)
    • getConstructionTechAdvancement

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

      public int getOriginalJumpMP()
      Returns this entity's original jumping mp.
      Overrides:
      getOriginalJumpMP in class Entity
    • getWalkMP

      public int getWalkMP(MPCalculationSetting mpCalculationSetting)
      Overrides:
      getWalkMP in class Entity
    • getRunMP

      public int getRunMP(MPCalculationSetting mpCalculationSetting)
      Overrides:
      getRunMP in class Entity
    • hasMyomerBooster

      public boolean hasMyomerBooster()
      does this ba mount a myomer booster?
    • getJumpMP

      public int getJumpMP(MPCalculationSetting mpCalculationSetting)
      Overrides:
      getJumpMP in class Entity
    • getMovementString

      public String getMovementString(EntityMovementType movementType)
      Returns the name of the type of movement used. This is Infantry-specific.
      Specified by:
      getMovementString in class Entity
    • getMovementAbbr

      public String getMovementAbbr(EntityMovementType movementType)
      Returns the abbreviation of the type of movement used. This is Infantry-specific.
      Overrides:
      getMovementAbbr in class Infantry
    • rollHitLocation

      public HitData rollHitLocation(int table, int side, int aimedLocation, AimingMode aimingMode, int cover)
      Battle Armor units can only get hit in undestroyed troopers.
      Specified by:
      rollHitLocation in class Entity
    • rollHitLocation

      public HitData rollHitLocation(int side, int aimedLocation, AimingMode aimingMode, boolean isAttackingConvInfantry)
      Battle Armor units can only get hit in undestroyed troopers.
      Parameters:
      isAttackingConvInfantry - Set to true when attacked by CI, as these cannot score TacOps crits
    • rollHitLocation

      public HitData rollHitLocation(int table, int side)
      Description copied from class: Entity
      Rolls up a hit location
      Specified by:
      rollHitLocation in class Entity
    • getTrooperAtLocation

      public HitData getTrooperAtLocation(HitData hit, Entity transport)
      For level 3 rules, each trooper occupies a specific location precondition: hit is a location covered by BA
      Overrides:
      getTrooperAtLocation in class Entity
    • getTransferLocation

      public HitData getTransferLocation(HitData hit)
      Battle Armor units don't transfer damage.
      Specified by:
      getTransferLocation in class Entity
    • getArmor

      public int getArmor(int loc, boolean rear)
      Battle Armor units have no armor on their squad location.
      Overrides:
      getArmor in class Entity
      See Also:
    • getOArmor

      public int getOArmor(int loc, boolean rear)
      Battle Armor units have no armor on their squad location.
      Overrides:
      getOArmor in class Entity
      Parameters:
      loc - the location to check.
      rear - if true inspect the rear armor, else check the front.
      See Also:
    • getInternal

      public int getInternal(int loc)
      Battle Armor units have no internals on their squad location.
      Overrides:
      getInternal in class Entity
      See Also:
    • getOInternal

      public int getOInternal(int loc)
      Battle Armor units have no internals on their squad location.
      Overrides:
      getOInternal in class Entity
      See Also:
    • getOriginalTrooperCount

      public int getOriginalTrooperCount()
      Overrides:
      getOriginalTrooperCount in class Infantry
      Returns:
      The full original strength (trooper count) of this infantry unit
    • autoSetInternal

      public void autoSetInternal()
      Description copied from class: Entity
      Sets the internal structure for every location to appropriate undamaged values for the unit and location.
      Specified by:
      autoSetInternal in class Entity
    • setInternal

      public void setInternal(int value)
      Set the troopers in the unit to the given values.
    • addEquipment

      public void addEquipment(Mounted<?> mounted, int loc, boolean rearMounted) throws LocationFullException
      Mounts the specified equipment in the specified location.
      Overrides:
      addEquipment in class Entity
      Parameters:
      mounted - The new equipment
      loc - The location; may be Entity.LOC_NONE
      rearMounted - True to make the equipment rear-facing
      Throws:
      LocationFullException - When the location is full
    • getNoOfSlots

      protected int[] getNoOfSlots()
      Battle Armor units have as many critical slots as they need to hold their equipment.
      Overrides:
      getNoOfSlots in class Infantry
    • newRound

      public void newRound(int roundNumber)
      Prepare the entity for a new round of action.
      Specified by:
      newRound in interface RoundUpdated
      Overrides:
      newRound in class Infantry
      Parameters:
      roundNumber - the int number of the new round
    • applyDamage

      public void applyDamage()
      Update the unit to reflect damages taken in this phase.
      Overrides:
      applyDamage in class Infantry
    • getShootingStrength

      public int getShootingStrength()
      Overrides:
      getShootingStrength in class Infantry
      Returns:
      The number of troopers in the platoon before damage to the current phase is applied.
    • applyImprovedMagneticPulseTrooperDisable

      public int applyImprovedMagneticPulseTrooperDisable(int missiles)
      Records Improved Magnetic Pulse (iATM IMP) missile hits on this battle armor unit (IO IMP rules). Each warhead that hits disables one trooper through the End Phase of the following turn, capped at the number of troopers still alive. Additional hits have no effect beyond the missiles' normal damage, so a later hit never lowers the disabled count (it takes the higher of the existing and new count).
      Parameters:
      missiles - number of IMP warheads that hit this unit
      Returns:
      the number of troopers disabled
    • getImprovedMagneticPulseDisabledTroopers

      public int getImprovedMagneticPulseDisabledTroopers()
    • setCost

      public void setCost(int inC)
    • isBurdened

      public boolean isBurdened()
      Determines if the battle armor unit is burdened with un-jettisoned equipment. This can prevent the unit from jumping or using their special Anti-Mek attacks.
      Returns:
      true if the unit hasn't jettisoned its equipment yet, false if it has.
    • canMakeAntiMekAttacks

      public boolean canMakeAntiMekAttacks()
      Specified by:
      canMakeAntiMekAttacks in class Infantry
      Returns:
      True for all infantry that are allowed AM attacks. Mechanized infantry and infantry units with encumbering armor or field guns are not allowed to make AM attacks, while all other infantry are. Note that a conventional infantry unit without Anti-Mek gear (15 kg per trooper) can still make AM attacks but has a fixed 8 AM skill rating.
    • hasDWP

      public boolean hasDWP()
      does this BA have an unjettisoned DWP?
    • canMountDWP

      @Deprecated(since="0.51.0", forRemoval=true) public boolean canMountDWP()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns true if this BattleArmor can use a detachable weapon pack. A BattleArmor must have 2 or more walking MP and be Medium or heavier to mount DWP.

      Used in MML!

      Returns:
      True if this BA can use a detachable weapon pack
    • getStealthName

      public String getStealthName()
      Returns the name of the stealth Armor used by the BA. Mostly for MegaMekLab Usage.
      Returns:
      name of the stealth armor.
    • getCamoName

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

      @Deprecated(since="0.51.0", forRemoval=true) public int getShortStealthMod()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Public interface to the BattleArmors short range stealth modifier
      Returns:
      shortStealthMod
    • getMediumStealthMod

      @Deprecated(since="0.51.0", forRemoval=true) public int getMediumStealthMod()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Public interface to the BattleArmors medium range stealth modifier
      Returns:
      mediumStealthMod
    • getLongStealthMod

      @Deprecated(since="0.51.0", forRemoval=true) public int getLongStealthMod()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Public interface to the BattleArmors long range stealth modifier
      Returns:
      longStealthMod
    • isStealthActive

      public boolean isStealthActive()
      Determine if this unit has an active stealth system.

      Subclasses are encouraged to override this method.

      Overrides:
      isStealthActive in class Entity
      Returns:
      true if this unit has a stealth system that is currently active, false if there is no stealth system or if it is inactive.
    • isMimetic

      public boolean isMimetic()
    • hasCamoSystem

      public boolean hasCamoSystem()
    • isStealthy

      public boolean isStealthy()
      Specified by:
      isStealthy in class Infantry
      Returns:
      True if this infantry unit has any type of stealth system.
    • getStealthModifier

      public TargetRoll getStealthModifier(int range, Entity ae)
      Determine the stealth modifier for firing at this unit from the given range. If the value supplied for range is not one of the Entity class range constants, an IllegalArgumentException will be thrown.

      Subclasses are encouraged to override this method.

      Overrides:
      getStealthModifier in class Entity
      Parameters:
      range - - an int value that must match one of the Compute class range constants.
      ae - - the entity making the attack.
      Returns:
      a TargetRoll value that contains the stealth modifier for the given range.
    • 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.
      Specified by:
      getCost in class Entity
      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.
    • getAlternateCost

      public double getAlternateCost()
      Overrides:
      getAlternateCost in class Entity
      Returns:
      An alternative cost that will be added to the MekSummaryCache - at the moment it is primarily used to rework infantry costs for MekHQ, but it could be applied to other unit types as well - defaults to -1, so there is no confusion.
    • setWeightClass

      public void setWeightClass(int inWC)
    • getTrooperWeight

      public double getTrooperWeight()
    • getWeightClass

      public int getWeightClass()
      Overrides:
      getWeightClass in class Entity
    • setChassisType

      public void setChassisType(int inCT)
    • getChassisType

      public int getChassisType()
    • canAssaultDrop

      public boolean canAssaultDrop()
      Overrides:
      canAssaultDrop in class Entity
    • isTrooperActive

      public boolean isTrooperActive(int trooperNum)
    • getNumberActiveTroopers

      public int getNumberActiveTroopers()
    • getRandomTrooper

      public int getRandomTrooper()
    • loadWeapon

      public boolean loadWeapon(WeaponMounted mounted, AmmoMounted mountedAmmo)
      Description copied from class: Entity
      Tries to load the specified weapon with the specified ammo. Returns true if successful, false otherwise.
      Overrides:
      loadWeapon in class Entity
    • loadWeaponWithSameAmmo

      public boolean loadWeaponWithSameAmmo(WeaponMounted mounted, AmmoMounted mountedAmmo)
      Description copied from class: Entity
      Tries to load the specified weapon with the specified ammo. Returns true if successful, false otherwise.
      Overrides:
      loadWeaponWithSameAmmo in class Entity
    • getVibroClaws

      public int getVibroClaws()
      Description copied from class: Entity
      Return how many BA vibroclaws this Entity is equipped with
      Overrides:
      getVibroClaws in class Entity
    • isFireResistant

      public boolean isFireResistant()
      return if this BA has fire-resistant armor
    • isReflective

      public boolean isReflective()
      return if this BA has laser reflective armor
    • isReactive

      public boolean isReactive()
      return if this BA has reactive armor
    • hasImprovedSensors

      public boolean hasImprovedSensors()
      return if this BA has improved sensors
    • hasActiveProbe

      public boolean hasActiveProbe()
      return if the BA has any kind of active probe
    • canTransferCriticalSlots

      public boolean canTransferCriticalSlots(int loc)
      Description copied from class: Entity
      Returns true if this location should transfer criticalSlots to the next location inwards. Checks to see that every critical in this location is either already totally destroyed (not just hit) or was never hittable to begin with.
      Overrides:
      canTransferCriticalSlots in class Entity
    • canDoMechanizedBA

      public boolean canDoMechanizedBA()
      can this BattleArmor ride as Mechanized BA?
    • getWeight

      public double getWeight()
      Overrides:
      getWeight in class Entity
      Returns:
      the tonnage of the Entity, not its weight
    • getAlternateWeight

      public double getAlternateWeight()
    • getWeaponArc

      public int getWeaponArc(int weaponNumber)
      Description copied from class: Entity
      Returns the Rules.ARC that the weapon, specified by number, fires into.
      Specified by:
      getWeaponArc in class Entity
      Parameters:
      weaponNumber - integer equipment number, index from equipment list
      Returns:
      arc the specified weapon is in
    • isHardenedArmorDamaged

      public boolean isHardenedArmorDamaged(HitData hit)
      Description copied from class: Entity
      do we have a half-hit hardened armor point in the location struck by this?
      Overrides:
      isHardenedArmorDamaged in class Entity
    • setIsExoskeleton

      public void setIsExoskeleton(boolean exoskeleton)
    • isExoskeleton

      public boolean isExoskeleton()
    • isCrippled

      public boolean isCrippled()
      Description copied from class: Entity
      Returns TRUE if the entity meets the requirements for crippling damage as detailed in TW pg 258.
      Specified by:
      isCrippled in class Entity
      Returns:
      boolean
    • isDmgHeavy

      public boolean isDmgHeavy()
      Description copied from class: Entity
      Returns TRUE if the entity has been heavily damaged.
      Specified by:
      isDmgHeavy in class Entity
      Returns:
      boolean
    • isDmgModerate

      public boolean isDmgModerate()
      Description copied from class: Entity
      Returns TRUE if the entity has been moderately damaged.
      Specified by:
      isDmgModerate in class Entity
      Returns:
      boolean
    • isDmgLight

      public boolean isDmgLight()
      Description copied from class: Entity
      Returns TRUE if the entity has been lightly damaged.
      Specified by:
      isDmgLight in class Entity
      Returns:
      boolean
    • calculateSwarmDamage

      public int calculateSwarmDamage()
    • getEntityType

      public long getEntityType()
      Specified by:
      getEntityType in class Entity
    • getMaximumJumpMP

      public int getMaximumJumpMP()
    • getMaximumJumpMP

      public int getMaximumJumpMP(boolean ignoreEquipment)
      Returns the maximum jump MP that this BA can have.
      Parameters:
      ignoreEquipment - If true, bonuses from equipment like partial wing and jump booster are ignored. This is important for construction purposes, where we shouldn't allow the JSpinner to select these values.
    • getMaximumWalkMP

      public int getMaximumWalkMP()
    • getMaximumArmorPoints

      public int getMaximumArmorPoints()
    • setArmorType

      public void setArmorType(int armType)
      Overrides:
      setArmorType in class Entity
    • getArmCrits

      public int getArmCrits()
    • getBodyCrits

      public int getBodyCrits()
    • getTurretCapacity

      public int getTurretCapacity()
    • setTurretSize

      public void setTurretSize(int capacity)
    • hasModularTurretMount

      public boolean hasModularTurretMount()
    • setModularTurret

      public void setModularTurret(boolean modular)
    • getTotalCrits

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

      public int getNumCrits(int loc)
    • getNumAllowedAntiMekWeapons

      public int getNumAllowedAntiMekWeapons(int loc)
      Returns the number of allowed anti-mek weapons the supplied location can mount. The body can mount a set number of anti-mek weapons and a set number of anti-personnel, however for the arms can mount 2 AP or 1 AP and 1 AM.
    • getNumAllowedAntiPersonnelWeapons

      public int getNumAllowedAntiPersonnelWeapons(int loc, int trooper)
      Returns the number of allowed anti-personnel weapons the location can mount. The body can mount a set number of anti-mek weapons and a set number of anti-personnel, however the arms can mount 2 AP or 1 AP and 1 AM.
    • canCarryDisposableWeapons

      public boolean canCarryDisposableWeapons()
      Determines whether this Battle Armor squad is permitted to carry Disposable Weapons (TO:AuE p.116, Corrected Sixth Printing). A suit may only carry Disposable Weapons if it is also equipped with an anti-personnel weapon mount or two armored gloves. Note that armored gloves themselves carry the MiscType.F_AP_MOUNT flag, so a dedicated AP mount is identified as an F_AP_MOUNT item that is not an armored glove.
      Returns:
      true if this squad may carry Disposable Weapons
    • hasMagneticClamps

      public boolean hasMagneticClamps()
      Convenience method for determining if the BA has magnetic clamps.
      Returns:
      true if the unit has at least one magnetic clamp, else false
    • getLeftManipulatorName

      public String getLeftManipulatorName()
      Returns the EquipmentType internal name for the manipulator mounted in the left arm of this BattleArmor squad.
    • getRightManipulatorName

      public String getRightManipulatorName()
      Returns the EquipmentType internal name for the manipulator mounted in the right arm of this BattleArmor squad.
    • getManipulator

      public MiscMounted getManipulator(int mountLocation)
      Returns the Mounted for the manipulator in the given location of this BattleArmor squad or null if there is none. Note that the location should be MOUNT_LOC_LEFT_ARM or MOUNT_LOC_RIGHT_ARM.
      Throws:
      IllegalArgumentException - for locations that are not one of the arms
    • getLeftManipulator

      public Mounted<?> getLeftManipulator()
      Returns the Mounted for the manipulator mounted in the left arm of this BattleArmor squad.
    • getRightManipulator

      public Mounted<?> getRightManipulator()
      Returns the Mounted for the manipulator mounted in the right arm of this BattleArmor squad.
    • isClanExoWithoutHarJel

      public boolean isClanExoWithoutHarJel()
    • setClanExoWithoutHarJel

      public void setClanExoWithoutHarJel(boolean clanExoWithoutHarJel)
    • getLocationDamage

      public String getLocationDamage(int loc)
      Overrides:
      getLocationDamage in class Entity
    • getSpriteDrawPriority

      public int getSpriteDrawPriority()
      Description copied from class: Entity
      Used to determine the draw priority of different Entity subclasses. This allows different unit types to always be draw above/below other types.
      Overrides:
      getSpriteDrawPriority in class Entity
    • isBattleArmor

      public boolean isBattleArmor()
      Description copied from interface: BTObject
      Returns true when this object is a BattleArmor unit or of type BA for Alpha Strike. Returns false for any type of unit group even if it is of the right type.
      Returns:
      True when this is a BattleArmor unit
    • firstArmorIndex

      public int firstArmorIndex()
      Overrides:
      firstArmorIndex in class Entity
      Returns:
      The index of the first armored location (skipping vehicle body, et al.)
    • 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.

      Specified by:
      getGenericBattleValue in class Entity
      Returns:
      The generic Battle value for this unit based on its tonnage and type
    • isCarryableObject

      public boolean isCarryableObject()
      Description copied from interface: BTObject
      For future reference. Returns true when this object is a battlefield object (such as a crate) that can be picked up and carried by some types of units.
      Specified by:
      isCarryableObject in interface BTObject
      Specified by:
      isCarryableObject in interface ICarryable
      Overrides:
      isCarryableObject in class Entity
      Returns:
      True when this is a carryable battlefield object.
    • getCarriedObjectDamageAllocation

      public ICarryable.CarriedObjectDamageAllocation getCarriedObjectDamageAllocation()
    • targetForArmHitToHitCarriedObject

      public int targetForArmHitToHitCarriedObject()
    • hasMiscInMountLocation

      public boolean hasMiscInMountLocation(String internalName, int location)
      Returns true when the entity has a MiscType equipment of the given internalName, regardless of its state, in the given mount location (arm/body...). When available, use EquipmentTypeLookup internal names (or add one when it is not yet used for a MiscType). Note that any internal name, even of weapons, can be given but this method only searches misc equipment and will not find weapons.
      Parameters:
      internalName - The internal name of the misc, e.g. EquipmentTypeLookup.BA_MYOMER_BOOSTER
      location - The location, e.g. BattleArmor.MOUNT_LOC_LEFT_ARM
      Returns:
      True when the entity has a MiscType equipment of the given internalName in the given location
      See Also:
    • canChangeSecondaryFacing

      public boolean canChangeSecondaryFacing()
      Description copied from class: Entity
      Can this entity change secondary facing at all?
      Specified by:
      canChangeSecondaryFacing in class Entity
    • isSecondaryArcWeapon

      public boolean isSecondaryArcWeapon(int wn)
      Description copied from class: Entity
      Returns true if this weapon fires into the secondary facing arc. If false, assume it fires into the primary.
      Specified by:
      isSecondaryArcWeapon in class Entity
    • 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 Entity
      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: