Class QuadMek

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

public class QuadMek extends Mek
See Also:
  • Constructor Details

    • QuadMek

      public QuadMek(String inGyroType, String inCockpitType)
    • QuadMek

      public QuadMek()
    • QuadMek

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

    • cannotStandUpFromHullDown

      public boolean cannotStandUpFromHullDown()
      Specified by:
      cannotStandUpFromHullDown in class Mek
      Returns:
      True if this Mek can NOT stand up from hull down. Checks leg and gyro damage.
    • isImmobile

      public boolean isImmobile()
      Description copied from class: Entity
      Returns true if the target is considered immobile (-4 to hit) as a target and also if it is considered immobile or temporarily or permanently immbolized for active movement. Overriding methods should check the status of the unit (shutdown, damage) and also the status of the crew (unconscious).
      Specified by:
      isImmobile in interface Targetable
      Overrides:
      isImmobile in class Entity
      Returns:
      True if the target is considered immobile as a target and unable to move actively.
    • getWalkMP

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

      public int getRunMP(MPCalculationSetting mpCalculationSetting)
      Overrides:
      getRunMP in class Mek
    • canChangeSecondaryFacing

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

      public boolean isValidSecondaryFacing(int dir)
      Description copied from class: Mek
      Can this Mek torso twist in the given direction?
      Overrides:
      isValidSecondaryFacing in class Mek
    • locationIsLeg

      public boolean locationIsLeg(int loc)
      Description copied from class: Mek
      Returns true if the location in question is a leg
      Overrides:
      locationIsLeg in class Mek
      Parameters:
      loc - the location to check.
      Returns:
      True if the given location is a leg location; this can only be true on Meks.
    • getWeaponArc

      public int getWeaponArc(int weaponNumber)
      Description copied from class: Mek
      Returns the Compute.ARC that the weapon fires into.
      Overrides:
      getWeaponArc in class Mek
      Parameters:
      weaponNumber - integer equipment number, index from equipment list
      Returns:
      arc the specified weapon is in
    • isQuadMek

      public boolean isQuadMek()
      Description copied from interface: BTObject
      Returns true when this object is a Quad Mek or QuadVee, regardless of conversion state. Returns false for any type of unit group even if it consists only of Quad Meks.
      Returns:
      True when this is a Quad (four-legged) Mek
    • setInternal

      public void setInternal(int head, int ct, int t, int arm, int leg)
      Description copied from class: Mek
      Sets the internal structure for the Mek.
      Specified by:
      setInternal in class Mek
      Parameters:
      head - head
      ct - center torso
      t - right/left torso
      arm - right/left arm
      leg - right/left leg
    • needsRollToStand

      public boolean needsRollToStand()
      Description copied from class: Entity
      Returns true is the entity needs a roll to stand up
      Overrides:
      needsRollToStand in class Entity
    • addEntityBonuses

      public PilotingRollData addEntityBonuses(PilotingRollData roll)
      Description copied from class: Mek
      Add in any piloting skill mods
      Overrides:
      addEntityBonuses in class Mek
    • getNoOfSlots

      protected int[] getNoOfSlots()
      Specified by:
      getNoOfSlots in class Entity
    • getLocationNames

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

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

      protected double getArmActuatorCost()
      Overrides:
      getArmActuatorCost in class Mek
    • getLegActuatorCost

      protected double getLegActuatorCost()
      Specified by:
      getLegActuatorCost in class Mek
    • 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 Mek
      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
    • innerRollHitLocation

      public HitData innerRollHitLocation(int table, int side, int aimedLocation, AimingMode aimingMode, int cover)
      Overrides:
      innerRollHitLocation in class Mek
    • removePartialCoverHits

      public boolean removePartialCoverHits(int location, int cover, int side)
      Overrides:
      removePartialCoverHits in class Mek
    • canGoHullDown

      public boolean canGoHullDown()
      Description copied from class: Entity
      Method to determine if an entity is currently capable of going hull-down. Note, this is *not* whether the entity can ever go hull-down.
      Overrides:
      canGoHullDown in class Entity
      Returns:
      True if the entity is able to go hull-down, else false.
    • isArm

      public boolean isArm(int loc)
      Overrides:
      isArm in class Mek
      Returns:
      True if the given location is an arm; always returns false for QuadMeks
    • hasMPReducingHardenedArmor

      public boolean hasMPReducingHardenedArmor()
      Specified by:
      hasMPReducingHardenedArmor in class Mek
    • getEntityType

      public long getEntityType()
      Overrides:
      getEntityType in class Mek
    • hasClaw

      public boolean hasClaw(int location)
      Description copied from class: Mek
      Check to see if a Mek has a claw in one of its arms
      Overrides:
      hasClaw in class Mek
      Parameters:
      location - (LOC_RIGHT_ARM or LOC_LEFT_ARM)
      Returns:
      True/False
    • legCount

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