Class BattlefieldSupportAsset
- All Implemented Interfaces:
Serializable,ICarryable,Transporter,InGameObject,CombatRole,ForceAssignable,ITechnology,ITurnOrdered,PhaseUpdated,RoundUpdated,BTObject,Deployable,Targetable
Entity realization of a Battlefield Support Asset - a simplified unit governed by the Battlefield Support
rules rather than by full construction/combat rules. This is the runtime object the rest of the program works with;
the whole codebase deals with this entity (and its MekSummary), not with the BattlefieldSupportAssetData
stat block, which exists only at the .bfs save/load boundary.
An asset is built from a BattlefieldSupportAssetData (see BattlefieldSupportAsset(BattlefieldSupportAssetData)
and setFromData(megamek.common.battlefieldSupport.BattlefieldSupportAssetData)) and can produce one for saving via toAssetData(). A parameterless constructor is
provided for tests and for creating a brand-new asset in MegaMekLab. Once built, all stat values live on this entity
(chassis, model and role reuse the base Entity fields); MegaMekLab edits them here directly.
A single carrier class represents every asset category (BFSAssetType); behavior that differs by category or
movement mode is derived from the stored values. Assets have no hit locations - the whole unit is a single location.
- 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 TypeFieldDescriptionstatic final intBattle Value per Battlefield Support Point.static final intA current Destroy Check strictly below this value means the asset has been destroyed by persistent damage (and is therefore shown asEntity.DMG_CRIPPLED).static final intThe Regular/Veteran choice for an asset instance is carried by the crew's Gunnery skill (so it persists through the normal Crew/MUL machinery): a gunnery at or belowGUNNERY_VETERANmeans Veteran, otherwise Regular.static final intstatic final intThe single, whole-unit location.Fields 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, C3EM_MAX_OPERATING_TURNS, c3emActive, c3emOperatingTurns, c3emOriginalMasterId, c3Master, c3MasterLostId, 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_C3M_SUBORDINATES, 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
ConstructorsConstructorDescriptionCreates an empty asset with default values (for tests and for a brand-new asset in MegaMekLab).Creates an asset from the given stat block. -
Method Summary
Modifier and TypeMethodDescriptionAdd in any piloting skill modsvoidaddSpecial(BFSSpecial special) voidSets the internal structure for every location to appropriate undamaged values for the unit and location.booleanCan this entity change secondary facing at all?intclipSecondaryFacing(int dir) Returns the closest valid secondary facing to the given direction.protected intdoBattleValueCalculation(boolean ignoreC3, boolean ignoreSkill, boolean ignoreTAG, CalculationReport calculationReport) Calculates and returns the Battle Value of this unit taking into account the parameters.findSpecial(BFSSpecialType type) intgetBsp()intgetBv()return - the base construction option tech advancementintgetCost()doublegetCost(CalculationReport calcReport, boolean ignoreAmmo) Calculates and returns the C-bill cost of the unit.intintintintlongintCalculates a "generic" Battle Value that is based on the average of all units of this type and tonnage.String[]String[]intThe maximum elevation change the entity can crossgetMovementAbbr(EntityMovementType movementType) Returns the abbreviation of the name of the type of movement used.getMovementString(EntityMovementType movementType) Returns the name of the type of movement used.intgetMp()protected int[]intgetRange()intgetRunMP(MPCalculationSetting mpCalculationSetting) intgetSkill()intintgetTmm()Gets the location that excess damage transfers to.intintgetWeaponArc(int weaponNumber) Returns the Rules.ARC that the weapon, specified by number, fires into.booleanhasSpecial(BFSSpecialType type) booleanbooleanbooleanReturns TRUE if the entity meets the requirements for crippling damage as detailed in TW pg 258.booleanisCrippled(boolean checkCrew) Returns TRUE if the entity meets the requirements for crippling damage as detailed in TW pg 258.booleanbooleanReturns TRUE if the entity has been heavily damaged.booleanReturns TRUE if the entity has been lightly damaged.booleanReturns TRUE if the entity has been moderately damaged.booleanbooleanbooleanbooleanisSecondaryArcWeapon(int weaponId) Returns true if this weapon fires into the secondary facing arc.booleanisValidSecondaryFacing(int dir) Can this entity torso/turret twist the given direction?booleanstatic booleanisVeteranGunnery(int gunnery) intReturns the number of locations in the entitystatic StringrollHitLocation(int table, int side) Rolls up a hit locationrollHitLocation(int table, int side, int aimedLocation, AimingMode aimingMode, int cover) Rolls the to-hit numbervoidsetAssetTechBase(String techBase) Applies a.bfstech-base value (IS/Clan/Mixed) to this asset.voidsetAssetType(BFSAssetType assetType) voidsetCardSubtitle(String cardSubtitle) voidsetCardTitle(String cardTitle) voidsetCost(int cost) voidvoidsetDestroyCheck(int destroyCheck) Sets the current Destroy Check target only (persistent damage), leaving the as-constructed value unchanged — mirroringEntity.setArmor(int, megamek.common.HitData).voidCopies every value from the given stat block onto this entity.voidsetLinkedUnitId(String linkedUnitId) Sets the base unit this asset is linked to, by the base unit's unit-file UUID.voidsetMp(int mp) Sets the asset's single Movement Point allowance against its declared movement mode - the jump MP for jump modes, otherwise the walk MP.voidsetODestroyCheck(int oDestroyCheck) Sets the as-constructed Destroy Check target and resets the current value to it (an undamaged unit), mirroringEntity.initializeArmor(int, int).voidvoidsetSkill(int skill) voidsetSpecials(List<BFSSpecial> specials) voidsetThreshold(int threshold) voidsetTmm(int tmm) voidsetVeteranCost(Integer veteranCost) voidsetVeteranCrew(boolean veteran) Sets the crew's Regular/Veteran level, carried by the Gunnery skill.voidsetVeteranSkill(Integer veteranSkill) 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, advanceTaintedAtmosphereExposure, antiTSMVulnerable, applyDamage, applyGravityEffectsOnMP, applyMagneticPulse, armorStringFor, assignAMS, assignTMAMS, assignWeaponQuirk, attachINarcPod, attachNarcPod, braceLocation, C3MasterIs, calcElevation, calcElevation, calculateBattleValue, calculateBattleValue, calculateBattleValue, calculateBattleValue, calculateBattleValue, calculateBattleValue, calculateFreeC3MNodes, calculateFreeC3Nodes, canActivateBloodStalker, canAnnounceAbandon, canAssaultDrop, canAssist, canBePickedUp, canBrace, canCharge, canDeclareInfantryAction, canDFA, canEjectCrew, canEscape, canFall, canFall, canFireWeapon, canFlee, canFlee, canFleeFrom, canFleeInState, canFlipArms, canGoDown, canGoDown, canGoHullDown, canGoUp, canHide, canInitiateInfantryVsInfantryCombat, canLayDemolitionCharges, canLayMine, canLoad, canLoad, canLoad, canonUnitWithInvalidBuild, canPerformGroundSalvageOperations, canPerformSpaceSalvageOperations, canPickupCarryableObject, canPickupGroundObject, canRam, canReinforceInfantryVsInfantry, canShutdownEi, canSpot, canTow, canTransferCriticalSlots, canUnjamRAC, canUnstickByJumping, canWithdrawFromInfantryAction, changeHeatBuildup, checkBogDown, checkDislodgeSwarmers, checkForMASCFailure, checkForSuperchargerFailure, checkGetUp, checkGunningIt, checkLandingInHeavyWoods, checkLandingOnBlackIce, checkLandingOnIce, checkLandingWithDamage, checkLandingWithPrototypeJJ, checkMovedTooFast, checkMovementInBuilding, checkRecklessMove, checkRubbleMove, checkRunningWithDamage, checkSideSlip, checkSkid, 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, defaultCrewType, deployOffBoard, destroy, destroyLocation, destroyLocation, destroyOneSearchlight, destroyRetractableBlade, disconnectUnit, 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, getActiveUMUCount, getActiveVibrobladeHeat, getActiveVibrobladeHeat, getAllGyroCodeName, getAllowedPhysicalAttacks, getAllTowedUnits, getAllUMUCount, 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, getC3EmergencyMasterOperatingTurns, getC3EmergencyOriginalMasterId, getC3iNextUUIDAsString, getC3Master, getC3MasterId, getC3MasterIsUUIDAsString, getC3MasterLostId, getC3NetId, getC3Top, getC3UUIDAsString, getCamouflage, getCamouflageOrElse, getCamouflageOrElse, getCamouflageOrElseOwners, getCargoMpReduction, getCarriedObject, getCarriedObjects, getChassis, getClanChassisName, getClimbingLevelsChosen, getClubs, getCollarById, getCommonDate, getCommonDateRange, getConnectedUnits, getConsecutiveRHSUses, getConversionMode, getCoolantFailureAmount, 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, 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, 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, getLocationDamage, getLocationFromAbbr, getLocationName, getLocationName, getLocationStatus, getLongRangeModifier, getLOSRangeModifier, getMagneticPulseRounds, getManualBV, getMASC, getMASCTarget, getMASCTurns, getMaxElevationDown, getMaxElevationDown, getMaxWeaponRange, getMaxWeaponRange, getMechanicalJumpBoosterMP, getMechanicalJumpBoosterMP, getMediumRangeModifier, getMisc, getMisc, getMiscEquipment, getMissionRoles, getMixedTechAdvancement, getModel, getMotiveSideMod, getMovedBackwards, getMovementBeforeSkidPSRModifier, getMovementMode, getMovementModeAsString, 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, getOperableC3MCount, 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, getRecoveryTime, getRecoveryTurn, getRefitFromUUID, getReintroductionDate, getReintroductionDate, getRemovalCondition, getRetreatedDirection, getRole, getRunHeat, 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, getTaintedAtmosphereExposureTurns, 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, getTransportBays, getTransportId, getTransports, getTroopCarryingSpace, getTrooperAtLocation, getTsempEffect, getTsempHitsThisTurn, getUnitFileUUID, getUnitNumber, getUnitsUnloadableFromBays, getUnitsUnloadableFromNonBays, getUnloadableUnits, getUnused, getUnused, getUnusedString, getUnusedString, getUseManualBV, getValidBraceLocations, getValidHalfWeightPickupLocations, getVariableRangeTargetingMode, getVariableRangeTargetingModifier, getVector, getVectors, getVelocity, getVibroClaws, getWalkHeat, getWalkMP, getWalkMP, getWeapon, 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, hasC3EmergencyMaster, hasC3i, hasC3M, hasC3MM, hasC3S, hasCase, hasCASEII, hasCASEII, hasCommandConsoleBonus, hasCustomSensorChoice, hasDamagedRHS, hasDetectedEntity, hasDisplacementAttack, hasDNICockpitMod, hasDNIImplant, hasDNIInducedHardToPilot, hasDroneOs, hasECM, hasEiCockpit, hasEmbeddedIcon, hasEMPInterferenceHeat, hasEngine, 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, hasPatchworkArmor, hasQuirk, hasRaisedShield, hasRaisedShield, hasRearArmor, hasRearMountedBulldozer, hasRHSWentUp, hasSCM, hasSearchlight, hasSeenEntity, hasSensorContactFor, hasShield, hasStealth, hasSystem, hasTAG, hasTargComp, hasTCPAimedShotCapability, hasUMU, hasUndamagedCriticalSlots, hasUnloadedUnitsFromBays, hasUsedRHSLastTurn, hasVariableRangeTargeting, hasViableWeapons, 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, isC3EmergencyMasterActive, isC3EmergencyMasterOverloaded, isC3IndependentMaster, isCanon, isCapitalFighter, isCapitalFighter, isCapitalScale, isCaptured, isCarcass, isCarefulStand, isCarryableObject, isChainWhipGrappled, isChameleonShieldActive, isChameleonShieldOn, isCharging, isChassisFamiliarityEligible, isClan, isClanArmor, isClearingMinefield, isClearingWoods, isClimbing, isCommander, isConvertingNow, isDangling, isDeployed, isDesignValid, isDestroyed, isDetectedByEnemy, isDone, isDoomed, isDropping, isEiShutdown, isEjectionPossible, isElevationValid, isEligibleFor, 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, isInfantryActionLeaving, 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, 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, isUsingManAce, isUsingSearchlight, isVisibleToEnemy, isVoidSigActive, isVoidSigOn, isWeaponBlockedAt, isWeaponBlockedByTowing, isWeaponOrderChanged, isWeaponValidForPhase, itemOppositeTech, joinLocationAbbr, load, load, load, load, loadAllWeapons, loadDefaultCustomWeaponOrder, loadedUnitsHaveActiveECM, loadQuirks, loadWeapon, loadWeapon, loadWeaponWithSameAmmo, loadWeaponWithSameAmmo, locationHasCase, locationIsLeg, madePointblankShot, maxGroundObjectTonnage, modifyPhysicalDamageForMeleeSpecialist, needsRollToStand, neuralInterfaceMode, newPhase, newRound, 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, 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, setC3EmergencyMasterActive, setC3EmergencyMasterOperatingTurns, setC3EmergencyOriginalMasterId, setC3iNextUUIDAsString, setC3Master, setC3Master, setC3MasterIsUUIDAsString, setC3MasterLostId, 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, setCustomSensorChoice, 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, setInfantryActionLeaving, 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, setRefitFromUUID, 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, setTransportId, 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, 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
-
BV_PER_BSP
public static final int BV_PER_BSPBattle Value per Battlefield Support Point.- See Also:
-
GUNNERY_REGULAR
public static final int GUNNERY_REGULARThe Regular/Veteran choice for an asset instance is carried by the crew's Gunnery skill (so it persists through the normal Crew/MUL machinery): a gunnery at or belowGUNNERY_VETERANmeans Veteran, otherwise Regular. These representative values are used when the UI toggles the level.- See Also:
-
GUNNERY_VETERAN
public static final int GUNNERY_VETERAN- See Also:
-
DESTROYED_DESTROY_CHECK
public static final int DESTROYED_DESTROY_CHECKA current Destroy Check strictly below this value means the asset has been destroyed by persistent damage (and is therefore shown asEntity.DMG_CRIPPLED). A destroyed asset is generally recorded with a Destroy Check of 0.- See Also:
-
LOC_ASSET
public static final int LOC_ASSETThe single, whole-unit location. Assets do not use hit locations.- See Also:
-
-
Constructor Details
-
BattlefieldSupportAsset
public BattlefieldSupportAsset()Creates an empty asset with default values (for tests and for a brand-new asset in MegaMekLab). -
BattlefieldSupportAsset
Creates an asset from the given stat block.- Parameters:
data- the stat block to build this asset from
-
-
Method Details
-
setFromData
Copies every value from the given stat block onto this entity. Identity, role, movement mode and MP use the baseEntityfields. Used when loading a.bfsfile. Movement mode is applied before MP so that the MP is stored against the correct (walk vs jump) allowance.- Parameters:
data- the stat block to copy from
-
toAssetData
- Returns:
- a new stat block snapshot of this asset, suitable for writing to a
.bfsfile
-
getLinkedUnitId
- Returns:
- the unit-file UUID of the base unit this asset is linked to, or
nullwhen the asset is standalone (not linked to a base unit)
-
setLinkedUnitId
Sets the base unit this asset is linked to, by the base unit's unit-file UUID.- Parameters:
linkedUnitId- the base unit's UUID, ornull/blank to make this a standalone asset
-
isLinkedToBaseUnit
public boolean isLinkedToBaseUnit()- Returns:
- whether this asset is linked to a base unit (has a non-blank
getLinkedUnitId())
-
setAssetTechBase
Applies a.bfstech-base value (IS/Clan/Mixed) to this asset. Assets are always tech level Standard, so this sets only the base (via the Standard tech-level constant) and the mixed-tech flag.- Parameters:
techBase- one ofBattlefieldSupportAssetData.TECH_BASE_IS/_CLAN/_MIXED
-
getAssetTechBase
- Returns:
- this asset's tech base as a
.bfsvalue (IS/Clan/Mixed (IS Chassis)/Mixed (Clan Chassis)).
-
isBattlefieldSupportAsset
public boolean isBattlefieldSupportAsset()- Returns:
- True when this object is a Battlefield Support Asset (a simplified unit governed by the Battlefield Support rules rather than by full construction/combat rules). False for all standard units.
-
getEntityType
public long getEntityType()- Specified by:
getEntityTypein classEntity
-
getUnitType
public int getUnitType()- Specified by:
getUnitTypein classEntity- See Also:
-
getConstructionTechAdvancement
Description copied from class:Entityreturn - the base construction option tech advancement- Specified by:
getConstructionTechAdvancementin classEntity
-
getAssetType
-
setAssetType
-
getCardTitle
-
setCardTitle
-
getCardSubtitle
-
setCardSubtitle
-
getEffectiveCardTitle
- Returns:
- the title to print on the card:
getCardTitle()if set, otherwise the chassis
-
getEffectiveCardSubtitle
- Returns:
- the subtitle to print on the card:
getCardSubtitle()if set, otherwise the model
-
getMp
public int getMp()- Returns:
- the asset's single Movement Point allowance for its declared movement mode - the jump MP for jump modes, otherwise the walk MP
-
setMp
public void setMp(int mp) Sets the asset's single Movement Point allowance against its declared movement mode - the jump MP for jump modes, otherwise the walk MP. Set the movement mode before calling this so the value is stored against the right allowance.- Parameters:
mp- the movement allowance
-
isJumpMode
public boolean isJumpMode()- Returns:
- true if this asset's movement mode is a jumping mode (its MP is a jump allowance)
-
getMovementDisplay
- Returns:
- the card display form of movement, for example
8H
-
movementCardLetter
- Parameters:
mode- a movement mode- Returns:
- the single-letter code shown on the Asset card for the given mode (for example
Hfor hover)
-
getTmm
public int getTmm() -
setTmm
public void setTmm(int tmm) -
getTmmDisplay
- Returns:
- the card display form of the TMM, always signed (for example
+3). Immobile assets append a*(for example+0*) to indicate that, although the printed TMM is as shown, the -4 Immobile to-hit modifier applies so the effective TMM is -4.
-
isImmobileAsset
public boolean isImmobileAsset()- Returns:
- true if this asset has the Immobile Special (its TMM is shown with a
*and it cannot move).
-
getRange
-
setRange
-
getRangeDisplay
- Returns:
- the card display form of the range, using a keyword label derived from Specials where applicable
-
getRangeKeywordLabel
- Returns:
- the keyword label to show for a keyword range - the artillery type (for example
Long Tom) when an Artillery Special is present, elseArrow IVfor an Arrow Special, else an em dash - ornullfor a numeric range
-
getSkill
public int getSkill() -
setSkill
public void setSkill(int skill) -
getVeteranSkill
-
setVeteranSkill
-
getSkillDisplay
- Returns:
- the card display form of the skill, for example
6(5)
-
getDamage
-
setDamage
-
getDamageDisplay
- Returns:
- the card display form of the damage, for example
5x4
-
getDestroyCheck
public int getDestroyCheck()- Returns:
- the current Destroy Check target (lowered by persistent damage; equal to
getODestroyCheck()for an undamaged asset). This is the value shown on the card and used in play.
-
setDestroyCheck
public void setDestroyCheck(int destroyCheck) Sets the current Destroy Check target only (persistent damage), leaving the as-constructed value unchanged — mirroringEntity.setArmor(int, megamek.common.HitData). UsesetODestroyCheck(int)to set the as-constructed value.- Parameters:
destroyCheck- the current Destroy Check target
-
getODestroyCheck
public int getODestroyCheck()- Returns:
- the as-constructed Destroy Check target (the designer's value, stored in the
.bfs).
-
setODestroyCheck
public void setODestroyCheck(int oDestroyCheck) Sets the as-constructed Destroy Check target and resets the current value to it (an undamaged unit), mirroringEntity.initializeArmor(int, int). Used when defining/editing the asset. Persistent damage is applied afterward viasetDestroyCheck(int).- Parameters:
oDestroyCheck- the as-constructed Destroy Check target
-
getThreshold
public int getThreshold() -
setThreshold
public void setThreshold(int threshold) -
getCost
public int getCost() -
setCost
public void setCost(int cost) -
getVeteranCost
-
setVeteranCost
-
getCostDisplay
- Returns:
- the card display form of the cost in BSP, for example
23(27)
-
getBsp
public int getBsp()- Returns:
- the standard cost in Battlefield Support Points
-
getEffectiveBsp
public int getEffectiveBsp()- Returns:
- the BSP cost for the current crew level: the Veteran BSP when Veteran is selected, else the Regular BSP.
-
getVeteranBsp
- Returns:
- the Veteran cost in Battlefield Support Points, or
nullif there is no Veteran variant
-
getBv
public int getBv() -
getVeteranBv
- Returns:
- the Veteran cost in Battle Value, or
nullif there is no Veteran variant
-
hasVeteranProfile
public boolean hasVeteranProfile()- Returns:
- true if this asset defines a Veteran variant (a Veteran cost/skill), so Veteran can be selected.
-
isVeteranGunnery
public static boolean isVeteranGunnery(int gunnery) - Parameters:
gunnery- a crew Gunnery skill- Returns:
- true if the given Gunnery skill encodes a Veteran asset crew (see
GUNNERY_VETERAN)
-
isVeteranCrew
public boolean isVeteranCrew()- Returns:
- true if this asset's current crew is set to the Veteran level and it has a Veteran variant. When there is no Veteran variant the asset is always treated as Regular regardless of the crew skill.
-
getCrewSkillLevel
- Returns:
- the crew grade as a
SkillLevel:SkillLevel.VETERANwhen the crew is Veteran, otherwiseSkillLevel.REGULAR. Assets use only these two grades (there are no gunnery/piloting numbers in play); this is the label form used wherever a crew's skill would normally be shown.
-
setVeteranCrew
public void setVeteranCrew(boolean veteran) Sets the crew's Regular/Veteran level, carried by the Gunnery skill. Requires a crew to be present.- Parameters:
veteran- true for Veteran, false for Regular
-
getEffectiveBv
public int getEffectiveBv()- Returns:
- the Battle Value for the current crew level: the Veteran BV when Veteran is selected, else the Regular BV.
-
doBattleValueCalculation
protected int doBattleValueCalculation(boolean ignoreC3, boolean ignoreSkill, boolean ignoreTAG, CalculationReport calculationReport) Description copied from class:EntityCalculates and returns the Battle Value of this unit taking into account the parameters. This method should be overridden by subclasses of Entity to provide a unit type specific calculation of the Battle Value. A report of the calculation should be written to the given calculationReport.- Overrides:
doBattleValueCalculationin classEntity- Parameters:
ignoreC3- Whentrue, the BV contributions of any C3 computers are not addedignoreSkill- Whentrue, the skill of the crew / pilot is not taken into account for BVignoreTAG- Whentrue, the force bonus for friendly guided munitions (TAG/homing) is not addedcalculationReport- A CalculationReport to write the BV calculation to- Returns:
- The Battle Value of this unit calculated from its current state
-
getSpecials
-
setSpecials
-
addSpecial
-
findSpecial
- Parameters:
type- the known Special type to look for- Returns:
- the first Special on this asset whose code matches the given registry entry, or empty if none
-
hasSpecial
- Parameters:
type- the known Special type to look for- Returns:
- true if this asset carries a Special whose code matches the given registry entry
-
getArtilleryType
- Returns:
- the artillery type of this asset's Artillery Special (from its value, for example
LT), ornullif the asset has no Artillery Special or its type is unrecognized
-
getSpecialsDisplay
- Returns:
- the card display form of all Specials, comma-separated, or an em dash when there are none
-
locations
public int locations()Description copied from class:EntityReturns the number of locations in the entity -
getLocationNames
- Specified by:
getLocationNamesin classEntity
-
getLocationAbbreviations
- Specified by:
getLocationAbbreviationsin classEntity
-
getNoOfSlots
protected int[] getNoOfSlots()- Specified by:
getNoOfSlotsin classEntity
-
autoSetInternal
public void autoSetInternal()Description copied from class:EntitySets the internal structure for every location to appropriate undamaged values for the unit and location.- Specified by:
autoSetInternalin classEntity
-
rollHitLocation
public HitData rollHitLocation(int table, int side, int aimedLocation, AimingMode aimingMode, int cover) Description copied from class:EntityRolls the to-hit number- Specified by:
rollHitLocationin classEntity
-
rollHitLocation
Description copied from class:EntityRolls up a hit location- Specified by:
rollHitLocationin classEntity
-
getTransferLocation
Description copied from class:EntityGets the location that excess damage transfers to. That is, one location inwards.- Specified by:
getTransferLocationin classEntity
-
canChangeSecondaryFacing
public boolean canChangeSecondaryFacing()Description copied from class:EntityCan this entity change secondary facing at all?- Specified by:
canChangeSecondaryFacingin classEntity
-
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.
-
getWeaponArc
public int getWeaponArc(int weaponNumber) Description copied from class:EntityReturns the Rules.ARC that the weapon, specified by number, fires into.- Specified by:
getWeaponArcin classEntity- Parameters:
weaponNumber- integer equipment number, index from equipment list- Returns:
- arc the specified weapon is in
-
isSecondaryArcWeapon
public boolean isSecondaryArcWeapon(int weaponId) Description copied from class:EntityReturns true if this weapon fires into the secondary facing arc. If false, assume it fires into the primary.- Specified by:
isSecondaryArcWeaponin classEntity
-
getMovementString
Description copied from class:EntityReturns the name of the type of movement used.- Specified by:
getMovementStringin classEntity
-
getMovementAbbr
Description copied from class:EntityReturns the abbreviation of the name of the type of movement used.- Specified by:
getMovementAbbrin classEntity
-
getRunMP
-
getMaxElevationChange
public int getMaxElevationChange()Description copied from class:EntityThe maximum elevation change the entity can cross- Overrides:
getMaxElevationChangein classEntity
-
addEntityBonuses
Description copied from class:EntityAdd in any piloting skill mods- Specified by:
addEntityBonusesin classEntity
-
getEngineHits
public int getEngineHits()- Specified by:
getEngineHitsin classEntity
-
isCrippled
public boolean isCrippled()Description copied from class:EntityReturns TRUE if the entity meets the requirements for crippling damage as detailed in TW pg 258.- Specified by:
isCrippledin classEntity- Returns:
- boolean
-
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
-
isDestroyedByDamage
public boolean isDestroyedByDamage()- Returns:
trueif this asset has been destroyed by persistent damage - its current Destroy Check has fallen belowDESTROYED_DESTROY_CHECK. An asset can no longer be damaged past destruction; a destroyed asset is generally recorded with a Destroy Check of 0. This is the only condition under which an asset is shown asEntity.DMG_CRIPPLED.
-
isDmgHeavy
public boolean isDmgHeavy()Description copied from class:EntityReturns TRUE if the entity has been heavily damaged.- Specified by:
isDmgHeavyin classEntity- Returns:
- boolean
-
isDmgModerate
public boolean isDmgModerate()Description copied from class:EntityReturns TRUE if the entity has been moderately damaged.- Specified by:
isDmgModeratein classEntity- Returns:
- boolean
-
isDmgLight
public boolean isDmgLight()Description copied from class:EntityReturns TRUE if the entity has been lightly damaged.- Specified by:
isDmgLightin classEntity- Returns:
- boolean
-
getCost
Description copied from class:EntityCalculates and returns the C-bill cost of the unit. The parameter ignoreAmmo can be used to include or exclude ("dry cost") the cost of ammunition on the unit. A report for the cost calculation will be written to the given calcReport. -
getGenericBattleValue
public int getGenericBattleValue()Description copied from class:EntityCalculates a "generic" Battle Value that is based on the average of all units of this type and tonnage. The purpose of this generic Battle Value is to allow a comparison of this unit's actual BV to that for units of its class. This can be used to balance forces without respect to unit or pilot quality.The generic BV values are calculated by a statistical elasticity model based on all data from the MegaMek database.
- Specified by:
getGenericBattleValuein classEntity- Returns:
- The generic Battle value for this unit based on its tonnage and type
-
victoryReport
Description copied from class:EntityGenerates a vector containing reports on all useful information about this entity.- Specified by:
victoryReportin classEntity
-