megamek.common
Class MechWarrior

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

public class MechWarrior
extends Infantry

Author:
Sebastian Brocks This class describes a MechWarrior that has ejected from its ride.
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class megamek.common.Entity
Entity.EntityFluff
 
Field Summary
 
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
MechWarrior(Entity originalRide)
          Create a new MechWarrior
 
Method Summary
 int calculateBattleValue()
          Calculates the battle value of this entity
 int getOriginalRideExternalId()
           
 int getOriginalRideId()
           
 int getPickedUpByExternalId()
           
 int getPickedUpById()
           
 boolean hasLanded()
           
 boolean isSelectableThisTurn()
          Returns true if this entity is selectable for action.
 void newRound(int number)
          Start a new round
 void setLanded(boolean landed)
          Ejected pilots do not get killed by ammo/fusion engine explosions so that means they are still up in the air and do not land until the end of the turn.
 void setOriginalRideExternalId(int originalRideExternalId)
          set the int external id of this MW's original ride
 void setOriginalRideId(int originalRideId)
          set the int id of this MW's original ride
 void setPickedUpByExternalId(int pickedUpByExternalId)
          set the int external id of the unit that picked up this MW
 void setPickedUpById(int pickedUpById)
          set the int id of the unit that picked up this MW
 
Methods inherited from class megamek.common.Infantry
addEntityBonuses, applyDamage, autoSetInternal, calculateBattleValue, canAssaultDrop, canAttackMeks, canChangeSecondaryFacing, canCharge, canDFA, checkBogDown, clipSecondaryFacing, doomedInAtmosphere, doomedInSpace, doomedInVacuum, doomedOnGround, getArmorDesc, getCost, getDamageDivisor, getDamagePerTrooper, getDependentLocation, getDugIn, getEngineCritHeat, getHeatCapacity, getHeatCapacityWithWater, getInternal, getInternalRemainingPercent, getJumpMP, getLocationAbbrs, getLocationNames, getMaxElevationChange, getMovementAbbr, getMovementString, getNoOfSlots, getOInternal, getPrimaryWeapon, getRunMP, getRunMPwithoutMASC, getSecondaryN, getSecondaryWeapon, getShootingStrength, getSquadN, getSquadSize, getStealthModifier, getTotalCommGearTons, getTransferLocation, getWalkMP, getWeaponArc, getWeight, hasActiveFieldArtillery, hasDEST, hasHittableCriticals, hasRearArmor, hasSneakCamo, hasSneakECM, hasSneakIR, hasSpaceSuit, initializeInternal, isAntiMek, isArmorEncumbering, isEligibleFor, isEligibleForFiring, isHexProhibited, isMechanized, isNuclearHardened, isPlatoon, isSecondaryArcWeapon, isSquad, isValidSecondaryFacing, loadWeapon, loadWeaponWithSameAmmo, locations, restore, rollHitLocation, rollHitLocation, 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, 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, canTransferCriticals, 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, 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, getOArmor, getOffBoardDirection, getOffBoardDistance, getOInternal, getOriginalJumpMP, 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, getTrooperAtLocation, getUnitNumber, getUnusedString, getVector, getVectors, getVelocity, getVibroClaws, getWalkHeat, getWalkMP, getWeaponBayList, getWeaponGroupList, getWeaponList, getWeapons, getWeaponsAndEquipmentCost, getWeaponsAndEquipmentCost, getWeightClass, 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, hasEiCockpit, 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, isShutDown, isShutDownThisPhase, isSpotting, isStalled, isStealthActive, 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
 

Constructor Detail

MechWarrior

public MechWarrior(Entity originalRide)
Create a new MechWarrior

Parameters:
originalRide - the Entity that was this MW's original ride
Method Detail

isSelectableThisTurn

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

Overrides:
isSelectableThisTurn in class Entity

getOriginalRideId

public int getOriginalRideId()
Returns:
the int id of this MW's original ride

setOriginalRideId

public void setOriginalRideId(int originalRideId)
set the int id of this MW's original ride


getOriginalRideExternalId

public int getOriginalRideExternalId()
Returns:
the int external id of this MW's original ride

setOriginalRideExternalId

public void setOriginalRideExternalId(int originalRideExternalId)
set the int external id of this MW's original ride


getPickedUpByExternalId

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

setPickedUpByExternalId

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


getPickedUpById

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

setPickedUpById

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


calculateBattleValue

public int calculateBattleValue()
Description copied from class: Entity
Calculates the battle value of this entity

Overrides:
calculateBattleValue in class Infantry

newRound

public void newRound(int number)
Description copied from class: Entity
Start a new round

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

setLanded

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

Parameters:
landed -

hasLanded

public boolean hasLanded()