megamek.common
Class BattleArmor

java.lang.Object
  extended by megamek.common.TurnOrdered
      extended by megamek.common.Entity
          extended by megamek.common.Infantry
              extended by megamek.common.BattleArmor
All Implemented Interfaces:
java.io.Serializable, RoundUpdated, Targetable, Transporter

public class BattleArmor
extends Infantry

This class represents a squad or point of battle armor equiped infantry, sometimes referred to as "Elementals". Much of the behaviour of a battle armor unit is identical to that of an infantry platoon, and is rather different than that of a Mek or Tank.

Version:
$revision:$
Author:
Suvarov454@sourceforge.net (James A. Damour )
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class megamek.common.Entity
Entity.EntityFluff
 
Field Summary
static java.lang.String ADVANCED_STEALTH
          The internal name for Advanced Stealth equipment.
static int BA_MAX_MEN
          /** The maximum number of men in a battle armor squad.
static int CHASSIS_TYPE_BIPED
           
static int CHASSIS_TYPE_QUAD
           
static java.lang.String DISPOSABLE_NARC_AMMO
          Internal name of the disposable NARC ammo pack.
static java.lang.String DISPOSABLE_SRM2_AMMO
          Internal name of the Inner disposable SRM2 ammo pack.
static java.lang.String EXPERT_STEALTH
          The internal name for Expert Stealth equipment.
static int LOC_SQUAD
          The location for infantry equipment.
static int LOC_TROOPER_1
           
static int LOC_TROOPER_2
           
static int LOC_TROOPER_3
           
static int LOC_TROOPER_4
           
static int LOC_TROOPER_5
           
static int LOC_TROOPER_6
           
static int MANIPULATOR_ARMORED_GLOVE
           
static int MANIPULATOR_BASIC
           
static int MANIPULATOR_BASIC_MINE_CLEARANCE
           
static int MANIPULATOR_BATTLE
           
static int MANIPULATOR_BATTLE_MAGNET
           
static int MANIPULATOR_BATTLE_VIBRO
           
static int MANIPULATOR_CARGO_LIFTER
           
static int MANIPULATOR_HEAVY_BATTLE
           
static int MANIPULATOR_HEAVY_BATTLE_VIBRO
           
static int MANIPULATOR_INDUSTRIAL_DRILL
           
static int MANIPULATOR_NONE
           
static int MANIPULATOR_SALVAGE_ARM
           
static java.lang.String[] MANIPULATOR_TYPE_STRINGS
           
static java.lang.String MIMETIC_CAMO
          The internal name for Mimetic Camo equipment.
static java.lang.String MINE_LAUNCHER
          The internal name for the Mine Launcher weapon.
static java.lang.String SIMPLE_CAMO
          The internal name for Simple Camo equipment.
static java.lang.String SINGLE_HEX_ECM
          The internal name for Single-Hex ECM equipment.
static java.lang.String STEALTH
          The internal name for Stealth equipment.
 
Fields inherited from class megamek.common.Infantry
DUG_IN_COMPLETE, DUG_IN_FORTIFYING1, DUG_IN_FORTIFYING2, DUG_IN_NONE, DUG_IN_WORKING, INF_PLT_CLAN_MAX_MEN, INF_PLT_FOOT_MAX_MEN, INF_PLT_JUMP_MAX_MEN, INF_PLT_MAX_MEN, LEG_ATTACK, LOC_FIELD_GUNS, LOC_INFANTRY, squadn, STOP_SWARM, SWARM_MEK, turnsLayingExplosives
 
Fields inherited from class megamek.common.Entity
_isEMId, altitude, ammoList, armorTechLevel, armorType, armsFlipped, aTracker, battleForceDebugString, BATTLEFORCEEXTREMERANGE, BATTLEFORCELONGRANGE, BATTLEFORCEMEDIUMRANGE, battleForceMinRangeModifier, BATTLEFORCESHORTRANGE, battleForceToHitModifier, bombList, bvText, c3CompanyMasterIndex, c3Master, c3NetIdString, canUnstickByJumping, carcass, chassis, crew, crits, damageThisPhase, damageThisRound, DEBUGBATTLEFORCE, delta_distance, designValid, destroyed, displacementAttack, displayName, dodging, done, doomed, duplicateMarker, elevation, endColumn, endRow, endTable, engine, engineHitsThisRound, equipmentList, externalId, facing, failedEquipmentList, findingClub, fluff, game, gotPavementBonus, GRAPPLE_BOTH, GRAPPLE_LEFT, GRAPPLE_RIGHT, hasSpotlight, heat, heatBuildup, heatFromExternal, heatSinkCoolantFailureFactor, hitThisRoundByAntiTSM, hullDown, id, illuminated, iNarcPods, infernos, inReverse, isCarefulStanding, isHidden, jumpMP, killerId, lastTarget, layingMines, LOC_DESTROYED, LOC_NONE, m_lNarcedBy, m_lPendingNarc, MAX_C3_NODES, miscList, mixedTech, model, moved, movementMode, mpUsed, mpUsedLastRound, narcPods, nl, NONE, omni, owner, ownerId, pendingINarcPods, pendingNarcPods, position, prone, reckless, rolledForEngineExplosion, sec_facing, secondaryPositions, shortName, shutDown, shutdownByBATaser, shutDownThisPhase, source, spotlightIsActive, spotting, startColumn, startRow, startTable, structureType, stuckInSwamp, taggedBy, taserFeedBackRounds, taserInterference, taserInterferenceRounds, taserShutdownRounds, techLevel, tmTracker, totalWeaponList, unjammingRAC, usedSearchlight, vectors, walkMP, weaponBayList, weaponGroupList, weaponList, weight, 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
BattleArmor()
          Generate a new, blank, battle armor unit.
 
Method Summary
protected  void addEquipment(Mounted mounted, int loc, boolean rearMounted)
          Mounts the specified equipment in the specified location.
 void applyDamage()
          Update the unit to reflect damages taken in this phase.
 void autoSetInternal()
          Set the troopers in the unit to the appropriate values.
 int calculateBattleValue(boolean ignoreC3, boolean ignorePilot)
          Calculates the battle value of this platoon.
 int calculateBattleValue(boolean ignoreC3, boolean ignorePilot, boolean singleTrooper)
          Calculates the battle value of this platoon.
 boolean canAssaultDrop()
           
 boolean canDoMechanizedBA()
          can this BattleArmor ride as Mechanized BA?
 boolean canTransferCriticals(int loc)
          Returns true if this location should transfer criticals to the next location inwards.
 int getArmor(int loc, boolean rear)
          Battle Armor units have no armor on their squad location.
 java.lang.String getBLK()
           
 int getChassisType()
           
 double getCost(boolean ignoreAmmo)
           
 int getInternal(int loc)
          Battle Armor units have no internals on their squad location.
 int getJumpMP(boolean gravity)
          return this entity's current jump MP, possibly affected by gravity
 int getJumpMP(boolean gravity, boolean ignoreBurden)
          get this BA's jump MP, possibly ignoring gravity and burden
 java.lang.String[] getLocationAbbrs()
           
 java.lang.String[] getLocationNames()
           
 int getLongStealthMod()
          Public interface to the BattleArmors long range stealth modifier
 int getMediumStealthMod()
          Public interface to the BattleArmors medium range stealth modifier
 java.lang.String getMovementAbbr(EntityMovementType mtype)
          Returns the abbreviation of the type of movement used.
 java.lang.String getMovementString(EntityMovementType mtype)
          Returns the name of the type of movement used.
protected  int[] getNoOfSlots()
          Battle Armor units have as many critical slots as they need to hold their equipment.
 int getNumberActiverTroopers()
           
 int getOArmor(int loc, boolean rear)
          Battle Armor units have no armor on their squad location.
 int getOInternal(int loc)
          Battle Armor units have no internals on their squad location.
 int getOriginalJumpMP()
          Returns this entity's original jumping mp.
 int getRandomTrooper()
           
 int getRunMP(boolean gravity, boolean ignoreheat)
          Returns this entity's running mp, factored for extreme temperatures and gravity.
 int getShootingStrength()
          Get the number of men in the unit (before damage is applied).
 int getShortStealthMod()
          Public interface to the BattleArmors short range stealth modifier
 TargetRoll getStealthModifier(int range, Entity ae)
          Determine the stealth modifier for firing at this unit from the given range.
 java.lang.String getStealthName()
          Returns the name of the stealth Armor used by the BA.
 HitData getTransferLocation(HitData hit)
          Battle Armor units don't transfer damage.
 HitData getTrooperAtLocation(HitData hit, Entity transport)
          For level 3 rules, each trooper occupies a specific location precondition: hit is a location covered by BA
 int getTroopers()
           
 float getTrooperWeight()
           
 int getVibroClaws()
          Return how many BA vibroclaws this Entity is equipped with
 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 mp, factored for extreme temperatures and gravity.
 float getWeight()
           
 int getWeightClass()
           
 boolean hasActiveProbe()
          return if the BA has any kind of active probe
 boolean hasEiCockpit()
           
 boolean hasHittableCriticals(int loc)
          Trooper's equipment dies when they do.
 boolean hasImprovedSensors()
          return if this BA has improved sensors
 boolean isAttacksDuringSwarmResolved()
          have all attacks this BA made while swarming a unit already been resolved this turn?
 boolean isBurdened()
          Determines if the battle armor unit is burdened with un-jettisoned equipment.
 boolean isFireResistant()
          return if this BA has fire resistant armor
 boolean isNuclearHardened()
          Checks if the unit is hardened agaist nuclear strikes.
protected  boolean isPlatoon()
          Battle Armor units use default behavior for armor and internals.
 boolean isStealthActive()
          Determine if this unit has an active stealth system.
 boolean isTrooperActive(int trooperNum)
           
 boolean loadWeapon(Mounted mounted, Mounted mountedAmmo)
          Tries to load the specified weapon with the specified ammo.
 boolean loadWeaponWithSameAmmo(Mounted mounted, Mounted mountedAmmo)
          Tries to load the specified weapon with the specified ammo.
 int locations()
          Returns the number of locations in this unit.
 void newRound(int roundNumber)
          Prepare the entity for a new round of action.
 HitData rollHitLocation(int table, int side)
          Rolls up a hit location
 HitData rollHitLocation(int table, int side, int aimedLocation, int aimingMode)
          Battle Armor units can only get hit in undestroyed troopers.
 void setAttacksDuringSwarmResolved(boolean resolved)
          set wether or not all attacks this BA made while swarming a unit have already been resolved
 void setChassisType(int inCT)
           
 void setCost(int inC)
           
 void setInternal(int value)
          Set the troopers in the unit to the given values.
 void setTroopers(int troopers)
           
 void setTrooperWeight(float trooperWeight)
           
 void setWeightClass(int inWC)
           
 
Methods inherited from class megamek.common.Infantry
addEntityBonuses, calculateBattleValue, canAttackMeks, canChangeSecondaryFacing, canCharge, canDFA, checkBogDown, clipSecondaryFacing, doomedInAtmosphere, doomedInSpace, doomedInVacuum, doomedOnGround, getArmorDesc, getDamageDivisor, getDamagePerTrooper, getDependentLocation, getDugIn, getEngineCritHeat, getHeatCapacity, getHeatCapacityWithWater, getInternalRemainingPercent, getMaxElevationChange, getPrimaryWeapon, getRunMPwithoutMASC, getSecondaryN, getSecondaryWeapon, getSquadN, getSquadSize, getTotalCommGearTons, getWeaponArc, hasActiveFieldArtillery, hasDEST, hasRearArmor, hasSneakCamo, hasSneakECM, hasSneakIR, hasSpaceSuit, initializeInternal, isAntiMek, isArmorEncumbering, isEligibleFor, isEligibleForFiring, isHexProhibited, isMechanized, isSecondaryArcWeapon, isSquad, isValidSecondaryFacing, restore, setAntiMek, setArmorEncumbering, setDamageDivisor, setDEST, setDugIn, setInternal, setMovementMode, setPrimaryWeapon, setSecondaryN, setSecondaryWeapon, setSneakCamo, setSneakECM, setSneakIR, setSpaceSuit, setSquadN, setSquadSize, setTransportID, victoryReport
 
Methods inherited from class megamek.common.Entity
absHeight, addBomb, addBomb, addConditionBonuses, addCoolantFailureAmount, addCritical, addCritical, addEquipment, addEquipment, addEquipment, addEquipment, addEquipment, addEquipment, addEquipment, addFailedEquipment, addKill, addPassedThrough, addPilotingModifierForTerrain, addPilotingModifierForTerrain, addPilotingModifierForTerrain, addTargetedBySwarm, addTransporter, addWeaponGroup, applyGravityEffectsOnMP, applySantaAnna, armorStringFor, assignAMS, attachINarcPod, attachNarcPod, baTaserShutdown, C3MasterIs, calcElevation, calcElevation, calculateFreeC3MNodes, calculateFreeC3Nodes, canAssist, canFlee, canFlipArms, canGoDown, canGoDown, canGoHullDown, canGoUp, canLayMine, canLoad, canLoad, canRam, canSpot, canUnjamRAC, canUnstickByJumping, checkBogDown, checkDislodgeSwarmers, checkGetUp, checkLandingInHeavyWoods, checkLandingOnIce, checkLandingWithDamage, checkMovedTooFast, checkMovementInBuilding, checkRecklessMove, checkRubbleMove, checkRunningWithDamage, checkSideSlip, checkSkid, checkSprintingWithMASC, checkSprintingWithSupercharger, checkUnstall, checkWaterMove, checkWaterMove, chooseSide, clearQuirks, climbMode, countQuirks, countQuirks, countWorkingMisc, damageBayDoor, damageDockCollar, damageDoorRecovery, decodeTransporters, deployOffBoard, destroy, destroyLocation, destroyRetractableBlade, doCheckEngineStallRoll, elevationOccupied, encodeTransporters, entityIsBiped, entityIsQuad, equals, extendBlade, findTargetedDisplacement, fixElevation, generateDisplayName, generateShortName, getActiveSensor, getActiveUMUCount, getActiveVibrobladeHeat, getAllUMUCount, getAltitude, getAmmo, getArmor, getArmor, getArmorRemainingPercent, getArmorString, getArmorString, getArmorTechLevel, getArmorType, getArmorWeight, getArmsFlipped, getBadCriticals, getBAPRange, getBARRating, getBasePilotingRoll, getBasePilotingRoll, getBattleForceArmorPoints, getBattleForceDamageThresholdString, getBattleForceJumpPoints, getBattleForceMovement, getBattleForceMovementPoints, getBattleForceOverHeatValue, getBattleForcePoints, getBattleForceSize, getBattleForceSpecialAbilites, getBattleForceStandardWeaponsDamage, getBattleForceStandardWeaponsDamage, getBattleForceStandardWeaponsDamage, getBattleForceStandardWeaponsDamage, getBattleForceStructurePoints, getBattleForceTotalHeatGeneration, getBayByAmmo, getBayLoadedUnits, getBlueShieldRounds, getBombLoadout, getBombs, getBombs, getBVText, getC3Master, getC3MasterId, getC3NetId, getC3Top, getCargoMpReduction, getChassis, getClubs, getCoolantFailureAmount, getCrew, getCritical, getDamageReductionFromModularArmor, getDeployRound, getDisplacementAttack, getDisplayName, getDocks, getDroppableUnits, getECCMStrength, getECMRange, getECMStrength, getElevation, getEmptyCriticals, getEngine, getEquipment, getEquipment, getEquipmentNum, getEquipmentType, getEvasionBonus, getExteriorUnitAt, getExternalId, getExternalUnits, getExtraCommGearTons, getExtremeRangeModifier, getFacing, getFailedEquipment, getFighterBays, getFighterLaunchRate, getFirstBay, getFirstWeapon, getFluff, getForwardArc, getGame, getGaveKillCredit, getGhostTargetOverride, getGhostTargetRoll, getGhostTargetRollMoS, getGoodCriticals, getGoodCriticals, getGrappled, getGrappleSide, getGyroType, getHeading, getHeatFiringModifier, getHeatInArc, getHeatMPReduction, getHeight, getHitCriticals, getHittableCriticals, getHQIniBonus, getId, getINarcPodsAttached, getInternal, getInternalString, getJumpHeat, getJumpMP, getJumpMPWithTerrain, getJumpType, getKillNumber, getKills, getLastTarget, getLaunchableFighters, getLaunchableSmallCraft, getLoadedBay, getLoadedFighters, getLoadedSmallCraft, getLoadedUnits, getLocationAbbr, getLocationAbbr, getLocationFromAbbr, getLocationName, getLocationName, getLocationStatus, getLongRangeModifier, getMaxElevationDown, getMDIniBonus, getMediumRangeModifier, getMisc, getModel, getMovementBeforeSkidPSRModifier, getMovementMode, getMovementModeAsBattleForceString, getMovementModeAsString, getNextSensor, getNextWeapon, getNumberOf, getNumberOfCriticals, getNumberOfCriticals, getNumberOfCriticals, getNumberOfCriticals, getNumberOfShields, getOArmor, getOArmor, getOffBoardDirection, getOffBoardDistance, getOInternal, getOriginalRunMP, getOriginalSprintMP, getOriginalWalkMP, getOwner, getOwnerId, getPassedThrough, getPickedUpMechWarriors, getPosition, getPriorPosition, getQuirkIniBonus, getQuirkList, getQuirks, getRearArc, getRecoveryTurn, getRemovalCondition, getRetreatedDirection, getRunHeat, getRunMP, getRunMPasString, getRunMPwithoutMASC, getRunningGravityLimit, getSecondaryFacing, getSecondaryPositions, getSensorCheck, getSensorDesc, getSensors, getShortName, getShortNameRaw, getShortRangeModifier, getSmallCraftBays, getSmallCraftLaunchRate, getSource, getSpotTargetId, getSprintHeat, getSprintMP, getSprintMP, getSprintMPasString, getSprintMPwithoutMASC, getSprintMPwithoutMASC, getStandingHeat, getStartingPos, getStructureType, getSwarmAttackerId, getSwarmTargetId, getTaggedBy, getTargetedBySwarm, getTargetId, getTargetType, getTaserFeedBackRounds, getTaserInterference, getTaserInterferenceRounds, getTaserShutdownRounds, getTechLevel, getTMTracker, getTotalAmmoOfType, getTotalArmor, getTotalInternal, getTotalMunitionsOfType, getTotalOArmor, getTotalOInternal, getTotalWeaponList, getTransferLocation, getTransportBays, getTransportId, getTransports, getTroopCarryingSpace, getUnitNumber, getUnusedString, getVector, getVectors, getVelocity, getWalkHeat, getWeaponBayList, getWeaponGroupList, getWeaponList, getWeapons, getWeaponsAndEquipmentCost, getWeaponsAndEquipmentCost, getWeightClassName, getYear, hasActiveAngelECCM, hasActiveAngelECM, hasActiveBlueShield, hasActiveECCM, hasActiveECM, hasActiveECM, hasActiveEiCockpit, hasActiveShield, hasActiveShield, hasAimModeTargComp, hasArcFired, hasArmoredChassis, hasArmoredEngine, hasBAP, hasBAP, hasBARArmor, hasBattleArmorHandles, hasC3, hasC3i, hasC3M, hasC3MM, hasC3S, hasCASEII, hasCASEII, hasDisplacementAttack, hasEnvironmentalSealing, hasFunctionalArmAES, hasFunctionalLegAES, hasGhostTargets, hasHipCrit, hasINarcPodsAttached, hasInfernoAmmo, hasLegActuatorCrit, hasLinkedMGA, hasModularArmor, hasModularArmor, hasNoDefenseShield, hasPassiveShield, hasPassiveShield, hasShield, hasSpotlight, hasStealth, hasSystem, hasTAG, hasTargComp, hasUMU, hasVibroblades, hasWorkingMisc, hasWorkingMisc, hasWorkingMisc, hasWorkingMisc, hasWorkingSystem, hasWorkingWeapon, hasWorkingWeapon, hasWorkingWeapon, hasWorkingWeapon, height, hitAllCriticals, illuminateTarget, initializeArmor, isActive, isActive, isAirborne, isAirborneVTOL, isAssaultDropInProgress, isAttackingThisTurn, isBATaserShutdown, isBoardProhibited, isCanon, isCapitalFighter, isCapitalScale, isCaptured, isCarcass, isCarefulStand, isChameleonShieldActive, isCharging, isClan, isClanArmor, isClearingMinefield, isCommander, isDeployed, isDesignValid, isDestroyed, isDone, isDoomed, isDropping, isElevationValid, isEligibleForMovement, isEligibleForOffboard, isEligibleForPhysical, isEligibleForTargetingPhase, isEnemyOf, isEvading, isFighter, isFindingClub, isGrappleAttacker, isHidden, isHullDown, isIlluminated, isImmobile, isINarcedBy, isINarcedWith, isLargeCraft, isLayingMines, isLoadableThisTurn, isLocationBad, isLocationDoomed, isMakingDfa, isMilitary, isMixedTech, isNarcedBy, isNOE, isNullSigActive, isOffBoard, isOmni, isOnSameSheet, isPartOfFighterSquadron, isProne, isPushing, isRamming, isReckless, isRepairable, isSalvage, isSeenByEnemy, isSelectableThisTurn, isShutDown, isShutDownThisPhase, isSpotting, isStalled, isStealthOn, isStuck, isSufferingEMI, isSurfaceNaval, isSystemRepairable, isTargetable, isTargetOfDisplacementAttack, isUnjammingRAC, isUnloadedThisTurn, isUsingManAce, isUsingSpotlight, isVisibleToEnemy, isVoidSigActive, isWeaponBlockedAt, itemOppositeTech, load, load, loadAllWeapons, loadedUnitsHaveActiveECM, loadWeapon, loadWeaponWithSameAmmo, locationHasCase, locationIsLeg, needsRollToStand, onSameC3NetworkAs, onSameC3NetworkAs, passedThrough, passedThroughPrevious, passedWithin, pickUp, printDebugToFile, recover, refreshLocations, reloadEmptyWeapons, removeAllINarcPods, removeAllTransporters, removeCriticals, removeINarcPod, removeMisc, removePartialCoverHits, resetBayDoors, resetFiringArcs, rollMovementInBuilding, setAltitude, setArcFired, setArmor, setArmor, setArmor, setArmorTechLevel, setArmorType, setArmorType, setArmsFlipped, setAssaultDropInProgress, setBATaserShutdown, setC3Master, setC3Master, setC3NetId, setCanon, setCanUnstickByJumping, setCaptured, setCarcass, setCarefulStand, setChassis, setClearingMinefield, setClimbMode, setCommander, setCrew, setCritical, setDeployed, setDeployRound, setDesignValid, setDestroyed, setDisplacementAttack, setDone, setDoomed, setElevation, setEMI, setEvading, setExternalId, setFacing, setFindingClub, setGame, setGameOptions, setGrappled, setGrappleSide, setHidden, setHullDown, setId, setIlluminated, setInternal, setLandedAssaultDrop, setLastTarget, setLayingMines, setLocationStatus, setMixedTech, setModel, setNextSensor, setOffBoard, setOmni, setOriginalJumpMP, setOriginalWalkMP, setOwner, setPassedThrough, setPosition, setProne, setQuirks, setRamming, setRapidFire, setReckless, setRecoveryTurn, setRemovalCondition, setRetreatedDirection, setSalvage, setSecondaryFacing, setSeenByEnemy, setShutDown, setShutDownThisPhase, setSource, setSpotlight, setSpotlightState, setSpotTargetId, setSpotting, setStartingPos, setStructureType, setStructureType, setStuck, setSwarmAttackerId, setSwarmTargetId, setTaggedBy, setTaserFeedback, setTaserInterference, setTaserShutdownRounds, setTechLevel, setTransportId, setUnitNumber, setUnjammingRAC, setUnloaded, setUsedSearchlight, setVectors, setVisibleToEnemy, setWeaponHit, setWeight, setYear, shouldDeploy, sideTable, sideTable, sideTable, statusToString, statusToString, statusToString, toString, unload, updateBays, usedSearchlight, usedTag, usesWeaponBays, weaponFiredFrom, whichBay
 
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

MANIPULATOR_NONE

public static final int MANIPULATOR_NONE
See Also:
Constant Field Values

MANIPULATOR_ARMORED_GLOVE

public static final int MANIPULATOR_ARMORED_GLOVE
See Also:
Constant Field Values

MANIPULATOR_BASIC

public static final int MANIPULATOR_BASIC
See Also:
Constant Field Values

MANIPULATOR_BASIC_MINE_CLEARANCE

public static final int MANIPULATOR_BASIC_MINE_CLEARANCE
See Also:
Constant Field Values

MANIPULATOR_BATTLE

public static final int MANIPULATOR_BATTLE
See Also:
Constant Field Values

MANIPULATOR_BATTLE_MAGNET

public static final int MANIPULATOR_BATTLE_MAGNET
See Also:
Constant Field Values

MANIPULATOR_BATTLE_VIBRO

public static final int MANIPULATOR_BATTLE_VIBRO
See Also:
Constant Field Values

MANIPULATOR_HEAVY_BATTLE

public static final int MANIPULATOR_HEAVY_BATTLE
See Also:
Constant Field Values

MANIPULATOR_HEAVY_BATTLE_VIBRO

public static final int MANIPULATOR_HEAVY_BATTLE_VIBRO
See Also:
Constant Field Values

MANIPULATOR_SALVAGE_ARM

public static final int MANIPULATOR_SALVAGE_ARM
See Also:
Constant Field Values

MANIPULATOR_CARGO_LIFTER

public static final int MANIPULATOR_CARGO_LIFTER
See Also:
Constant Field Values

MANIPULATOR_INDUSTRIAL_DRILL

public static final int MANIPULATOR_INDUSTRIAL_DRILL
See Also:
Constant Field Values

MANIPULATOR_TYPE_STRINGS

public static final java.lang.String[] MANIPULATOR_TYPE_STRINGS

CHASSIS_TYPE_BIPED

public static final int CHASSIS_TYPE_BIPED
See Also:
Constant Field Values

CHASSIS_TYPE_QUAD

public static final int CHASSIS_TYPE_QUAD
See Also:
Constant Field Values

DISPOSABLE_SRM2_AMMO

public static final java.lang.String DISPOSABLE_SRM2_AMMO
Internal name of the Inner disposable SRM2 ammo pack.

See Also:
Constant Field Values

DISPOSABLE_NARC_AMMO

public static final java.lang.String DISPOSABLE_NARC_AMMO
Internal name of the disposable NARC ammo pack.

See Also:
Constant Field Values

MINE_LAUNCHER

public static final java.lang.String MINE_LAUNCHER
The internal name for the Mine Launcher weapon.

See Also:
Constant Field Values

STEALTH

public static final java.lang.String STEALTH
The internal name for Stealth equipment.

See Also:
Constant Field Values

ADVANCED_STEALTH

public static final java.lang.String ADVANCED_STEALTH
The internal name for Advanced Stealth equipment.

See Also:
Constant Field Values

EXPERT_STEALTH

public static final java.lang.String EXPERT_STEALTH
The internal name for Expert Stealth equipment.

See Also:
Constant Field Values

MIMETIC_CAMO

public static final java.lang.String MIMETIC_CAMO
The internal name for Mimetic Camo equipment.

See Also:
Constant Field Values

SIMPLE_CAMO

public static final java.lang.String SIMPLE_CAMO
The internal name for Simple Camo equipment.

See Also:
Constant Field Values

SINGLE_HEX_ECM

public static final java.lang.String SINGLE_HEX_ECM
The internal name for Single-Hex ECM equipment.

See Also:
Constant Field Values

BA_MAX_MEN

public static final int BA_MAX_MEN
/** The maximum number of men in a battle armor squad.

See Also:
Constant Field Values

LOC_SQUAD

public static final int LOC_SQUAD
The location for infantry equipment.

See Also:
Constant Field Values

LOC_TROOPER_1

public static final int LOC_TROOPER_1
See Also:
Constant Field Values

LOC_TROOPER_2

public static final int LOC_TROOPER_2
See Also:
Constant Field Values

LOC_TROOPER_3

public static final int LOC_TROOPER_3
See Also:
Constant Field Values

LOC_TROOPER_4

public static final int LOC_TROOPER_4
See Also:
Constant Field Values

LOC_TROOPER_5

public static final int LOC_TROOPER_5
See Also:
Constant Field Values

LOC_TROOPER_6

public static final int LOC_TROOPER_6
See Also:
Constant Field Values
Constructor Detail

BattleArmor

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

Method Detail

getLocationAbbrs

public java.lang.String[] getLocationAbbrs()
Overrides:
getLocationAbbrs in class Infantry

getLocationNames

public java.lang.String[] getLocationNames()
Overrides:
getLocationNames in class Infantry

locations

public int locations()
Returns the number of locations in this unit.

Overrides:
locations in class Infantry

getOriginalJumpMP

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

Overrides:
getOriginalJumpMP in class Entity

getWalkMP

public int getWalkMP()
Description copied from class: Entity
Returns this entity's walking/cruising mp, factored for heat and gravity.

Overrides:
getWalkMP in class Entity

getWalkMP

public int getWalkMP(boolean gravity,
                     boolean ignoreheat)
Returns this entity's walking mp, factored for extreme temperatures and gravity.

Overrides:
getWalkMP in class Infantry
Parameters:
gravity - Should the movement be factored for gravity
ignoreheat - Should heat be ignored?

getRunMP

public int getRunMP(boolean gravity,
                    boolean ignoreheat)
Returns this entity's running mp, factored for extreme temperatures and gravity.

Overrides:
getRunMP in class Infantry

getJumpMP

public int getJumpMP(boolean gravity)
Description copied from class: Entity
return this entity's current jump MP, possibly affected by gravity

Overrides:
getJumpMP in class Infantry
Returns:

getJumpMP

public int getJumpMP(boolean gravity,
                     boolean ignoreBurden)
get this BA's jump MP, possibly ignoring gravity and burden

Parameters:
gravity -
ignoreBurden -
Returns:

getMovementString

public java.lang.String getMovementString(EntityMovementType mtype)
Returns the name of the type of movement used. This is Infantry-specific.

Overrides:
getMovementString in class Infantry

getMovementAbbr

public java.lang.String getMovementAbbr(EntityMovementType mtype)
Returns the abbreviation of the type of movement used. This is Infantry-specific.

Overrides:
getMovementAbbr in class Infantry

rollHitLocation

public HitData rollHitLocation(int table,
                               int side,
                               int aimedLocation,
                               int aimingMode)
Battle Armor units can only get hit in undestroyed troopers.

Overrides:
rollHitLocation in class Infantry

rollHitLocation

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

Overrides:
rollHitLocation in class Infantry

getTrooperAtLocation

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

Overrides:
getTrooperAtLocation in class Entity

getTransferLocation

public HitData getTransferLocation(HitData hit)
Battle Armor units don't transfer damage.

Overrides:
getTransferLocation in class Infantry

isPlatoon

protected boolean isPlatoon()
Battle Armor units use default behavior for armor and internals.

Overrides:
isPlatoon in class Infantry
See Also:
Infantry.isPlatoon()

getArmor

public int getArmor(int loc,
                    boolean rear)
Battle Armor units have no armor on their squad location.

Overrides:
getArmor in class Entity
See Also:
Entity.getArmor( int, boolean )

getOArmor

public int getOArmor(int loc,
                     boolean rear)
Battle Armor units have no armor on their squad location.

Overrides:
getOArmor in class Entity
Parameters:
loc - the location to check.
rear - if true inspect the rear armor, else check the front.
See Also:
Entity.getOArmor( int, boolean )

getInternal

public int getInternal(int loc)
Battle Armor units have no internals on their squad location.

Overrides:
getInternal in class Infantry
See Also:
Infantry.getInternal( int )

getOInternal

public int getOInternal(int loc)
Battle Armor units have no internals on their squad location.

Overrides:
getOInternal in class Infantry
See Also:
Infantry.getOInternal( int )

autoSetInternal

public void autoSetInternal()
Set the troopers in the unit to the appropriate values.

Overrides:
autoSetInternal in class Infantry

setInternal

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


addEquipment

protected void addEquipment(Mounted mounted,
                            int loc,
                            boolean rearMounted)
                     throws LocationFullException
Mounts the specified equipment in the specified location.

Overrides:
addEquipment in class Entity
Throws:
LocationFullException

getNoOfSlots

protected int[] getNoOfSlots()
Battle Armor units have as many critical slots as they need to hold their equipment.

Overrides:
getNoOfSlots in class Infantry

hasHittableCriticals

public boolean hasHittableCriticals(int loc)
Trooper's equipment dies when they do.

Overrides:
hasHittableCriticals in class Infantry

calculateBattleValue

public int calculateBattleValue(boolean ignoreC3,
                                boolean ignorePilot)
Calculates the battle value of this platoon.

Overrides:
calculateBattleValue in class Infantry
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

calculateBattleValue

public int calculateBattleValue(boolean ignoreC3,
                                boolean ignorePilot,
                                boolean singleTrooper)
Calculates the battle value of this platoon.

Parameters:
ignoreC3 - ignore C3 linkage
ignorePilot - ignore the skill of the pilot
singleTrooper - calculate just the BV of a single trooper
Returns:
the battlevalue

newRound

public void newRound(int roundNumber)
Prepare the entity for a new round of action.

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

applyDamage

public void applyDamage()
Update the unit to reflect damages taken in this phase.

Overrides:
applyDamage in class Infantry

getShootingStrength

public int getShootingStrength()
Get the number of men in the unit (before damage is applied).

Overrides:
getShootingStrength in class Infantry
See Also:
Infantry.getShootingStrength()

setCost

public void setCost(int inC)

isBurdened

public boolean isBurdened()
Determines if the battle armor unit is burdened with un-jettisoned equipment. This can prevent the unit from jumping or using their special Anti-Mek attacks.

Returns:
true if the unit hasn't jettisoned its equipment yet, false if it has.

getStealthName

public java.lang.String getStealthName()
Returns the name of the stealth Armor used by the BA. Mostly for MegaMekLab Usage.

Returns:
name of the stealth armor.

getShortStealthMod

public int getShortStealthMod()
Public interface to the BattleArmors short range stealth modifier

Returns:
shortStealthMod

getMediumStealthMod

public int getMediumStealthMod()
Public interface to the BattleArmors medium range stealth modifier

Returns:
mediumStealthMod

getLongStealthMod

public int getLongStealthMod()
Public interface to the BattleArmors long range stealth modifier

Returns:
longStealthMod

isStealthActive

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

Sub-classes are encouraged to override this method.

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

getStealthModifier

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

Sub-classes are encouraged to override this method.

Overrides:
getStealthModifier in class Infantry
Parameters:
range - - an int value that must match one of the Compute class range constants.
ae - - the entity making the attack.
Returns:
a TargetRoll value that contains the stealth modifier for the given range.

getCost

public double getCost(boolean ignoreAmmo)
Overrides:
getCost in class Infantry
Returns:
The cost in C-Bills of the Infantry in question.

hasEiCockpit

public boolean hasEiCockpit()
Overrides:
hasEiCockpit in class Entity

setWeightClass

public void setWeightClass(int inWC)

getTrooperWeight

public float getTrooperWeight()

setTrooperWeight

public void setTrooperWeight(float trooperWeight)

getWeightClass

public int getWeightClass()
Overrides:
getWeightClass in class Entity

getTroopers

public int getTroopers()

setTroopers

public void setTroopers(int troopers)

setChassisType

public void setChassisType(int inCT)

getChassisType

public int getChassisType()

canAssaultDrop

public boolean canAssaultDrop()
Overrides:
canAssaultDrop in class Infantry

isNuclearHardened

public boolean isNuclearHardened()
Description copied from class: Entity
Checks if the unit is hardened agaist nuclear strikes.

Overrides:
isNuclearHardened in class Infantry
Returns:
true if this is a hardened unit.

isTrooperActive

public boolean isTrooperActive(int trooperNum)

getNumberActiverTroopers

public int getNumberActiverTroopers()

getRandomTrooper

public int getRandomTrooper()

loadWeapon

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

Overrides:
loadWeapon in class Infantry

loadWeaponWithSameAmmo

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

Overrides:
loadWeaponWithSameAmmo in class Infantry

getBLK

public final java.lang.String getBLK()

getVibroClaws

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

Overrides:
getVibroClaws in class Entity

isFireResistant

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

Returns:

hasImprovedSensors

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

Returns:

hasActiveProbe

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

Returns:

canTransferCriticals

public boolean canTransferCriticals(int loc)
Description copied from class: Entity
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.

Overrides:
canTransferCriticals in class Entity

isAttacksDuringSwarmResolved

public boolean isAttacksDuringSwarmResolved()
have all attacks this BA made while swarming a unit already been resolved this turn?

Returns:

setAttacksDuringSwarmResolved

public void setAttacksDuringSwarmResolved(boolean resolved)
set wether or not all attacks this BA made while swarming a unit have already been resolved

Parameters:
resolved - - a boolean

canDoMechanizedBA

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

Returns:

getWeight

public float getWeight()
Overrides:
getWeight in class Infantry