Class Mek

All Implemented Interfaces:
Serializable, BTObject, CombatRole, Deployable, ForceAssignable, InGameObject, ITechnology, ITurnOrdered, PhaseUpdated, RoundUpdated, Targetable, Transporter
Direct Known Subclasses:
MekWithArms, QuadMek

public abstract class Mek extends Entity
You know what Meks are, silly.
See Also:
  • Field Details

  • Constructor Details

    • Mek

      public Mek()
      Construct a new, blank, Mek.
    • Mek

      public Mek(int inGyroType, int inCockpitType)
  • Method Details

    • getUnitType

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

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

      public abstract boolean cannotStandUpFromHullDown()
      Returns:
      True if this Mek can NOT stand up from hulldown. Checks leg and gyro damage.
    • hasCowl

      public boolean hasCowl()
      Returns:
      True if this Mek has the Cowl quirk and quirks are used in the present game.
    • damageCowl

      public int damageCowl(int amount)
      Damages the remaining cowl armor, if any, by the given amount. Returns the amount of excess damage that is left after deducting cowl armor. This method tests if the unit has Cowl and quirks are being used.
      Parameters:
      amount - The incoming damage
      Returns:
      The damage left after deducting the cowl's remaining armor, if any
    • getInnerLocation

      public static int getInnerLocation(int location)
      Returns the location that transferred damage or crits will go to from a given location.
    • mostRestrictiveLoc

      public static int mostRestrictiveLoc(int location1, int location2)
      Returns the location with the most restrictive firing arc for a weapon.
    • leastRestrictiveLoc

      public static int leastRestrictiveLoc(int location1, int location2)
      find the least restrictive location of the two locations passed in
      Parameters:
      location1 -
      location2 -
      Returns:
    • restrictScore

      public static int restrictScore(int location)
      Helper function designed to give relative restrictiveness of locations. Used for finding the most restrictive firing arc for a weapon.
    • setOmni

      public void setOmni(boolean omni)
      OmniMeks have handles for Battle Armor squads to latch onto. Please note, this method should only be called during this Mek's construction.

      Overrides Entity#setOmni(boolean)

      Overrides:
      setOmni in class Entity
    • setBAGrabBars

      public void setBAGrabBars()
    • setProtoMekClampMounts

      public void setProtoMekClampMounts()
    • load

      public void load(Entity unit, boolean checkElev, int bayNumber)
      Description copied from class: Entity
      Load the given unit.
      Overrides:
      load in class Entity
      Parameters:
      unit - - the Entity to be loaded.
    • locations

      public int locations()
      Returns the number of locations in the entity
      Specified by:
      locations in class Entity
    • 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 Entity
      Parameters:
      roundNumber - the int number of the new round
    • locationIsTorso

      public boolean locationIsTorso(int loc)
      Returns true if the location in question is a torso location
    • locationIsLeg

      public boolean locationIsLeg(int loc)
      Returns true if the location in question is a leg
      Overrides:
      locationIsLeg in class Entity
      Parameters:
      loc - the location to check.
    • countBadLegs

      public int countBadLegs()
      Count the number of destroyed or breached legs on the Mek
    • hasHipCrit

      public boolean hasHipCrit()
      Returns true if the entity has a hip crit.
      Overrides:
      hasHipCrit in class Entity
    • legHasHipCrit

      public boolean legHasHipCrit(int loc)
      Return true is the location is a leg and has a hip crit
    • isSystemIntact

      public boolean isSystemIntact(int system)
      This function returns true iff the system is in perfect condition.
      Parameters:
      system - the system to check
      Returns:
      false if the system is damaged.
    • countLegActuatorCrits

      public int countLegActuatorCrits(int loc)
      Count non-hip leg actuator crits
    • hasCompositeStructure

      public boolean hasCompositeStructure()
      does this Mek have composite internal structure?
      Returns:
    • hasReinforcedStructure

      public boolean hasReinforcedStructure()
      does this Mek have reinforced internal structure?
      Returns:
    • hasJumpBoosters

      public boolean hasJumpBoosters()
      does this Mek have working jump boosters?
      Returns:
    • hasExtendedRetractableBlade

      public boolean hasExtendedRetractableBlade()
      Does this Mek have an extended retractable blade in working condition?
    • hasRetractedBlade

      public boolean hasRetractedBlade(int loc)
      Does the entity have a retracted blade in the given location? Only true for biped Meks
    • hasTSM

      public boolean hasTSM(boolean includePrototype)
      Check for whether the Mek has triple strength myomer
      Parameters:
      includePrototype - Whether to include prototype TSM in the check. Prototype TSM does not have a movement bonus or a required heat level.
      Returns:
      Whether the Mek has TSM
    • antiTSMVulnerable

      public boolean antiTSMVulnerable()
      Description copied from class: Entity
      Check for vulnerability to anti-TSM munitions. ATSM affects Meks with prototype TSM and any industrial TSM created before 3050, and conventional infantry with TSM implants.
      Overrides:
      antiTSMVulnerable in class Entity
      Returns:
      Whether the unit is affected by ATSM munitions
    • hasActiveTSM

      public boolean hasActiveTSM()
    • hasActiveTSM

      public boolean hasActiveTSM(boolean includeIndustrial)
      Checks whether any type of TSM is active. Industrial and prototype are always on. Standard is on when heat level is >= 9.
      Parameters:
      includeIndustrial - Whether to include industrial TSM in the check
      Returns:
      Whether the Mek has some form of TSM and it's active
    • hasIndustrialTSM

      public boolean hasIndustrialTSM()
      does this Mek have industrial TSM=
      Returns:
    • hasNullSig

      public boolean hasNullSig()
      does this Mek have a null-sig-system?
      Returns:
    • hasVoidSig

      public boolean hasVoidSig()
      does this Mek have a void-sig-system?
      Returns:
    • hasTracks

      public boolean hasTracks()
      Does this Mek have tracks? Used for tracks as industrial equipment; QuadVees return false.
      Returns:
    • hasChameleonShield

      public boolean hasChameleonShield()
      does this Mek have a chameleon light polarization shield?
      Returns:
    • getStandingHeat

      public int getStandingHeat()
      Description copied from class: Entity
      get the heat generated by this Entity when standing still
      Overrides:
      getStandingHeat in class Entity
    • setEngine

      public void setEngine(Engine e)
      set this Mek's Engine
      Overrides:
      setEngine in class Entity
      Parameters:
      e - the Engine to set
    • calculateWalk

      protected int calculateWalk()
      Used to set this Mek's original walk mp
      Returns:
      this units calculated walking speed, dependent on engine rating and weight
    • getWalkHeat

      public int getWalkHeat()
      Description copied from class: Entity
      get the heat generated by this Entity when walking/cruising
      Overrides:
      getWalkHeat in class Entity
    • getRunMP

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

      public String getRunMPasString()
      Returns this entity's running/flank mp as a string.
      Overrides:
      getRunMPasString in class Entity
    • getRunHeat

      public int getRunHeat()
      Depends on engine type
      Overrides:
      getRunHeat in class Entity
    • getSprintMP

      public int getSprintMP(MPCalculationSetting mpCalculationSetting)
      Description copied from class: Entity
      Returns this entity's sprinting MP, modified according to the given setting. For units that can't sprint, this is equal to the modified run/flank MP.
      Overrides:
      getSprintMP in class Entity
      Returns:
      This entity's modified sprinting MP
    • getRunningGravityLimit

      public int getRunningGravityLimit()
      Description copied from class: Entity
      get the gravity limit for ground movement
      Overrides:
      getRunningGravityLimit in class Entity
    • getSprintHeat

      public int getSprintHeat()
      Depends on engine type
      Overrides:
      getSprintHeat in class Entity
    • getJumpMP

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

      public int getOriginalMechanicalJumpBoosterMP()
      Returns:
      The jump MP for the Mek's mechanical jump boosters, unmodified by damage, other equipment (shields) or any other effects.
    • getMechanicalJumpBoosterMP

      public int getMechanicalJumpBoosterMP(MPCalculationSetting mpCalculationSetting)
      Overrides:
      getMechanicalJumpBoosterMP in class Entity
      Returns:
      The jump MP for a Mek's mechanical jump boosters, modified as given through the MPCalculationSetting. Returns 0 for non-Meks.
    • hasChainDrape

      public boolean hasChainDrape()
    • getPartialWingJumpWeightClassBonus

      public int getPartialWingJumpWeightClassBonus()
    • getPartialWingJumpAtmoBonus

      public int getPartialWingJumpAtmoBonus()
    • getPartialWingJumpAtmoBonus

      public int getPartialWingJumpAtmoBonus(MPCalculationSetting mpCalculationSetting)
    • getPartialWingJumpBonus

      public int getPartialWingJumpBonus(Mounted<?> mount, MPCalculationSetting mpCalculationSetting)
      Gives the bonus to Jump MP conferred by a Mek partial wing.
      Parameters:
      mount - The mounted location of the Wing
      Returns:
      The Jump MP bonus conferred by the wing
    • getPartialWingJumpBonus

      public int getPartialWingJumpBonus(Mounted<?> mount)
    • getJumpType

      public int getJumpType()
      Returns the type of jump jet system the Mek has.
      Overrides:
      getJumpType in class Entity
    • getJumpHeat

      public int getJumpHeat(int movedMP)
      Description copied from class: Entity
      get the heat generated by this Entity when jumping for a certain amount of MP
      Overrides:
      getJumpHeat in class Entity
      Parameters:
      movedMP - the number of movement points spent
    • torsoJumpJets

      public int torsoJumpJets()
      Returns the number of (working) jump jets mounted in the torsos.
    • isEligibleForPavementOrRoadBonus

      public boolean isEligibleForPavementOrRoadBonus()
      Description copied from class: Entity
      Tanks and certain other units can get a +1 bonus to MP if their move is entirely on pavement.
      Overrides:
      isEligibleForPavementOrRoadBonus in class Entity
      Returns:
      true if the Entity gets a movement bonus on pavement
    • nextConversionMode

      public EntityMovementMode nextConversionMode(EntityMovementMode afterMode)
      Description copied from class: Entity
      Entities that can convert movement modes (LAMs, QuadVees) report the next mode to assume when a convert movement command is processed. This provides a set order for cycling through available modes.
      Overrides:
      nextConversionMode in class Entity
      Parameters:
      afterMode - The movement mode to convert from.
      Returns:
      The next movement mode in the sequence.
    • canFall

      public boolean canFall(boolean gyroLegDamage)
      QuadVees and LAMs may not have to make PSRs to avoid falling depending on their mode, and Meks using tracks for movement do not have to make PSRs for damage to gyro or leg actuators.
      Overrides:
      canFall in class Entity
      Parameters:
      gyroLegDamage - Whether the PSR is due to damage to gyro or leg actuators
      Returns:
      true if the Mek can fall due to failed PSR.
    • height

      public int height()
      Return the height of this Mek above the terrain.
      Overrides:
      height in class Entity
    • addEngineSinks

      public void addEngineSinks(int totalSinks, EquipmentFlag heatSinkFlag)
      Adds heat sinks to the engine. Uses clan/normal depending on the currently set techLevel
    • addEngineSinks

      public void addEngineSinks(int totalSinks, EquipmentFlag heatSinkFlag, boolean clan)
      Adds heat sinks to the engine. Adds either the engine capacity, or the entire number of heat sinks, whichever is less
    • addEngineSinks

      public void addEngineSinks(int totalSinks, String sinkName)
      base for adding engine sinks. Newer method allows externals to say how much are engine HS.
      Parameters:
      totalSinks - the amount of heatsinks to add to the engine
      sinkName - the String determining the type of heatsink to add. must be a lookupname of a heatsinktype
    • addEngineSinks

      public void addEngineSinks(String sinkName, int toAllocate)
      add heat sinks into the engine
      Parameters:
      sinkName - the String determining the type of heatsink to add. must be a lookupname of a heatsinktype
      toAllocate - Number of hs to add to the Engine.
    • getEngineCritHeat

      public int getEngineCritHeat()
      Returns extra heat generated by engine crits
      Specified by:
      getEngineCritHeat in class Entity
    • heatSinks

      public int heatSinks()
      Returns the number of heat sinks, functional or not.
    • heatSinks

      public int heatSinks(boolean countPrototypes)
      Returns the number of heat sinks, functional or not.
      Parameters:
      countPrototypes - Set TRUE to include Prototype Heat Sinks in the total.
    • damagedHeatSinks

      public int damagedHeatSinks()
      Returns the number of destroyed heat sinks.
    • getHeatSinkTypeName

      public String getHeatSinkTypeName()
      Returns the name of the heat sinks mounted on this 'Mek.
      Returns:
    • getHeatCapacity

      public int getHeatCapacity()
      Returns the about of heat that the entity can sink each turn.
      Overrides:
      getHeatCapacity in class Entity
    • getHeatCapacity

      public int getHeatCapacity(boolean radicalHeatSink)
      Specified by:
      getHeatCapacity in class Entity
    • getHeatCapacity

      public int getHeatCapacity(boolean includePartialWing, boolean includeRadicalHeatSink)
    • getHeatCapacityWithWater

      public int getHeatCapacityWithWater()
      Returns the about of heat that the entity can sink each turn, factoring for water.
      Specified by:
      getHeatCapacityWithWater in class Entity
    • tracksHeat

      public boolean tracksHeat()
      Description copied from interface: Targetable
      Used to identify an target that tracks heat buildup (Meks, ASFs, and small craft).
      Returns:
      Whether the target tracks heat buildup.
    • getMovementString

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

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

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

      public boolean isValidSecondaryFacing(int dir)
      Can this Mek torso twist in the given direction?
      Specified by:
      isValidSecondaryFacing in class Entity
    • clipSecondaryFacing

      public int clipSecondaryFacing(int dir)
      Return the nearest valid direction to torso twist in
      Specified by:
      clipSecondaryFacing in class Entity
      Returns:
      the closest valid secondary facing.
    • hasRearArmor

      public boolean hasRearArmor(int loc)
      Description copied from class: Entity
      Does this location have rear armor?
      Specified by:
      hasRearArmor in class Entity
    • getArmor

      public int getArmor(int loc, boolean rear)
      Returns the amount of armor in the location specified. Mek version, handles rear armor.
      Overrides:
      getArmor in class Entity
    • getArmorForReal

      public int getArmorForReal(int loc, boolean rear)
      Overrides:
      getArmorForReal in class Entity
    • getOArmor

      public int getOArmor(int loc, boolean rear)
      Returns the original amount of armor in the location specified. Mek version, handles rear armor.
      Overrides:
      getOArmor in class Entity
      Parameters:
      loc - the location to check.
      rear - if true inspect the rear armor, else check the front.
    • setArmor

      public void setArmor(int val, int loc, boolean rear)
      Sets the amount of armor in the location specified. Mek version, handles rear armor.
      Overrides:
      setArmor in class Entity
      Parameters:
      val - the value of the armor (eg how many armor points)
      loc - the location of the armor
      rear - true iff the armor is rear mounted.
    • initializeRearArmor

      public void initializeRearArmor(int val, int loc)
      Initializes the rear armor on the Mek. Sets the original and starting point of the armor to the same number.
    • setHardenedArmorDamaged

      public void setHardenedArmorDamaged(HitData hit, boolean damaged)
      Overrides:
      setHardenedArmorDamaged in class Entity
    • 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
      Returns:
    • setArmorDamagedThisTurn

      public void setArmorDamagedThisTurn(int loc, boolean tookdamage)
      did the armor in this location take damage which did not destroy it at least once this turn? this is used to decide whether to trigger Harjel II/III
    • isArmorDamagedThisTurn

      public boolean isArmorDamagedThisTurn(int loc)
      did the armor in this location take damage which did not destroy it at least once this turn? this is used to decide whether to trigger Harjel II/III
    • getWeaponArc

      public int getWeaponArc(int wn)
      Returns the Compute.ARC that the weapon fires into.
      Specified by:
      getWeaponArc in class Entity
    • isSecondaryArcWeapon

      public boolean isSecondaryArcWeapon(int weaponId)
      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
    • joinLocationAbbr

      public String joinLocationAbbr(List<Integer> locations, int limit)
      Description copied from class: Entity
      Joins the abbreviations for the locations into a String with / as the separator. If the number of locations exceeds the provided limit, the result is abbreviated. By default the abbreviation is simply an asterisk, but Meks have specific abbreviations locations that include all torso or leg positions.
      Overrides:
      joinLocationAbbr in class Entity
      Parameters:
      locations - A list of location indices
      limit - The maximum number of locations to show in full
      Returns:
      A string formatted for display that shows the locations
    • rollHitLocation

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

      public HitData rollHitLocation(int table, int side, int aimedLocation, AimingMode aimingMode, int cover)
      Description copied from class: Entity
      Rolls the to-hit number
      Specified by:
      rollHitLocation in class Entity
    • tac

      protected HitData tac(int table, int side, int location, int cover, boolean rear)
      Called when a thru-armor-crit is rolled. Checks the game options and either returns no critical hit, rolls a floating crit, or returns a TAC in the specified location.
    • getTransferLocation

      public HitData getTransferLocation(HitData hit)
      Gets the location that excess damage transfers to
      Specified by:
      getTransferLocation in class Entity
    • getDependentLocation

      public int getDependentLocation(int loc)
      Gets the location that is destroyed recursively
      Specified by:
      getDependentLocation in class Entity
    • setInternal

      public abstract void setInternal(int head, int ct, int t, int arm, int leg)
      Sets the internal structure for the Mek.
      Parameters:
      head - head
      ct - center torso
      t - right/left torso
      arm - right/left arm
      leg - right/left leg
    • autoSetInternal

      public void autoSetInternal()
      Set the internal structure to the appropriate value for the Mek's weight class
      Specified by:
      autoSetInternal in class Entity
    • addClanCase

      public void addClanCase()
      Description copied from class: Entity
      For clan units that get automatic Clan CASE, adds clan CASE in every location that has potentially explosive equipment (this includes uncharged PPC Capacitors).

      As clan CASE does not need critical slots, this method does not perform checks whether other CASE types are already present on a location.

      This method does nothing by default and must be overridden for unit types that get Clan CASE.

      Overrides:
      addClanCase in class Entity
    • addTargCompWithoutSlots

      public MiscMounted addTargCompWithoutSlots(MiscType etype, int loc, boolean omniPod, boolean armored) throws LocationFullException
      Adds equipment without adding slots for it. Specifically for targeting computers, which when loaded from a file don't have a correct size and get loaded slot by slot
      Throws:
      LocationFullException
    • addEquipment

      public Mounted<?> addEquipment(EquipmentType etype, EquipmentType etype2, int loc, boolean omniPod, boolean armored) throws LocationFullException
      Throws:
      LocationFullException
    • addEquipment

      public void addEquipment(Mounted<?> mounted, int loc, boolean rearMounted) throws LocationFullException
      Mounts the specified weapon in the specified location.
      Overrides:
      addEquipment in class Entity
      Throws:
      LocationFullException
    • addEquipment

      public void addEquipment(Mounted<?> mounted, int loc, boolean rearMounted, int critSlot) throws LocationFullException
      Mounts the specified weapon in the specified location.
      Overrides:
      addEquipment in class Entity
      Throws:
      LocationFullException
    • getTechAdvancement

      public static TechAdvancement getTechAdvancement(long etype, boolean primitive, boolean industrial, int weightClass)
    • getConstructionTechAdvancement

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

      public static TechAdvancement getIndustrialAdvFireConTA()
    • getCockpitTechAdvancement

      public static TechAdvancement getCockpitTechAdvancement(int cockpitType)
    • getCockpitTechAdvancement

      public TechAdvancement getCockpitTechAdvancement()
    • getGyroTechAdvancement

      public static TechAdvancement getGyroTechAdvancement(int gyroType)
    • getGyroTechAdvancement

      public TechAdvancement getGyroTechAdvancement()
    • getFullHeadEjectAdvancement

      public static TechAdvancement getFullHeadEjectAdvancement()
    • getRiscHeatSinkOverrideKitAdvancement

      public static TechAdvancement getRiscHeatSinkOverrideKitAdvancement()
    • addSystemTechAdvancement

      protected void addSystemTechAdvancement(CompositeTechLevel ctl)
      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 Entity
    • 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.
    • 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 Entity
    • implicitClanCASE

      public int implicitClanCASE()
      Description copied from class: Entity
      Used to for cost calculations. Though the TM rules allow a Clan unit to be designed without CASE, MM assumes that CASE is present in any location that has explosive equipment.
      Overrides:
      implicitClanCASE in class Entity
      Returns:
      The number of locations protected by Clan CASE beyond what is explicitly mounted.
    • getActuatorCost

      public double getActuatorCost()
    • getArmActuatorCost

      protected double getArmActuatorCost()
    • getLegActuatorCost

      protected abstract double getLegActuatorCost()
    • victoryReport

      public Vector<Report> victoryReport()
      Description copied from class: Entity
      Generates a vector containing reports on all useful information about this entity.
      Specified by:
      victoryReport in class Entity
    • addEntityBonuses

      public PilotingRollData addEntityBonuses(PilotingRollData roll)
      Add in any piloting skill mods
      Specified by:
      addEntityBonuses in class Entity
    • getMaxElevationChange

      public int getMaxElevationChange()
      Description copied from class: Entity
      The maximum elevation change the entity can cross
      Specified by:
      getMaxElevationChange in class Entity
    • getMaxElevationDown

      public int getMaxElevationDown(int currElevation)
      Description copied from class: Entity
      Returns the maximum number of downward elevation changes a unit can make. For some units (namely, WiGEs), this can depend upon their current elevation (since elevation determines if the WiGEs is using WiGE movement or not).
      Overrides:
      getMaxElevationDown in class Entity
      Returns:
    • isStealthActive

      public boolean isStealthActive()
      Determine if this unit has an active and working stealth system. (stealth can be active and not working when under ECCM)

      Sub-classes 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.
    • isStealthOn

      public boolean isStealthOn()
      Determine if this unit has an active and working stealth system. (stealth can be active and not working when under ECCM)

      Sub-classes are encouraged to override this method.

      Overrides:
      isStealthOn 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.
    • isNullSigActive

      public boolean isNullSigActive()
      Does the Mek have a functioning null signature system, or a void sig that is acting as a a null sig because of externally carried BA?
      Overrides:
      isNullSigActive in class Entity
      Returns:
      true if this unit has a null signature system that is currently active, false if there is no stealth system or if it is inactive.
    • isNullSigOn

      public boolean isNullSigOn()
      Description copied from class: Entity
      Determine if this unit has an active null-signature system.

      Sub-classes are encouraged to override this method.

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

      public boolean isVoidSigActive()
      Does the Mek have a functioning void signature system?
      Overrides:
      isVoidSigActive in class Entity
      Returns:
      true if this unit has a void signature system that is currently active, false if there is no stealth system or if it is inactive.
    • isVoidSigOn

      public boolean isVoidSigOn()
      Does the Mek have a functioning void signature system?
      Overrides:
      isVoidSigOn in class Entity
      Returns:
      true if this unit has a void signature system that is currently active, false if there is no stealth system or if it is turned off.
    • isChameleonShieldActive

      public boolean isChameleonShieldActive()
      Does the Mek have a functioning Chameleon Light Polarization Field? For a CLPS to be functioning it must be on and the unit can't have mounted mechanized BattleArmor.
      Overrides:
      isChameleonShieldActive in class Entity
      Returns:
      true if this unit has a void signature system that is currently active, false if there is no stealth system or if it is inactive.
    • isChameleonShieldOn

      public boolean isChameleonShieldOn()
      Does the Mek Chameleon Light Polarization Field turned on? This is used for heat generation purposes. A CLPS can be on and generating heat but not providing any benefit if the unit has mechanized BattleArmor.
      Overrides:
      isChameleonShieldOn in class Entity
      Returns:
      true if this unit has a void signature system that is currently active, false if there is no stealth system or if it is inactive.
    • 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.

      Sub-classes 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 - - entity making the attack
      Returns:
      a TargetRoll value that contains the stealth modifier for the given range.
    • isRepairable

      public boolean isRepairable()
      Determine if the unit can be repaired, or only harvested for spares.
      Overrides:
      isRepairable in class Entity
      Returns:
      A boolean that is true if the unit can be repaired (given enough time and parts); if this value is false, the unit is only a source of spares.
      See Also:
    • canCharge

      public boolean canCharge()
      Overrides:
      canCharge in class Entity
      Returns:
      Whether this type of unit can perform charges
    • canDFA

      public boolean canDFA()
      Overrides:
      canDFA in class Entity
      Returns:
      Whether this type of unit can perform DFA attacks
    • getNumberOfSinks

      public int getNumberOfSinks()
      Returns:
      the total number of sinks
    • hasDoubleHeatSinks

      public boolean hasDoubleHeatSinks()
    • hasLaserHeatSinks

      public boolean hasLaserHeatSinks()
    • setActiveSinksNextRound

      public void setActiveSinksNextRound(int sinks)
    • getActiveSinks

      public int getActiveSinks()
    • resetSinks

      public void resetSinks()
    • getActiveSinksNextRound

      public int getActiveSinksNextRound()
    • hasEjectSeat

      public boolean hasEjectSeat()
      Returns:
      unit has an ejection seat
    • isAutoEject

      public boolean isAutoEject()
      Returns:
      Returns the autoEject.
    • setAutoEject

      public void setAutoEject(boolean autoEject)
      Parameters:
      autoEject - The autoEject to set.
    • isCondEjectAmmo

      public boolean isCondEjectAmmo()
      Returns:
      Conditional Ejection Ammo
    • setCondEjectAmmo

      public void setCondEjectAmmo(boolean condEjectAmmo)
      Parameters:
      condEjectAmmo - The condEjectAmmo to set.
    • isCondEjectEngine

      public boolean isCondEjectEngine()
      Returns:
      Conditional Ejection Engine
    • setCondEjectEngine

      public void setCondEjectEngine(boolean condEjectEngine)
      Parameters:
      condEjectEngine - The condEjectEngine to set.
    • isCondEjectCTDest

      public boolean isCondEjectCTDest()
      Returns:
      Conditional Ejection CTDest
    • setCondEjectCTDest

      public void setCondEjectCTDest(boolean condEjectCTDest)
      Parameters:
      condEjectCTDest - The condEjectCTDest to set.
    • isCondEjectHeadshot

      public boolean isCondEjectHeadshot()
      Returns:
      Conditional Ejection Headshot
    • setCondEjectHeadshot

      public void setCondEjectHeadshot(boolean condEjectHeadshot)
      Parameters:
      condEjectHeadshot - The condEjectHeadshot to set.
    • removePartialCoverHits

      public boolean removePartialCoverHits(int location, int cover, int side)
      Overrides:
      removePartialCoverHits in class Entity
    • doomedInExtremeTemp

      public boolean doomedInExtremeTemp()
      Specified by:
      doomedInExtremeTemp in class Entity
    • doomedInVacuum

      public boolean doomedInVacuum()
      Specified by:
      doomedInVacuum in class Entity
    • doomedOnGround

      public boolean doomedOnGround()
      Specified by:
      doomedOnGround in class Entity
    • doomedInAtmosphere

      public boolean doomedInAtmosphere()
      Specified by:
      doomedInAtmosphere in class Entity
    • doomedInSpace

      public boolean doomedInSpace()
      Specified by:
      doomedInSpace in class Entity
    • hasEiCockpit

      public boolean hasEiCockpit()
      Overrides:
      hasEiCockpit in class Entity
    • hasActiveEiCockpit

      public boolean hasActiveEiCockpit()
      Overrides:
      hasActiveEiCockpit in class Entity
    • getCockpitStatus

      public int getCockpitStatus()
    • getCockpitStatusNextRound

      public int getCockpitStatusNextRound()
    • setCockpitStatus

      public void setCockpitStatus(int state)
    • getGyroType

      public int getGyroType()
      Description copied from class: Entity
      Only Meks have Gyros but this helps keep the code a bit cleaner.
      Overrides:
      getGyroType in class Entity
      Returns:
      -1
    • getCockpitType

      public int getCockpitType()
    • setGyroType

      public void setGyroType(int type)
    • setCockpitType

      public void setCockpitType(int type)
    • getGyroTypeString

      public String getGyroTypeString()
    • getCockpitTypeString

      public static String getCockpitTypeString(int cockpitType, boolean industrial)
    • getCockpitTypeString

      public String getCockpitTypeString()
    • getGyroTypeString

      public static String getGyroTypeString(int inGyroType)
    • getGyroTypeShortString

      public static String getGyroTypeShortString(int inGyroType)
    • getCockpitTypeString

      public static String getCockpitTypeString(int inCockpitType)
    • getGyroTypeForString

      public static int getGyroTypeForString(String inType)
    • getCockpitTypeForString

      public static int getCockpitTypeForString(String inType)
    • getSystemName

      public String getSystemName(int index)
    • getRawSystemName

      public String getRawSystemName(int index)
    • getGyroDisplayString

      public static String getGyroDisplayString(int inType)
    • getCockpitDisplayString

      public static String getCockpitDisplayString(int inType)
    • hasAdvancedFireControl

      public boolean hasAdvancedFireControl()
    • canAssaultDrop

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

      public boolean isLocationProhibited(Coords c, int currElevation)
      Overrides:
      isLocationProhibited in class Entity
      Parameters:
      c - Coords Coordinates
      currElevation - Elevation level
      Returns:
      true if the specified hex contains some sort of prohibited terrain if the Entity is at the specified elevation. Elevation generally only matters for units like WiGEs or VTOLs.
    • isLocationDeadly

      public boolean isLocationDeadly(Coords c)
      Description copied from class: Entity
      Returns true if the specified hex contains some sort of deadly terrain.
      Overrides:
      isLocationDeadly in class Entity
    • getMtf

      public String getMtf()
      Get an '.mtf' file representation of the Mek. This string can be directly written to disk as a file and later loaded by the MtfFile class.
    • addCockpit

      public boolean addCockpit()
      Add the critical slots necessary for a standard cockpit. Note: This is part of the mek creation public API, and might not be referenced by any MegaMek code.
      Returns:
      false if insufficient critical space
    • addIndustrialCockpit

      public boolean addIndustrialCockpit()
      Add the critical slots necessary for an industrial cockpit. Note: This is part of the mek creation public API, and might not be referenced by any MegaMek code.
      Returns:
      false if insufficient critical space
    • addPrimitiveCockpit

      public boolean addPrimitiveCockpit()
      Add the critical slots necessary for an industrial cockpit. Note: This is part of the mek creation public API, and might not be referenced by any MegaMek code.
      Returns:
      false if insufficient critical space
    • addIndustrialPrimitiveCockpit

      public boolean addIndustrialPrimitiveCockpit()
      Add the critical slots necessary for an industrial primitive cockpit. Note: This is part of the mek creation public API, and might not be referenced by any MegaMek code.
      Returns:
      false if insufficient critical space
    • addSmallCockpit

      public boolean addSmallCockpit()
      Add the critical slots necessary for a small cockpit. Note: This is part of the mek creation public API, and might not be referenced by any MegaMek code.
      Returns:
      false if insufficient critical space
    • addInterfaceCockpit

      public boolean addInterfaceCockpit()
      Add the critical slots necessary for a small cockpit. Note: This is part of the mek creation public API, and might not be referenced by any MegaMek code.
      Returns:
      false if insufficient critical space
    • addCommandConsole

      public boolean addCommandConsole()
    • addQuadVeeCockpit

      public boolean addQuadVeeCockpit()
    • addDualCockpit

      public boolean addDualCockpit()
    • addSuperheavyIndustrialCockpit

      public boolean addSuperheavyIndustrialCockpit()
    • addSuperheavyCommandConsole

      public boolean addSuperheavyCommandConsole()
    • addSmallCommandConsole

      public boolean addSmallCommandConsole()
    • addTorsoMountedCockpit

      public boolean addTorsoMountedCockpit(boolean vrpp)
      Add the critical slots necessary for a torso-mounted cockpit. Note: This is part of the mek creation public API, and might not be referenced by any MegaMek code.
      Parameters:
      vrpp - if this is a VRPP rather than a standard torso-mounted cockpit
      Returns:
      false if insufficient critical space
    • getCockpit

      public List<CriticalSlot> getCockpit()
      Convenience function that returns the critical slot containing the cockpit
      Returns:
    • getCrewForCockpitSlot

      public int getCrewForCockpitSlot(int loc, CriticalSlot cs)
      Determines which crew slot is associated with a particular cockpit critical.
      Parameters:
      cs - A cockpit critical slot
      Returns:
      The crew slot index associated with this critical slot, or -1 to indicate the entire crew.
    • hasCommandConsoleBonus

      public boolean hasCommandConsoleBonus()
      Description copied from class: Entity
      Units with a cockpit command console provide an initiative bonus to their side, provided that the commander is not currently functioning as pilot, the unit has advanced fire control, and the unit is heavy or assault weight class.
      Overrides:
      hasCommandConsoleBonus in class Entity
      Returns:
      Whether the Entity qualifies for initiative bonus from cockpit command console.
    • addGyro

      public boolean addGyro()
      Add the critical slots necessary for a standard gyro. Also set the gyro type variable. Note: This is part of the mek creation public API, and might not be referenced by any MegaMek code.
      Returns:
      false if insufficient critical space
    • addSuperheavyGyro

      public boolean addSuperheavyGyro()
      Add the critical slots necessary for a standard gyro. Also set the gyro type variable. Note: This is part of the mek creation public API, and might not be referenced by any MegaMek code.
      Returns:
      false if insufficient critical space
    • addCompactGyro

      public boolean addCompactGyro()
      Add the critical slots necessary for a compact gyro. Also set the gyro type variable. Note: This is part of the mek creation public API, and might not be referenced by any MegaMek code.
      Returns:
      false if insufficient critical space
    • addXLGyro

      public boolean addXLGyro()
      Add the critical slots necessary for an extra-light gyro. Also set the gyro type variable. Note: This is part of the mek creation public API, and might not be referenced by any MegaMek code.
      Returns:
      false if insufficient critical space
    • addHeavyDutyGyro

      public boolean addHeavyDutyGyro()
      Add the critical slots necessary for a heavy-duty gyro. Also set the gyro type variable. Note: This is part of the mek creation public API, and might not be referenced by any MegaMek code.
      Returns:
      false if insufficient critical space
    • addEngineCrits

      public boolean addEngineCrits()
      Add the critical slots necessary for the mek's engine. Calling this method before setting a mek's engine object will result in a NPE. Note: This is part of the mek creation public API, and might not be referenced by any MegaMek code.
      Returns:
      false if insufficient critical space
    • clearEngineCrits

      public void clearEngineCrits()
      Remove all engine critical slots from the mek. Note: This is part of the mek creation public API, and might not be referenced by any MegaMek code.
    • clearCockpitCrits

      public void clearCockpitCrits()
      Remove all cockpit critical slots from the mek. Note: This is part of the mek creation public API, and might not be referenced by any MegaMek code.
    • clearGyroCrits

      public void clearGyroCrits()
      Remove all gyro critical slots from the mek. Note: This is part of the mek creation public API, and might not be referenced by any MegaMek code.
    • shieldAbsorptionDamage

      public int shieldAbsorptionDamage(int damage, int location, boolean rear)
    • hasHarJelIIIn

      public boolean hasHarJelIIIn(int loc)
      Does this Mek have an undamaged HarJel system in this location?
      Parameters:
      loc - the int location to check
      Returns:
      a boolean value indicating a present HarJel system
    • hasHarJelIIIIn

      public boolean hasHarJelIIIIn(int loc)
      Does this Mek have an undamaged HarJel system in this location?
      Parameters:
      loc - the int location to check
      Returns:
      a boolean value indicating a present HarJel system
    • setGrappled

      public void setGrappled(int id, boolean attacker)
      Overrides:
      setGrappled in class Entity
    • isGrappleAttacker

      public boolean isGrappleAttacker()
      Overrides:
      isGrappleAttacker in class Entity
    • getGrappled

      public int getGrappled()
      Overrides:
      getGrappled in class Entity
    • isGrappledThisRound

      public boolean isGrappledThisRound()
      Overrides:
      isGrappledThisRound in class Entity
    • setGrappledThisRound

      public void setGrappledThisRound(boolean grappled)
      Overrides:
      setGrappledThisRound in class Entity
    • isEligibleForMovement

      public boolean isEligibleForMovement()
      Description copied from class: Entity
      Pretty much anybody's eligible for movement. If the game option is toggled on, inactive and immobile entities are not eligible. OffBoard units are always ineligible
      Overrides:
      isEligibleForMovement in class Entity
      Returns:
      whether or not the entity is allowed to move
    • isNuclearHardened

      public boolean isNuclearHardened()
      Description copied from class: Entity
      Checks if the unit is hardened against nuclear strikes.
      Specified by:
      isNuclearHardened in class Entity
      Returns:
      true if this is a hardened unit.
    • destroyLocation

      public void destroyLocation(int loc)
      Description copied from class: Entity
      Marks all equipment in a location on this entity as destroyed.
      Overrides:
      destroyLocation in class Entity
      Parameters:
      loc - The location that is destroyed.
    • destroyLocation

      public void destroyLocation(int loc, boolean blownOff)
      Description copied from class: Entity
      Marks all equipment in a location on this entity as destroyed.
      Overrides:
      destroyLocation in class Entity
      Parameters:
      loc - The location that is destroyed.
      blownOff - true if the location was blown off
    • setGrappleSide

      public void setGrappleSide(int side)
      Overrides:
      setGrappleSide in class Entity
    • getGrappleSide

      public int getGrappleSide()
      Overrides:
      getGrappleSide in class Entity
    • isCarefulStand

      public boolean isCarefulStand()
      Overrides:
      isCarefulStand in class Entity
    • getCoolantFailureAmount

      public int getCoolantFailureAmount()
      How many times TacOps coolant failure has occurred, which is also the reduction in heat sinking capacity
      Overrides:
      getCoolantFailureAmount in class Entity
    • addCoolantFailureAmount

      public void addCoolantFailureAmount(int amount)
      Description copied from class: Entity
      This is implemented in subclasses, do nothing in general
      Overrides:
      addCoolantFailureAmount in class Entity
      Parameters:
      amount - Amount of Coolant to add
    • resetCoolantFailureAmount

      public void resetCoolantFailureAmount()
      Reset count of TacOps coolant failures to zero (no loss)
      Overrides:
      resetCoolantFailureAmount in class Entity
    • getTotalCommGearTons

      public int getTotalCommGearTons()
      Specified by:
      getTotalCommGearTons in class Entity
      Returns:
      the total tonnage of communications gear in this entity
    • getHQIniBonus

      public int getHQIniBonus()
      Overrides:
      getHQIniBonus in class Entity
      Returns:
      the initiative bonus this Entity grants for HQ
    • 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
    • isIndustrial

      public boolean isIndustrial()
      Is this an Industrial Mek?
      Returns:
      if this Mek has an industrial inner structure
    • setJustMovedIntoIndustrialKillingWater

      public void setJustMovedIntoIndustrialKillingWater(boolean moved)
      set if this Mek just moved into water that would kill it because of the lack of environmental sealing
      Parameters:
      moved -
    • isJustMovedIntoIndustrialKillingWater

      public boolean isJustMovedIntoIndustrialKillingWater()
      did this Mek just moved into water that would kill it because we lack environmental sealing?
      Returns:
    • shouldDieAtEndOfTurnBecauseOfWater

      public boolean shouldDieAtEndOfTurnBecauseOfWater()
      should this Mek die at the end of turn because it's an IndustrialMek without environmental sealing that moved into water last round and stayed there?
      Returns:
    • setShouldDieAtEndOfTurnBecauseOfWater

      public void setShouldDieAtEndOfTurnBecauseOfWater(boolean moved)
      set if this Mek should die at the end of turn because it's an IndustrialMek without environmental sealing that moved into water last round and stayed there?
      Parameters:
      moved -
    • setStalled

      public void setStalled(boolean stalled)
      Set if this Mek's ICE Engine is stalled or not should only be used for industrial Meks carrying an ICE engine
      Parameters:
      stalled -
    • isStalled

      public boolean isStalled()
      Description copied from class: Entity
      Is this Entity's ICE Engine stalled?
      Overrides:
      isStalled in class Entity
      Returns:
      if this Entity's ICE engine is stalled
    • isShutDown

      public boolean isShutDown()
      Overrides:
      isShutDown in class Entity
    • doCheckEngineStallRoll

      public Vector<Report> doCheckEngineStallRoll(Vector<Report> vPhaseReport)
      Description copied from class: Entity
      Possibly do a ICE-Engine stall PSR (only intended for Meks, both Industrial and Battle).
      Overrides:
      doCheckEngineStallRoll in class Entity
      Parameters:
      vPhaseReport - the Report Vector containing the phase reports
      Returns:
      a Report Vector containing the passed in reports, and any additional ones
    • checkUnstall

      public void checkUnstall(Vector<Report> vPhaseReport)
      Description copied from class: Entity
      Check for uninstalling of this Entity's engine (only used for ICE-powered 'Meks).
      Overrides:
      checkUnstall in class Entity
      Parameters:
      vPhaseReport - the Report Vector containing the phase reports
    • isPrimitive

      public boolean isPrimitive()
      Overrides:
      isPrimitive in class Entity
      Returns:
      Whether the unit uses primitive or retro tech construction rules
    • hasArmoredCockpit

      public boolean hasArmoredCockpit()
    • hasArmoredGyro

      public boolean hasArmoredGyro()
    • hasArmoredEngine

      public boolean hasArmoredEngine()
      Overrides:
      hasArmoredEngine in class Entity
    • isCheckForCrit

      public boolean isCheckForCrit()
      should this Mek check for a critical hit at the end of turn due to being an industrial Mek and having been the target of a successful physical attack or for falling
    • getLevelsFallen

      public int getLevelsFallen()
      how many levels did this Mek fall this turn?
      Returns:
    • setLevelsFallen

      public void setLevelsFallen(int levels)
    • setCheckForCrit

      public void setCheckForCrit(boolean check)
    • isArm

      public boolean isArm(int loc)
      Is the passed in location an arm?
      Parameters:
      loc -
      Returns:
    • getArmoredComponentBV

      public double getArmoredComponentBV()
    • getGyroMultiplier

      public double getGyroMultiplier()
    • setFullHeadEject

      public void setFullHeadEject(boolean fullHeadEject)
    • hasFullHeadEject

      public boolean hasFullHeadEject()
    • setRiscHeatSinkOverrideKit

      public void setRiscHeatSinkOverrideKit(boolean heatSinkKit)
    • hasRiscHeatSinkOverrideKit

      public boolean hasRiscHeatSinkOverrideKit()
    • hasMPReducingHardenedArmor

      public abstract boolean hasMPReducingHardenedArmor()
    • hardenedArmorMPReduction

      protected int hardenedArmorMPReduction()
      Returns:
      The MP reduction due to hardened armor on this unit; 1 if it has HA, 0 if not.
    • getEngineHits

      public int getEngineHits()
      Specified by:
      getEngineHits in class Entity
    • getGyroHits

      public int getGyroHits()
    • isGyroDestroyed

      public boolean isGyroDestroyed()
      Description copied from class: Entity
      Only Meks have gyros, but this helps keep the code a bit cleaner.
      Overrides:
      isGyroDestroyed in class Entity
      Returns:
      true if the Entity is a Mek and has taken enough gyro hits to destroy it
    • getLocationDamage

      public String getLocationDamage(int loc)
      Specified by:
      getLocationDamage in class Entity
    • 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
    • isCrippled

      public boolean isCrippled(boolean checkCrew)
      Description copied from class: Entity
      Returns TRUE if the entity meets the requirements for crippling damage as detailed in TW pg 258. Excepting dead or non-existing crew issues
      Specified by:
      isCrippled in class Entity
      Returns:
      boolean
    • canEscape

      public boolean canEscape()
      Overrides:
      canEscape in class Entity
      Returns:
      true if this unit can reasonably escape from the board. It can be used to determine whether some non-destroyed units should be considered possible salvage.
    • isPermanentlyImmobilized

      public boolean isPermanentlyImmobilized(boolean checkCrew)
      Description copied from class: Entity
      This method returns true if a unit is permanently immobilized either because its crew is dead/gone or because of damage
      Overrides:
      isPermanentlyImmobilized in class Entity
      Returns:
      true if unit is permanently immobile
    • 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
    • hasCompactHeatSinks

      public boolean hasCompactHeatSinks()
    • getInternal

      public int getInternal(int loc)
      Description copied from class: Entity
      Returns the amount of internal structure in the location specified, or ARMOR_NA, or ARMOR_DESTROYED.
      Overrides:
      getInternal in class Entity
    • isSuperHeavy

      public boolean isSuperHeavy()
      Overrides:
      isSuperHeavy in class Entity
    • getEntityType

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

      public boolean isEjectionPossible()
      Overrides:
      isEjectionPossible in class Entity
    • hasClaw

      public boolean hasClaw(int location)
      Check to see if a Mek has a claw in one of its arms
      Parameters:
      location - (LOC_RARM or LOC_LARM)
      Returns:
      True/False
    • hasIntactHeatDissipatingArmor

      public boolean hasIntactHeatDissipatingArmor()
      Check whether a Mek has intact heat-dissipating armor in every location thus protecting it from external heat sources like fires or magma
      Returns:
      True/False
    • doRISCEmergencyCoolantCheckFor

      public boolean doRISCEmergencyCoolantCheckFor(Vector<Report> vDesc, HashMap<Integer,List<CriticalSlot>> vCriticals)
      return if a RISC emergency coolant failed its roll
      Parameters:
      vDesc -
      vCriticals -
      Returns:
    • hasDamagedCoolantSystem

      public boolean hasDamagedCoolantSystem()
    • setHasDamagedCoolantSystem

      public void setHasDamagedCoolantSystem(boolean hit)
    • getCoolantSystemMOS

      public int getCoolantSystemMOS()
    • isCoolingFlawActive

      public boolean isCoolingFlawActive()
    • setCoolingFlawActive

      public void setCoolingFlawActive(boolean flawActive)
    • 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
    • isMek

      public boolean isMek()
      Description copied from interface: BTObject
      Returns true when this object is a Mek (Industrial Mek or BattleMek) or of type BM/IM 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 Mek or BM/IM
    • isIndustrialMek

      public boolean isIndustrialMek()
      Description copied from interface: BTObject
      Returns true when this object is an Industrial Mek or of type IM for Alpha Strike. Returns false for any type of unit group even if it is of the right type.
      Returns:
      True when this is an Industrial Mek (not a BattleMek)
    • 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
    • getsAutoExternalSearchlight

      public boolean getsAutoExternalSearchlight()
      Overrides:
      getsAutoExternalSearchlight in class Entity
      Returns:
      True for unit types that have an automatic external searchlight (Meks and Tanks).
    • getAllCockpitCodeName

      public static Map<Integer,String> getAllCockpitCodeName()
    • getBlockedFiringLocations

      protected Map<Integer,List<Integer>> getBlockedFiringLocations()
      Description copied from class: Entity
      Method that returns the mapping between locations which, if cargo is carried, block other locations from firing.
      Overrides:
      getBlockedFiringLocations in class Entity
    • hasFunctionalLegAES

      public boolean hasFunctionalLegAES()
      Overrides:
      hasFunctionalLegAES in class Entity
    • legCount

      protected int legCount()
      Returns:
      The number of legs on this Mek (the nominal number, regardless of state or damage, i.e. 2, 3 or 4)