Package megamek.common.units
Class Infantry
java.lang.Object
megamek.common.turns.TurnOrdered
megamek.common.units.Entity
megamek.common.units.Infantry
- All Implemented Interfaces:
Serializable,ICarryable,Transporter,InGameObject,CombatRole,ForceAssignable,ITechnology,ITurnOrdered,PhaseUpdated,RoundUpdated,BTObject,Deployable,Targetable
- Direct Known Subclasses:
BattleArmor,ConvInfantry
This is a superclass for infantry unit types, Conventional Infantry and BattleArmor. Other personnel on the
battlefield (e.g., ejected crew) are subtypes of Conventional Infantry.
Note that formerly, this class represented conventional infantry directly and BattleArmor was a subtype. This has been changed as a substantional number of rules for CI/BA do not overlap.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class megamek.common.units.Entity
Entity.InvalidSourceBuildReasonNested classes/interfaces inherited from interface megamek.common.equipment.ICarryable
ICarryable.CarriedObjectDamageAllocation -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intThe number of troopers alive in this platoon, including any damage sustained in the current phase.static final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intNumber of idle turns (no movement, no fire) the unit must spend "hitting the deck" before it may convert to "dug in" status.static final Stringprotected intprotected intprotected intstatic final Stringstatic final Stringstatic final Stringprotected intThe number of troopers alive in this platoon at the beginning of the phase, before taking damage.intFields inherited from class megamek.common.units.Entity
_isEMId, abandonmentAnnouncedRound, ALTERNATE_MASC_FAILURE, ALTERNATE_MASC_FAILURE_ENHANCED, altitude, ammoList, armorTechLevel, armorTechRating, armorTonnage, armorType, armsFlipped, asewAffectedTurns, aTracker, baVDNINeedsFeedbackMessage, BLOOD_STALKER_TARGET_CLEARED, bMASCWentUp, bombList, boobyTrapInitiated, bSuperchargerWentUp, C3_NETWORK_ID_SEPARATOR, c3CompanyMasterIndex, c3Master, c3NetIdString, camouflage, canUnstickByJumping, carcass, chassis, clanChassisName, climbing, climbingLevelsChosen, consecutiveRHSUses, convertingNow, coolFromExternal, crits, damageThisPhase, damageThisRound, dangling, delta_distance, designValid, destroyed, displacementAttack, DMG_CRIPPLED, DMG_HEAVY, DMG_LIGHT, DMG_MODERATE, DMG_NONE, dodging, DOES_NOT_TRACK_HEAT, done, doomed, eiShutdown, elevation, empInterferenceHeat, empInterferenceRounds, empShutdownRounds, engineHitsThisPhase, engineTechRating, equipmentList, ETYPE_AERO, ETYPE_AEROSPACE_FIGHTER, ETYPE_ARMLESS_MEK, ETYPE_BATTLEARMOR, ETYPE_BATTLEFIELD_SUPPORT_ASSET, ETYPE_BIPED_MEK, ETYPE_BUILDING_ENTITY, ETYPE_COMBAT_VEHICLE_ESCAPE_POD, ETYPE_CONV_FIGHTER, ETYPE_DROPSHIP, ETYPE_FIGHTER_SQUADRON, ETYPE_FIXED_WING_SUPPORT, ETYPE_GUN_EMPLACEMENT, ETYPE_HANDHELD_WEAPON, ETYPE_INFANTRY, ETYPE_JUMPSHIP, ETYPE_LAND_AIR_MEK, ETYPE_LARGE_SUPPORT_TANK, ETYPE_MEK, ETYPE_MEKWARRIOR, ETYPE_PROTOMEK, ETYPE_QUAD_MEK, ETYPE_QUADVEE, ETYPE_SMALL_CRAFT, ETYPE_SPACE_STATION, ETYPE_SUPER_HEAVY_TANK, ETYPE_SUPPORT_TANK, ETYPE_SUPPORT_VTOL, ETYPE_TANK, ETYPE_TELEMISSILE, ETYPE_TRIPOD_MEK, ETYPE_VTOL, ETYPE_WARSHIP, externalId, facing, failedEquipmentList, fell, findingClub, firingSolutions, fluff, game, gotPavementOrRoadBonus, GRAPPLE_BOTH, GRAPPLE_LEFT, GRAPPLE_RIGHT, hardenedArmorDamaged, hasDamagedRHS, hasExternalSearchlight, heat, heatBuildup, heatFromExternal, heatSinkCoolantFailureFactor, hiddenActivationPhase, hullDown, icon, id, iGame, illuminated, iNarcPods, incomingGuidedAttacks, infernos, initialBV, inReverse, isC3ecmAffected, isCarefulStanding, isHidden, isJumpingNow, jumpMP, killerId, lastTarget, lastTargetDisplayName, layingMines, LOC_DESTROYED, LOC_NONE, locationBlownOff, locationBlownOffThisPhase, m_lNarcedBy, m_lPendingNarc, madePointblankShot, manualBV, manualShutdown, MASC_FAILURE, MAX_C3_NODES, MAX_C3i_NODES, MAX_NOVA_CEWS_NODES, military, miscList, mixedTech, model, moved, movedLastRound, movementMode, mpUsed, mpUsedLastRound, mulId, narcPods, nCrew, nMarines, nMASCLevel, nPassenger, nSuperchargerLevel, OBSOLETE_UNKNOWN_MARKER, omni, owner, ownerId, pendingAbandon, pendingINarcPods, pendingNarcPods, previousMovementMode, prone, published, reckless, reportedVDNIFeedbackThisPhase, rhsWentUp, rolledForEngineExplosion, searchlightIsActive, searchlightOverride, sec_facing, secondaryPositions, selfDestructedThisTurn, selfDestructing, selfDestructInitiated, sensorContacts, shutDown, shutdownByBATaser, shutDownThisPhase, source, spotting, STARTING_ANY_NONE, startupThisPhase, struck, structuralTechRating, structureTechLevel, structureType, stuckInSwamp, TA_ARMORED_COMPONENT, TA_MIXED_TECH, TA_OMNI, TA_PATCHWORK_ARMOR, taggedBy, targetBay, taserFeedBackRounds, taserInterference, taserInterferenceHeat, taserInterferenceRounds, taserShutdownRounds, techFaction, techLevel, tmTracker, totalWeaponList, traitorId, twistedPhase, underwaterRounds, unjammingRAC, UNLIMITED_JUMP_DOWN, usedMASC, usedRHSLastTurn, usedSearchlight, usedSupercharger, useManualBV, vectors, walkMP, weaponBayList, weaponGroupList, weaponList, weight, wigeBonus, yearFields inherited from interface megamek.common.interfaces.ITechnology
DATE_ES, DATE_NONE, DATE_PSFields inherited from interface megamek.common.units.Targetable
TYPE_BLDG_IGNITE, TYPE_BLDG_TAG, 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_HEX_TAG, TYPE_I_NARC_POD, TYPE_MINEFIELD_CLEAR, TYPE_MINEFIELD_DELIVER, TYPE_SATURATION, TYPE_SEARCHLIGHT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd in any piloting skill modsvoidApplies any damage that the entity has suffered.voidbeginDigIn(boolean convertFromDeck) Begins the one-turn self "digging in" process (TO:AR p.106), or completes it immediately for a unit that has stayed on the deck long enough to convert directly.voidBegins the three-turn fieldwork that raises a fortified hex (Trench/Fieldworks Engineers, TO:AUE p.153).booleanbooleanbooleancanDFA()booleanbooleanReturns true if this infantry unit can exit a VTOL using glider wings.booleanDetermines if this entity can initiate infantry vs infantry combat (TO:AR p.169).abstract booleanbooleanDetermines if this entity can reinforce ongoing infantry vs infantry combat.checkBogDown(MoveStep step, Hex curHex, Coords lastPos, Coords curPos, boolean isPavementStep) checkBogDown(MoveStep step, EntityMovementType moveType, Hex 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.checkLandingInHeavyWoods(EntityMovementType overallMoveType, Hex curHex) Checks if an entity is landing (from a jump) in heavy woods.checkSkid(EntityMovementType moveType, Hex prevHex, EntityMovementType overallMoveType, MoveStep prevStep, MoveStep currStep, int prevFacing, int curFacing, Coords lastPos, Coords curPos, boolean isInfantry, int distance) Checks if the entity might skid.voidClears the transient ground defensive postures (dug in and hitting the deck).intclipSecondaryFacing(int dir) Returns the closest valid secondary facing to the given direction.voidCreates a local platoon (CO 4th p.82, Urban Guerilla)intintThis counts the number of UMU's a Mek has that are still viableintThis returns all UMU a Mek has.Returns the base (stored) movement mode for this infantry unit, ignoring any virtual VTOL mode from powered flight wings.intgetDugIn()intintintbooleanintReturns the maximum number of extraneous limb pairs allowed.static TechAdvancementgetMotiveTechAdvancement(EntityMovementMode movementMode) Generates theTechAdvancementfor the unit's motive type.getMovementAbbr(EntityMovementType movementType) Returns the abbreviation of the name of the type of movement used.protected int[]intintReturns the recovery time for this entity in minutes.intintintintbooleanbooleanbooleanhasUMU()This method checks to see if a unit has Underwater Maneuvering Unitsstatic booleanhasValidCover(Game game, Coords pos, int elevation) Determines if there is valid cover for an infantry unit to utilize the Using Non-Infantry as Cover rules (TO:AR p.106).protected booleanbooleanReturns whether this unit is a chassis-familiarity-eligible type for MekHQ's Familiarity systembooleanisCrippled(boolean checkCrew) Returns TRUE if the entity meets the requirements for crippling damage as detailed in TW pg 258.booleanisEligibleFor(GamePhase phase) Determines if an entity is eligible for a phase.booleanbooleanbooleanbooleanbooleanisSquad()abstract booleanbooleanbooleanbooleanisValidSecondaryFacing(int dir) Can this entity torso/turret twist the given direction?voidnewRound(int roundNumber) Start a new roundvoidsetCanCallSupport(boolean b) voidsetDugIn(int i) voidsetFiredWhileOnDeck(boolean firedWhileOnDeck) Marks that this unit fired while on the deck this turn, which breaks the idle streak required for converting to "dug in".voidsetHitTheDeck(boolean hitTheDeck) Sets the "hitting the deck" status.voidsetIsCallingSupport(boolean b) voidsetSquadCount(int n) voidsetSquadSize(int size) Sets the squad size for this infantry unit.voidsetTakingCover(boolean isTakingCover) voidsetTransportId(int transportID) This function is called when loading a unit into transport.Generates a vector containing reports on all useful information about this entity.Methods inherited from class megamek.common.units.Entity
activateRadicalHS, addAttackedByThisTurn, addBeenDetectedBy, addBeenSeenBy, addBomb, addBomb, addClanCase, addConditionBonuses, addCoolantFailureAmount, addCritical, addCritical, addCritical, addEquipment, addEquipment, addEquipment, addEquipment, addEquipment, addEquipment, addEquipment, addEquipment, addEquipment, addEquipment, addEquipment, addEquipment, addFailedEquipment, addFiringSolution, addGhostTargetDefensiveBonus, addGhostTargetOffensiveBonus, addGroundAttackedByThisTurn, addIMPHits, addIntrinsicTransporters, addKill, addOffBoardObserver, addPassedThrough, addPilotingModifierForTerrain, addPilotingModifierForTerrain, addPilotingModifierForTerrain, addPilotingModifierForTerrain, addRoofRack, addSensorContact, addSystemTechAdvancement, addTargetedBySwarm, addTechComponent, addTowedUnit, addTransporter, addTransporter, addTsempHitThisTurn, addWeaponGroup, antiTSMVulnerable, applyGravityEffectsOnMP, applyMagneticPulse, armorStringFor, assignAMS, assignTMAMS, assignWeaponQuirk, attachINarcPod, attachNarcPod, autoSetInternal, braceLocation, C3MasterIs, calcElevation, calcElevation, calculateBattleValue, calculateBattleValue, calculateBattleValue, calculateBattleValue, calculateFreeC3MNodes, calculateFreeC3Nodes, canActivateBloodStalker, canAnnounceAbandon, canAssaultDrop, canAssist, canBePickedUp, canBrace, canChangeSecondaryFacing, canEjectCrew, canEscape, canFall, canFall, canFireWeapon, canFlee, canFlee, canFleeFrom, canFleeInState, canFlipArms, canGoDown, canGoDown, canGoHullDown, canGoUp, canHide, canLayDemolitionCharges, canLayMine, canLoad, canLoad, canLoad, canonUnitWithInvalidBuild, canPerformGroundSalvageOperations, canPerformSpaceSalvageOperations, canPickupCarryableObject, canPickupGroundObject, canRam, canShutdownEi, canSpot, canTow, canTransferCriticalSlots, canUnjamRAC, canUnstickByJumping, changeHeatBuildup, checkDislodgeSwarmers, checkForMASCFailure, checkForSuperchargerFailure, checkGetUp, checkGunningIt, checkLandingOnBlackIce, checkLandingOnIce, checkLandingWithDamage, checkLandingWithPrototypeJJ, checkMovedTooFast, checkMovementInBuilding, checkRecklessMove, checkRubbleMove, checkRunningWithDamage, checkSideSlip, checkSprintingWithMASCAndSupercharger, checkSprintingWithMASCXorSupercharger, checkTurnModeFailure, checkUnstall, checkUsingOverdrive, checkWaterMove, checkWaterMove, chooseSide, clearAttackedByThisTurn, clearBombs, clearDestroyedNarcPods, clearDetectedBy, clearFiringSolutions, clearHeatBreakdown, clearInfantryCombatState, clearNarcAndiNarcPods, clearPartialRepairs, clearSeenBy, clearSensorContacts, climbMode, countEquipment, countForStrengthSum, countMisc, countPartialRepairs, countQuirks, countQuirks, countWeaponQuirks, countWorkingMisc, countWorkingMisc, countWorkingMisc, crewCanLeave, critStateCount, damage, damageBayDoor, damagedJumpJets, damageDockCollar, damageDoorRecovery, damagedSCMCritCount, damageSystem, damageSystem, deactivateRadicalHS, deployOffBoard, destroy, destroyLocation, destroyLocation, destroyOneSearchlight, destroyRetractableBlade, disconnectUnit, doBattleValueCalculation, doCheckEngineStallRoll, doomedInAtmosphere, doomedInExtremeTemp, doomedInSpace, doomedInVacuum, doomedOnGround, dropCarriedObject, dropCarriedObject, dropGroundObjects, elevationOccupied, elevationOccupied, endOfTurnCargoInteraction, entityIsQuad, equals, extendBlade, factionTechLevel, findTargetedDisplacement, firstArmorIndex, fixElevation, formatHeat, gameOptions, generalName, generateDisplayName, generateShortName, getAbandonmentAnnouncedRound, getActiveAMS, getActiveSensor, getActiveSubEntities, getActiveVibrobladeHeat, getActiveVibrobladeHeat, getAllGyroCodeName, getAllowedPhysicalAttacks, getAllTowedUnits, getAlreadyTwisted, getAlternateCost, getAltitude, getAmmo, getAmmo, getAmmo, getAnyTypeMaxJumpMP, getArmedMPBoosters, getArmor, getArmor, getArmor, getArmoredComponentTechAdvancement, getArmorForReal, getArmorForReal, getArmorRemainingPercent, getArmorString, getArmorString, getArmorTechLevel, getArmorTechRating, getArmorType, getArmorWeight, getArmorWeight, getArmsFlipped, getASEWAffected, getAttackedByThisTurn, getAttackingEntity, getBadCriticalSlots, getBAPRange, getBARRating, getBase64Icon, getBaseAvailability, getBaseChassisFireConWeight, getBaseChassisValue, getBaseEngineValue, getBasePilotingRoll, getBasePilotingRoll, getBay, getBayByAmmo, getBayById, getBayLoadedUnitIds, getBayPersonnel, getBlockedFiringLocations, getBloodStalkerTarget, getBlueShieldRounds, getBoardId, getBoardLocation, getBodyLocation, getBombLoadout, getBombLoadout, getBombs, getBombs, getBoobyTrap, getBoobyTrapDamage, getBraceMPCost, getBvCalculator, getC3ecmAffected, getC3iNextUUIDAsString, getC3Master, getC3MasterId, getC3MasterIsUUIDAsString, getC3NetId, getC3Top, getC3UUIDAsString, getCamouflage, getCamouflageOrElse, getCamouflageOrElse, getCamouflageOrElseOwners, getCargoMpReduction, getCarriedObject, getCarriedObjects, getChassis, getClanChassisName, getClimbingLevelsChosen, getClubs, getCollarById, getCommonDate, getCommonDateRange, getConnectedUnits, getConsecutiveRHSUses, getConstructionTechAdvancement, getConversionMode, getCoolantFailureAmount, getCost, getCost, getCrew, getCritical, getCriticalSlots, getCustomWeaponOrder, getCustomWeaponOrder, getDamagedCriticalSlots, getDamageLevel, getDamageLevel, getDamageReductionFromModularArmor, getDefaultPickupLocations, getDependentLocation, getDeployRound, getDisplacementAttack, getDisplayName, getDistinctCarriedObjects, getDockingCollars, getDocks, getDocks, getDropCargoLocationMap, getDroppableUnits, getDuplicateMarker, getEarliestTechDate, getEarliestTechDateAndEra, getECCMInfo, getECCMStrength, getECMInfo, getECMRange, getECMStrength, getElevation, getEMPInterferenceRounds, getEMPShutdownRounds, getEmptyCriticalSlots, getEngine, getEngineCritHeat, getEngineTechRating, getEngineType, getEntityMajorTypeName, getEntityType, getEntityTypeName, getEquipment, getEquipment, getEquipmentForWeaponQuirk, getEquipmentNum, getEquipmentType, getEvasionBonus, getExteriorUnitAt, getExternalBombLoadout, getExternalId, getExternalIdAsString, getExternalUnits, getExtinctionDate, getExtinctionDate, getExtinctionRange, getExtraC3BV, getExtraCommGearTons, getExtremeRangeModifier, getFacing, getFacingName, getFailedEquipment, getFighterBays, getFiringSolutions, getFleeZone, getFluff, getFluffImage, getForceGeneratorAvailability, getForceId, getForceString, getForwardArc, getFreeC3iUUID, getFreeNC3UUID, getFullChassis, getGame, getGaveKillCredit, getGenericBattleValue, getGhostTargetDefensiveBonus, getGhostTargetOffensiveBonus, getGhostTargetOverride, getGhostTargetRoll, getGhostTargetRollMoS, getGoodCriticalSlots, getGrappled, getGrappleSide, getGroundAttackedByThisTurn, getGyroType, getHeading, getHeat, getHeatBreakdown, getHeatCapacity, getHeatCapacity, getHeatCapacityWithWater, getHeatFiringModifier, getHeatInArc, getHeatMPReduction, getHeight, getHiddenActivationPhase, getHitchCarrying, getHitchLocations, getHitCriticalSlots, getHittableCriticalSlots, getHQIniBonus, getIcon, getId, getImpLastTurn, getImpMpReduction, getImpToHitModifier, getINarcPodsAttached, getIndividualWeaponList, getInfantryCombatTargetId, getInfantryCombatTurnCount, getInitialBV, getInternal, getInternal, getInternalBombLoadout, getInternalForReal, getInternalRemainingPercent, getInternalString, getIntroductionDate, getIntroductionDate, getIntroductionDateAndEra, getInvalidSourceBuildReasons, getIsJumpingNow, getJumpHeat, getJumpMP, getJumpMP, getJumpMPWithTerrain, getJumpType, getKillerId, getKillNumber, getKills, getLabArmorTonnage, getLabTotalArmorPoints, getLastTarget, getLastTargetDisplayName, getLaunchableDropships, getLaunchableFighters, getLaunchableSmallCraft, getLoadedKeepers, getLoadedTrailers, getLoadedUnits, getLocationAbbr, getLocationAbbr, getLocationAbbreviations, getLocationDamage, getLocationFromAbbr, getLocationName, getLocationName, getLocationNames, getLocationStatus, getLongRangeModifier, getLOSRangeModifier, getMagneticPulseRounds, getManualBV, getMASC, getMASCTarget, getMASCTurns, getMaxElevationChange, getMaxElevationDown, getMaxElevationDown, getMaxWeaponRange, getMaxWeaponRange, getMechanicalJumpBoosterMP, getMechanicalJumpBoosterMP, getMediumRangeModifier, getMisc, getMisc, getMiscEquipment, getMissionRoles, getMixedTechAdvancement, getModel, getMotiveSideMod, getMovedBackwards, getMovementBeforeSkidPSRModifier, getMovementMode, getMovementModeAsString, getMovementString, getMPBoosters, getMPBoosters, getMpUsedLastRound, getMulId, getNC3NextUUIDAsString, getNCrew, getNeuralInterfaceMode, getNewRoundNovaNetworkString, getNextSensor, getNMarines, getNPassenger, getNumberOfCriticalSlots, getNumberOfCriticalSlots, getNumberOfCriticalSlots, getNumberOfCriticalSlots, getNumberOfShields, getOArmor, getOArmor, getOArmor, getObsoleteQuirkValue, getObsoleteRepairModifier, getObsoleteResaleModifier, getObsoleteYear, getObsoleteYearForModifiers, getObsoleteYears, getOccupiedCoords, getOccupiedHex, getOffBoardDirection, getOffBoardDistance, getOInternal, getOInternal, getOmniAdvancement, getOmniAdvancement, getOriginalBuildYear, getOriginalChassis, getOriginalJumpMP, getOriginalJumpMP, getOriginalModel, getOriginalNovaC3NetId, getOriginalRunMP, getOriginalUnitFileUUID, getOriginalWalkMP, getOwner, getOwnerId, getPartialRepairs, getPassedThrough, getPassedThroughBoardId, getPassedThroughFacing, getPassengerCapacityWithoutBayCrew, getPatchworkArmorAdvancement, getPendingVariableRangeTargetingMode, getPickedUpMekWarriors, getPickupLocationMap, getPlayerPickedPassThrough, getPodMountedTroopCarryingSpace, getPosition, getPowerAmplifierWeight, getPriceMultiplier, getPriorPosition, getProductionDate, getProductionDate, getProductionDateRange, getPrototypeDate, getPrototypeDate, getPrototypeRangeDate, getPublished, getPublishedSources, getQuirkIniBonus, getQuirkList, getQuirks, getRearArc, getRecoveryTurn, getReintroductionDate, getReintroductionDate, getRemovalCondition, getRetreatedDirection, getRole, getRunHeat, getRunMP, getRunMP, getRunMPasString, getRunMPasString, getRunMPWithoutMASC, getRunningGravityLimit, getsAutoExternalSearchlight, getSearchlightOverride, getSecondaryFacing, getSecondaryPositions, getSelfDestructedThisTurn, getSelfDestructing, getSelfDestructInitiated, getSensorCheck, getSensorContacts, getSensors, getShortName, getShortNameRaw, getShortRangeModifier, getSource, getSources, getSpotTargetId, getSprintHeat, getSprintMP, getSprintMP, getSprintMPWithOneMASC, getSprintMPWithoutMASC, getSpriteDrawPriority, getStandingHeat, getStartingAnyNWx, getStartingAnyNWx, getStartingAnyNWy, getStartingAnyNWy, getStartingAnySEx, getStartingAnySEx, getStartingAnySEy, getStartingAnySEy, getStartingOffset, getStartingOffset, getStartingPos, getStartingPos, getStartingWidth, getStartingWidth, getStaticTechLevel, getStealthModifier, getStrength, getStructuralTechRating, getStructureTechLevel, getStructureType, getSubEntities, getSuperCharger, getSuperchargerTarget, getSuperchargerTurns, getSwarmAttackerId, getSwarmTargetId, getTaggedBy, getTargetBay, getTargetedBySwarm, getTargetType, getTaserFeedBackRounds, getTaserInterference, getTaserInterferenceHeat, getTaserInterferenceRounds, getTaserShutdownRounds, getTCPInitiativeBonus, getTechBase, getTechBaseDescription, getTechBaseDescriptions, getTechFaction, getTechLevel, getTechLevelYear, getTechLevelYears, getTechRating, getTilesetModeString, getTMTracker, getTonnage, getTotalAmmoOfType, getTotalArmor, getTotalCommGearTons, getTotalInternal, getTotalMunitionsOfType, getTotalOArmor, getTotalOInternal, getTotalWeaponList, getTowedBy, getTowing, getTractor, getTraitorId, getTransferLocation, getTransferLocation, getTransportBays, getTransportId, getTransports, getTroopCarryingSpace, getTrooperAtLocation, getTsempEffect, getTsempHitsThisTurn, getUnitFileUUID, getUnitNumber, getUnitsUnloadableFromBays, getUnitsUnloadableFromNonBays, getUnitType, getUnloadableUnits, getUnused, getUnused, getUnusedString, getUnusedString, getUseManualBV, getValidBraceLocations, getValidHalfWeightPickupLocations, getVariableRangeTargetingMode, getVariableRangeTargetingModifier, getVector, getVectors, getVelocity, getVibroClaws, getWalkHeat, getWalkMP, getWalkMP, getWeapon, getWeaponArc, getWeaponBayList, getWeaponFiringHeight, getWeaponFiringPosition, getWeaponGroupList, getWeaponList, getWeaponListWithHHW, getWeapons, getWeaponSortOrder, getWeight, getWeightClass, getWeightClassName, getWhoCanDetect, getWhoCanSee, getYear, hasAbility, hasAbility, hasActivatedRadicalHS, hasActiveBlueShield, hasActiveDNI, hasActiveECCM, hasActiveECM, hasActiveECM, hasActiveEiCockpit, hasActiveNovaCEWS, hasAimModeTargComp, hasAnyC3System, hasAnyTypeNarcPodsAttached, hasArcFired, hasArmoredChassis, hasArmoredEngine, hasArtillery, hasBadLegs, hasBAP, hasBAP, hasBARArmor, hasBattleArmorHandles, hasBoobyTrap, hasBoostedC3, hasC3, hasC3i, hasC3M, hasC3MM, hasC3S, hasCase, hasCASEII, hasCASEII, hasCommandConsoleBonus, hasDamagedRHS, hasDetectedEntity, hasDisplacementAttack, hasDNICockpitMod, hasDNIImplant, hasDNIInducedHardToPilot, hasDroneOs, hasECM, hasEiCockpit, hasEmbeddedIcon, hasEMPInterferenceHeat, hasEntityScopedPreEndDeclaration, hasEnvironmentalSealing, hasETypeFlag, hasExternalSearchlight, hasFallen, hasFiredTsemp, hasFiringSolutionFor, hasFleeZone, hasFlotationHull, hasFrontMountedBulldozer, hasFrontMountedSaw, hasFunctionalArmAES, hasFunctionalLegAES, hasGhostTargetEquipment, hasGhostTargets, hasHardenedArmor, hasHarJelIn, hashCode, hasHierarchicalC3, hasHipCrit, hasINarcPodsAttached, hasInfernoAmmo, hasLegActuatorCrit, hasLinkedMGA, hasLoweredShield, hasLoweredShield, hasMinesweeper, hasMisc, hasMisc, hasMisc, hasModularArmor, hasModularArmor, hasMulId, hasNarcPodsAttached, hasNavalC3, hasNhC3, hasNoDefenseShield, hasNovaCEWS, hasObsoleteQuirk, hasOccupiedHex, hasOriginalBuildYear, hasQuirk, hasRaisedShield, hasRaisedShield, hasRearArmor, hasRearMountedBulldozer, hasRHSWentUp, hasSCM, hasSearchlight, hasSeenEntity, hasSensorContactFor, hasShield, hasStealth, hasSystem, hasTAG, hasTargComp, hasTCPAimedShotCapability, hasUndamagedCriticalSlots, hasUnloadedUnitsFromBays, hasUsedRHSLastTurn, hasVariableRangeTargeting, hasVibroblades, hasWorkingBackhoe, hasWorkingBulldozer, hasWorkingMisc, hasWorkingMisc, hasWorkingMisc, hasWorkingMisc, hasWorkingRadicalHS, hasWorkingSCM, hasWorkingSystem, height, hitAllCriticalSlots, implicitClanCASE, incrementInfantryCombatTurnCount, incrementMASCAndSuperchargerLevels, initializeArmor, initializeInternal, initMilitary, initTechAdvancement, isAbandoned, isActive, isActive, isActiveOption, isAeroLandedOnGroundMap, isAeroSensorDestroyed, isAirborne, isAirborneAeroOnGroundMap, isAirborneVTOLorWIGE, isAssaultDropInProgress, isAttackingThisTurn, isBATaserShutdown, isBoardable, isBoardProhibited, isBoardProhibited, isBoobyTrapInitiated, isBracing, isC3CompanyCommander, isC3IndependentMaster, isCanon, isCapitalFighter, isCapitalFighter, isCapitalScale, isCaptured, isCarcass, isCarefulStand, isCarryableObject, isChainWhipGrappled, isChameleonShieldActive, isChameleonShieldOn, isCharging, isClan, isClanArmor, isClearingMinefield, isClearingWoods, isClimbing, isCommander, isConvertingNow, isCrippled, isDangling, isDeployed, isDesignValid, isDestroyed, isDetectedByEnemy, isDmgHeavy, isDmgLight, isDmgModerate, isDone, isDoomed, isDropping, isEiShutdown, isEjectionPossible, isElevationValid, isEligibleForArtyAutoHitHexes, isEligibleForFiring, isEligibleForInfantryVsInfantry, isEligibleForMovement, isEligibleForOffboard, isEligibleForPavementOrRoadBonus, isEligibleForPhysical, isEligibleForPreEndDeclarations, isEligibleForTargetingPhase, isEnemyOf, isEvading, isEverSeenByEnemy, isFindingClub, isFiredTsempThisTurn, isFirefighter, isGhostTargetCapable, isGrappleAttacker, isGrappledThisRound, isGyroDestroyed, isHardenedArmorDamaged, isHidden, isHullDown, isIlluminated, isImmobile, isImmobile, isImmobileForJump, isImpEcmAffected, isINarcedBy, isINarcedWith, isInBuilding, isInDemolishableStructureHex, isInfantryCombatAttacker, isInfantryCombatWantsWithdrawal, isIntroLevel, isInvulnerable, isJumpingWithMechanicalBoosters, isLargeCraft, isLayingMines, isLoadableThisTurn, isLocationBad, isLocationBlownOff, isLocationBlownOffThisPhase, isLocationDeadly, isLocationDeadly, isLocationDoomed, isLocationProhibited, isLocationProhibited, isLocationProhibited, isLocationProhibited, isLocationProhibited, isLocationTrulyDestroyed, isMakingDfa, isMakingVTOLGroundAttack, isManualShutdown, isMASCUsed, isMilitary, isMixedTech, isNarcedBy, isNaval, isNeuralInterfaceEnabled, isNeuralInterfaceFullTracking, isNightwalker, isNOE, isNonCanonBySource, isNonCanonBySource, isNotCrewedEntityType, isNuclearHardened, isNullSigActive, isNullSigOn, isObsoleteInYear, isOffBoard, isOffBoardObserved, isOmni, isOnAtmosphericGroundMap, isPartOfFighterSquadron, isPendingAbandon, isPermanentlyImmobilized, isPodMountedTransport, isPowerReverse, isPrimitive, isProne, isPushing, isRamming, isReckless, isRepairable, isSalvage, isSecondaryArcWeapon, isSelectableThisTurn, isSensorReturn, isShutDown, isShutDownThisPhase, isSpaceborne, isSpotting, isStalled, isStartupThisPhase, isStealthActive, isStealthOn, isStuck, isSufferingEMI, isSuperchargerUsed, isSuperHeavy, isSurfaceNaval, isTargetable, isTargetOfDisplacementAttack, isTractor, isTrailer, isTransported, isTrapped, isUncrewed, isUnderwater, isUnjammingRAC, isUnloadedThisTurn, isUnofficial, isUsingSearchlight, isVisibleToEnemy, isVoidSigActive, isVoidSigOn, isWeaponBlockedAt, isWeaponBlockedByTowing, isWeaponOrderChanged, isWeaponValidForPhase, itemOppositeTech, joinLocationAbbr, load, load, load, load, loadAllWeapons, loadDefaultCustomWeaponOrder, loadedUnitsHaveActiveECM, loadQuirks, loadWeapon, loadWeapon, loadWeaponWithSameAmmo, loadWeaponWithSameAmmo, locationHasCase, locationIsLeg, locations, madePointblankShot, maxGroundObjectTonnage, modifyPhysicalDamageForMeleeSpecialist, needsRollToStand, newPhase, newRoundNovaNetSwitch, newRoundVariableRangeSwitch, nextConversionMode, onSameC3NetworkAs, onSameC3NetworkAs, ownerHasDemolitionCharge, passedOver, passedThrough, passedThroughPrevious, passedWithin, performManualShutdown, performManualStartup, pickUp, pickupCarryableObject, postProcessFacingChange, processPickupStep, processPickupStepEntity, recalculateTechAdvancement, recordedTechLevel, recover, refreshLocations, regenerateUnitFileUUID, relHeight, reloadEmptyWeapons, removeAllINarcPods, removeAllTransporters, removeCriticalSlots, removeFiringSolution, removeINarcPod, removeMisc, removePartialCoverHits, removeSensorContact, removeTowedUnit, removeTransporter, resetBayDoors, resetBays, resetBombAttacks, resetCoolantFailureAmount, resetFiringArcs, resetPickedUpMekWarriors, resetTransporter, restore, rollHitLocation, rollHitLocation, rollMovementInBuilding, scmCritStateCount, setAbandonmentAnnouncedRound, setAlreadyTwisted, setAltitude, setArcFired, setArmor, setArmor, setArmor, setArmorTechLevel, setArmorTechLevel, setArmorTechRating, setArmorTechRating, setArmorTonnage, setArmorType, setArmorType, setArmorType, setArmorType, setArmsFlipped, setArmsFlipped, setASEWAffected, setAssaultDropInProgress, setBARRating, setBARRating, setBaseChassisFireConWeight, setBATaserShutdown, setBloodStalkerTarget, setBoardId, setBoobyTrapInitiated, setBraceLocation, setC3ecmAffected, setC3iNextUUIDAsString, setC3Master, setC3Master, setC3MasterIsUUIDAsString, setC3NetId, setC3NetId, setC3NetIdSelf, setC3UUID, setC3UUIDAsString, setCamouflage, setCanon, setCanUnstickByJumping, setCaptured, setCarcass, setCarefulStand, setCarriedObjects, setChassis, setClanChassisName, setClearingMinefield, setClearingWoods, setClimbing, setClimbingLevelsChosen, setClimbMode, setCommander, setConsecutiveRHSUses, setConversionMode, setConvertingNow, setCrew, setCritical, setCustomWeaponOrder, setCustomWeaponOrder, setDangling, setDeployed, setDeployRound, setDesignValid, setDestroyed, setDetectedByEnemy, setDisplacementAttack, setDisplayName, setDone, setDoomed, setDuplicateMarker, setEiShutdown, setElevation, setEMI, setEMPInterference, setEMPShutdownRounds, setEngine, setEngineTechRating, setEngineTechRating, setEvading, setEverSeenByEnemy, setExternalId, setExternalIdAsString, setExternalSearchlight, setFacing, setFallen, setFindingClub, setFiredTsempThisTurn, setFleeZone, setForceGeneratorAvailability, setForceId, setForceString, setGame, setGameOptions, setGrappled, setGrappledThisRound, setGrappleSide, setHardenedArmorDamaged, setHasDamagedRHS, setHasFiredTsemp, setHidden, setHiddenActivationPhase, setHullDown, setIcon, setId, setIGame, setIlluminated, setImpLastTurn, setInfantryCombatAttacker, setInfantryCombatTargetId, setInfantryCombatTurnCount, setInfantryCombatWantsWithdrawal, setInitialBV, setInternal, setInternal, setInvalidSourceBuildReasons, setIsJumpingNow, setJumpingWithMechanicalBoosters, setLandedAssaultDrop, setLastTarget, setLastTargetDisplayName, setLayingMines, setLoadedKeepers, setLoadedThisTurn, setLocationBlownOff, setLocationBlownOffThisPhase, setLocationStatus, setLocationStatus, setMadePointblankShot, setMagneticPulseHit, setManualBV, setManualShutdown, setMASCUsed, setMissionRoles, setMixedTech, setModel, setMovedBackwards, setMovementMode, setMulId, setNC3NextUUIDAsString, setNCrew, setNeverDeployed, setNewRoundNovaNetworkString, setNextSensor, setNMarines, setNPassenger, setOffBoard, setOmni, setOriginalBuildYear, setOriginalJumpMP, setOriginalWalkMP, setOwner, setOwnerId, setPassedThrough, setPassedThroughBoardId, setPassedThroughFacing, setPendingAbandon, setPendingVariableRangeTargetingMode, setPlayerPickedPassThrough, setPosition, setPosition, setPowerReverse, setProne, setPublished, setPublishedSources, setQuirks, setRamming, setRapidFire, setReckless, setRecoveryTurn, setRemovalCondition, setRetreatedDirection, setSalvage, setSearchlightOverride, setSearchlightState, setSecondaryFacing, setSecondaryFacing, setSelfDestructedThisTurn, setSelfDestructing, setSelfDestructInitiated, setShutDown, setShutDownThisPhase, setSource, setSources, setSpotTargetId, setSpotting, setStartingAnyNWx, setStartingAnyNWy, setStartingAnySEx, setStartingAnySEy, setStartingOffset, setStartingPos, setStartingWidth, setStartupThisPhase, setStruck, setStructuralTechRating, setStructuralTechRating, setStructureTechLevel, setStructureType, setStructureType, setStuck, setSuperchargerUsed, setSwarmAttackerId, setSwarmTargetId, setTaggedBy, setTargetBay, setTaserFeedback, setTaserInterference, setTaserShutdownRounds, setTechFaction, setTechLevel, setTowedBy, setTowing, setTractor, setTraitorId, setTsempEffect, setTurnInterrupted, setUnitFileUUID, setUnitNumber, setUnitRole, setUnjammingRAC, setUnloaded, setUsedRHSLastTurn, setUsedSearchlight, setUseManualBV, setVariableRangeTargetingMode, setVectors, setVisibleToEnemy, setWeaponHit, setWeaponOrderChanged, setWeaponSortOrder, setWeight, setWhoCanDetect, setWhoCanSee, setWigeLiftoffHover, setYear, shouldDeploy, shouldOffBoardDeploy, shouldUseEdge, sideTable, sideTable, sideTable, sideTable, sideTableRam, sideTableRam, slotNumber, specificName, statusToString, statusToString, statusToString, storeOriginalUnitData, storeSavedUnitData, taserShutdown, toggleConversionMode, toString, towUnit, turnWasInterrupted, unload, updateBays, updateDuplicateMarkerAfterDelete, usedSearchlight, usedTag, usesTurnMode, usesWeaponBays, wasLoadedThisTurn, wasNeverDeployed, wasStruck, weaponFired, weaponFiredFrom, whichBay, wigeLiftoffHoverMethods inherited from class megamek.common.turns.TurnOrdered
clearInitiative, generateTurnOrder, getAeroTurns, getDropshipTurns, getEvenTurns, getInitCompensationBonus, getInitiative, getJumpshipTurns, getMultiTurns, getNormalTurns, getOtherTurns, getSmallCraftTurns, getSpaceStationTurns, getTeleMissileTurns, getWarshipTurns, incrementAeroTurns, incrementDropshipTurns, incrementEvenTurns, incrementJumpshipTurns, incrementMultiTurns, incrementOtherTurns, incrementSmallCraftTurns, incrementSpaceStationTurns, incrementTeleMissileTurns, incrementWarshipTurns, resetAeroTurns, resetDropshipTurns, resetEvenTurns, resetInitiativeCompensation, resetJumpshipTurns, resetMultiTurns, resetOtherTurns, resetSmallCraftTurns, resetSpaceStationTurns, resetTeleMissileTurns, resetWarshipTurns, rollInitAndResolveTies, rollInitAndResolveTies, rollInitiative, rollInitiative, setInitCompensationBonus, setInitiativeMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface megamek.common.units.BTObject
hasAerodyneSpheroidDistinction, isAero, isAerodyne, isAerospace, isAerospaceFighter, isAerospaceSV, isBattleArmor, isBattlefieldSupportAsset, isBattleMek, isCombatVehicle, isConventionalFighter, isConventionalInfantry, isDropShip, isFighter, isFixedWingSupport, isGround, isHandheldWeapon, isIndustrialMek, isInfantry, isJumpShip, isLargeAerospace, isMek, isObjectiveMarker, isProtoMek, isQuadMek, isSingleUnit, isSmallCraft, isSpaceStation, isSpheroid, isSupportVehicle, isTripodMek, isUnitGroup, isVehicle, isWarShipMethods inherited from interface megamek.common.interfaces.CombatRole
hasRoleMethods inherited from interface megamek.common.interfaces.ForceAssignable
partOfForceMethods inherited from interface megamek.common.equipment.ICarryable
getCarriedObjectDamageAllocation, targetForArmHitToHitCarriedObjectMethods inherited from interface megamek.common.game.InGameObject
hasOwnerMethods inherited from interface megamek.common.interfaces.ITechnology
calcEraAvailability, calcEraAvailability, calcYearAvailability, calcYearAvailability, calcYearAvailability, findMinimumRulesLevel, findMinimumRulesLevel, getAdvancedRange, getAdvancedRange, getCodeFromIOAbbr, getCodeFromMMAbbr, getCommonDate, getEraAvailabilityName, getEraAvailabilityName, getExperimentalRange, getExperimentalRange, getExtinctionDate, getExtinctionRange, getFullRatingName, getFullRatingName, getIntroductionDate, getProductionDate, getPrototypeDate, getReintroductionDate, getSimpleLevel, getSimpleLevel, getSimpleLevel, getStandardRange, getStandardRange, getTechLevel, getTechLevel, getTechRatingName, isAvailableIn, isAvailableIn, isAvailableIn, isExtinct, isExtinct, isExtinct, isLegal, isLegalMethods inherited from interface megamek.common.units.Targetable
isBomber, isBuildingEntityOrGunEmplacement, isHexBeingBombed, isOnBoard, tracksHeatMethods inherited from interface megamek.common.equipment.Transporter
alwaysDamageCargoIfTransportHit, canTow, getCarryables, getNameForRecordSheets, getNumberLoadedThisTurn, getNumberUnloadedThisTurn, getTransporterType, hardpointCost, setEntity
-
Field Details
-
squadCount
protected int squadCount -
squadSize
protected int squadSize -
originalTrooperCount
protected int originalTrooperCount -
troopersShooting
protected int troopersShootingThe number of troopers alive in this platoon at the beginning of the phase, before taking damage. -
activeTroopers
protected int activeTroopersThe number of troopers alive in this platoon, including any damage sustained in the current phase. -
turnsLayingExplosives
public int turnsLayingExplosives -
DUG_IN_NONE
public static final int DUG_IN_NONE- See Also:
-
DUG_IN_WORKING
public static final int DUG_IN_WORKING- See Also:
-
DUG_IN_COMPLETE
public static final int DUG_IN_COMPLETE- See Also:
-
DUG_IN_FORTIFYING1
public static final int DUG_IN_FORTIFYING1- See Also:
-
DUG_IN_FORTIFYING2
public static final int DUG_IN_FORTIFYING2- See Also:
-
DUG_IN_FORTIFYING3
public static final int DUG_IN_FORTIFYING3- See Also:
-
HIT_DECK_TURNS_TO_DIG_IN
public static final int HIT_DECK_TURNS_TO_DIG_INNumber of idle turns (no movement, no fire) the unit must spend "hitting the deck" before it may convert to "dug in" status. Per TO:AR p.106.- See Also:
-
LEG_ATTACK
- See Also:
-
SWARM_MEK
- See Also:
-
SWARM_WEAPON_MEK
- See Also:
-
STOP_SWARM
- See Also:
-
-
Constructor Details
-
Infantry
protected Infantry()Generate a new, blank, infantry platoon. Hopefully, we'll be loaded from somewhere.
-
-
Method Details
-
defaultCrewType
- Overrides:
defaultCrewTypein classEntity
-
getMotiveTechAdvancement
Generates theTechAdvancementfor the unit's motive type. A value of EntityMovementMode.NONE indicates Beast-mounted infantry.- Parameters:
movementMode- An infantry movement mode.- Returns:
- The Tech Advancement data for the movement mode.
-
isValidSecondaryFacing
public boolean isValidSecondaryFacing(int dir) Description copied from class:EntityCan this entity torso/turret twist the given direction?- Specified by:
isValidSecondaryFacingin classEntity
-
clipSecondaryFacing
public int clipSecondaryFacing(int dir) Description copied from class:EntityReturns the closest valid secondary facing to the given direction.- Specified by:
clipSecondaryFacingin classEntity- Returns:
- the closest valid secondary facing.
-
createLocalSupport
public void createLocalSupport()Creates a local platoon (CO 4th p.82, Urban Guerilla) -
setIsCallingSupport
public void setIsCallingSupport(boolean b) -
getIsCallingSupport
public boolean getIsCallingSupport() -
hasUMU
public boolean hasUMU()Description copied from class:EntityThis method checks to see if a unit has Underwater Maneuvering Units -
getActiveUMUCount
public int getActiveUMUCount()Description copied from class:EntityThis counts the number of UMU's a Mek has that are still viable- Overrides:
getActiveUMUCountin classEntity- Returns:
- number
intof usable UMU's
-
getAllUMUCount
public int getAllUMUCount()Description copied from class:EntityThis returns all UMU a Mek has.- Overrides:
getAllUMUCountin classEntity- Returns:
intTotal number of UMUs a Mek has.
-
getMovementAbbr
Description copied from class:EntityReturns the abbreviation of the name of the type of movement used.- Specified by:
getMovementAbbrin classEntity
-
getOriginalTrooperCount
public int getOriginalTrooperCount()- Returns:
- The full original strength (trooper count) of this infantry unit
-
victoryReport
Description copied from class:EntityGenerates a vector containing reports on all useful information about this entity.- Specified by:
victoryReportin classEntity
-
addEntityBonuses
Description copied from class:EntityAdd in any piloting skill mods- Specified by:
addEntityBonusesin classEntity
-
applyDamage
public void applyDamage()Description copied from class:EntityApplies 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.- Overrides:
applyDamagein classEntity
-
getActiveTroopers
public int getActiveTroopers() -
getShootingStrength
public int getShootingStrength()- Returns:
- The number of troopers in the platoon before damage to the current phase is applied.
-
canCharge
public boolean canCharge() -
canDFA
public boolean canDFA() -
checkBogDown
public PilotingRollData checkBogDown(MoveStep step, EntityMovementType moveType, Hex curHex, Coords lastPos, Coords curPos, int lastElev, boolean isPavementStep) Description copied from class:EntityChecks 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.- Overrides:
checkBogDownin classEntity
-
checkBogDown
public PilotingRollData checkBogDown(MoveStep step, Hex curHex, Coords lastPos, Coords curPos, boolean isPavementStep) -
canCallSupport
public boolean canCallSupport()- Returns:
- True when this infantry unit can still call upon local support (CO 4th p.82, Urban Guerilla); in other words, if this ability has not been used yet. Note that this method does not check if it has the ability at all.
-
isStealthy
public abstract boolean isStealthy()- Returns:
- True if this infantry unit has any type of stealth system.
-
getMaxExtraneousLimbPairs
public int getMaxExtraneousLimbPairs()Returns the maximum number of extraneous limb pairs allowed. Per IO p.85, if glider wings or powered flight wings are installed, only one pair of extraneous limbs is allowed (instead of the normal two pairs).- Returns:
- 1 if any wing type is installed, 2 otherwise
-
isEligibleFor
Description copied from class:EntityDetermines if an entity is eligible for a phase.- Overrides:
isEligibleForin classEntity
-
newRound
public void newRound(int roundNumber) Description copied from class:EntityStart a new round- Specified by:
newRoundin interfaceRoundUpdated- Overrides:
newRoundin classEntity- Parameters:
roundNumber- theintnumber of the new round
-
setDugIn
public void setDugIn(int i) -
getDugIn
public int getDugIn() -
beginDigIn
public void beginDigIn(boolean convertFromDeck) Begins the one-turn self "digging in" process (TO:AR p.106), or completes it immediately for a unit that has stayed on the deck long enough to convert directly. Seeds the damage baseline used to detect an interrupting attack that would extend the effort.- Parameters:
convertFromDeck-trueif the unit qualifies to convert straight to fully dug-in from the deck (seecanDigInFromDeck())
-
beginFortify
public void beginFortify()Begins the three-turn fieldwork that raises a fortified hex (Trench/Fieldworks Engineers, TO:AUE p.153). Seeds the damage baseline used to detect an interrupting attack that extends the effort. -
isFortifyExtendedThisRound
public boolean isFortifyExtendedThisRound()- Returns:
trueif this unit's digging-in / fortification effort was set back by damage this round (so its progress counter was held rather than advanced). TO:AR p.106 / TO:AUE p.153.
-
isFortifying
public boolean isFortifying()- Returns:
trueif this unit is partway through building a fortified hex (one of the multi-turn FORTIFYING stages), as opposed to plain one-turn self digging-in. TO:AUE p.153.
-
getFortifyStage
public int getFortifyStage()- Returns:
- the current fortification stage (1..
getFortifyTotalStages()) whileisFortifying(), or 0 when the unit is not building a fortification.
-
getFortifyTotalStages
public int getFortifyTotalStages()- Returns:
- the number of turns of work a fortified hex takes to complete.
-
isHitTheDeck
public boolean isHitTheDeck()- Returns:
trueif this infantry is currently "hitting the deck", TO:AR p.106.
-
setHitTheDeck
public void setHitTheDeck(boolean hitTheDeck) Sets the "hitting the deck" status. Clearing the status (e.g. when the unit moves or is loaded) also resets the idle-turn counter used for the dig-in conversion.- Parameters:
hitTheDeck-trueto mark the unit as hitting the deck
-
getTurnsOnDeck
public int getTurnsOnDeck()- Returns:
- The number of consecutive idle turns this unit has spent on the deck (no movement, no fire).
-
setFiredWhileOnDeck
public void setFiredWhileOnDeck(boolean firedWhileOnDeck) Marks that this unit fired while on the deck this turn, which breaks the idle streak required for converting to "dug in". TO:AR p.106.- Parameters:
firedWhileOnDeck- True if the unit made a weapon attack while on the deck
-
canDigInFromDeck
public boolean canDigInFromDeck()- Returns:
- True if this on-deck unit has remained idle long enough that it may convert directly to "dug in" (protected) status, per TO:AR p.106.
-
clearGroundPostures
public void clearGroundPostures()Clears the transient ground defensive postures (dug in and hitting the deck). Called when the unit moves or is loaded into a transport, since either action ends those postures. TO:AR p.106. -
setTransportId
public void setTransportId(int transportID) This function is called when loading a unit into transport. This is overridden to ensure infantry are no longer considered dug in or hitting the deck when they are being transported.- Overrides:
setTransportIdin classEntity- Parameters:
transportID- The entity ID of the transporter
-
isMechanized
public boolean isMechanized() -
setCanCallSupport
public void setCanCallSupport(boolean b) -
setSquadSize
public void setSquadSize(int size) Sets the squad size for this infantry unit. For Conventional Infantry, this is the size of a single squad and the CI unit can be composed of more than one squad. For Battle Armor, this is the entire size of the unit (usually 4, 5 or 6).- Parameters:
size- The new squad size
-
getSquadSize
public int getSquadSize()- Returns:
- The squad size of this infantry unit. For Conventional Infantry, this is the size of a single squad and the CI unit can be composed of more than one squad. For Battle Armor, this is the entire size of the unit (usually 4, 5 or 6).
-
setSquadCount
public void setSquadCount(int n) -
getSquadCount
public int getSquadCount() -
isSquad
public boolean isSquad() -
getBaseMovementMode
Returns the base (stored) movement mode for this infantry unit, ignoring any virtual VTOL mode from powered flight wings. This should be used for validation and construction rules that need to know the actual infantry type (leg, motorized, etc.) rather than the effective movement mode.- Returns:
- The actual stored movement mode, not affected by powered flight
-
canMakeAntiMekAttacks
public abstract boolean canMakeAntiMekAttacks()- Returns:
- True for all infantry that are allowed AM attacks. Mechanized infantry and infantry units with encumbering armor or field guns are not allowed to make AM attacks, while all other infantry are. Note that a conventional infantry unit without Anti-Mek gear (15 kg per trooper) can still make AM attacks but has a fixed 8 AM skill rating.
-
isUsingManAce
public boolean isUsingManAce()- Overrides:
isUsingManAcein classEntity
-
getEngineHits
public int getEngineHits()- Specified by:
getEngineHitsin classEntity
-
isCrippled
public boolean isCrippled(boolean checkCrew) Description copied from class:EntityReturns TRUE if the entity meets the requirements for crippling damage as detailed in TW pg 258. Excepting dead or non-existing crew issues- Specified by:
isCrippledin classEntity- Returns:
- boolean
-
hasEngine
public boolean hasEngine() -
checkLandingInHeavyWoods
Description copied from class:EntityChecks if an entity is landing (from a jump) in heavy woods.- Overrides:
checkLandingInHeavyWoodsin classEntity
-
hasValidCover
Determines if there is valid cover for an infantry unit to utilize the Using Non-Infantry as Cover rules (TO:AR p.106).- Parameters:
game- The currentGamepos- The hex coordselevation- The elevation (flying or in building)- Returns:
- True when this infantry has valid cover
-
isTakingCover
public boolean isTakingCover() -
setTakingCover
public void setTakingCover(boolean isTakingCover) -
hasViableWeapons
protected boolean hasViableWeapons()- Overrides:
hasViableWeaponsin classEntity
-
hasPatchworkArmor
public boolean hasPatchworkArmor()- Overrides:
hasPatchworkArmorin classEntity- Returns:
- True if this unit has patchwork armor. Note that this is checked by comparing actual armor types (and tech level) across the locations - in other words, it is *not* a simple boolean flag; instead, the result will always correspond to the unit's armoring.
-
checkSkid
public PilotingRollData checkSkid(EntityMovementType moveType, Hex prevHex, EntityMovementType overallMoveType, MoveStep prevStep, MoveStep currStep, int prevFacing, int curFacing, Coords lastPos, Coords curPos, boolean isInfantry, int distance) Description copied from class:EntityChecks if the entity might skid. If so, returns the target roll for the piloting skill check. -
getRecoveryTime
public int getRecoveryTime()Description copied from class:EntityReturns the recovery time for this entity in minutes.This method provides the base recovery time required for this entity type. The recovery time represents the duration needed to recover, repair, or prepare the entity after deployment or damage.
Subclasses should override this method to provide entity-specific recovery times based on their type, weight class, or other relevant characteristics.
Manual Reference: CamOps pg 214
- Overrides:
getRecoveryTimein classEntity- Returns:
- The recovery time in minutes. The default implementation returns 60 minutes.
-
canInitiateInfantryVsInfantryCombat
public boolean canInitiateInfantryVsInfantryCombat()Description copied from class:EntityDetermines if this entity can initiate infantry vs infantry combat (TO:AR p.169). Default implementation returns false. Infantry units override this.- Overrides:
canInitiateInfantryVsInfantryCombatin classEntity- Returns:
- true if this entity can initiate infantry vs infantry combat
-
canReinforceInfantryVsInfantry
public boolean canReinforceInfantryVsInfantry()Description copied from class:EntityDetermines if this entity can reinforce ongoing infantry vs infantry combat. Default implementation returns false. Infantry units override this.- Overrides:
canReinforceInfantryVsInfantryin classEntity- Returns:
- true if this entity can reinforce infantry vs infantry combat
-
getNoOfSlots
protected int[] getNoOfSlots()- Specified by:
getNoOfSlotsin classEntity
-
canExitVTOLWithGliderWings
public boolean canExitVTOLWithGliderWings()Returns true if this infantry unit can exit a VTOL using glider wings. Per IO:AE p.79, glider wings give a soldier the ability to leave a VTOL during movement as if the soldier were jump infantry.- Returns:
- true if this infantry can exit a VTOL using glider wings
-
isChassisFamiliarityEligible
public boolean isChassisFamiliarityEligible()Description copied from class:EntityReturns whether this unit is a chassis-familiarity-eligible type for MekHQ's Familiarity system- Overrides:
isChassisFamiliarityEligiblein classEntity- Returns:
trueif familiarity is tracked for this unit
-