Class MekWarrior

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

public class MekWarrior extends EjectedCrew
See Also:
  • Constructor Details

    • MekWarrior

      public MekWarrior(Entity originalRide)
      Create a new MekWarrior
      Parameters:
      originalRide - the Entity that was this MW's original ride
    • MekWarrior

      public MekWarrior(Crew crew, Player owner, Game game)
    • MekWarrior

      public MekWarrior()
      This constructor is so MULParser can load these entities
  • Method Details

    • isSelectableThisTurn

      public boolean isSelectableThisTurn()
      Description copied from class: Entity
      Returns true if this entity is selectable for action. Transported entities can not be selected.
      Overrides:
      isSelectableThisTurn in class Entity
    • getPickedUpByExternalId

      public int getPickedUpByExternalId()
      Returns:
      the int external id of the unit that picked up this MW
    • getPickedUpByExternalIdAsString

      public String getPickedUpByExternalIdAsString()
    • setPickedUpByExternalId

      public void setPickedUpByExternalId(String pickedUpByExternalId)
      set the int external id of the unit that picked up this MW
    • setPickedUpByExternalId

      public void setPickedUpByExternalId(int pickedUpByExternalId)
    • getPickedUpById

      public int getPickedUpById()
      Returns:
      the int id of the unit that picked up this MW
    • setPickedUpById

      public void setPickedUpById(int pickedUpById)
      set the int id of the unit that picked up this MW
    • doBattleValueCalculation

      public int doBattleValueCalculation(boolean ignoreC3, boolean ignoreSkill, CalculationReport calculationReport)
      Description copied from class: Entity
      Calculates and returns the Battle Value of this unit taking into account the parameters. This method should be overridden by subclasses of Entity to provide a unit type specific calculation of the Battle Value. A report of the calculation should be written to the given calculationReport.
      Overrides:
      doBattleValueCalculation in class Entity
      Parameters:
      ignoreC3 - When true, the BV contributions of any C3 computers are not added
      ignoreSkill - When true, the skill of the crew / pilot is not taken into account for BV
      calculationReport - A CalculationReport to write the BV calculation to
      Returns:
      The Battle Value of this unit calculated from its current state
    • setLanded

      public void setLanded(boolean landed)
      Ejected pilots do not get killed by ammo/fusion engine explosions so that means they are still up in the air and do not land until the end of the turn.
    • hasLanded

      public boolean hasLanded()
    • 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.
      Overrides:
      isCrippled in class EjectedCrew
      Returns:
      boolean
    • doomedInAtmosphere

      public boolean doomedInAtmosphere()
      Overrides:
      doomedInAtmosphere in class Entity
      Returns:
      True when this unit is not allowed to be or will not survive in any hex of a low altitude a.k.a. atmospheric map (unless it is being transported). Note that this has nothing to do with the atmosphere (or lack of it, depending on planetary conditions), only the map type and scale.
    • getEntityType

      public long getEntityType()
      Overrides:
      getEntityType in class Infantry
    • canSpot

      public boolean canSpot()
      Description copied from class: Entity
      Um, basically everything can spot for LRM indirect fire. Except for off-board units, units that sprinted, and units evading.
      Overrides:
      canSpot in class Entity
      Returns:
      true, if the entity is eligible to spot