megamek.common
Class Entity

java.lang.Object
  extended by megamek.common.TurnOrdered
      extended by megamek.common.Entity
All Implemented Interfaces:
java.io.Serializable, RoundUpdated, Targetable, Transporter
Direct Known Subclasses:
Aero, Infantry, Mech, Protomech, Tank

public abstract class Entity
extends TurnOrdered
implements Transporter, Targetable, RoundUpdated

Entity is a master class for basically anything on the board except terrain.

See Also:
Serialized Form

Nested Class Summary
 class Entity.EntityFluff
           
 
Field Summary
protected  boolean _isEMId
           
protected  int altitude
          altitude is different from elevation.
protected  java.util.ArrayList<Mounted> ammoList
          A list of all mounted ammo.
protected  int armorTechLevel
           
protected  int armorType
           
protected  boolean armsFlipped
           
 ArtilleryTracker aTracker
           
protected  java.lang.StringBuffer battleForceDebugString
           
static int BATTLEFORCEEXTREMERANGE
           
static int BATTLEFORCELONGRANGE
           
static int BATTLEFORCEMEDIUMRANGE
           
protected  double[] battleForceMinRangeModifier
           
static int BATTLEFORCESHORTRANGE
           
protected  double[] battleForceToHitModifier
           
protected  java.util.ArrayList<Mounted> bombList
          A list of all mounted bombs.
protected  java.lang.StringBuffer bvText
           
protected  int c3CompanyMasterIndex
           
protected  int c3Master
           
protected  java.lang.String c3NetIdString
           
protected  boolean canUnstickByJumping
           
protected  boolean carcass
           
protected  java.lang.String chassis
           
 Pilot crew
          The pilot of the entity.
protected  CriticalSlot[][] crits
          This matrix stores critical slots in the format [location][slot #].
 int damageThisPhase
           
 int damageThisRound
           
protected  boolean DEBUGBATTLEFORCE
           
 int delta_distance
           
protected  boolean designValid
           
protected  boolean destroyed
           
protected  DisplacementAttackAction displacementAttack
           
protected  java.lang.String displayName
           
 boolean dodging
           
protected  boolean done
           
protected  boolean doomed
           
 int duplicateMarker
           
protected  int elevation
          this is the elevation of the Entity--with respect to the surface of the hex it's in.
protected  java.lang.String endColumn
           
protected  java.lang.String endRow
           
protected  java.lang.String endTable
           
protected  Engine engine
           
 int engineHitsThisRound
           
protected  java.util.ArrayList<Mounted> equipmentList
          A list of all mounted equipment.
protected  int externalId
          ID settable by external sources (such as mm.net)
protected  int facing
           
protected  java.util.ArrayList<java.lang.String> failedEquipmentList
           
protected  boolean findingClub
           
protected  Entity.EntityFluff fluff
           
protected  IGame game
           
 boolean gotPavementBonus
           
static int GRAPPLE_BOTH
           
static int GRAPPLE_LEFT
           
static int GRAPPLE_RIGHT
           
protected  boolean hasSpotlight
           
 int heat
           
 int heatBuildup
           
 int heatFromExternal
           
protected  int heatSinkCoolantFailureFactor
           
 boolean hitThisRoundByAntiTSM
           
protected  boolean hullDown
           
protected  int id
           
protected  boolean illuminated
           
protected  java.util.ArrayList<INarcPod> iNarcPods
           
 InfernoTracker infernos
          The object that tracks this unit's Inferno round hits.
 boolean inReverse
           
protected  boolean isCarefulStanding
           
protected  boolean isHidden
           
protected  int jumpMP
           
protected  int killerId
           
protected  int lastTarget
           
protected  boolean layingMines
           
static int LOC_DESTROYED
           
static int LOC_NONE
           
protected  long m_lNarcedBy
           
protected  long m_lPendingNarc
           
static int MAX_C3_NODES
           
protected  java.util.ArrayList<Mounted> miscList
          A list of all remaining equipment.
protected  boolean mixedTech
           
protected  java.lang.String model
           
 EntityMovementType moved
           
protected  EntityMovementMode movementMode
          Stores the current movement mode.
 int mpUsed
           
protected  int mpUsedLastRound
           
protected  java.util.ArrayList<NarcPod> narcPods
           
protected  java.lang.String nl
           
static int NONE
           
protected  boolean omni
           
protected  Player owner
           
protected  int ownerId
           
protected  java.util.ArrayList<INarcPod> pendingINarcPods
           
protected  java.util.ArrayList<NarcPod> pendingNarcPods
           
protected  Coords position
           
protected  boolean prone
           
 boolean reckless
           
 boolean rolledForEngineExplosion
           
protected  int sec_facing
           
protected  java.util.Map<java.lang.Integer,Coords> secondaryPositions
           
protected  java.lang.String shortName
           
protected  boolean shutDown
           
protected  boolean shutdownByBATaser
           
protected  boolean shutDownThisPhase
           
protected  java.lang.String source
           
protected  boolean spotlightIsActive
           
 boolean spotting
           
protected  java.lang.String startColumn
           
protected  java.lang.String startRow
           
protected  java.lang.String startTable
           
protected  int structureType
           
protected  boolean stuckInSwamp
           
protected  int taggedBy
           
protected  int taserFeedBackRounds
           
protected  int taserInterference
           
protected  int taserInterferenceRounds
           
protected  int taserShutdownRounds
           
protected  int techLevel
           
 TeleMissileTracker tmTracker
           
protected  java.util.ArrayList<Mounted> totalWeaponList
          A list of every weapon mount, including bay mounts and weapon group mounts
protected  boolean unjammingRAC
           
protected  boolean usedSearchlight
           
protected  int[] vectors
           
protected  int walkMP
           
protected  java.util.ArrayList<Mounted> weaponBayList
          A list of all mounted weapon bays
protected  java.util.ArrayList<Mounted> weaponGroupList
          A list of all mounted weapon groups
protected  java.util.ArrayList<Mounted> weaponList
          A list of all mounted weapons.
protected  float weight
           
protected  int year
           
 
Fields inherited from interface megamek.common.Targetable
TYPE_BLDG_IGNITE, TYPE_BUILDING, TYPE_ENTITY, TYPE_FLARE_DELIVER, TYPE_FUEL_TANK, TYPE_FUEL_TANK_IGNITE, TYPE_HEX_AERO_BOMB, TYPE_HEX_ARTILLERY, TYPE_HEX_BOMB, TYPE_HEX_CLEAR, TYPE_HEX_EXTINGUISH, TYPE_HEX_IGNITE, TYPE_HEX_SCREEN, TYPE_INARC_POD, TYPE_MINEFIELD_CLEAR, TYPE_MINEFIELD_DELIVER, TYPE_SEARCHLIGHT
 
Constructor Summary
Entity()
          Generates a new, blank, entity.
 
Method Summary
 int absHeight()
          Returns the absolute height of the entity
 Mounted addBomb(EquipmentType etype, int loc)
          indicate whether this is a bomb mount
protected  void addBomb(Mounted mounted, int loc)
           
 PilotingRollData addConditionBonuses(PilotingRollData roll, EntityMovementType moveType)
          Add in any modifiers due to global conditions like light/weather/etc.
 void addCoolantFailureAmount(int amount)
           
 boolean addCritical(int loc, CriticalSlot cs)
          Adds a critical to the first available slot in the location.
 boolean addCritical(int loc, int slot, CriticalSlot cs)
          Attempts to set the given slot to the given critical.
abstract  PilotingRollData addEntityBonuses(PilotingRollData roll)
          Add in any piloting skill mods
 Mounted addEquipment(EquipmentType etype, int loc)
          Creates a new mount for this equipment and adds it in.
 Mounted addEquipment(EquipmentType etype, int loc, boolean rearMounted)
          Creates a new mount for this equipment and adds it in.
 Mounted addEquipment(EquipmentType etype, int loc, boolean rearMounted, boolean bodyMounted)
          indicate whether this is bodymounted for BAs
 Mounted addEquipment(EquipmentType etype, int loc, boolean rearMounted, boolean bodyMounted, boolean isArmored)
          Creates a new mount for this equipment and adds it in.
 Mounted addEquipment(EquipmentType etype, int loc, boolean rearMounted, int nAmmo)
          mounting weapons needs to take account of ammo
protected  void addEquipment(Mounted mounted, int loc, boolean rearMounted)
           
protected  void addEquipment(Mounted mounted, int loc, boolean rearMounted, boolean isWeaponGroup)
           
protected  void addEquipment(Mounted mounted, int loc, boolean rearMounted, int nAmmo)
           
 void addFailedEquipment(java.lang.String s)
           
 void addKill(Entity kill)
           
 void addPassedThrough(Coords c)
           
 void addPilotingModifierForTerrain(PilotingRollData roll)
          Apply PSR modifier for difficult terrain in the current position
 void addPilotingModifierForTerrain(PilotingRollData roll, Coords c)
          Apply PSR modifier for difficult terrain at the specified coordinates
 void addPilotingModifierForTerrain(PilotingRollData roll, MoveStep step)
          Apply PSR modifier for difficult terrain at the move step position
 void addTargetedBySwarm(int entityId, int weaponId)
          Add a targeting by a swarm volley from a specified entity
 void addTransporter(Transporter component)
          Add a transportation component to this Entity.
 Mounted addWeaponGroup(EquipmentType etype, int loc)
           
 void applyDamage()
          Applies any damage that the entity has suffered.
protected  int applyGravityEffectsOnMP(int MP)
           
 void applySantaAnna()
          Apply any pending Santa Anna allocations to Killer Whale ammo bins effectively "splitting" the ammo bins in two This is a hack that I should really creat a general method of "splitting" ammo bins for
static java.lang.String armorStringFor(int value)
          Parses the game's internal armor representation into a human-readable string.
 void assignAMS(java.util.Vector<WeaponHandler> vAttacks)
          Assign AMS systems to the most dangerous incoming missile attacks.
 void attachINarcPod(INarcPod pod)
          attach an iNarcPod
 void attachNarcPod(NarcPod pod)
          add a narc pod from this team to the mech.
abstract  void autoSetInternal()
          Set the internal structure to the appropriate value for the mech's weight class
 void baTaserShutdown(int turns)
          shut this unit down due to a BA Taser attack
 boolean C3MasterIs(Entity e)
          Determines if the passed Entity is the C3 Master of this unit.
 int calcElevation(IHex current, IHex next)
           
 int calcElevation(IHex current, IHex next, int assumedElevation, boolean climb, boolean wigeEndClimbPrevious)
          A helper function for fiddling with elevation.
abstract  int calculateBattleValue()
          Calculates the battle value of this entity
 int calculateBattleValue(boolean ignoreC3, boolean ignorePilot)
          Calculates the battle value of this mech.
 int calculateFreeC3MNodes()
          Determine the remaining number of other C3 Master computers that can connect to this Entity.
 int calculateFreeC3Nodes()
          Determine the remaining number of other C3 computers that can connect to this Entity.
 boolean canAssaultDrop()
           
 boolean canAssist(IGame.Phase phase)
          Determines if an entity is eligible for a phase.
abstract  boolean canChangeSecondaryFacing()
          Can this entity change secondary facing at all?
 boolean canCharge()
          Whether this type of unit can perform charges
 boolean canDFA()
          Whether this type of unit can perform DFA attacks
 boolean canFlee()
          Returns whether an entity can flee from its current position.
 boolean canFlipArms()
          Returns true if the entity can flip its arms
 boolean canGoDown()
           
 boolean canGoDown(int assumedElevation, Coords assumedPos)
          is it possible to go down, or are we landed/just above the water/treeline?
 boolean canGoHullDown()
           
 boolean canGoUp(int assumedElevation, Coords assumedPos)
          is it possible to go up, or are we at maximum altitude?
 boolean canLayMine()
           
 boolean canLoad(Entity unit)
          Determines if this object can accept the given unit.
 boolean canLoad(Entity unit, boolean checkElev)
          Determines if this object can accept the given unit.
 boolean canRam()
          Whether this type of unit can perform Ramming attacks
 boolean canSpot()
          Um, basically everything can spot for LRM indirect fire.
 boolean canTransferCriticals(int loc)
          Returns true if this location should transfer criticals to the next location inwards.
 boolean canUnjamRAC()
          Returns true if the entity has an RAC which is jammed and not destroyed
 boolean canUnstickByJumping()
          Is the Entity stuck in a swamp?
 PilotingRollData checkBogDown(MoveStep step, IHex curHex, Coords lastPos, Coords curPos, int lastElev, boolean isPavementStep)
          Checks if the entity is moving into a hex that might cause it to bog down.
 PilotingRollData checkDislodgeSwarmers(MoveStep step)
          Checks if the entity is being swarmed.
 PilotingRollData checkGetUp(MoveStep step)
          Checks if the entity is getting up.
 PilotingRollData checkLandingInHeavyWoods(EntityMovementType overallMoveType, IHex curHex)
          Checks if an entity is landing (from a jump) in heavy woods.
 PilotingRollData checkLandingOnIce(EntityMovementType overallMoveType, IHex curHex)
          Checks if the entity is landing (from a jump) on ice-covered water.
 PilotingRollData checkLandingWithDamage(EntityMovementType overallMoveType)
          Checks if the entity is landing (from a jump) with damage that would force a PSR.
 PilotingRollData checkMovedTooFast(MoveStep step)
          return a PilotingRollData checking for wether this Entity moved too fast due to low gravity
 int checkMovementInBuilding(MoveStep step, MoveStep prevStep, Coords curPos, Coords prevPos)
          Checks to see if an entity is moving through building walls.
 PilotingRollData checkRecklessMove(MoveStep step, IHex curHex, Coords lastPos, Coords curPos, IHex prevHex)
          Checks if an entity is passing through certain terrain while not moving carefully
 PilotingRollData checkRubbleMove(MoveStep step, IHex curHex, Coords lastPos, Coords curPos)
          Checks if the entity is moving into rubble.
 PilotingRollData checkRunningWithDamage(EntityMovementType overallMoveType)
          Checks if the entity is attempting to run with damage that would force a PSR.
 PilotingRollData checkSideSlip(EntityMovementType moveType, IHex prevHex, EntityMovementType overallMoveType, MoveStep prevStep, int prevFacing, int curFacing, Coords lastPos, Coords curPos, int distance)
           
 PilotingRollData checkSkid(EntityMovementType moveType, IHex prevHex, EntityMovementType overallMoveType, MoveStep prevStep, int prevFacing, int curFacing, Coords lastPos, Coords curPos, boolean isInfantry, int distance)
          Checks if the entity might skid on pavement.
 PilotingRollData checkSprintingWithMASC(EntityMovementType overallMoveType, int used)
          Checks if the entity is attempting to sprint with MASC engaged.
 PilotingRollData checkSprintingWithSupercharger(EntityMovementType overallMoveType, int used)
          Checks if the entity is attempting to sprint with supercharger engaged.
 void checkUnstall(java.util.Vector<Report> vPhaseReport)
          check for unstalling of this Entity's engine (only used for ICE industrial Mechs)
 PilotingRollData checkWaterMove(int waterLevel, EntityMovementType overallMoveType)
          Checks if the entity is moving into depth 1+ water.
 PilotingRollData checkWaterMove(MoveStep step, IHex curHex, Coords lastPos, Coords curPos, boolean isPavementStep)
          Checks if the entity is moving into depth 1+ water.
 int chooseSide(Coords attackPos, boolean usePrior)
           
 void clearQuirks()
           
 boolean climbMode()
           
abstract  int clipSecondaryFacing(int dir)
          Returns the closest valid secondary facing to the given direction.
 int countQuirks()
          count all the quirks for this unit, positive and negative
 int countQuirks(java.lang.String grpKey)
          count the quirks for this unit, for a given group name
 int countWorkingMisc(java.math.BigInteger flag)
          return how many misc equipments with the specified flag the unit has
 java.lang.String damageBayDoor()
          Damages a randomly determined bay door on the entity, if one exists
 boolean damageDockCollar()
          Damages a randomly determined docking collar on the entity, if one exists
 void damageDoorRecovery(Entity en)
          damage the door of the first bay that can load this unit
static void decodeTransporters(Entity entity, java.lang.String transporters)
          Set the Transporters for the given Entity.
 void deployOffBoard()
          Deploy this offboard entity at the previously specified distance and direction.
 java.lang.String destroy(java.lang.String reason, boolean survivable, boolean canSalvage)
           
 void destroyLocation(int loc)
          Marks all equipment in a location on this entity as destroyed.
 void destroyRetractableBlade(int loc)
          destroys the first retractable blade critical slot found
 java.util.Vector<Report> doCheckEngineStallRoll(java.util.Vector<Report> vPhaseReport)
          possibly do a ICE-Engine stall PSR, only industrialmechs will actually do such a roll
abstract  boolean doomedInAtmosphere()
           
abstract  boolean doomedInSpace()
           
abstract  boolean doomedInVacuum()
           
abstract  boolean doomedOnGround()
           
 int elevationOccupied(IHex hex)
          Returns the elevation that this entity would be on if it were placed into the specified hex.
static java.lang.String encodeTransporters(Entity entity)
          Get a list of the class names of the Transporters for the given Entity.
 boolean entityIsBiped()
          Helper function to determine if a entity is a biped
 boolean entityIsQuad()
          Helper function to determine if a entity is a quad
 boolean equals(java.lang.Object object)
          Two entities are equal if their ids are equal
 void extendBlade(int loc)
          Set the retractable blade in the given location as extended Takes the first piece of appropriate equipment
 DisplacementAttackAction findTargetedDisplacement()
          Returns any known displacement attacks (should only be one) that this entity is a target of.
 boolean fixElevation()
          defensively check and correct elevation
 void generateDisplayName()
          Generates the display name for this entity.
 void generateShortName()
          Generate the short name for a unit

Sub-classes are allowed to override this method.

 Sensor getActiveSensor()
           
 int getActiveUMUCount()
          This counts the number of UMU's a Mech has that are still viable
 int getActiveVibrobladeHeat(int location)
          Checks to see if any heat is given off by an active vibro blade
 int getAllUMUCount()
          This returns all UMU a mech has.
 int getAltitude()
           
 java.util.ArrayList<Mounted> getAmmo()
           
 int getArmor(HitData hit)
          Returns the amount of armor in the location hit, or IArmorState.ARMOR_NA, or IArmorState.ARMOR_DESTROYED.
 int getArmor(int loc)
          Returns the amount of armor in the location specified, or ARMOR_NA, or ARMOR_DESTROYED.
 int getArmor(int loc, boolean rear)
          Returns the amount of armor in the location specified, or IArmorState.ARMOR_NA, or IArmorState.ARMOR_DESTROYED.
 double getArmorRemainingPercent()
          Returns the percent of the armor remaining
 java.lang.String getArmorString(int loc)
          Returns a string representing the armor in the location
 java.lang.String getArmorString(int loc, boolean rear)
          Returns a string representing the armor in the location
 int getArmorTechLevel()
           
 int getArmorType()
           
 double getArmorWeight()
           
 boolean getArmsFlipped()
          Returns true if the mech's arms are flipped to the rear
 int getBadCriticals(int type, int index, int loc)
          The number of critical slots that are destroyed in the component.
 int getBAPRange()
          What's the range of the BAP equipment?
 int getBARRating()
          Return the BAR-rating of this Entity's armor
 PilotingRollData getBasePilotingRoll()
          Returns an entity's base piloting skill roll needed Only use this version if the entity is through processing movement
 PilotingRollData getBasePilotingRoll(EntityMovementType moveType)
          Returns an entity's base piloting skill roll needed
 int getBattleForceArmorPoints()
           
 java.lang.String getBattleForceDamageThresholdString()
          only used for Aerospace and Dropships
 long getBattleForceJumpPoints()
           
 java.lang.String getBattleForceMovement()
          Returns the Battle Force Movement string this is used in a battle force game
 long getBattleForceMovementPoints()
           
 java.lang.String getBattleForceOverHeatValue()
           
 int getBattleForcePoints()
          Start of Battle Force Conversion Methods
 int getBattleForceSize()
           
 java.lang.String getBattleForceSpecialAbilites()
           
 int getBattleForceStandardWeaponsDamage(int range)
           
 int getBattleForceStandardWeaponsDamage(int range, boolean ignoreHeat, boolean ignoreSpecialAbilities)
           
 int getBattleForceStandardWeaponsDamage(int range, int ammoType)
           
 int getBattleForceStandardWeaponsDamage(int range, int ammoType, boolean ignoreHeat, boolean ignoreSpecialAbilities)
           
 int getBattleForceStructurePoints()
          this will be unit specific
 int getBattleForceTotalHeatGeneration(boolean allowRear)
           
 Mounted getBayByAmmo(Mounted mammo)
          get the bay that ammo is associated with
 java.util.Vector<Entity> getBayLoadedUnits()
          only entities in Bays (for cargo damage to Aero units
 int getBlueShieldRounds()
           
 int[] getBombLoadout()
          produce an int array of the number of bombs of each type based on the current bomblist
 java.util.ArrayList<Mounted> getBombs()
           
 java.util.Vector<Mounted> getBombs(java.math.BigInteger flag)
           
 java.lang.String getBVText()
          Return a HTML string that describes the BV calculations
 Entity getC3Master()
          Return the unit that is current master of this unit's C3 network.
 int getC3MasterId()
          Get the ID of the master unit in this unit's C3 network.
 java.lang.String getC3NetId()
           
 Entity getC3Top()
           
 int getCargoMpReduction()
           
 java.lang.String getChassis()
          Returns the chassis name for this entity.
 java.util.List<Mounted> getClubs()
           
 int getCoolantFailureAmount()
           
abstract  double getCost(boolean ignoreAmmo)
           
 Pilot getCrew()
           
 CriticalSlot getCritical(int loc, int slot)
          Returns a critical hit slot
 int getDamageReductionFromModularArmor(int loc, int damage, java.util.Vector<Report> vDesc)
           
abstract  int getDependentLocation(int loc)
          Gets the location that is destroyed recursively.
 int getDeployRound()
          The round the unit will be deployed
 DisplacementAttackAction getDisplacementAttack()
           
 java.lang.String getDisplayName()
          Returns the display name for this entity.
 int getDocks()
           
 java.util.Vector<Entity> getDroppableUnits()
           
 double getECCMStrength()
           
 int getECMRange()
          What's the range of the ECM equipment?
 double getECMStrength()
           
 int getElevation()
          Returns the elevation of this entity.
 int getEmptyCriticals(int loc)
          Returns the number of empty critical slots in a location
 Engine getEngine()
           
abstract  int getEngineCritHeat()
          Returns extra heat generated by engine crits
 java.util.ArrayList<Mounted> getEquipment()
          Returns an enumeration of all equipment
 Mounted getEquipment(int index)
          Returns the equipment, specified by number
 int getEquipmentNum(Mounted mounted)
          Returns the equipment number of the specified equipment, or -1 if equipment is not present.
 EquipmentType getEquipmentType(CriticalSlot cs)
           
 int getEvasionBonus()
           
 Entity getExteriorUnitAt(int loc, boolean isRear)
          If a unit is being transported on the outside of the transporter, it can suffer damage when the transporter is hit by an attack.
 int getExternalId()
          this returns the external ID.
 java.util.ArrayList<Entity> getExternalUnits()
           
 int getExtraCommGearTons()
           
 int getExtremeRangeModifier()
           
 int getFacing()
          Returns the primary facing, or -1 if n/a
 java.util.Iterator<java.lang.String> getFailedEquipment()
          Returns an enumeration which contains the name of each piece of equipment that failed to load.
 java.util.Vector<Bay> getFighterBays()
           
 int getFighterLaunchRate()
           
 Mounted getFirstBay(WeaponType wtype, int loc, boolean rearMount)
          return the first bay of the right type in the right location with enough damage to spare
 int getFirstWeapon()
          Returns the first ready weapon
 Entity.EntityFluff getFluff()
          Returns the fluff for this entity.
 int getForwardArc()
          Returns the forward firing arc for this entity - overrided by some units
 IGame getGame()
          This returns the game this Entity belongs to.
 boolean getGaveKillCredit()
           
 int getGhostTargetOverride()
           
 int getGhostTargetRoll()
           
 int getGhostTargetRollMoS()
           
 int getGoodCriticals(CriticalSlot cs, int loc)
          Returns the number of operational critical slots of the specified type in the location
 int getGoodCriticals(int type, int index, int loc)
          Returns the number of operational critical slots of the specified type in the location
 int getGrappled()
           
 int getGrappleSide()
           
 int getGyroType()
          Only Mechs have Gyros but this helps keep the code a bit cleaner.
 java.util.Vector<java.lang.Integer> getHeading()
          return the heading of the unit based on its active vectors if vectors are tied then return two headings
abstract  int getHeatCapacity()
          Returns the amount of heat that the entity can sink each turn.
abstract  int getHeatCapacityWithWater()
          Returns the amount of heat that the entity can sink each turn, factoring in whether the entity is standing in water.
 int getHeatFiringModifier()
          Returns the modifier to weapons fire due to heat.
 int getHeatInArc(int location, boolean rearMount)
           
 int getHeatMPReduction()
          This returns how much MP is removed due to heat
 int getHeight()
           
 int getHitCriticals(int type, int index, int loc)
          Number of slots doomed, missing or destroyed in a location
 int getHittableCriticals(int loc)
          Returns the number of operational critical slots remaining in a location
 int getHQIniBonus()
           
 int getId()
          Returns the ID number of this Entity.
 java.util.Iterator<INarcPod> getINarcPodsAttached()
          Get an Enumeration of INarcPods that are attached to this entity.
 int getInternal(HitData hit)
          Returns the amount of internal structure in the location hit.
 int getInternal(int loc)
          Returns the amount of internal structure in the location specified, or ARMOR_NA, or ARMOR_DESTROYED.
 double getInternalRemainingPercent()
          Returns the percent of the armor remaining
 java.lang.String getInternalString(int loc)
          Returns a string representing the internal structure in the location
 int getJumpHeat(int movedMP)
          get the heat generated by this Entity when jumping for a certain amount of MP
 int getJumpMP()
          Returns this entity's current jumping MP, not effected by terrain, factored for gravity.
 int getJumpMP(boolean gravity)
          return this entity's current jump MP, possibly affected by gravity
 int getJumpMPWithTerrain()
          Returns this entity's current jumping MP, effected by terrain (like water.)
 int getJumpType()
           
 int getKillNumber()
           
 java.util.Enumeration<Entity> getKills()
           
 int getLastTarget()
           
 java.util.Vector<Entity> getLaunchableFighters()
           
 java.util.Vector<Entity> getLaunchableSmallCraft()
           
 Bay getLoadedBay(int bayID)
           
 java.util.Vector<Entity> getLoadedFighters()
           
 java.util.Vector<Entity> getLoadedSmallCraft()
           
 java.util.List<Entity> getLoadedUnits()
          Get a List of the units currently loaded into this payload.
 java.lang.String getLocationAbbr(HitData hit)
          Returns the abbreviated name of the location specified.
 java.lang.String getLocationAbbr(int loc)
          Returns the abbreviated name of the location specified.
abstract  java.lang.String[] getLocationAbbrs()
           
 int getLocationFromAbbr(java.lang.String abbr)
          Returns the location that the specified abbreviation indicates
 java.lang.String getLocationName(HitData hit)
          Returns the name of the location specified.
 java.lang.String getLocationName(int loc)
          Returns the name of the location specified.
abstract  java.lang.String[] getLocationNames()
           
 int getLocationStatus(int loc)
          returns exposure or breached flag for location
 int getLongRangeModifier()
           
abstract  int getMaxElevationChange()
          The maximum elevation change the entity can cross
 int getMaxElevationDown()
          by default, entities can move as far down as they can move up
 int getMDIniBonus()
           
 int getMediumRangeModifier()
           
 java.util.ArrayList<Mounted> getMisc()
           
 java.lang.String getModel()
          Returns the unit code for this entity.
abstract  java.lang.String getMovementAbbr(EntityMovementType mtype)
          Returns the abbreviation of the name of the type of movement used.
 int getMovementBeforeSkidPSRModifier(int distance)
          Calculate the piloting skill roll modifier, based upon the number of hexes moved this phase.
 EntityMovementMode getMovementMode()
          Get the movement mode of the entity
 java.lang.String getMovementModeAsBattleForceString()
          Get the movement mode of the entity and return it as a battle force string.
 java.lang.String getMovementModeAsString()
          Get the movement mode of the entity as a String.
abstract  java.lang.String getMovementString(EntityMovementType mtype)
          Returns the name of the type of movement used.
 Sensor getNextSensor()
           
 int getNextWeapon(int start)
          Returns the next ready weapon, starting at the specified index
protected abstract  int[] getNoOfSlots()
           
 int getNumberOf(EquipmentType etype)
          Returns how many of the given equipment are present in the mech, destroyed or not.
 int getNumberOfCriticals(EquipmentType etype)
          Returns the number of critical slots present in the mech, destroyed or not.
 int getNumberOfCriticals(EquipmentType etype, int loc)
          Returns the number of critical slots present in the section, destroyed or not.
 int getNumberOfCriticals(int loc)
          Returns the number of total critical slots in a location
 int getNumberOfCriticals(int type, int index, int loc)
          Returns the number of critical slots present in the section, destroyed or not.
 int getNumberOfShields(long size)
          Check to see how many shields of a certian size a mek has. you can have up to shields per mech.
 int getOArmor(HitData hit)
          Returns the original amount of armor in the location hit.
 int getOArmor(int loc)
          Returns the original amount of armor in the location specified.
 int getOArmor(int loc, boolean rear)
          Returns the original amount of armor in the location specified, or ARMOR_NA, or ARMOR_DESTROYED.
 OffBoardDirection getOffBoardDirection()
          Get the direction the board that the unit will be deployed.
 int getOffBoardDistance()
          Get the distance in hexes from the board that the unit will be deployed.
 int getOInternal(HitData hit)
          Returns the original amount of internal structure in the location hit.
 int getOInternal(int loc)
          Returns the original amount of internal structure in the location specified, or ARMOR_NA, or ARMOR_DESTROYED.
 int getOriginalJumpMP()
          Returns this entity's original jumping mp.
protected  int getOriginalRunMP()
          Returns this entity's unmodified running/flank mp.
protected  int getOriginalSprintMP()
          Returns this entity's unmodified sprint mp.
 int getOriginalWalkMP()
          Returns this entity's original walking movement points
 Player getOwner()
          Returns the player that "owns" this entity.
 int getOwnerId()
           
 java.util.Vector<Coords> getPassedThrough()
           
 java.util.Vector<java.lang.Integer> getPickedUpMechWarriors()
           
 Coords getPosition()
          Returns the current position of this entity on the board.
 Coords getPriorPosition()
           
 int getQuirkIniBonus()
           
 java.lang.String getQuirkList(java.lang.String sep)
          Returns a string of all the quirk "codes" for this entity, using sep as the separator
 Quirks getQuirks()
           
 int getRearArc()
          Returns the rear firing arc for this entity - overrided by some units
 int getRecoveryTurn()
           
 int getRemovalCondition()
          Getter for property removalCondition.
 OffBoardDirection getRetreatedDirection()
           
 int getRunHeat()
          get the heat generated by this Entity when running/flanking
 int getRunMP()
          Returns this entity's running/flank mp modified for heat and gravity.
 int getRunMP(boolean gravity, boolean ignoreheat)
           
 java.lang.String getRunMPasString()
          Returns this entity's running/flank mp as a string.
 int getRunMPwithoutMASC()
          Returns run MP without considering MASC
abstract  int getRunMPwithoutMASC(boolean gravity, boolean ignoreheat)
          Returns run MP without considering MASC, optionally figuring in gravity and possibly ignoring heat
 int getRunningGravityLimit()
          get the gravity limit for ground movement
 int getSecondaryFacing()
          Returns the secondary facing, or -1 if n/a
 java.util.Map<java.lang.Integer,Coords> getSecondaryPositions()
          End of Battle Force Conversion Methods
 int getSensorCheck()
           
 java.lang.String getSensorDesc()
          returns a description to the current sensing range of the active sensor
 java.util.Vector<Sensor> getSensors()
           
 java.lang.String getShortName()
          A short name, suitable for displaying above a unit icon.
 java.lang.String getShortNameRaw()
           
 int getShortRangeModifier()
           
 java.util.Vector<SmallCraftBay> getSmallCraftBays()
          get the bays separately
 int getSmallCraftLaunchRate()
           
 java.lang.String getSource()
           
 int getSpotTargetId()
           
 int getSprintHeat()
          get the heat generated by this Entity when sprinting
 int getSprintMP()
          Returns this entity's running/flank mp modified for heat and gravity.
 int getSprintMP(boolean gravity, boolean ignoreheat)
           
 java.lang.String getSprintMPasString()
          Returns this entity's sprint mp as a string.
 int getSprintMPwithoutMASC()
          Returns sprint MP without considering MASC
 int getSprintMPwithoutMASC(boolean gravity, boolean ignoreheat)
          Returns sprint MP without considering MASC, optionally figuring in gravity and possibly ignoring heat
 int getStandingHeat()
          get the heat generated by this Entity when standing still
 int getStartingPos()
           
 TargetRoll getStealthModifier(int range, Entity ae)
          Determine the stealth modifier for firing at this unit from the given range.
 int getStructureType()
           
 int getSwarmAttackerId()
          Get the ID of the Entity that is attacking this unit with a swarm attack.
 int getSwarmTargetId()
          Get the ID of the Entity that is the current target of a swarm attack by this unit.
 int getTaggedBy()
           
 boolean getTargetedBySwarm(int entityId, int weaponId)
          Were we targeted by a certain swarm/swarm-i volley this turn?
 int getTargetId()
           
 int getTargetType()
           
 int getTaserFeedBackRounds()
          get the rounds for which this entity suffers from taser feedback
 int getTaserInterference()
           
 int getTaserInterferenceRounds()
           
 int getTaserShutdownRounds()
          get the number of rounds for which this unit should be shutdown by taser
 int getTechLevel()
          Returns the unit tech for this entity.
 TeleMissileTracker getTMTracker()
           
 int getTotalAmmoOfType(EquipmentType et)
           
 int getTotalArmor()
          Returns the total amount of armor on the entity.
abstract  int getTotalCommGearTons()
           
 int getTotalInternal()
          Returns the total amount of internal structure on the entity.
 int getTotalMunitionsOfType(EquipmentType et)
          Determine how much ammunition (of all munition types) remains which is compatable with the given ammo.
 int getTotalOArmor()
          Returns the total amount of armor on the entity.
 int getTotalOInternal()
          Returns the total original amount of internal structure on the entity.
 java.util.ArrayList<Mounted> getTotalWeaponList()
           
abstract  HitData getTransferLocation(HitData hit)
          Gets the location that excess damage transfers to.
 int getTransferLocation(int loc)
          int version
 java.util.Vector<Bay> getTransportBays()
           
 int getTransportId()
          Get the ID Entity that has loaded this one.
 java.util.Vector<Transporter> getTransports()
          Returns vector of Transports for everything a unit transports
 float getTroopCarryingSpace()
           
 HitData getTrooperAtLocation(HitData hit, Entity transport)
           
 char getUnitNumber()
          Get the unit number of this entity.
 java.lang.String getUnusedString()
          Return a string that identifies the unused capacity of this transporter.
 int getVector(int vectorFacing)
           
 int[] getVectors()
           
 int getVelocity()
           
 int getVibroClaws()
          Return how many BA vibroclaws this Entity is equipped with
 int getWalkHeat()
          get the heat generated by this Entity when walking/cruising
 int getWalkMP()
          Returns this entity's walking/cruising mp, factored for heat and gravity.
 int getWalkMP(boolean gravity, boolean ignoreheat)
          Returns this entity's walking/cruising mp, factored for heat and possibly gravity.
abstract  int getWeaponArc(int wn)
          Returns the Rules.ARC that the weapon, specified by number, fires into.
 java.util.ArrayList<Mounted> getWeaponBayList()
           
 java.util.ArrayList<Mounted> getWeaponGroupList()
           
 java.util.ArrayList<Mounted> getWeaponList()
           
 java.util.Iterator<Mounted> getWeapons()
           
 int getWeaponsAndEquipmentCost(boolean ignoreAmmo)
           
 int getWeaponsAndEquipmentCost(java.lang.StringBuffer detail, boolean ignoreAmmo)
           
 float getWeight()
           
 int getWeightClass()
           
 java.lang.String getWeightClassName()
           
 int getYear()
           
 boolean hasActiveAngelECCM()
          Checks to see if this unit has a functional AngelECM unit that is using ECCM.
 boolean hasActiveAngelECM()
          Does the mech have a functioning ECM unit?
 boolean hasActiveBlueShield()
          Checks to see if this unit has a functional Blue Shield Particle Field Damper that is turned on
 boolean hasActiveECCM()
          Checks to see if this entity has a functional ECM unit that is using ECCM.
 boolean hasActiveECM()
          Does the mech have a functioning ECM unit?
 boolean hasActiveECM(boolean stealth)
          check if we have an active ECM unit for stealth armor purposes
 boolean hasActiveEiCockpit()
           
 boolean hasActiveShield(int location)
          Does the mech have an active shield This should only be called by hasActiveShield(location,rear)
 boolean hasActiveShield(int location, boolean rear)
          Does the mech have an active shield This should only be called after hasShield has been called.
 boolean hasAimModeTargComp()
          Returns wether or not this entity has a Targeting Computer that is in aimed shot mode.
 boolean hasArcFired(int location, boolean rearMount)
           
 boolean hasArmoredChassis()
          does this entity have an armored chassis?
 boolean hasArmoredEngine()
           
 boolean hasBAP()
          Does the mech have a functioning BAP?
 boolean hasBAP(boolean checkECM)
           
 boolean hasBARArmor()
          does this Entity have BAR armor?
 boolean hasBattleArmorHandles()
           
 boolean hasC3()
          Checks if it has any type of C3 computer.
 boolean hasC3i()
           
 boolean hasC3M()
          Checks if the entity has a C3 Master.
 boolean hasC3MM()
           
 boolean hasC3S()
          Returns whether this 'mech has a C3 Slave or not.
 boolean hasCASEII()
          Only Meks can have CASE II so all other entites return false.
 boolean hasCASEII(int location)
          Only Meks have CASE II so all other entites return false.
 boolean hasDisplacementAttack()
           
 boolean hasEiCockpit()
           
 boolean hasEnvironmentalSealing()
          does this Entity have Environmental sealing?
 boolean hasFunctionalArmAES(int location)
           
 boolean hasFunctionalLegAES()
           
 boolean hasGhostTargets(boolean active)
          Does the mech have a functioning ECM unit, tuned to ghost target generation?
 boolean hasHipCrit()
          Returns true if the entity has a hip crit.
 boolean hasINarcPodsAttached()
          Do we have any iNarc Pods attached?
 boolean hasInfernoAmmo()
          Scans through the ammo on the unit for any inferno rounds.
 boolean hasLegActuatorCrit()
          Returns true if the entity has a leg actuator crit
 boolean hasLinkedMGA(Mounted mounted)
           
 boolean hasModularArmor()
           
 boolean hasModularArmor(int loc)
           
 boolean hasNoDefenseShield(int location)
          Does the mech have an shield in no defense mode
 boolean hasPassiveShield(int location)
          Does the mech have a passive shield This should only be called by hasPassiveShield(location,rear)
 boolean hasPassiveShield(int location, boolean rear)
          Does the mech have a passive shield This should only be called after hasShield has been called.
abstract  boolean hasRearArmor(int loc)
          Does this location have rear armor?
 boolean hasShield()
          Does the mech have any shields. a mech can have up to 2 shields.
 boolean hasSpotlight()
           
 boolean hasStealth()
          does this unit have stealth armor?
 boolean hasSystem(int system, int loc)
          Returns true if the the location has a system of the type, whether is destroyed or not
 boolean hasTAG()
           
 boolean hasTargComp()
          Returns wether or not this entity has a Targeting Computer.
 boolean hasUMU()
          This method checks to see if a unit has Underwater Maneuvering Units Only Battle Mechs may have UMU's
 boolean hasVibroblades()
          Checks to see if this entity is wielding any vibroblades
 boolean hasWorkingMisc(java.math.BigInteger flag)
          Check if the entity has an arbitrary type of misc equipment
 boolean hasWorkingMisc(java.math.BigInteger flag, int secondary, int location)
          Check if the entity has an arbitrary type of misc equipment
 boolean hasWorkingMisc(java.math.BigInteger flag, long secondary)
          Check if the entity has an arbitrary type of misc equipment
 boolean hasWorkingMisc(java.lang.String name)
          Check if the entity has an arbitrary type of misc equipment
 boolean hasWorkingSystem(int system, int loc)
          Returns true if there is at least 1 functional system of the type specified in the location
 boolean hasWorkingWeapon(java.math.BigInteger flag)
          Check if the entity has an arbitrary type of weapon
 boolean hasWorkingWeapon(java.math.BigInteger flag, int secondary, int location)
          Check if the entity has an arbitrary type of weapon
 boolean hasWorkingWeapon(java.math.BigInteger flag, long secondary)
          Check if the entity has an arbitrary type of weapon
 boolean hasWorkingWeapon(java.lang.String name)
          Check if the entity has an arbitrary type of weapon
 int height()
          Returns the height of the unit, that is, how many levels above it's elevation is it for LOS purposes.
 void hitAllCriticals(int loc, int slot)
          Hits all criticals of the system occupying the specified critical slot.
 void illuminateTarget(HexTarget target)
          illuminate a hex and all units that are between us and the hex
 void initializeArmor(int val, int loc)
          Initializes the armor on the unit.
 void initializeInternal(int val, int loc)
          Initializes the internal structure on the unit.
 boolean isActive()
          Determine if this entity participate in the current game phase.
 boolean isActive(int turn)
           
 boolean isAirborne()
           
 boolean isAirborneVTOL()
           
 boolean isAssaultDropInProgress()
           
 boolean isAttackingThisTurn()
           
 boolean isBATaserShutdown()
           
 boolean isBoardProhibited(int mapType)
          Returns true if the the given board is prohibited
 boolean isCanon()
           
 boolean isCapitalFighter()
           
 boolean isCapitalScale()
          a function that let's us know if this entity has capital-scale armor
 boolean isCaptured()
          Has this entity been captured?
 boolean isCarcass()
          Is this unit a carcass, a carcass can take no action
 boolean isCarefulStand()
           
 boolean isChameleonShieldActive()
          Determine if this unit has an active chameleon light polarization field.
 boolean isCharging()
           
 boolean isClan()
          Checks if this is a clan unit.
 boolean isClanArmor()
           
 boolean isClearingMinefield()
           
 boolean isCommander()
           
 boolean isDeployed()
          Checks to see if an entity has been deployed
 boolean isDesignValid()
           
 boolean isDestroyed()
           
 boolean isDone()
           
 boolean isDoomed()
           
 boolean isDropping()
           
 boolean isElevationValid(int assumedElevation, IHex hex)
          Check if this entity can legally occupy the requested elevation.
 boolean isEligibleFor(IGame.Phase phase)
          Determines if an entity is eligible for a phase.
 boolean isEligibleForFiring()
          An entity is eligible if its to-hit number is anything but impossible.
 boolean isEligibleForMovement()
          Pretty much anybody's eligible for movement.
 boolean isEligibleForOffboard()
           
 boolean isEligibleForPhysical()
          Check if the entity has any valid targets for physical attacks.
 boolean isEligibleForTargetingPhase()
           
 boolean isEnemyOf(Entity other)
          Returns true if the other entity is an enemy of this entity.
 boolean isEvading()
           
 boolean isFighter()
           
 boolean isFindingClub()
           
 boolean isGrappleAttacker()
           
 boolean isHexProhibited(IHex hex)
          Returns true if the specified hex contains some sort of prohibited terrain.
 boolean isHidden()
           
 boolean isHullDown()
           
 boolean isIlluminated()
           
 boolean isImmobile()
          Is this entity shut down or is the crew unconscious?
 boolean isINarcedBy(int nTeamID)
          Have we been iNarced with a homing pod from that team?
 boolean isINarcedWith(long type)
          Have we been iNarced with the named pod from any team?
 boolean isLargeCraft()
          is this entity a large craft?
 boolean isLayingMines()
           
 boolean isLoadableThisTurn()
          Returns true if this entity could potentially be loaded (did not move from starting hex)
 boolean isLocationBad(int loc)
          Is this location destroyed or breached?
 boolean isLocationDoomed(int loc)
          Is this location destroyed or breached?
 boolean isMakingDfa()
           
 boolean isMilitary()
          returns whether the unit is a military unit (as opposed to a civilian unit).
 boolean isMixedTech()
           
 boolean isNarcedBy(int nTeamID)
          has the team attached a narc pod to me?
 boolean isNOE()
          is the unit flying Nape of the Earth?
abstract  boolean isNuclearHardened()
          Checks if the unit is hardened agaist nuclear strikes.
 boolean isNullSigActive()
          Determine if this unit has an active null-signature system.
 boolean isOffBoard()
           
 boolean isOmni()
           
 boolean isOnSameSheet(Coords tc)
          returns true if this is a valid target for Arrow IV homing which was aimed at hex (tc)
 boolean isPartOfFighterSquadron()
          is this entity loaded into a fighter squadron?
 boolean isProne()
           
 boolean isPushing()
           
 boolean isRamming()
           
 boolean isReckless()
           
 boolean isRepairable()
          Determine if the unit can be repaired, or only harvested for spares.
 boolean isSalvage()
          Determine if the unit is just combat-lossed or if it has been utterly destroyed.
abstract  boolean isSecondaryArcWeapon(int weaponId)
          Returns true if this weapon fires into the secondary facing arc.
 boolean isSeenByEnemy()
           
 boolean isSelectableThisTurn()
          Returns true if this entity is selectable for action.
 boolean isShutDown()
           
 boolean isShutDownThisPhase()
           
 boolean isSpotting()
           
 boolean isStalled()
          Is this Entity's ICE Engine stalled?
 boolean isStealthActive()
          Determine if this unit has an active and working stealth system.
 boolean isStealthOn()
          Determine if this unit has an active and working stealth system.
 boolean isStuck()
          Is the Entity stuck in a swamp?
 boolean isSufferingEMI()
           
 boolean isSurfaceNaval()
          is this a naval vessel on the surface of the water?
 boolean isSystemRepairable(int system, int loc)
          Returns false if there is at least one non-repairable critical slot for this system in the given location
 boolean isTargetable()
          Returns true if this entity is targetable for attacks
 boolean isTargetOfDisplacementAttack()
          Returns true if any other entities this entity knows of are making a displacement attack on this entity.
 boolean isUnjammingRAC()
           
 boolean isUnloadedThisTurn()
          Determine if this Entity was unloaded previously this turn.
 boolean isUsingManAce()
           
 boolean isUsingSpotlight()
           
abstract  boolean isValidSecondaryFacing(int dir)
          Can this entity torso/turret twist the given direction?
 boolean isVisibleToEnemy()
           
 boolean isVoidSigActive()
          Determine if this unit has an active void signature system.
 boolean isWeaponBlockedAt(int loc, boolean isRear)
          Determine if transported units prevent a weapon in the given location from firing.
 boolean itemOppositeTech(java.lang.String s)
           
 void load(Entity unit)
          Load the given unit.
 void load(Entity unit, boolean checkElev)
          Load the given unit.
 void loadAllWeapons()
          Attempts to load all weapons with ammo
 boolean loadedUnitsHaveActiveECM()
          Do units loaded onto this entity still have active ECM/ECCM/etc.?
 void loadWeapon(Mounted mounted)
          Tries to load the specified weapon with the first available ammo
 boolean loadWeapon(Mounted mounted, Mounted mountedAmmo)
          Tries to load the specified weapon with the specified ammo.
 void loadWeaponWithSameAmmo(Mounted mounted)
          Tries to load the specified weapon with the first available ammo of the same munition type as currently in use.
 boolean loadWeaponWithSameAmmo(Mounted mounted, Mounted mountedAmmo)
          Tries to load the specified weapon with the specified ammo.
 boolean locationHasCase(int loc)
          Returns whether there is CASE protecting the location.
 boolean locationIsLeg(int loc)
          Returns true is the location is a leg
abstract  int locations()
          Returns the number of locations in the entity
 boolean needsRollToStand()
          Returns true is the entity needs a roll to stand up
 void newRound(int roundNumber)
          Start a new round
 boolean onSameC3NetworkAs(Entity e)
           
 boolean onSameC3NetworkAs(Entity e, boolean ignoreECM)
          Checks if another entity is on the same c3 network as this entity
 boolean passedThrough(Coords c)
           
 Coords passedThroughPrevious(Coords c)
          What coords were passed through previous to the given one
 boolean passedWithin(Coords c, int dist)
          Did the entity pass within a certain number of hexes of these coords?
 void pickUp(MechWarrior mw)
           
protected  void printDebugToFile()
           
 void recover(Entity unit)
          Recover the given unit.
 void refreshLocations()
           
 void reloadEmptyWeapons()
          Attempts to reload any empty weapons with the first ammo found
 void removeAllINarcPods()
          Remove all attached iNarc Pods
 void removeAllTransporters()
          Remove all transportation components from this Entity.
 void removeCriticals(int loc, CriticalSlot cs)
          Removes all matching critical slots from the location
 boolean removeINarcPod(INarcPod pod)
          Remove an INarcPod from this entity.
 void removeMisc(java.lang.String toRemove)
          Removes the first misc eq. whose name equals the specified string.
 boolean removePartialCoverHits(int location, int cover, int side)
           
 void resetBayDoors()
          do any damage to bay doors
 void resetFiringArcs()
           
 void restore()
          Restores the entity after serialization
abstract  HitData rollHitLocation(int table, int side)
          Rolls up a hit location
abstract  HitData rollHitLocation(int table, int side, int aimedLocation, int aimingMode)
          Rolls the to-hit number
 PilotingRollData rollMovementInBuilding(Building bldg, int distance, java.lang.String why, EntityMovementType overallMoveType)
          Calculates and returns the roll for an entity moving in buildings.
 void setAltitude(int a)
           
 void setArcFired(int location, boolean rearMount)
           
 void setArmor(int val, HitData hit)
          Sets the amount of armor in the location specified.
 void setArmor(int val, int loc)
          Sets the amount of armor in the front location specified.
 void setArmor(int val, int loc, boolean rear)
          Sets the amount of armor in the location specified.
 void setArmorTechLevel(int newTL)
           
 void setArmorType(int armType)
           
 void setArmorType(java.lang.String armType)
           
 void setArmsFlipped(boolean armsFlipped)
          Set whether or not the mech's arms are flipped to the rear
 void setAssaultDropInProgress(boolean flag)
           
 void setBATaserShutdown(boolean value)
           
 void setC3Master(Entity e)
          Set another Entity as our C3 Master
 void setC3Master(int entityId)
           
 void setC3NetId(Entity e)
           
 void setCanon(boolean canon)
           
 void setCanUnstickByJumping(boolean arg)
          Set wether this Enity is stuck in a swamp or not
 void setCaptured(boolean arg)
          Specify that this entity has been captured.
 void setCarcass(boolean carcass)
          Sets if this unit is a carcass.
 void setCarefulStand(boolean stand)
           
 void setChassis(java.lang.String chassis)
          sets the chassis name for this entity.
 void setClearingMinefield(boolean clearingMinefield)
           
 void setClimbMode(boolean state)
           
 void setCommander(boolean arg)
           
 void setCrew(Pilot crew)
           
 void setCritical(int loc, int slot, CriticalSlot cs)
          Sets a critical hit slot
 void setDeployed(boolean deployed)
          Toggles if an entity has been deployed
 void setDeployRound(int deployRound)
          The round the unit will be deployed.
 void setDesignValid(boolean designValid)
           
 void setDestroyed(boolean destroyed)
           
 void setDisplacementAttack(DisplacementAttackAction displacementAttack)
           
 void setDone(boolean done)
           
 void setDoomed(boolean doomed)
           
 void setElevation(int elevation)
          Sets the current elevation of this entity above the ground.
 void setEMI(boolean inVal)
           
 void setEvading(boolean evasion)
           
 void setExternalId(int externalId)
          This sets the external ID.
 void setFacing(int facing)
          Sets the primary facing.
 void setFindingClub(boolean findingClub)
           
 void setGame(IGame game)
          This sets the game the entity belongs to.
 void setGameOptions()
           
 void setGrappled(int id, boolean attacker)
           
 void setGrappleSide(int side)
           
 void setHidden(boolean inVal)
           
 void setHullDown(boolean down)
           
 void setId(int id)
          Sets the ID number of this Entity, which will also set the display name and short name to null.
 void setIlluminated(boolean arg)
           
 void setInternal(int val, HitData hit)
          Sets the amount of armor in the location specified.
 void setInternal(int val, int loc)
          Sets the amount of armor in the location specified.
 void setLandedAssaultDrop()
           
 void setLastTarget(int id)
           
 void setLayingMines(boolean laying)
           
 void setLocationStatus(int loc, int status)
          sets location exposure
 void setMixedTech(boolean mixedTech)
           
 void setModel(java.lang.String model)
          Sets the unit code for this Entity.
 void setMovementMode(EntityMovementMode movementMode)
          Set the movement type of the entity
 void setNextSensor(Sensor s)
           
 void setOffBoard(int distance, OffBoardDirection direction)
          Set the unit as an offboard deployment.
 void setOmni(boolean omni)
           
 void setOriginalJumpMP(int jumpMP)
          Sets this entity's original jump movement points
 void setOriginalWalkMP(int walkMP)
          Sets this entity's original walking movement points
 void setOwner(Player player)
           
 void setPassedThrough(java.util.Vector<Coords> pass)
           
 void setPosition(Coords position)
          Sets the current position of this entity on the board.
 void setProne(boolean prone)
           
 void setQuirks(Quirks quirks)
           
 void setRamming(boolean b)
           
 void setRapidFire()
          Force rapid fire mode to the highest level on RAC and UAC
 void setReckless(boolean b)
           
 void setRecoveryTurn(int r)
           
 void setRemovalCondition(int removalCondition)
          Setter for property removalCondition.
 void setRetreatedDirection(OffBoardDirection retreatedDirection)
           
 void setSalvage(boolean canSalvage)
          Record if the unit is just combat-lossed or if it has been utterly destroyed.
 void setSecondaryFacing(int sec_facing)
          Sets the secondary facing.
 void setSeenByEnemy(boolean b)
           
 void setShutDown(boolean shutDown)
           
 void setShutDownThisPhase(boolean shutDown)
           
 void setSource(java.lang.String source)
          used to set the source of the creation of this entity, i.e RS PPU Custom what not Fluff for MMLab
 void setSpotlight(boolean arg)
           
 void setSpotlightState(boolean arg)
           
 void setSpotTargetId(int targetId)
           
 void setSpotting(boolean spotting)
           
 void setStartingPos(int i)
           
 void setStructureType(int strucType)
           
 void setStructureType(java.lang.String strucType)
           
 void setStuck(boolean arg)
          Set weather this Entity is stuck in a swamp or not
 void setSwarmAttackerId(int id)
          Record the ID of the Entity that is attacking this unit with a swarm attack.
 void setSwarmTargetId(int id)
          Record the ID of the Entity that is the current target of a swarm attack by this unit.
 void setTaggedBy(int tagger)
           
 void setTaserFeedback(int rounds)
          set this entity to suffer from taser feedback
 void setTaserInterference(int value, int rounds)
           
 void setTaserShutdownRounds(int rounds)
           
 void setTechLevel(int techLevel)
          Sets the tech level for this Entity.
 void setTransportId(int transportId)
          Record the ID of the Entity that has loaded this unit.
 void setUnitNumber(char unit)
          Set the unit number for this entity.
 void setUnjammingRAC(boolean u)
           
 void setUnloaded(boolean unloaded)
          This method should only be called when needed to remove a dead swarmer's game turn.
 void setUsedSearchlight(boolean arg)
           
 void setVectors(int[] v)
           
 void setVisibleToEnemy(boolean b)
           
 void setWeaponHit(Mounted which)
           
 void setWeight(float weight)
           
 void setYear(int year)
           
 boolean shouldDeploy(int round)
          Returns true if the entity should be deployed
 int sideTable(Coords src)
           
 int sideTable(Coords src, boolean usePrior)
           
 int sideTable(Coords src, boolean usePrior, int face)
           
 java.lang.String statusToString()
          This returns a textual description of the entity for visualy impaired users.
 java.lang.String statusToString(int loc)
          This returns a textual description of a specific location of the entity for visualy impaired users.
 java.lang.String statusToString(java.lang.String str)
           
 java.lang.String toString()
           
 boolean unload(Entity unit)
          Unload the given unit.
 void updateBays()
          cycle through and update Bays
 boolean usedSearchlight()
           
 boolean usedTag()
           
 boolean usesWeaponBays()
          a function that let's us know if this entity is using weapons bays
abstract  java.util.Vector<Report> victoryReport()
          Generates a vector containing reports on all useful information about this entity.
 boolean weaponFiredFrom(int loc)
          Checks whether a weapon has been fired from the specified location this turn
 Mounted whichBay(int bayID)
          return the bay of the current weapon
 
Methods inherited from class megamek.common.TurnOrdered
clearInitiative, generateTurnOrder, getAeroTurns, getDropshipTurns, getEvenTurns, getInitiative, getJumpshipTurns, getMultiTurns, getNormalTurns, getOtherTurns, getSmallCraftTurns, getSpaceStationTurns, getWarshipTurns, incrementAeroTurns, incrementDropshipTurns, incrementEvenTurns, incrementJumpshipTurns, incrementMultiTurns, incrementOtherTurns, incrementSmallCraftTurns, incrementSpaceStationTurns, incrementWarshipTurns, resetAeroTurns, resetDropshipTurns, resetEvenTurns, resetJumpshipTurns, resetMultiTurns, resetOtherTurns, resetSmallCraftTurns, resetSpaceStationTurns, resetWarshipTurns, rollInitAndResolveTies, rollInitiative
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

NONE

public static final int NONE
See Also:
Constant Field Values

LOC_NONE

public static final int LOC_NONE
See Also:
Constant Field Values

LOC_DESTROYED

public static final int LOC_DESTROYED
See Also:
Constant Field Values

MAX_C3_NODES

public static final int MAX_C3_NODES
See Also:
Constant Field Values

GRAPPLE_BOTH

public static final int GRAPPLE_BOTH
See Also:
Constant Field Values

GRAPPLE_RIGHT

public static final int GRAPPLE_RIGHT
See Also:
Constant Field Values

GRAPPLE_LEFT

public static final int GRAPPLE_LEFT
See Also:
Constant Field Values

game

protected transient IGame game

id

protected int id

externalId

protected int externalId
ID settable by external sources (such as mm.net)


weight

protected float weight

omni

protected boolean omni

chassis

protected java.lang.String chassis

model

protected java.lang.String model

year

protected int year

techLevel

protected int techLevel

engine

protected Engine engine

mixedTech

protected boolean mixedTech

designValid

protected boolean designValid

displayName

protected java.lang.String displayName

shortName

protected java.lang.String shortName

duplicateMarker

public int duplicateMarker

owner

protected transient Player owner

ownerId

protected int ownerId

crew

public Pilot crew
The pilot of the entity. Even infantry has a 'pilot'.


shutDown

protected boolean shutDown

shutDownThisPhase

protected boolean shutDownThisPhase

doomed

protected boolean doomed

destroyed

protected boolean destroyed

position

protected Coords position

secondaryPositions

protected java.util.Map<java.lang.Integer,Coords> secondaryPositions

facing

protected int facing

sec_facing

protected int sec_facing

walkMP

protected int walkMP

jumpMP

protected int jumpMP

done

protected boolean done

prone

protected boolean prone

hullDown

protected boolean hullDown

findingClub

protected boolean findingClub

armsFlipped

protected boolean armsFlipped

unjammingRAC

protected boolean unjammingRAC

hasSpotlight

protected boolean hasSpotlight

illuminated

protected boolean illuminated

spotlightIsActive

protected boolean spotlightIsActive

usedSearchlight

protected boolean usedSearchlight

stuckInSwamp

protected boolean stuckInSwamp

canUnstickByJumping

protected boolean canUnstickByJumping

taggedBy

protected int taggedBy

layingMines

protected boolean layingMines

_isEMId

protected boolean _isEMId

displacementAttack

protected DisplacementAttackAction displacementAttack

heat

public int heat

heatBuildup

public int heatBuildup

heatFromExternal

public int heatFromExternal

delta_distance

public int delta_distance

mpUsed

public int mpUsed

moved

public EntityMovementType moved

mpUsedLastRound

protected int mpUsedLastRound

gotPavementBonus

public boolean gotPavementBonus

hitThisRoundByAntiTSM

public boolean hitThisRoundByAntiTSM

inReverse

public boolean inReverse

damageThisPhase

public int damageThisPhase

damageThisRound

public int damageThisRound

engineHitsThisRound

public int engineHitsThisRound

rolledForEngineExplosion

public boolean rolledForEngineExplosion

dodging

public boolean dodging

reckless

public boolean reckless

spotting

public boolean spotting

killerId

protected int killerId

vectors

protected int[] vectors

infernos

public InfernoTracker infernos
The object that tracks this unit's Inferno round hits.


aTracker

public ArtilleryTracker aTracker

tmTracker

public TeleMissileTracker tmTracker

c3NetIdString

protected java.lang.String c3NetIdString

c3Master

protected int c3Master

c3CompanyMasterIndex

protected int c3CompanyMasterIndex

armorType

protected int armorType

armorTechLevel

protected int armorTechLevel

structureType

protected int structureType

source

protected java.lang.String source

equipmentList

protected java.util.ArrayList<Mounted> equipmentList
A list of all mounted equipment. (Weapons, ammo, and misc)


weaponList

protected java.util.ArrayList<Mounted> weaponList
A list of all mounted weapons. This only includes regular weapons, not bay mounts or grouped weapon mounts.


weaponBayList

protected java.util.ArrayList<Mounted> weaponBayList
A list of all mounted weapon bays


weaponGroupList

protected java.util.ArrayList<Mounted> weaponGroupList
A list of all mounted weapon groups


totalWeaponList

protected java.util.ArrayList<Mounted> totalWeaponList
A list of every weapon mount, including bay mounts and weapon group mounts


ammoList

protected java.util.ArrayList<Mounted> ammoList
A list of all mounted ammo.


bombList

protected java.util.ArrayList<Mounted> bombList
A list of all mounted bombs.


miscList

protected java.util.ArrayList<Mounted> miscList
A list of all remaining equipment.


pendingINarcPods

protected java.util.ArrayList<INarcPod> pendingINarcPods

iNarcPods

protected java.util.ArrayList<INarcPod> iNarcPods

pendingNarcPods

protected java.util.ArrayList<NarcPod> pendingNarcPods

narcPods

protected java.util.ArrayList<NarcPod> narcPods

failedEquipmentList

protected java.util.ArrayList<java.lang.String> failedEquipmentList

m_lNarcedBy

protected long m_lNarcedBy

m_lPendingNarc

protected long m_lPendingNarc

crits

protected CriticalSlot[][] crits
This matrix stores critical slots in the format [location][slot #]. What locations entities have and how many slots there are in each is determined by the subclasses of Entity such as Mech.


movementMode

protected EntityMovementMode movementMode
Stores the current movement mode.


isHidden

protected boolean isHidden

carcass

protected boolean carcass

elevation

protected int elevation
this is the elevation of the Entity--with respect to the surface of the hex it's in. In other words, this may need to *change* as it moves from hex to hex--without it going up or down. I.e.--level 0 hex, elevation 5--it moves to a level 2 hex, without going up or down. elevation is now 3.


altitude

protected int altitude
altitude is different from elevation. It is used to measure the vertical distance of Aero units from the ground on low atmosphere and ground maps.


lastTarget

protected int lastTarget

isCarefulStanding

protected boolean isCarefulStanding

heatSinkCoolantFailureFactor

protected int heatSinkCoolantFailureFactor

taserShutdownRounds

protected int taserShutdownRounds

shutdownByBATaser

protected boolean shutdownByBATaser

taserFeedBackRounds

protected int taserFeedBackRounds

taserInterference

protected int taserInterference

taserInterferenceRounds

protected int taserInterferenceRounds

bvText

protected java.lang.StringBuffer bvText

startTable

protected java.lang.String startTable

endTable

protected java.lang.String endTable

startRow

protected java.lang.String startRow

endRow

protected java.lang.String endRow

startColumn

protected java.lang.String startColumn

endColumn

protected java.lang.String endColumn

nl

protected java.lang.String nl

DEBUGBATTLEFORCE

protected boolean DEBUGBATTLEFORCE

battleForceDebugString

protected java.lang.StringBuffer battleForceDebugString

battleForceMinRangeModifier

protected double[] battleForceMinRangeModifier

battleForceToHitModifier

protected double[] battleForceToHitModifier

BATTLEFORCESHORTRANGE

public static final int BATTLEFORCESHORTRANGE
See Also:
Constant Field Values

BATTLEFORCEMEDIUMRANGE

public static final int BATTLEFORCEMEDIUMRANGE
See Also:
Constant Field Values

BATTLEFORCELONGRANGE

public static final int BATTLEFORCELONGRANGE
See Also:
Constant Field Values

BATTLEFORCEEXTREMERANGE

public static final int BATTLEFORCEEXTREMERANGE
See Also:
Constant Field Values

fluff

protected Entity.EntityFluff fluff
Constructor Detail

Entity

public Entity()
Generates a new, blank, entity.

Method Detail

restore

public void restore()
Restores the entity after serialization


getId

public int getId()
Returns the ID number of this Entity.

Returns:
ID Number.

setId

public void setId(int id)
Sets the ID number of this Entity, which will also set the display name and short name to null.

Parameters:
id - the new ID.

getExternalId

public int getExternalId()
this returns the external ID.

Returns:
the ID settable by external sources (such as mm.net)
See Also:
externalId

setExternalId

public void setExternalId(int externalId)
This sets the external ID.

Parameters:
externalId - the new external ID for this Entity.
See Also:
externalId

getGame

public IGame getGame()
This returns the game this Entity belongs to.

Returns:
the game.

setGame

public void setGame(IGame game)
This sets the game the entity belongs to. It also restores the entity and checks that the game is in a consistent state. This function takes care of the units transported by this entity.

Parameters:
game - the game.

getModel

public java.lang.String getModel()
Returns the unit code for this entity.


setModel

public void setModel(java.lang.String model)
Sets the unit code for this Entity.

Parameters:
model - The unit code.

getChassis

public java.lang.String getChassis()
Returns the chassis name for this entity.


setChassis

public void setChassis(java.lang.String chassis)
sets the chassis name for this entity.

Parameters:
chassis - The chassis name.

getFluff

public Entity.EntityFluff getFluff()
Returns the fluff for this entity.


getTechLevel

public int getTechLevel()
Returns the unit tech for this entity.


setTechLevel

public void setTechLevel(int techLevel)
Sets the tech level for this Entity.

Parameters:
techLevel - The tech level, it must be one of the TechConstants .

getRecoveryTurn

public int getRecoveryTurn()

setRecoveryTurn

public void setRecoveryTurn(int r)

isClan

public boolean isClan()
Checks if this is a clan unit. It is determined by tech level.

Returns:
true if this unit is a clan unit.
See Also:
setTechLevel(int)

isClanArmor

public boolean isClanArmor()

isMixedTech

public boolean isMixedTech()

setMixedTech

public void setMixedTech(boolean mixedTech)

isDesignValid

public boolean isDesignValid()

setDesignValid

public void setDesignValid(boolean designValid)

getYear

public int getYear()

setYear

public void setYear(int year)

getWeight

public float getWeight()

getWeightClass

public int getWeightClass()

getWeightClassName

public java.lang.String getWeightClassName()

setWeight

public void setWeight(float weight)

isOmni

public boolean isOmni()

setOmni

public void setOmni(boolean omni)

locations

public abstract int locations()
Returns the number of locations in the entity


getOwner

public Player getOwner()
Returns the player that "owns" this entity.


setOwner

public void setOwner(Player player)

getOwnerId

public int getOwnerId()

isEnemyOf

public boolean isEnemyOf(Entity other)
Returns true if the other entity is an enemy of this entity. This is more reliable than Player.isEnemyOf since it knows that an entity will never be an enemy of itself.


getCrew

public Pilot getCrew()

setCrew

public void setCrew(Pilot crew)

isShutDown

public boolean isShutDown()

setShutDown

public void setShutDown(boolean shutDown)

setShutDownThisPhase

public void setShutDownThisPhase(boolean shutDown)

isShutDownThisPhase

public boolean isShutDownThisPhase()

isDoomed

public boolean isDoomed()

setDoomed

public void setDoomed(boolean doomed)

isDestroyed

public boolean isDestroyed()

setDestroyed

public void setDestroyed(boolean destroyed)

getTargetType

public int getTargetType()
Specified by:
getTargetType in interface Targetable

getTargetId

public int getTargetId()
Specified by:
getTargetId in interface Targetable

getHeight

public int getHeight()
Specified by:
getHeight in interface Targetable
Returns:
height of the target in elevation levels

isDone

public boolean isDone()

setDone

public void setDone(boolean done)

setUnloaded

public void setUnloaded(boolean unloaded)
This method should only be called when needed to remove a dead swarmer's game turn.


isActive

public boolean isActive()
Determine if this entity participate in the current game phase.

Returns:
true if this entity is not shut down, is not destroyed, has an active crew, and was not unloaded from a transport this turn. false otherwise.

isActive

public boolean isActive(int turn)

isSelectableThisTurn

public boolean isSelectableThisTurn()
Returns true if this entity is selectable for action. Transported entities can not be selected.


isLoadableThisTurn

public boolean isLoadableThisTurn()
Returns true if this entity could potentially be loaded (did not move from starting hex)


isUnloadedThisTurn

public boolean isUnloadedThisTurn()
Determine if this Entity was unloaded previously this turn.

Returns:
true if this entity was unloaded for any reason during this turn.

isTargetable

public boolean isTargetable()
Returns true if this entity is targetable for attacks


isProne

public boolean isProne()

setProne

public void setProne(boolean prone)

isHullDown

public boolean isHullDown()

setHullDown

public void setHullDown(boolean down)

isImmobile

public boolean isImmobile()
Is this entity shut down or is the crew unconscious?

Specified by:
isImmobile in interface Targetable
Returns:
true if the target is immobile (-4 to hit)

isCharging

public boolean isCharging()

isPushing

public boolean isPushing()

isMakingDfa

public boolean isMakingDfa()

hasDisplacementAttack

public boolean hasDisplacementAttack()

getDisplacementAttack

public DisplacementAttackAction getDisplacementAttack()

setDisplacementAttack

public void setDisplacementAttack(DisplacementAttackAction displacementAttack)

isTargetOfDisplacementAttack

public boolean isTargetOfDisplacementAttack()
Returns true if any other entities this entity knows of are making a displacement attack on this entity.


findTargetedDisplacement

public DisplacementAttackAction findTargetedDisplacement()
Returns any known displacement attacks (should only be one) that this entity is a target of.


isUnjammingRAC

public boolean isUnjammingRAC()

setUnjammingRAC

public void setUnjammingRAC(boolean u)

isFindingClub

public boolean isFindingClub()

setFindingClub

public void setFindingClub(boolean findingClub)

setArmsFlipped

public void setArmsFlipped(boolean armsFlipped)
Set whether or not the mech's arms are flipped to the rear


getArmsFlipped

public boolean getArmsFlipped()
Returns true if the mech's arms are flipped to the rear


getPosition

public Coords getPosition()
Returns the current position of this entity on the board. This is not named getLocation(), since I want the word location to refer to hit locations on a mech or vehicle.

Specified by:
getPosition in interface Targetable
Returns:
the coordinates of the hex containing the target

setPosition

public void setPosition(Coords position)
Sets the current position of this entity on the board.

Parameters:
position - the new position.

getPriorPosition

public Coords getPriorPosition()
Returns:
the coords of the second to last position on the passed through vector or the current position if too small

setElevation

public void setElevation(int elevation)
Sets the current elevation of this entity above the ground.

Parameters:
elevation - an int representing the new position.

calcElevation

public int calcElevation(IHex current,
                         IHex next,
                         int assumedElevation,
                         boolean climb,
                         boolean wigeEndClimbPrevious)
A helper function for fiddling with elevation. Takes the current hex, a hex being moved to, returns the elevation the Entity will be considered to be at w/r/t it's new hex.


calcElevation

public int calcElevation(IHex current,
                         IHex next)

getElevation

public int getElevation()
Returns the elevation of this entity.

Specified by:
getElevation in interface Targetable
Returns:
elevation of the bottom (e.g. legs) of the target relative to surface

canGoDown

public boolean canGoDown()

canGoDown

public boolean canGoDown(int assumedElevation,
                         Coords assumedPos)
is it possible to go down, or are we landed/just above the water/treeline? assuming passed elevation.


canGoUp

public boolean canGoUp(int assumedElevation,
                       Coords assumedPos)
is it possible to go up, or are we at maximum altitude? assuming passed elevation.


isElevationValid

public boolean isElevationValid(int assumedElevation,
                                IHex hex)
Check if this entity can legally occupy the requested elevation. Does not check stacking, only terrain limitations


height

public int height()
Returns the height of the unit, that is, how many levels above it's elevation is it for LOS purposes. Default is 0.


absHeight

public int absHeight()
Returns the absolute height of the entity

Specified by:
absHeight in interface Targetable
Returns:
elevation of the top (e.g. torso) of the target relative to surface

getDisplayName

public java.lang.String getDisplayName()
Returns the display name for this entity.

Specified by:
getDisplayName in interface Targetable
Returns:
name of the target for ui purposes

generateDisplayName

public void generateDisplayName()
Generates the display name for this entity.

Sub-classes are allowed to override this method. The display name is in the format [Chassis] [Model] ([Player Name]).


getShortName

public java.lang.String getShortName()
A short name, suitable for displaying above a unit icon. The short name is basically the same as the display name, minus the player name.


generateShortName

public void generateShortName()
Generate the short name for a unit

Sub-classes are allowed to override this method. The display name is in the format [Chassis] [Model].


getShortNameRaw

public java.lang.String getShortNameRaw()

getFacing

public int getFacing()
Returns the primary facing, or -1 if n/a


setFacing

public void setFacing(int facing)
Sets the primary facing.


getSecondaryFacing

public int getSecondaryFacing()
Returns the secondary facing, or -1 if n/a


setSecondaryFacing

public void setSecondaryFacing(int sec_facing)
Sets the secondary facing.


canChangeSecondaryFacing

public abstract boolean canChangeSecondaryFacing()
Can this entity change secondary facing at all?


isValidSecondaryFacing

public abstract boolean isValidSecondaryFacing(int dir)
Can this entity torso/turret twist the given direction?


clipSecondaryFacing

public abstract int clipSecondaryFacing(int dir)
Returns the closest valid secondary facing to the given direction.

Returns:
the the closest valid secondary facing.

canUnjamRAC

public boolean canUnjamRAC()
Returns true if the entity has an RAC which is jammed and not destroyed


canFlipArms

public boolean canFlipArms()
Returns true if the entity can flip its arms


getOriginalWalkMP

public int getOriginalWalkMP()
Returns this entity's original walking movement points


setOriginalWalkMP

public void setOriginalWalkMP(int walkMP)
Sets this entity's original walking movement points


getWalkMP

public int getWalkMP()
Returns this entity's walking/cruising mp, factored for heat and gravity.


getWalkMP

public int getWalkMP(boolean gravity,
                     boolean ignoreheat)
Returns this entity's walking/cruising mp, factored for heat and possibly gravity.

Parameters:
gravity - Should the movement be factored for gravity
ignoreheat - Should heat be ignored?

getHeatMPReduction

public int getHeatMPReduction()
This returns how much MP is removed due to heat

Returns:

getStandingHeat

public int getStandingHeat()
get the heat generated by this Entity when standing still


getWalkHeat

public int getWalkHeat()
get the heat generated by this Entity when walking/cruising


getOriginalRunMP

protected int getOriginalRunMP()
Returns this entity's unmodified running/flank mp.


getRunMP

public int getRunMP()
Returns this entity's running/flank mp modified for heat and gravity.


getRunMP

public int getRunMP(boolean gravity,
                    boolean ignoreheat)

getRunMPwithoutMASC

public int getRunMPwithoutMASC()
Returns run MP without considering MASC


getRunMPwithoutMASC

public abstract int getRunMPwithoutMASC(boolean gravity,
                                        boolean ignoreheat)
Returns run MP without considering MASC, optionally figuring in gravity and possibly ignoring heat


getRunMPasString

public java.lang.String getRunMPasString()
Returns this entity's running/flank mp as a string.


getRunHeat

public int getRunHeat()
get the heat generated by this Entity when running/flanking


getOriginalSprintMP

protected int getOriginalSprintMP()
Returns this entity's unmodified sprint mp.


getSprintMP

public int getSprintMP()
Returns this entity's running/flank mp modified for heat and gravity.


getSprintMP

public int getSprintMP(boolean gravity,
                       boolean ignoreheat)

getSprintMPwithoutMASC

public int getSprintMPwithoutMASC()
Returns sprint MP without considering MASC


getSprintMPwithoutMASC

public int getSprintMPwithoutMASC(boolean gravity,
                                  boolean ignoreheat)
Returns sprint MP without considering MASC, optionally figuring in gravity and possibly ignoring heat


getSprintMPasString

public java.lang.String getSprintMPasString()
Returns this entity's sprint mp as a string.


getSprintHeat

public int getSprintHeat()
get the heat generated by this Entity when sprinting


getRunningGravityLimit

public int getRunningGravityLimit()
get the gravity limit for ground movement


getOriginalJumpMP

public int getOriginalJumpMP()
Returns this entity's original jumping mp.


setOriginalJumpMP

public void setOriginalJumpMP(int jumpMP)
Sets this entity's original jump movement points


getJumpMP

public int getJumpMP()
Returns this entity's current jumping MP, not effected by terrain, factored for gravity.


getJumpMP

public int getJumpMP(boolean gravity)
return this entity's current jump MP, possibly affected by gravity

Parameters:
gravity -
Returns:

getJumpType

public int getJumpType()

getJumpHeat

public int getJumpHeat(int movedMP)
get the heat generated by this Entity when jumping for a certain amount of MP

Parameters:
movedMP - the number of movement points spent

getJumpMPWithTerrain

public int getJumpMPWithTerrain()
Returns this entity's current jumping MP, effected by terrain (like water.)


elevationOccupied

public int elevationOccupied(IHex hex)
Returns the elevation that this entity would be on if it were placed into the specified hex. Hovercraft, naval vessels, and hydrofoils move on the surface of the water


isHexProhibited

public boolean isHexProhibited(IHex hex)
Returns true if the specified hex contains some sort of prohibited terrain.


isBoardProhibited

public boolean isBoardProhibited(int mapType)
Returns true if the the given board is prohibited


getMovementString

public abstract java.lang.String getMovementString(EntityMovementType mtype)
Returns the name of the type of movement used.


getMovementAbbr

public abstract java.lang.String getMovementAbbr(EntityMovementType mtype)
Returns the abbreviation of the name of the type of movement used.


getLocationName

public java.lang.String getLocationName(HitData hit)
Returns the name of the location specified.


getLocationNames

public abstract java.lang.String[] getLocationNames()

getLocationName

public java.lang.String getLocationName(int loc)
Returns the name of the location specified.


getLocationAbbrs

public abstract java.lang.String[] getLocationAbbrs()

getLocationAbbr

public java.lang.String getLocationAbbr(HitData hit)
Returns the abbreviated name of the location specified.


getLocationAbbr

public java.lang.String getLocationAbbr(int loc)
Returns the abbreviated name of the location specified.


getLocationFromAbbr

public int getLocationFromAbbr(java.lang.String abbr)
Returns the location that the specified abbreviation indicates


rollHitLocation

public abstract HitData rollHitLocation(int table,
                                        int side,
                                        int aimedLocation,
                                        int aimingMode)
Rolls the to-hit number


rollHitLocation

public abstract HitData rollHitLocation(int table,
                                        int side)
Rolls up a hit location


getTransferLocation

public abstract HitData getTransferLocation(HitData hit)
Gets the location that excess damage transfers to. That is, one location inwards.


getTransferLocation

public int getTransferLocation(int loc)
int version


getDependentLocation

public abstract int getDependentLocation(int loc)
Gets the location that is destroyed recursively. That is, one location outwards.


hasRearArmor

public abstract boolean hasRearArmor(int loc)
Does this location have rear armor?


getArmor

public int getArmor(int loc)
Returns the amount of armor in the location specified, or ARMOR_NA, or ARMOR_DESTROYED. Only works on front locations.


getArmor

public int getArmor(HitData hit)
Returns the amount of armor in the location hit, or IArmorState.ARMOR_NA, or IArmorState.ARMOR_DESTROYED.


getArmor

public int getArmor(int loc,
                    boolean rear)
Returns the amount of armor in the location specified, or IArmorState.ARMOR_NA, or IArmorState.ARMOR_DESTROYED.


getOArmor

public int getOArmor(int loc)
Returns the original amount of armor in the location specified. Only works on front locations.


getOArmor

public int getOArmor(HitData hit)
Returns the original amount of armor in the location hit.


getOArmor

public int getOArmor(int loc,
                     boolean rear)
Returns the original amount of armor in the location specified, or ARMOR_NA, or ARMOR_DESTROYED.

Parameters:
loc - the location to check.
rear - if true inspect the rear armor, else check the front.

setArmor

public void setArmor(int val,
                     HitData hit)
Sets the amount of armor in the location specified.


setArmor

public void setArmor(int val,
                     int loc)
Sets the amount of armor in the front location specified.


setArmor

public void setArmor(int val,
                     int loc,
                     boolean rear)
Sets the amount of armor in the location specified.

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.

refreshLocations

public void refreshLocations()

initializeArmor

public void initializeArmor(int val,
                            int loc)
Initializes the armor on the unit. Sets the original and starting point of the armor to the same number.


getTotalArmor

public int getTotalArmor()
Returns the total amount of armor on the entity.


getTotalOArmor

public int getTotalOArmor()
Returns the total amount of armor on the entity.


getArmorRemainingPercent

public double getArmorRemainingPercent()
Returns the percent of the armor remaining


getInternal

public int getInternal(HitData hit)
Returns the amount of internal structure in the location hit.


getInternal

public int getInternal(int loc)
Returns the amount of internal structure in the location specified, or ARMOR_NA, or ARMOR_DESTROYED.


getOInternal

public int getOInternal(HitData hit)
Returns the original amount of internal structure in the location hit.


getOInternal

public int getOInternal(int loc)
Returns the original amount of internal structure in the location specified, or ARMOR_NA, or ARMOR_DESTROYED.


setInternal

public void setInternal(int val,
                        HitData hit)
Sets the amount of armor in the location specified.


setInternal

public void setInternal(int val,
                        int loc)
Sets the amount of armor in the location specified.


initializeInternal

public void initializeInternal(int val,
                               int loc)
Initializes the internal structure on the unit. Sets the original and starting point of the internal structure to the same number.


autoSetInternal

public abstract void autoSetInternal()
Set the internal structure to the appropriate value for the mech's weight class


getTotalInternal

public int getTotalInternal()
Returns the total amount of internal structure on the entity.


getTotalOInternal

public int getTotalOInternal()
Returns the total original amount of internal structure on the entity.


getInternalRemainingPercent

public double getInternalRemainingPercent()
Returns the percent of the armor remaining


isLocationBad

public boolean isLocationBad(int loc)
Is this location destroyed or breached?


isLocationDoomed

public boolean isLocationDoomed(int loc)
Is this location destroyed or breached?


getLocationStatus

public int getLocationStatus(int loc)
returns exposure or breached flag for location


setLocationStatus

public void setLocationStatus(int loc,
                              int status)
sets location exposure

Parameters:
loc - the location who's exposure is to be set
status - the status to set

locationIsLeg

public boolean locationIsLeg(int loc)
Returns true is the location is a leg

Parameters:
loc - the location to check.

getArmorString

public java.lang.String getArmorString(int loc)
Returns a string representing the armor in the location


getArmorString

public java.lang.String getArmorString(int loc,
                                       boolean rear)
Returns a string representing the armor in the location


getInternalString

public java.lang.String getInternalString(int loc)
Returns a string representing the internal structure in the location


armorStringFor

public static java.lang.String armorStringFor(int value)
Parses the game's internal armor representation into a human-readable string.


getHeatFiringModifier

public int getHeatFiringModifier()
Returns the modifier to weapons fire due to heat.


addEquipment

public Mounted addEquipment(EquipmentType etype,
                            int loc)
                     throws LocationFullException
Creates a new mount for this equipment and adds it in.

Throws:
LocationFullException

addEquipment

public Mounted addEquipment(EquipmentType etype,
                            int loc,
                            boolean rearMounted)
                     throws LocationFullException
Creates a new mount for this equipment and adds it in.

Throws:
LocationFullException

addEquipment

public Mounted addEquipment(EquipmentType etype,
                            int loc,
                            boolean rearMounted,
                            boolean bodyMounted,
                            boolean isArmored)
                     throws LocationFullException
Creates a new mount for this equipment and adds it in.

Throws:
LocationFullException

addEquipment

public Mounted addEquipment(EquipmentType etype,
                            int loc,
                            boolean rearMounted,
                            int nAmmo)
                     throws LocationFullException
mounting weapons needs to take account of ammo

Parameters:
etype -
loc -
rearMounted -
nAmmo -
Returns:
Throws:
LocationFullException

addBomb

public Mounted addBomb(EquipmentType etype,
                       int loc)
                throws LocationFullException
indicate whether this is a bomb mount

Throws:
LocationFullException

addWeaponGroup

public Mounted addWeaponGroup(EquipmentType etype,
                              int loc)
                       throws LocationFullException
Throws:
LocationFullException

addEquipment

public Mounted addEquipment(EquipmentType etype,
                            int loc,
                            boolean rearMounted,
                            boolean bodyMounted)
                     throws LocationFullException
indicate whether this is bodymounted for BAs

Throws:
LocationFullException

addEquipment

protected void addEquipment(Mounted mounted,
                            int loc,
                            boolean rearMounted,
                            int nAmmo)
                     throws LocationFullException
Throws:
LocationFullException

addBomb

protected void addBomb(Mounted mounted,
                       int loc)
                throws LocationFullException
Throws:
LocationFullException

addEquipment

protected void addEquipment(Mounted mounted,
                            int loc,
                            boolean rearMounted,
                            boolean isWeaponGroup)
                     throws LocationFullException
Throws:
LocationFullException

addEquipment

protected void addEquipment(Mounted mounted,
                            int loc,
                            boolean rearMounted)
                     throws LocationFullException
Throws:
LocationFullException

addFailedEquipment

public void addFailedEquipment(java.lang.String s)

getEquipmentNum

public int getEquipmentNum(Mounted mounted)
Returns the equipment number of the specified equipment, or -1 if equipment is not present.


getEquipment

public java.util.ArrayList<Mounted> getEquipment()
Returns an enumeration of all equipment


getEquipment

public Mounted getEquipment(int index)
Returns the equipment, specified by number


getEquipmentType

public EquipmentType getEquipmentType(CriticalSlot cs)

getFailedEquipment

public java.util.Iterator<java.lang.String> getFailedEquipment()
Returns an enumeration which contains the name of each piece of equipment that failed to load.


getTotalAmmoOfType

public int getTotalAmmoOfType(EquipmentType et)

getTotalMunitionsOfType

public int getTotalMunitionsOfType(EquipmentType et)
Determine how much ammunition (of all munition types) remains which is compatable with the given ammo.

Parameters:
et - - the EquipmentType of the ammo to be found. This value may be null.
Returns:
the int count of the amount of shots of all munitions equivalent to the given ammo type.

getWeaponArc

public abstract int getWeaponArc(int wn)
Returns the Rules.ARC that the weapon, specified by number, fires into.


isSecondaryArcWeapon

public abstract boolean isSecondaryArcWeapon(int weaponId)
Returns true if this weapon fires into the secondary facing arc. If false, assume it fires into the primary.


getWeapons

public java.util.Iterator<Mounted> getWeapons()

getWeaponList

public java.util.ArrayList<Mounted> getWeaponList()

getTotalWeaponList

public java.util.ArrayList<Mounted> getTotalWeaponList()

getWeaponBayList

public java.util.ArrayList<Mounted> getWeaponBayList()

getWeaponGroupList

public java.util.ArrayList<Mounted> getWeaponGroupList()

getFirstWeapon

public int getFirstWeapon()
Returns the first ready weapon

Returns:
the index number of the first available weapon, or -1 if none are ready.

getNextWeapon

public int getNextWeapon(int start)
Returns the next ready weapon, starting at the specified index


loadAllWeapons

public void loadAllWeapons()
Attempts to load all weapons with ammo


loadWeapon

public void loadWeapon(Mounted mounted)
Tries to load the specified weapon with the first available ammo


loadWeaponWithSameAmmo

public void loadWeaponWithSameAmmo(Mounted mounted)
Tries to load the specified weapon with the first available ammo of the same munition type as currently in use. If this fails, use first ammo.


loadWeapon

public boolean loadWeapon(Mounted mounted,
                          Mounted mountedAmmo)
Tries to load the specified weapon with the specified ammo. Returns true if successful, false otherwise.


loadWeaponWithSameAmmo

public boolean loadWeaponWithSameAmmo(Mounted mounted,
                                      Mounted mountedAmmo)
Tries to load the specified weapon with the specified ammo. Returns true if successful, false otherwise.


weaponFiredFrom

public boolean weaponFiredFrom(int loc)
Checks whether a weapon has been fired from the specified location this turn


getAmmo

public java.util.ArrayList<Mounted> getAmmo()

getMisc

public java.util.ArrayList<Mounted> getMisc()

getBombs

public java.util.ArrayList<Mounted> getBombs()

getBombs

public java.util.Vector<Mounted> getBombs(java.math.BigInteger flag)

removeMisc

public void removeMisc(java.lang.String toRemove)
Removes the first misc eq. whose name equals the specified string. Used for removing broken tree clubs.


getClubs

public java.util.List<Mounted> getClubs()

hasWorkingMisc

public boolean hasWorkingMisc(java.math.BigInteger flag)
Check if the entity has an arbitrary type of misc equipment

Parameters:
flag - A MiscType.F_XXX
Returns:
true if at least one ready item.

hasWorkingMisc

public boolean hasWorkingMisc(java.math.BigInteger flag,
                              long secondary)
Check if the entity has an arbitrary type of misc equipment

Parameters:
flag - A MiscType.F_XXX
secondary - A MiscType.S_XXX or -1 for don't care
Returns:
true if at least one ready item.

countWorkingMisc

public int countWorkingMisc(java.math.BigInteger flag)
return how many misc equipments with the specified flag the unit has

Parameters:
flag -
Returns:

hasWorkingMisc

public boolean hasWorkingMisc(java.lang.String name)
Check if the entity has an arbitrary type of misc equipment

Parameters:
name - MiscType internal name
Returns:
true if at least one ready item.

hasWorkingMisc

public boolean hasWorkingMisc(java.math.BigInteger flag,
                              int secondary,
                              int location)
Check if the entity has an arbitrary type of misc equipment

Parameters:
flag - A MiscType.F_XXX
secondary - A MiscType.S_XXX or -1 for don't care
location - The location to check e.g. Mech.LOC_LARM
Returns:
true if at least one ready item.

hasWorkingWeapon

public boolean hasWorkingWeapon(java.math.BigInteger flag)
Check if the entity has an arbitrary type of weapon

Parameters:
flag - A WeaponType.F_XXX

hasWorkingWeapon

public boolean hasWorkingWeapon(java.math.BigInteger flag,
                                long secondary)
Check if the entity has an arbitrary type of weapon

Parameters:
flag - A WeaponType.F_XXX
secondary - A WeaponType.S_XXX or -1 for don't care
Returns:
true if at least one ready item.

hasWorkingWeapon

public boolean hasWorkingWeapon(java.lang.String name)
Check if the entity has an arbitrary type of weapon

Parameters:
string - internal name of the weapon.
Returns:
true if at least one ready item.

hasWorkingWeapon

public boolean hasWorkingWeapon(java.math.BigInteger flag,
                                int secondary,
                                int location)
Check if the entity has an arbitrary type of weapon

Parameters:
flag - A WeaponType.F_XXX
secondary - A WeaponType.S_XXX or -1 for don't care
location - The location to check e.g. Mech.LOC_LARM
Returns:
true if at least one ready item.

getHeatCapacity

public abstract int getHeatCapacity()
Returns the amount of heat that the entity can sink each turn.


getHeatCapacityWithWater

public abstract int getHeatCapacityWithWater()
Returns the amount of heat that the entity can sink each turn, factoring in whether the entity is standing in water.


getEngineCritHeat

public abstract int getEngineCritHeat()
Returns extra heat generated by engine crits


getCritical

public CriticalSlot getCritical(int loc,
                                int slot)
Returns a critical hit slot


setCritical

public void setCritical(int loc,
                        int slot,
                        CriticalSlot cs)
Sets a critical hit slot


addCritical

public boolean addCritical(int loc,
                           CriticalSlot cs)
Adds a critical to the first available slot in the location.

Returns:
true if there was room for the critical

addCritical

public boolean addCritical(int loc,
                           int slot,
                           CriticalSlot cs)
Attempts to set the given slot to the given critical. If the desired slot is full, adds the critical to the first available slot.

Returns:
true if the crit was succesfully added to any slot

removeCriticals

public void removeCriticals(int loc,
                            CriticalSlot cs)
Removes all matching critical slots from the location


getEmptyCriticals

public int getEmptyCriticals(int loc)
Returns the number of empty critical slots in a location


getHittableCriticals

public int getHittableCriticals(int loc)
Returns the number of operational critical slots remaining in a location


canTransferCriticals

public boolean canTransferCriticals(int loc)
Returns true if this location should transfer criticals 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.


getGyroType

public int getGyroType()
Only Mechs have Gyros but this helps keep the code a bit cleaner.

Returns:
-1

getGoodCriticals

public int getGoodCriticals(CriticalSlot cs,
                            int loc)
Returns the number of operational critical slots of the specified type in the location


getGoodCriticals

public int getGoodCriticals(int type,
                            int index,
                            int loc)
Returns the number of operational critical slots of the specified type in the location


getBadCriticals

public int getBadCriticals(int type,
                           int index,
                           int loc)
The number of critical slots that are destroyed in the component.


getHitCriticals

public int getHitCriticals(int type,
                           int index,
                           int loc)
Number of slots doomed, missing or destroyed in a location


getNoOfSlots

protected abstract int[] getNoOfSlots()

getNumberOfCriticals

public int getNumberOfCriticals(int loc)
Returns the number of total critical slots in a location


getNumberOfCriticals

public int getNumberOfCriticals(int type,
                                int index,
                                int loc)
Returns the number of critical slots present in the section, destroyed or not.


getNumberOfCriticals

public int getNumberOfCriticals(EquipmentType etype,
                                int loc)
Returns the number of critical slots present in the section, destroyed or not.


getNumberOfCriticals

public int getNumberOfCriticals(EquipmentType etype)
Returns the number of critical slots present in the mech, destroyed or not.


getNumberOf

public int getNumberOf(EquipmentType etype)
Returns how many of the given equipment are present in the mech, destroyed or not.


hasHipCrit

public boolean hasHipCrit()
Returns true if the entity has a hip crit. Overridden by sub-classes.


hasLegActuatorCrit

public boolean hasLegActuatorCrit()
Returns true if the entity has a leg actuator crit


hasWorkingSystem

public boolean hasWorkingSystem(int system,
                                int loc)
Returns true if there is at least 1 functional system of the type specified in the location


isSystemRepairable

public boolean isSystemRepairable(int system,
                                  int loc)
Returns false if there is at least one non-repairable critical slot for this system in the given location


hasSystem

public boolean hasSystem(int system,
                         int loc)
Returns true if the the location has a system of the type, whether is destroyed or not


hasVibroblades

public boolean hasVibroblades()
Checks to see if this entity is wielding any vibroblades

Returns:
always returns false as Only biped mechs can wield vibroblades

getActiveVibrobladeHeat

public int getActiveVibrobladeHeat(int location)
Checks to see if any heat is given off by an active vibro blade

Parameters:
location -
Returns:
always returns 0 as Only biped mechs can wield vibroblades

hasShield

public boolean hasShield()
Does the mech have any shields. a mech can have up to 2 shields.

Returns:
true if shieldCount is greater then 0 else false

getNumberOfShields

public int getNumberOfShields(long size)
Check to see how many shields of a certian size a mek has. you can have up to shields per mech. However they can be of different size and each size has its own draw backs. So check each size and add modifers based on the number shields of that size.


hasActiveShield

public boolean hasActiveShield(int location,
                               boolean rear)
Does the mech have an active shield This should only be called after hasShield has been called.


hasActiveShield

public boolean hasActiveShield(int location)
Does the mech have an active shield This should only be called by hasActiveShield(location,rear)


hasPassiveShield

public boolean hasPassiveShield(int location,
                                boolean rear)
Does the mech have a passive shield This should only be called after hasShield has been called.


hasPassiveShield

public boolean hasPassiveShield(int location)
Does the mech have a passive shield This should only be called by hasPassiveShield(location,rear)


hasNoDefenseShield

public boolean hasNoDefenseShield(int location)
Does the mech have an shield in no defense mode


hasUMU

public boolean hasUMU()
This method checks to see if a unit has Underwater Maneuvering Units Only Battle Mechs may have UMU's

Returns:
boolean if the entity has usable UMU crits.

getActiveUMUCount

public int getActiveUMUCount()
This counts the number of UMU's a Mech has that are still viable

Returns:
number intof useable UMU's

getAllUMUCount

public int getAllUMUCount()
This returns all UMU a mech has.

Returns:
intTotal number of UMUs a mech has.

hasActiveECM

public boolean hasActiveECM()
Does the mech have a functioning ECM unit?


hasActiveECM

public boolean hasActiveECM(boolean stealth)
check if we have an active ECM unit for stealth armor purposes

Parameters:
stealth -
Returns:

hasActiveAngelECM

public boolean hasActiveAngelECM()
Does the mech have a functioning ECM unit?


hasGhostTargets

public boolean hasGhostTargets(boolean active)
Does the mech have a functioning ECM unit, tuned to ghost target generation?


hasActiveECCM

public boolean hasActiveECCM()
Checks to see if this entity has a functional ECM unit that is using ECCM.

Returns:
true if the entity has angelecm and it is in ECCM mode false if the entity does not have angel ecm or it is not in eccm mode or it is damaged.

hasActiveAngelECCM

public boolean hasActiveAngelECCM()
Checks to see if this unit has a functional AngelECM unit that is using ECCM.

Returns:
true if the entity has angelecm and it is in ECCM mode false if the entity does not have angel ecm or it is not in eccm mode or it is damaged.

getECMRange

public int getECMRange()
What's the range of the ECM equipment? Infantry can have ECM that just covers their own hex.

Returns:
the int range of this unit's ECM. This value will be Entity.NONE if no ECM is active.

hasBAP

public boolean hasBAP()
Does the mech have a functioning BAP? This is just for the basic BAP for Beagle BloodHound WatchDog Clan Active or Light.


hasBAP

public boolean hasBAP(boolean checkECM)

getBAPRange

public int getBAPRange()
What's the range of the BAP equipment?

Returns:
the int range of this unit's BAP. This value will be Entity.NONE if no BAP is active.

hasTargComp

public boolean hasTargComp()
Returns wether or not this entity has a Targeting Computer.


hasAimModeTargComp

public boolean hasAimModeTargComp()
Returns wether or not this entity has a Targeting Computer that is in aimed shot mode.


hasC3S

public boolean hasC3S()
Returns whether this 'mech has a C3 Slave or not.


hasCASEII

public boolean hasCASEII()
Only Meks can have CASE II so all other entites return false.

Returns:
true iff the mech has CASE II.

hasCASEII

public boolean hasCASEII(int location)
Only Meks have CASE II so all other entites return false.

Parameters:
location -
Returns:
true iff the mech has CASE II at this location.

hasC3M

public boolean hasC3M()
Checks if the entity has a C3 Master.

Returns:
true if it has a working C3M computer and has a master.

hasC3MM

public boolean hasC3MM()

hasC3

public boolean hasC3()
Checks if it has any type of C3 computer.

Returns:
true iff it has a C3 computer.

hasC3i

public boolean hasC3i()

getC3NetId

public java.lang.String getC3NetId()

setC3NetId

public void setC3NetId(Entity e)

calculateFreeC3MNodes

public int calculateFreeC3MNodes()
Determine the remaining number of other C3 Master computers that can connect to this Entity.

Please note, if this Entity does not have two C3 Master computers, then it must first be identified as a company commander; otherwise the number of free nodes will be zero.

Returns:
a non-negative int value.

calculateFreeC3Nodes

public int calculateFreeC3Nodes()
Determine the remaining number of other C3 computers that can connect to this Entity.

Please note, if this Entity has two C3 Master computers, then this function only returns the remaining number of C3 Slave computers that can connect.

Returns:
a non-negative int value.

getC3Top

public Entity getC3Top()
Returns:
the entity "above" this entity in our c3 network, or this entity itself, if none is above this

getC3Master

public Entity getC3Master()
Return the unit that is current master of this unit's C3 network. If the master unit has been destroyed or had it's C3 master computer damaged, then this unit is out of the C3 network for the rest of the game. If the master unit has shut down, then this unit may return to the C3 network at a later time.

Returns:
the Entity that is the master of this unit's C3 network. This value may be null. If the value master unit has shut down, then the value will be non-null after the master unit restarts.

getC3MasterId

public int getC3MasterId()
Get the ID of the master unit in this unit's C3 network. If the master unit has shut down, then the ID will still be returned. The only times when the value, Entity.NONE is returned is when this unit is permanently out of the C3 network, or when it was never in a C3 network.

Returns:
the int ID of the unit that is the master of this unit's C3 network, or Entity.NONE.

C3MasterIs

public boolean C3MasterIs(Entity e)
Determines if the passed Entity is the C3 Master of this unit.

Please note, that when an Entity is it's own C3 Master, then it is a company commander.

Also note that when null is the master for this Entity, then it is an independent master.

Parameters:
e - - the Entity that may be this unit's C3 Master.
Returns:
a boolean that is true when the passed Entity is this unit's commander. If the passed unit isn't this unit's commander, this routine returns false.

setC3Master

public void setC3Master(Entity e)
Set another Entity as our C3 Master

Parameters:
e - - the Entity that should be set as our C3 Master.

setC3Master

public void setC3Master(int entityId)
Parameters:
entityId -

onSameC3NetworkAs

public boolean onSameC3NetworkAs(Entity e)

onSameC3NetworkAs

public boolean onSameC3NetworkAs(Entity e,
                                 boolean ignoreECM)
Checks if another entity is on the same c3 network as this entity

Parameters:
e - The Entity to check against this entity
ignoreECM - a boolean indicating if ECM should be ignored, we need this for c3i
Returns:
a boolean that is true if the given entity is on the same network, false if not.

locationHasCase

public boolean locationHasCase(int loc)
Returns whether there is CASE protecting the location.


hitAllCriticals

public void hitAllCriticals(int loc,
                            int slot)
Hits all criticals of the system occupying the specified critical slot. Used, for example, in a gauss rifle capacitor discharge. Does not apply any special effect of hitting the criticals, like ammo explosion.


newRound

public void newRound(int roundNumber)
Start a new round

Specified by:
newRound in interface RoundUpdated
Parameters:
roundNumber - the int number of the new round

applyDamage

public void applyDamage()
Applies any damage that the entity has suffered. When anything gets hit it is simply marked as "hit" but does not stop working until this is called.


reloadEmptyWeapons

public void reloadEmptyWeapons()
Attempts to reload any empty weapons with the first ammo found


assignAMS

public void assignAMS(java.util.Vector<WeaponHandler> vAttacks)
Assign AMS systems to the most dangerous incoming missile attacks. This should only be called once per turn, or AMS will get extra attacks


isNarcedBy

public boolean isNarcedBy(int nTeamID)
has the team attached a narc pod to me?


attachNarcPod

public void attachNarcPod(NarcPod pod)
add a narc pod from this team to the mech. Unremovable

Parameters:
pod - The NarcPod to be attached.

attachINarcPod

public void attachINarcPod(INarcPod pod)
attach an iNarcPod

Parameters:
pod - The INarcPod to be attached.

isINarcedBy

public boolean isINarcedBy(int nTeamID)
Have we been iNarced with a homing pod from that team?

Parameters:
nTeamID - The id of the team that we are wondering about.
Returns:
true if the Entity is narced by that team.

isINarcedWith

public boolean isINarcedWith(long type)
Have we been iNarced with the named pod from any team?

Parameters:
type - the int type of iNarc pod.
Returns:
true if we have.

removeAllINarcPods

public void removeAllINarcPods()
Remove all attached iNarc Pods


hasINarcPodsAttached

public boolean hasINarcPodsAttached()
Do we have any iNarc Pods attached?

Returns:
true iff one or more iNarcPods are attached.

getINarcPodsAttached

public java.util.Iterator<INarcPod> getINarcPodsAttached()
Get an Enumeration of INarcPods that are attached to this entity.

Returns:
an Enumeration of INarcPods.

removeINarcPod

public boolean removeINarcPod(INarcPod pod)
Remove an INarcPod from this entity.

Parameters:
pod - the INarcPod to be removed.
Returns:
true if the pod was removed, false if the pod was not attached to this entity.

calculateBattleValue

public abstract int calculateBattleValue()
Calculates the battle value of this entity


calculateBattleValue

public int calculateBattleValue(boolean ignoreC3,
                                boolean ignorePilot)
Calculates the battle value of this mech. If the parameter is true, then the battle value for c3 will be added whether the mech is currently part of a network or not. This should be overwritten if necessary

Parameters:
ignoreC3 - if the contribution of the C3 computer should be ignored when calculating BV.
ignorePilot - if the extra BV due to piloting skill should be ignore, needed for c3 bv

victoryReport

public abstract java.util.Vector<Report> victoryReport()
Generates a vector containing reports on all useful information about this entity.


equals

public boolean equals(java.lang.Object object)
Two entities are equal if their ids are equal

Overrides:
equals in class java.lang.Object

getMovementMode

public EntityMovementMode getMovementMode()
Get the movement mode of the entity


getMovementModeAsString

public java.lang.String getMovementModeAsString()
Get the movement mode of the entity as a String.


setMovementMode

public void setMovementMode(EntityMovementMode movementMode)
Set the movement type of the entity


entityIsBiped

public boolean entityIsBiped()
Helper function to determine if a entity is a biped


entityIsQuad

public boolean entityIsQuad()
Helper function to determine if a entity is a quad


needsRollToStand

public boolean needsRollToStand()
Returns true is the entity needs a roll to stand up


getBasePilotingRoll

public PilotingRollData getBasePilotingRoll()
Returns an entity's base piloting skill roll needed Only use this version if the entity is through processing movement


getBasePilotingRoll

public PilotingRollData getBasePilotingRoll(EntityMovementType moveType)
Returns an entity's base piloting skill roll needed


addEntityBonuses

public abstract PilotingRollData addEntityBonuses(PilotingRollData roll)
Add in any piloting skill mods


addConditionBonuses

public PilotingRollData addConditionBonuses(PilotingRollData roll,
                                            EntityMovementType moveType)
Add in any modifiers due to global conditions like light/weather/etc.


checkGetUp

public PilotingRollData checkGetUp(MoveStep step)
Checks if the entity is getting up. If so, returns the target roll for the piloting skill check.


checkRunningWithDamage

public PilotingRollData checkRunningWithDamage(EntityMovementType overallMoveType)
Checks if the entity is attempting to run with damage that would force a PSR. If so, returns the target roll for the piloting skill check.


checkSprintingWithMASC

public PilotingRollData checkSprintingWithMASC(EntityMovementType overallMoveType,
                                               int used)
Checks if the entity is attempting to sprint with MASC engaged. If so, returns the target roll for the piloting skill check.


checkSprintingWithSupercharger

public PilotingRollData checkSprintingWithSupercharger(EntityMovementType overallMoveType,
                                                       int used)
Checks if the entity is attempting to sprint with supercharger engaged. If so, returns the target roll for the piloting skill check.


checkRecklessMove

public PilotingRollData checkRecklessMove(MoveStep step,
                                          IHex curHex,
                                          Coords lastPos,
                                          Coords curPos,
                                          IHex prevHex)
Checks if an entity is passing through certain terrain while not moving carefully


checkLandingWithDamage

public PilotingRollData checkLandingWithDamage(EntityMovementType overallMoveType)
Checks if the entity is landing (from a jump) with damage that would force a PSR. If so, returns the target roll for the piloting skill check.


checkLandingInHeavyWoods

public PilotingRollData checkLandingInHeavyWoods(EntityMovementType overallMoveType,
                                                 IHex curHex)
Checks if an entity is landing (from a jump) in heavy woods.


checkLandingOnIce

public PilotingRollData checkLandingOnIce(EntityMovementType overallMoveType,
                                          IHex curHex)
Checks if the entity is landing (from a jump) on ice-covered water.


checkMovedTooFast

public PilotingRollData checkMovedTooFast(MoveStep step)
return a PilotingRollData checking for wether this Entity moved too fast due to low gravity

Parameters:
step -
Returns:

checkSkid

public PilotingRollData checkSkid(EntityMovementType moveType,
                                  IHex prevHex,
                                  EntityMovementType overallMoveType,
                                  MoveStep prevStep,
                                  int prevFacing,
                                  int curFacing,
                                  Coords lastPos,
                                  Coords curPos,
                                  boolean isInfantry,
                                  int distance)
Checks if the entity might skid on pavement. If so, returns the target roll for the piloting skill check.


checkRubbleMove

public PilotingRollData checkRubbleMove(MoveStep step,
                                        IHex curHex,
                                        Coords lastPos,
                                        Coords curPos)
Checks if the entity is moving into rubble. If so, returns the target roll for the piloting skill check.


checkBogDown

public PilotingRollData checkBogDown(MoveStep step,
                                     IHex curHex,
                                     Coords lastPos,
                                     Coords curPos,
                                     int lastElev,
                                     boolean isPavementStep)
Checks if the entity is moving into a hex that might cause it to bog down. If so, returns the target roll for the piloting skill check.


checkWaterMove

public PilotingRollData checkWaterMove(MoveStep step,
                                       IHex curHex,
                                       Coords lastPos,
                                       Coords curPos,
                                       boolean isPavementStep)
Checks if the entity is moving into depth 1+ water. If so, returns the target roll for the piloting skill check.


checkWaterMove

public PilotingRollData checkWaterMove(int waterLevel,
                                       EntityMovementType overallMoveType)
Checks if the entity is moving into depth 1+ water. If so, returns the target roll for the piloting skill check.


checkDislodgeSwarmers

public PilotingRollData checkDislodgeSwarmers(MoveStep step)
Checks if the entity is being swarmed. If so, returns the target roll for the piloting skill check to dislodge them.


checkMovementInBuilding

public int checkMovementInBuilding(MoveStep step,
                                   MoveStep prevStep,
                                   Coords curPos,
                                   Coords prevPos)
Checks to see if an entity is moving through building walls. Note: this method returns true/false, unlike the other checkStuff() methods above.

Returns:
0, no eligable building; 1, exiting; 2, entering; 3, both; 4, stepping on roof

rollMovementInBuilding

public PilotingRollData rollMovementInBuilding(Building bldg,
                                               int distance,
                                               java.lang.String why,
                                               EntityMovementType overallMoveType)
Calculates and returns the roll for an entity moving in buildings.


getMovementBeforeSkidPSRModifier

public int getMovementBeforeSkidPSRModifier(int distance)
Calculate the piloting skill roll modifier, based upon the number of hexes moved this phase. Used for skidding.


getMaxElevationChange

public abstract int getMaxElevationChange()
The maximum elevation change the entity can cross


getMaxElevationDown

public int getMaxElevationDown()
by default, entities can move as far down as they can move up


encodeTransporters

public static java.lang.String encodeTransporters(Entity entity)
Get a list of the class names of the Transporters for the given Entity.

This method should only be used when serializing the Entity.

Parameters:
entity - - the Entity being serialized.
Returns:
a String listing the Transporter class names of the Entity. This value will be empty ("") if the entity has no Transporters.

decodeTransporters

public static void decodeTransporters(Entity entity,
                                      java.lang.String transporters)
                               throws java.lang.IllegalStateException
Set the Transporters for the given Entity.

This method should only be used when deserializing the Entity.

Parameters:
entity - - the Entity being deserialized.
transporters - - the String listing the class names of the Transporters to be set for the Entity, separated by commas. This value can be null or empty ("").
Throws:
java.lang.IllegalStateException - if any error occurs.

addTransporter

public void addTransporter(Transporter component)
Add a transportation component to this Entity. Please note, this method should only be called during this entity's construction.

Parameters:
component - - One of this new entity's Transporters.

removeAllTransporters

public void removeAllTransporters()
Remove all transportation components from this Entity. Should probably only be called during construction.


canLoad

public boolean canLoad(Entity unit,
                       boolean checkElev)
Determines if this object can accept the given unit. The unit may not be of the appropriate type or there may be no room for the unit.

Parameters:
unit - - the Entity to be loaded.
Returns:
true if the unit can be loaded, false otherwise.

canLoad

public boolean canLoad(Entity unit)
Description copied from interface: Transporter
Determines if this object can accept the given unit. The unit may not be of the appropriate type or there may be no room for the unit.

Specified by:
canLoad in interface Transporter
Parameters:
unit - - the Entity to be loaded.
Returns:
true if the unit can be loaded, false otherwise.

load

public void load(Entity unit,
                 boolean checkElev)
Load the given unit.

Parameters:
unit - - the Entity to be loaded.
Throws:
java.lang.IllegalArgumentException - If the unit can't be loaded

load

public void load(Entity unit)
Description copied from interface: Transporter
Load the given unit.

Specified by:
load in interface Transporter
Parameters:
unit - - the Entity to be loaded.

recover

public void recover(Entity unit)
Recover the given unit. Only for ASF and Small Craft

Parameters:
unit - - the Entity to be loaded.
Throws:
java.lang.IllegalArgumentException - If the unit can't be loaded

updateBays

public void updateBays()
cycle through and update Bays


damageBayDoor

public java.lang.String damageBayDoor()
Damages a randomly determined bay door on the entity, if one exists


damageDoorRecovery

public void damageDoorRecovery(Entity en)
damage the door of the first bay that can load this unit


damageDockCollar

public boolean damageDockCollar()
Damages a randomly determined docking collar on the entity, if one exists


pickUp

public void pickUp(MechWarrior mw)

getLoadedUnits

public java.util.List<Entity> getLoadedUnits()
Get a List of the units currently loaded into this payload.

Specified by:
getLoadedUnits in interface Transporter
Returns:
A List of loaded Entity units. This list will never be null, but it may be empty. The returned List is independant from the under- lying data structure; modifying one does not affect the other.

getDocks

public int getDocks()
Returns:
the number of docking collars

getBayLoadedUnits

public java.util.Vector<Entity> getBayLoadedUnits()
only entities in Bays (for cargo damage to Aero units

Returns:

getLoadedFighters

public java.util.Vector<Entity> getLoadedFighters()
Returns:
only entities in ASF Bays

getLaunchableFighters

public java.util.Vector<Entity> getLaunchableFighters()
Returns:
only entities in ASF Bays that can be launched (i.e. not in recovery)

getDroppableUnits

public java.util.Vector<Entity> getDroppableUnits()
Returns:
only entities in that can be combat dropped

getLoadedBay

public Bay getLoadedBay(int bayID)

getFighterBays

public java.util.Vector<Bay> getFighterBays()
Returns:
get the bays separately

getTransports

public java.util.Vector<Transporter> getTransports()
Returns vector of Transports for everything a unit transports

Returns:

getTransportBays

public java.util.Vector<Bay> getTransportBays()

resetBayDoors

public void resetBayDoors()
do any damage to bay doors


getFighterLaunchRate

public int getFighterLaunchRate()
Returns:
the launch rate for fighters

getLoadedSmallCraft

public java.util.Vector<Entity> getLoadedSmallCraft()

getLaunchableSmallCraft

public java.util.Vector<Entity> getLaunchableSmallCraft()

getSmallCraftBays

public java.util.Vector<SmallCraftBay> getSmallCraftBays()
get the bays separately


getSmallCraftLaunchRate

public int getSmallCraftLaunchRate()
Returns:
launch rate for Small Craft

unload

public boolean unload(Entity unit)
Unload the given unit.

Specified by:
unload in interface Transporter
Parameters:
unit - - the Entity to be unloaded.
Returns:
true if the unit was contained in this space, false otherwise.

getUnusedString

public java.lang.String getUnusedString()
Return a string that identifies the unused capacity of this transporter.

Specified by:
getUnusedString in interface Transporter
Returns:
A String meant for a human.

isWeaponBlockedAt

public boolean isWeaponBlockedAt(int loc,
                                 boolean isRear)
Determine if transported units prevent a weapon in the given location from firing.

Specified by:
isWeaponBlockedAt in interface Transporter
Parameters:
loc - - the int location attempting to fire.
isRear - - a boolean value stating if the given location is rear facing; if false, the location is front facing.
Returns:
true if a transported unit is in the way, false if the weapon can fire.

getExteriorUnitAt

public Entity getExteriorUnitAt(int loc,
                                boolean isRear)
If a unit is being transported on the outside of the transporter, it can suffer damage when the transporter is hit by an attack. Currently, no more than one unit can be at any single location; that same unit can be "spread" over multiple locations.

Specified by:
getExteriorUnitAt in interface Transporter
Parameters:
loc - - the int location hit by attack.
isRear - - a boolean value stating if the given location is rear facing; if false, the location is front facing.
Returns:
The Entity being transported on the outside at that location. This value will be null if no unit is transported on the outside at that location.

getExternalUnits

public java.util.ArrayList<Entity> getExternalUnits()
Specified by:
getExternalUnits in interface Transporter
Returns:
list of all units carried externally by this transporter

getCargoMpReduction

public int getCargoMpReduction()
Specified by:
getCargoMpReduction in interface Transporter
Returns:
the MP reduction due to cargo carried by this transporter

getTrooperAtLocation

public HitData getTrooperAtLocation(HitData hit,
                                    Entity transport)

setTransportId

public void setTransportId(int transportId)
Record the ID of the Entity that has loaded this unit. A unit that is unloaded can neither move nor attack for the rest of the turn.

Parameters:
transportId - - the int ID of our transport. The ID is not validated. This value should be Entity.NONE if this unit has been unloaded.

getTransportId

public int getTransportId()
Get the ID Entity that has loaded this one.

Returns:
the int ID of our transport. The ID may be invalid. This value should be Entity.NONE if this unit has not been loaded.

isStealthActive

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

Sub-classes are encouraged to override this method.

Returns:
true if this unit has a stealth system that is currently active and it's actually working, 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.

Sub-classes are encouraged to override this method.

Returns:
true if this unit has a stealth system that is currently active and it's actually working, false if there is no stealth system or if it is inactive.

isNullSigActive

public boolean isNullSigActive()
Determine if this unit has an active null-signature system.

Sub-classes are encouraged to override this method.

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()
Determine if this unit has an active void signature system.

Sub-classes are encouraged to override this method.

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.

isChameleonShieldActive

public boolean isChameleonShieldActive()
Determine if this unit has an active chameleon light polarization field.

Sub-classes are encouraged to override this method.

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.

Parameters:
range - - an int value that must match one of the Compute class range constants.
ae - - the entity making the attack, who maybe immune to certain kinds of stealth
Returns:
a TargetRoll value that contains the stealth modifier for the given range.

setSwarmTargetId

public void setSwarmTargetId(int id)
Record the ID of the Entity that is the current target of a swarm attack by this unit. A unit that stops swarming can neither move nor attack for the rest of the turn.

Parameters:
id - - the int ID of the swarm attack's target. The ID is not validated. This value should be Entity.NONE if this unit has stopped swarming.

getSwarmTargetId

public int getSwarmTargetId()
Get the ID of the Entity that is the current target of a swarm attack by this unit.

Returns:
the int ID of the swarm attack's target The ID may be invalid. This value should be Entity.NONE if this unit is not swarming.

setSwarmAttackerId

public void setSwarmAttackerId(int id)
Record the ID of the Entity that is attacking this unit with a swarm attack.

Parameters:
id - - the int ID of the swarm attack's attacker. The ID is not validated. This value should be Entity.NONE if the swarm attack has ended.

getSwarmAttackerId

public int getSwarmAttackerId()
Get the ID of the Entity that is attacking this unit with a swarm attack.

Returns:
the int ID of the swarm attack's attacker The ID may be invalid. This value should be Entity.NONE if this unit is not being swarmed.

hasInfernoAmmo

public boolean hasInfernoAmmo()
Scans through the ammo on the unit for any inferno rounds.

Returns:
true if the unit is still loaded with Inferno rounds. false if no rounds were ever loaded or if they have all been fired.

setSalvage

public void setSalvage(boolean canSalvage)
Record if the unit is just combat-lossed or if it has been utterly destroyed.

Parameters:
canSalvage - - a boolean that is true if the unit can be repaired (given time and parts); if this value is false, the unit is utterly destroyed.

isSalvage

public boolean isSalvage()
Determine if the unit is just combat-lossed or if it has been utterly destroyed.

Returns:
A boolean that is true if the unit has salvageable components; if this value is false the unit is utterly destroyed.
See Also:
isRepairable()

isRepairable

public boolean isRepairable()
Determine if the unit can be repaired, or only harvested for spares.

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:
isSalvage()

getRemovalCondition

public int getRemovalCondition()
Getter for property removalCondition.

Returns:
Value of property removalCondition.

setRemovalCondition

public void setRemovalCondition(int removalCondition)
Setter for property removalCondition.

Parameters:
removalCondition - New value of property removalCondition.

isClearingMinefield

public boolean isClearingMinefield()
Returns:
whether this entity is clearing a minefield.

setClearingMinefield

public void setClearingMinefield(boolean clearingMinefield)
Parameters:
clearingMinefield -

isSpotting

public boolean isSpotting()
Returns:
whether this entity is spotting this round.

setSpotting

public void setSpotting(boolean spotting)
Parameters:
spotting -

canSpot

public boolean canSpot()
Um, basically everything can spot for LRM indirect fire.

Returns:
true, if the entity is active

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

statusToString

public java.lang.String statusToString()
This returns a textual description of the entity for visualy impaired users.


statusToString

public java.lang.String statusToString(int loc)
This returns a textual description of a specific location of the entity for visualy impaired users.

Parameters:
loc - the location
Returns:
a string descibing the status of the location.

statusToString

public java.lang.String statusToString(java.lang.String str)
Parameters:
string - a string defining the location
Returns:
the status of the given location.

setDeployRound

public void setDeployRound(int deployRound)
The round the unit will be deployed. We will deploy at the end of a round. So if depoyRound is set to 5, we will deploy when round 5 is over. Any value of zero or less is automatically set to 1

Parameters:
deployRound - an int

getDeployRound

public int getDeployRound()
The round the unit will be deployed

Returns:
an int

setDeployed

public void setDeployed(boolean deployed)
Toggles if an entity has been deployed


isDeployed

public boolean isDeployed()
Checks to see if an entity has been deployed


shouldDeploy

public boolean shouldDeploy(int round)
Returns true if the entity should be deployed


setUnitNumber

public void setUnitNumber(char unit)
Set the unit number for this entity.

Parameters:
unit - the char number for the low-level unit that this entity belongs to. This entity can be removed from its unit by passing the value, (char) Entity.NONE.

getUnitNumber

public char getUnitNumber()
Get the unit number of this entity.

Returns:
the char unit number. If the entity does not belong to a unit, (char) Entity.NONE will be returned.

canFlee

public boolean canFlee()
Returns whether an entity can flee from its current position. Currently returns true if the entity is on the edge of the board.


setSeenByEnemy

public void setSeenByEnemy(boolean b)

isSeenByEnemy

public boolean isSeenByEnemy()

setVisibleToEnemy

public void setVisibleToEnemy(boolean b)

isVisibleToEnemy

public boolean isVisibleToEnemy()

applyGravityEffectsOnMP

protected int applyGravityEffectsOnMP(int MP)

canCharge

public boolean canCharge()
Whether this type of unit can perform charges


canDFA

public boolean canDFA()
Whether this type of unit can perform DFA attacks


canRam

public boolean canRam()
Whether this type of unit can perform Ramming attacks


isUsingManAce

public boolean isUsingManAce()

getKills

public java.util.Enumeration<Entity> getKills()

getKillNumber

public int getKillNumber()

addKill

public void addKill(Entity kill)

getGaveKillCredit

public boolean getGaveKillCredit()

isEligibleFor

public boolean isEligibleFor(IGame.Phase phase)
Determines if an entity is eligible for a phase.


canAssist

public boolean canAssist(IGame.Phase phase)
Determines if an entity is eligible for a phase. Called only if at least one entity returned true to isEligibleFor() This is for using searchlights in physical&offboard phase, without forcing the phase to be played when not needed. However it could be used for other things in the future


isEligibleForFiring

public boolean isEligibleForFiring()
An entity is eligible if its to-hit number is anything but impossible. This is only really an issue if friendly fire is turned off.


isEligibleForMovement

public boolean isEligibleForMovement()
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

Returns:
whether or not the entity is allowed to move

isEligibleForOffboard

public boolean isEligibleForOffboard()

isAttackingThisTurn

public boolean isAttackingThisTurn()

isEligibleForPhysical

public boolean isEligibleForPhysical()
Check if the entity has any valid targets for physical attacks.


isEligibleForTargetingPhase

public boolean isEligibleForTargetingPhase()

getTroopCarryingSpace

public float getTroopCarryingSpace()

hasBattleArmorHandles

public boolean hasBattleArmorHandles()

isOffBoard

public boolean isOffBoard()
Specified by:
isOffBoard in interface Targetable
Returns:
if this is off the board

setOffBoard

public void setOffBoard(int distance,
                        OffBoardDirection direction)
Set the unit as an offboard deployment. If a non-zero distance is chosen, the direction must not be Entity.NONE. If a direction other than Entity.NONE is chosen, the distance must not be zero (0).

Parameters:
distance - the int distance in hexes that the unit will be deployed from the board; this value must not be negative.
direction - the int direction from the board that the unit will be deployed; a valid value must be selected from: NONE, NORTH, SOUTH, EAST, or WEST.
Throws:
java.lang.IllegalArgumentException - if a negative distance, an invalid direction is selected, or the distance does not match the direction.

getOffBoardDistance

public int getOffBoardDistance()
Get the distance in hexes from the board that the unit will be deployed. If the unit is to be deployed onboard, the distance will be zero (0).

Returns:
the int distance from the board the unit will be deployed (in hexes); this value will never be negative.

getOffBoardDirection

public OffBoardDirection getOffBoardDirection()
Get the direction the board that the unit will be deployed. If the unit is to be deployed onboard, the distance will be IOffBoardDirections.NONE, otherwise it will be one of the values:
  • IOffBoardDirections.NORTH
  • IOffBoardDirections.SOUTH
  • IOffBoardDirections.EAST
  • IOffBoardDirections.WEST

Returns:
the int direction from the board the unit will be deployed. Only valid values will be returned.

deployOffBoard

public void deployOffBoard()
Deploy this offboard entity at the previously specified distance and direction. This should only be invoked by the Server after the board has been selected and all the players are ready to start. The side effects of this methods set the unit's position and facing as appropriate (as well as deploying the unit).

Onboard units (units with an offboard distance of zero and a direction of Entity.NONE) will be unaffected by this method.


getPickedUpMechWarriors

public java.util.Vector<java.lang.Integer> getPickedUpMechWarriors()

isCaptured

public boolean isCaptured()
Has this entity been captured?

Returns:
true if it has.

setCaptured

public void setCaptured(boolean arg)
Specify that this entity has been captured.

Parameters:
arg - the boolean value to assign.

setSpotlight

public void setSpotlight(boolean arg)

hasSpotlight

public boolean hasSpotlight()

setSpotlightState

public void setSpotlightState(boolean arg)

isIlluminated

public boolean isIlluminated()

setIlluminated

public void setIlluminated(boolean arg)

isUsingSpotlight

public boolean isUsingSpotlight()

setUsedSearchlight

public void setUsedSearchlight(boolean arg)

usedSearchlight

public boolean usedSearchlight()

illuminateTarget

public void illuminateTarget(HexTarget target)
illuminate a hex and all units that are between us and the hex

Parameters:
target - the HexTarget to illuminate

isStuck

public boolean isStuck()
Is the Entity stuck in a swamp?


setStuck

public void setStuck(boolean arg)
Set weather this Entity is stuck in a swamp or not

Parameters:
arg - the boolean value to assign

canUnstickByJumping

public boolean canUnstickByJumping()
Is the Entity stuck in a swamp?


setCanUnstickByJumping

public void setCanUnstickByJumping(boolean arg)
Set wether this Enity is stuck in a swamp or not

Parameters:
arg - the boolean value to assign

destroy

public java.lang.String destroy(java.lang.String reason,
                                boolean survivable,
                                boolean canSalvage)

addTargetedBySwarm

public void addTargetedBySwarm(int entityId,
                               int weaponId)
Add a targeting by a swarm volley from a specified entity

Parameters:
entityId - The int id of the shooting entity
weaponId - The int id of the shooting lrm launcher

getTargetedBySwarm

public boolean getTargetedBySwarm(int entityId,
                                  int weaponId)
Were we targeted by a certain swarm/swarm-i volley this turn?

Parameters:
entityId - The int id of the shooting entity we are checking
weaponId - The int id of the launcher to check
Returns:
a fitting boolean value

getShortRangeModifier

public int getShortRangeModifier()

getMediumRangeModifier

public int getMediumRangeModifier()

getLongRangeModifier

public int getLongRangeModifier()

getExtremeRangeModifier

public int getExtremeRangeModifier()

setArmorType

public void setArmorType(int armType)

setStructureType

public void setStructureType(int strucType)

setArmorType

public void setArmorType(java.lang.String armType)

setStructureType

public void setStructureType(java.lang.String strucType)

getArmorType

public int getArmorType()

setArmorTechLevel

public void setArmorTechLevel(int newTL)

getArmorTechLevel

public int getArmorTechLevel()

getStructureType

public int getStructureType()

setWeaponHit

public void setWeaponHit(Mounted which)

setTaggedBy

public void setTaggedBy(int tagger)

getTaggedBy

public int getTaggedBy()

getCost

public abstract double getCost(boolean ignoreAmmo)

getWeaponsAndEquipmentCost

public int getWeaponsAndEquipmentCost(boolean ignoreAmmo)

getWeaponsAndEquipmentCost

public int getWeaponsAndEquipmentCost(java.lang.StringBuffer detail,
                                      boolean ignoreAmmo)

removePartialCoverHits

public boolean removePartialCoverHits(int location,
                                      int cover,
                                      int side)

isOnSameSheet

public boolean isOnSameSheet(Coords tc)
returns true if this is a valid target for Arrow IV homing which was aimed at hex (tc)


doomedInVacuum

public abstract boolean doomedInVacuum()

doomedOnGround

public abstract boolean doomedOnGround()

doomedInAtmosphere

public abstract boolean doomedInAtmosphere()

doomedInSpace

public abstract boolean doomedInSpace()

getArmorWeight

public double getArmorWeight()

hasTAG

public boolean hasTAG()

isCanon

public boolean isCanon()

setCanon

public void setCanon(boolean canon)

climbMode

public boolean climbMode()

setClimbMode

public void setClimbMode(boolean state)

usedTag

public boolean usedTag()

hasEiCockpit

public boolean hasEiCockpit()

hasActiveEiCockpit

public boolean hasActiveEiCockpit()

isLayingMines

public boolean isLayingMines()

setLayingMines

public void setLayingMines(boolean laying)

canLayMine

public boolean canLayMine()

sideTable

public int sideTable(Coords src)
Specified by:
sideTable in interface Targetable
Returns:
side hit from location

sideTable

public int sideTable(Coords src,
                     boolean usePrior)
Specified by:
sideTable in interface Targetable
Returns:
side hit from location

sideTable

public int sideTable(Coords src,
                     boolean usePrior,
                     int face)

canGoHullDown

public boolean canGoHullDown()

canAssaultDrop

public boolean canAssaultDrop()

setAssaultDropInProgress

public void setAssaultDropInProgress(boolean flag)

setLandedAssaultDrop

public void setLandedAssaultDrop()

isAssaultDropInProgress

public boolean isAssaultDropInProgress()

addPilotingModifierForTerrain

public void addPilotingModifierForTerrain(PilotingRollData roll,
                                          Coords c)
Apply PSR modifier for difficult terrain at the specified coordinates

Parameters:
roll - the PSR to modify
c - the coordinates where the PSR happens

addPilotingModifierForTerrain

public void addPilotingModifierForTerrain(PilotingRollData roll,
                                          MoveStep step)
Apply PSR modifier for difficult terrain at the move step position

Parameters:
roll - the PSR to modify
step - the move step the PSR occurs at

addPilotingModifierForTerrain

public void addPilotingModifierForTerrain(PilotingRollData roll)
Apply PSR modifier for difficult terrain in the current position

Parameters:
roll - the PSR to modify

fixElevation

public boolean fixElevation()
defensively check and correct elevation


getEngine

public Engine getEngine()

itemOppositeTech

public boolean itemOppositeTech(java.lang.String s)

getRetreatedDirection

public OffBoardDirection getRetreatedDirection()
Returns:
Returns the retreatedDirection.

setRetreatedDirection

public void setRetreatedDirection(OffBoardDirection retreatedDirection)
Parameters:
retreatedDirection - The retreatedDirection to set.

setLastTarget

public void setLastTarget(int id)

getLastTarget

public int getLastTarget()

isSufferingEMI

public boolean isSufferingEMI()

setEMI

public void setEMI(boolean inVal)

isNuclearHardened

public abstract boolean isNuclearHardened()
Checks if the unit is hardened agaist nuclear strikes.

Returns:
true if this is a hardened unit.

setHidden

public void setHidden(boolean inVal)

isHidden

public boolean isHidden()

isCarcass

public boolean isCarcass()
Is this unit a carcass, a carcass can take no action


setCarcass

public void setCarcass(boolean carcass)
Sets if this unit is a carcass.

Parameters:
carcass - true if this unit should be a carcass, false otherwise.
See Also:
isCarcass()

destroyLocation

public void destroyLocation(int loc)
Marks all equipment in a location on this entity as destroyed.

Parameters:
loc - The location that is destroyed.

checkSideSlip

public PilotingRollData checkSideSlip(EntityMovementType moveType,
                                      IHex prevHex,
                                      EntityMovementType overallMoveType,
                                      MoveStep prevStep,
                                      int prevFacing,
                                      int curFacing,
                                      Coords lastPos,
                                      Coords curPos,
                                      int distance)

isAirborneVTOL

public boolean isAirborneVTOL()
Specified by:
isAirborneVTOL in interface Targetable
Returns:
is the entity airborne in the fashion of a VTOL Not used for aerospace units, see Targetable.isAirborne()

setSpotTargetId

public void setSpotTargetId(int targetId)

getSpotTargetId

public int getSpotTargetId()

setCommander

public void setCommander(boolean arg)

isCommander

public boolean isCommander()

hasLinkedMGA

public boolean hasLinkedMGA(Mounted mounted)

setReckless

public void setReckless(boolean b)

isReckless

public boolean isReckless()

isFighter

public boolean isFighter()

isCapitalFighter

public boolean isCapitalFighter()

isCapitalScale

public boolean isCapitalScale()
a function that let's us know if this entity has capital-scale armor

Returns:

usesWeaponBays

public boolean usesWeaponBays()
a function that let's us know if this entity is using weapons bays

Returns:

whichBay

public Mounted whichBay(int bayID)
return the bay of the current weapon

Parameters:
bayID -
Returns:

getFirstBay

public Mounted getFirstBay(WeaponType wtype,
                           int loc,
                           boolean rearMount)
return the first bay of the right type in the right location with enough damage to spare

Parameters:
wtype -
loc -
rearMount -
Returns:

getHeatInArc

public int getHeatInArc(int location,
                        boolean rearMount)

getVectors

public int[] getVectors()

setVectors

public void setVectors(int[] v)

getVector

public int getVector(int vectorFacing)

getVelocity

public int getVelocity()

chooseSide

public int chooseSide(Coords attackPos,
                      boolean usePrior)

getHeading

public java.util.Vector<java.lang.Integer> getHeading()
return the heading of the unit based on its active vectors if vectors are tied then return two headings


setPassedThrough

public void setPassedThrough(java.util.Vector<Coords> pass)

getPassedThrough

public java.util.Vector<Coords> getPassedThrough()

addPassedThrough

public void addPassedThrough(Coords c)

passedThrough

public boolean passedThrough(Coords c)

passedWithin

public boolean passedWithin(Coords c,
                            int dist)
Did the entity pass within a certain number of hexes of these coords?


passedThroughPrevious

public Coords passedThroughPrevious(Coords c)
What coords were passed through previous to the given one


setRamming

public void setRamming(boolean b)

isRamming

public boolean isRamming()

resetFiringArcs

public void resetFiringArcs()

hasArcFired

public boolean hasArcFired(int location,
                           boolean rearMount)

setArcFired

public void setArcFired(int location,
                        boolean rearMount)

setRapidFire

public void setRapidFire()
Force rapid fire mode to the highest level on RAC and UAC


extendBlade

public void extendBlade(int loc)
Set the retractable blade in the given location as extended Takes the first piece of appropriate equipment


destroyRetractableBlade

public void destroyRetractableBlade(int loc)
destroys the first retractable blade critical slot found


getTMTracker

public TeleMissileTracker getTMTracker()

setGrappled

public void setGrappled(int id,
                        boolean attacker)

isGrappleAttacker

public boolean isGrappleAttacker()

getGrappled

public int getGrappled()

setGameOptions

public void setGameOptions()

setGrappleSide

public void setGrappleSide(int side)

getGrappleSide

public int getGrappleSide()

hasFunctionalArmAES

public boolean hasFunctionalArmAES(int location)

hasFunctionalLegAES

public boolean hasFunctionalLegAES()

isEvading

public boolean isEvading()

setEvading

public void setEvading(boolean evasion)

getEvasionBonus

public int getEvasionBonus()

setCarefulStand

public void setCarefulStand(boolean stand)

isCarefulStand

public boolean isCarefulStand()

getSensors

public java.util.Vector<Sensor> getSensors()

getActiveSensor

public Sensor getActiveSensor()

getNextSensor

public Sensor getNextSensor()

setNextSensor

public void setNextSensor(Sensor s)

getSensorCheck

public int getSensorCheck()

hasModularArmor

public boolean hasModularArmor()

hasModularArmor

public boolean hasModularArmor(int loc)

getDamageReductionFromModularArmor

public int getDamageReductionFromModularArmor(int loc,
                                              int damage,
                                              java.util.Vector<Report> vDesc)

getGhostTargetRoll

public int getGhostTargetRoll()

getGhostTargetRollMoS

public int getGhostTargetRollMoS()

getGhostTargetOverride

public int getGhostTargetOverride()

getCoolantFailureAmount

public int getCoolantFailureAmount()

addCoolantFailureAmount

public void addCoolantFailureAmount(int amount)

getExtraCommGearTons

public int getExtraCommGearTons()
Returns:
the tonnage of additional mounted communications equipment

getECMStrength

public double getECMStrength()
Returns:
the strength of the ECM field this unit emits

getECCMStrength

public double getECCMStrength()
Returns:
the strength of the ECCM field this unit emits

getTotalCommGearTons

public abstract int getTotalCommGearTons()
Returns:
the total tonnage of communications gear in this entity

getHQIniBonus

public int getHQIniBonus()
Returns:
the initiative bonus this Entity grants for HQ

getMDIniBonus

public int getMDIniBonus()
Returns:
the initiative bonus this Entity grants for MD implants

getQuirkIniBonus

public int getQuirkIniBonus()
Returns:
the initiative bonus this Entity grants for quirks

applySantaAnna

public void applySantaAnna()
Apply any pending Santa Anna allocations to Killer Whale ammo bins effectively "splitting" the ammo bins in two This is a hack that I should really creat a general method of "splitting" ammo bins for


getBayByAmmo

public Mounted getBayByAmmo(Mounted mammo)
get the bay that ammo is associated with

Parameters:
mammo -
Returns:

getVibroClaws

public int getVibroClaws()
Return how many BA vibroclaws this Entity is equipped with


baTaserShutdown

public void baTaserShutdown(int turns)
shut this unit down due to a BA Taser attack

Parameters:
turns - - the amount of rounds for which this Entity should be shutdown

getTaserShutdownRounds

public int getTaserShutdownRounds()
get the number of rounds for which this unit should be shutdown by taser

Returns:

setTaserShutdownRounds

public void setTaserShutdownRounds(int rounds)

isBATaserShutdown

public boolean isBATaserShutdown()

setBATaserShutdown

public void setBATaserShutdown(boolean value)

setTaserFeedback

public void setTaserFeedback(int rounds)
set this entity to suffer from taser feedback

Parameters:
rounds - - the number of rounds to suffer from taserfeedback

getTaserFeedBackRounds

public int getTaserFeedBackRounds()
get the rounds for which this entity suffers from taser feedback

Returns:

setTaserInterference

public void setTaserInterference(int value,
                                 int rounds)

getTaserInterference

public int getTaserInterference()

getTaserInterferenceRounds

public int getTaserInterferenceRounds()

isMilitary

public boolean isMilitary()
returns whether the unit is a military unit (as opposed to a civilian unit). TODO: for now this just returns true, but at some point the database should be updated


isLargeCraft

public boolean isLargeCraft()
is this entity a large craft? (dropship, jumpship, warship, or space station)


loadedUnitsHaveActiveECM

public boolean loadedUnitsHaveActiveECM()
Do units loaded onto this entity still have active ECM/ECCM/etc.?


isPartOfFighterSquadron

public boolean isPartOfFighterSquadron()
is this entity loaded into a fighter squadron?


getBVText

public java.lang.String getBVText()
Return a HTML string that describes the BV calculations

Returns:
a String explaining the BV calculation

getBARRating

public int getBARRating()
Return the BAR-rating of this Entity's armor

Returns:
the BAR rating

hasBARArmor

public boolean hasBARArmor()
does this Entity have BAR armor?

Returns:

hasArmoredChassis

public boolean hasArmoredChassis()
does this entity have an armored chassis?

Returns:

hasEnvironmentalSealing

public boolean hasEnvironmentalSealing()
does this Entity have Environmental sealing? (only Support Vehicles or IndustrialMechs should mount this)

Returns:

doCheckEngineStallRoll

public java.util.Vector<Report> doCheckEngineStallRoll(java.util.Vector<Report> vPhaseReport)
possibly do a ICE-Engine stall PSR, only industrialmechs will actually do such a roll

Parameters:
vPhaseReport - the Vector containing the phase reports
Returns:
a Vector containing the passed in reports, and any additional ones

checkUnstall

public void checkUnstall(java.util.Vector<Report> vPhaseReport)
check for unstalling of this Entity's engine (only used for ICE industrial Mechs)

Parameters:
vPhaseReport - the Vector containing the phase reports

hasArmoredEngine

public boolean hasArmoredEngine()

isStalled

public boolean isStalled()
Is this Entity's ICE Engine stalled?

Returns:
if this Entity's ICE engine is stalled

isSurfaceNaval

public boolean isSurfaceNaval()
is this a naval vessel on the surface of the water?


setSource

public void setSource(java.lang.String source)
used to set the source of the creation of this entity, i.e RS PPU Custom what not Fluff for MMLab

Parameters:
source -

getSource

public java.lang.String getSource()

setQuirks

public void setQuirks(Quirks quirks)

getQuirks

public Quirks getQuirks()

clearQuirks

public void clearQuirks()

countQuirks

public int countQuirks()
count all the quirks for this unit, positive and negative


countQuirks

public int countQuirks(java.lang.String grpKey)
count the quirks for this unit, for a given group name


getQuirkList

public java.lang.String getQuirkList(java.lang.String sep)
Returns a string of all the quirk "codes" for this entity, using sep as the separator


getForwardArc

public int getForwardArc()
Returns the forward firing arc for this entity - overrided by some units


getRearArc

public int getRearArc()
Returns the rear firing arc for this entity - overrided by some units


getSensorDesc

public java.lang.String getSensorDesc()
returns a description to the current sensing range of the active sensor


isAirborne

public boolean isAirborne()
Specified by:
isAirborne in interface Targetable
Returns:
Is the entity airborne in the fashion of an aerospace unit? Does not include VTOL movement (see Targetable.isAirborneVTOL()

isNOE

public boolean isNOE()
is the unit flying Nape of the Earth? (i.e. one elevation above ground)


getStartingPos

public int getStartingPos()

setStartingPos

public void setStartingPos(int i)

getAltitude

public int getAltitude()
Specified by:
getAltitude in interface Targetable
Returns:
altitude of target

setAltitude

public void setAltitude(int a)

getBombLoadout

public int[] getBombLoadout()
produce an int array of the number of bombs of each type based on the current bomblist

Returns:

getBattleForcePoints

public int getBattleForcePoints()
Start of Battle Force Conversion Methods


getBattleForceMovementPoints

public long getBattleForceMovementPoints()

getBattleForceJumpPoints

public long getBattleForceJumpPoints()

getMovementModeAsBattleForceString

public java.lang.String getMovementModeAsBattleForceString()
Get the movement mode of the entity and return it as a battle force string.


getBattleForceMovement

public java.lang.String getBattleForceMovement()
Returns the Battle Force Movement string this is used in a battle force game

Returns:

getBattleForceArmorPoints

public int getBattleForceArmorPoints()

getBattleForceDamageThresholdString

public java.lang.String getBattleForceDamageThresholdString()
only used for Aerospace and Dropships

Returns:

getBattleForceStructurePoints

public int getBattleForceStructurePoints()
this will be unit specific

Returns:

getBattleForceStandardWeaponsDamage

public int getBattleForceStandardWeaponsDamage(int range)
Parameters:
range -
Returns:

getBattleForceStandardWeaponsDamage

public int getBattleForceStandardWeaponsDamage(int range,
                                               int ammoType)
Parameters:
range -
ammoType -
Returns:

getBattleForceStandardWeaponsDamage

public int getBattleForceStandardWeaponsDamage(int range,
                                               boolean ignoreHeat,
                                               boolean ignoreSpecialAbilities)
Parameters:
range -
ignoreHeat -
ignoreSpecialAbilities -
Returns:

getBattleForceStandardWeaponsDamage

public int getBattleForceStandardWeaponsDamage(int range,
                                               int ammoType,
                                               boolean ignoreHeat,
                                               boolean ignoreSpecialAbilities)
Parameters:
range -
ammoType -
ignoreHeat - if set to true then heat modifier is not used on damage
ignoreSpecialAbilities - calculate special attacks into total damage if set to true
Returns:

getBattleForceTotalHeatGeneration

public int getBattleForceTotalHeatGeneration(boolean allowRear)

getBattleForceOverHeatValue

public java.lang.String getBattleForceOverHeatValue()

getBattleForceSpecialAbilites

public java.lang.String getBattleForceSpecialAbilites()

getBattleForceSize

public int getBattleForceSize()

printDebugToFile

protected void printDebugToFile()

getSecondaryPositions

public java.util.Map<java.lang.Integer,Coords> getSecondaryPositions()
End of Battle Force Conversion Methods


hasActiveBlueShield

public boolean hasActiveBlueShield()
Checks to see if this unit has a functional Blue Shield Particle Field Damper that is turned on

Returns:
true if the entity has a working, switched on blue field false otherwise

getBlueShieldRounds

public int getBlueShieldRounds()

isDropping

public boolean isDropping()

hasStealth

public boolean hasStealth()
does this unit have stealth armor?

Returns: