Package megamek.common
Class FighterSquadron
java.lang.Object
megamek.common.TurnOrdered
megamek.common.Entity
megamek.common.Aero
megamek.common.AeroSpaceFighter
megamek.common.FighterSquadron
- All Implemented Interfaces:
Serializable
,BTObject
,CombatRole
,Deployable
,ForceAssignable
,IAero
,IBomber
,InGameObject
,ITechnology
,ITurnOrdered
,PhaseUpdated
,RoundUpdated
,Targetable
,Transporter
Fighter squadrons are basically "containers" for a bunch of fighters.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class megamek.common.Entity
Entity.InvalidSourceBuildReason
-
Field Summary
FieldsFields inherited from class megamek.common.Aero
AERO_EFFECTIVE_ELEVATION, CIVILIAN, COCKPIT_COMMAND_CONSOLE, COCKPIT_PRIMITIVE, COCKPIT_SHORT_STRING, COCKPIT_SMALL, COCKPIT_STANDARD, COCKPIT_STRING, COCKPIT_TA, CRIT_AVIONICS, CRIT_BOMB, CRIT_CARGO, CRIT_CIC, CRIT_CONTROL, CRIT_CREW, CRIT_DOCK_COLLAR, CRIT_DOOR, CRIT_ENGINE, CRIT_FCS, CRIT_FUEL_TANK, CRIT_GEAR, CRIT_GRAV_DECK, CRIT_HEATSINK, CRIT_KF_BOOM, CRIT_KF_DRIVE, CRIT_LEFT_THRUSTER, CRIT_LIFE_SUPPORT, CRIT_NONE, CRIT_RIGHT_THRUSTER, CRIT_SENSOR, CRIT_WEAPON, CRIT_WEAPON_BROAD, damThresh, designType, extBombChoices, HEAT_DOUBLE, HEAT_SINGLE, intBombChoices, LOC_AFT, LOC_FUSELAGE, LOC_LWING, LOC_NOSE, LOC_RWING, LOC_WINGS, maxExtBombPoints, maxIntBombPoints, MILITARY, RAM_AWAY_DIR, RAM_AWAY_OBL, RAM_TOWARD_DIR, RAM_TOWARD_OBL, TA_ASF, TA_ASF_PRIMITIVE, usedInternalBombs
Fields inherited from class megamek.common.Entity
_isEMId, ALTERNATE_MASC_FAILURE, ALTERNATE_MASC_FAILURE_ENHANCED, altitude, ammoList, armorTechLevel, armorTechRating, armorTonnage, armorType, armsFlipped, asewAffectedTurns, aTracker, BLOOD_STALKER_TARGET_CLEARED, bMASCWentUp, bombList, bSuperchargerWentUp, c3CompanyMasterIndex, c3Master, c3NetIdString, camouflage, canUnstickByJumping, carcass, chassis, clanChassisName, consecutiveRHSUses, convertingNow, coolFromExternal, crits, damageThisPhase, damageThisRound, delta_distance, designValid, destroyed, displacementAttack, DMG_CRIPPLED, DMG_HEAVY, DMG_LIGHT, DMG_MODERATE, DMG_NONE, dodging, DOES_NOT_TRACK_HEAT, done, doomed, elevation, engineHitsThisPhase, engineTechRating, equipmentList, ETYPE_AERO, ETYPE_AEROSPACEFIGHTER, ETYPE_ARMLESS_MEK, ETYPE_BATTLEARMOR, ETYPE_BIPED_MEK, 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, 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, military, miscList, mixedTech, model, moved, movedLastRound, movementMode, mpUsed, mpUsedLastRound, mulId, narcPods, nCrew, nMarines, nMASCLevel, nPassenger, nSuperchargerLevel, omni, owner, ownerId, pendingINarcPods, pendingNarcPods, previousMovementMode, prone, reckless, rolledForEngineExplosion, searchlightIsActive, 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, techLevel, tmTracker, totalWeaponList, traitorId, twistedPhase, underwaterRounds, unjammingRAC, UNLIMITED_JUMP_DOWN, USE_STRUCTURAL_RATING, usedMASC, usedSearchlight, usedSupercharger, useManualBV, vectors, walkMP, weaponBayList, weaponGroupList, weaponList, weight, wigeBonus, year
Fields inherited from interface megamek.common.IBomber
ALT_BOMB_ATTACK, DIVE_BOMB_ATTACK, SPACE_BOMB_ATTACK
Fields inherited from interface megamek.common.ITechnology
DATE_ES, DATE_NONE, DATE_PS, ERA_CLAN, ERA_DA, ERA_NUM, ERA_SL, ERA_SW, F_CBR, F_CBS, F_CC, F_CCC, F_CCY, F_CF, F_CFM, F_CGB, F_CGS, F_CHH, F_CIH, F_CJF, F_CLAN, F_CMN, F_CNC, F_CP, F_CS, F_CSA, F_CSF, F_CSJ, F_CSR, F_CSV, F_CWF, F_CWM, F_CWV, F_CWX, F_DC, F_EI, F_FC, F_FR, F_FS, F_FW, F_IS, F_LC, F_MC, F_MERC, F_MH, F_NONE, F_OA, F_PER, F_RA, F_RD, F_RS, F_RW, F_TA, F_TC, F_TH, F_WB, IO_FACTION_CODES, MM_FACTION_CODES, RATING_A, RATING_B, RATING_C, RATING_D, RATING_E, RATING_F, RATING_FSTAR, RATING_X, ratingNames, TECH_BASE_ALL, TECH_BASE_CLAN, TECH_BASE_IS
Fields inherited from interface megamek.common.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_INARC_POD, TYPE_MINEFIELD_CLEAR, TYPE_MINEFIELD_DELIVER, TYPE_SEARCHLIGHT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd in any piloting skill modsvoid
Iterate through the bomb choices that were configured prior to deployment and add the corresponding equipment.void
boolean
Determines if this object can accept the given unit.void
This method looks at the bombs equipped on all the fighters in the squadron and determines what possible bombing attacks the squadrons can make.void
damageCapFighterWeapons
(int loc) Damage a capital fighter's weapons.int
doBattleValueCalculation
(boolean ignoreC3, boolean ignoreSkill, CalculationReport calculationReport) Calculates and returns the Battle Value of this unit taking into account the parameters.A list of all active sub-entities.getAmmo()
double
Returns the percent of the armor remainingint[]
Produce an int array of the number of bombs of each type based on the current bomblist.int
getCargoMpReduction
(Entity carrier) int
get modifications to the cluster hit table for critical hitsdouble
getCost
(CalculationReport calcReport, boolean ignoreAmmo) Calculates and returns the C-bill cost of the unit.int
int
long
getExteriorUnitAt
(int loc, boolean isRear) If a unit is being transported on the outside of the transporter, it can suffer damage when the transporter is hit by an attack.int
getFuel()
int
getHeatCapacity
(boolean includeRadicalHeatSink) int
double
Squadrons have an SI for PSR purposes, but don't take SI damage.Get aList
of the units currently loaded into this payload.int
Get the movement mode of the entityint
getOSI()
int
getSI()
This method (and getActiveSubEntities()) is meant for groups of entities handled as a singular one.int
Returns the total amount of armor on the entity.int
Returns the total amount of armor on the entity.double
double
Returns the current amount of cargo space for an entity of the given type.Return a string that identifies the unused capacity of this transporter.int
getWalkMP
(MPCalculationSetting mpCalculationSetting) double
boolean
Does the Mek have a functioning ECM unit?boolean
boolean
Returns whether or not this entity has a Targeting Computer.boolean
boolean
boolean
isCrippled
(boolean checkCrew) Per SO, fighter squadrons can't actually be crippled Individual crippled fighters should be detached and sent home, but it isn't required by the rulesboolean
Returns true when this object is a fighter (aerospace or conventional) including Fixed-Wing Support or of type CF/AF/SV(MV a) for Alpha Strike.boolean
Returns true when this is a group of units or elements such as a TW Squadron, BF Unit or SBF Formation even if it happens to contain only a single element at the time.boolean
isWeaponBlockedAt
(int loc, boolean isRear) Determine if transported units prevent a weapon in the given location from firing.void
Load the given unit.boolean
Do units loaded onto this entity still have active ECM/ECCM/etc.?void
newRound
(int roundNumber) Start a new roundvoid
rollHitLocation
(int table, int side) Rolls up a hit locationrollHitLocation
(int table, int side, int aimedLocation, AimingMode aimingMode, int cover) Rolls up a hit locationvoid
setBombChoices
(int... bc) Backwards compatibility bomb choice setter that only affects external stores.void
setTransportId
(int transportId) Override of Entity method.boolean
Unload the given unit.void
Update sensors.void
void
instead of trying to track the individual units weapons, just recompile the weapon groups for this squadron each roundvoid
useFuel
(int fuel) use the specified amount of fuel for this Aero.Methods inherited from class megamek.common.AeroSpaceFighter
damageLocation, getGenericBattleValue, getUnitType, isAerospaceFighter, isBomber, isSpheroid, reduceMPByBombLoad, setOriginalWalkMP, setWeight
Methods inherited from class megamek.common.Aero
addClanCase, addEquipment, addEscapeCraft, addMarine, addSystemTechAdvancement, areWingsHit, autoSetCapArmor, autoSetFatalThresh, autoSetInternal, autoSetSI, autoSetThresh, availableBombLocation, calculateWalk, canChangeSecondaryFacing, canCharge, canDFA, canGoDown, canRam, canSpot, chooseSideRam, clearBombChoices, clipSecondaryFacing, didAccDecNow, didAccLast, didFailManeuver, doDisbandDamage, doomedInAtmosphere, doomedInExtremeTemp, doomedInSpace, doomedInVacuum, doomedOnGround, fuelTankHit, getActiveAMS, getAltLoss, getAltLossThisRound, getAvionicsHits, getAvionicsMisrepaired, getAvionicsMisreplaced, getBadCriticals, getBodyLocation, getBVTypeModifier, getCap0Armor, getCapArmor, getCICHits, getCockpitTechAdvancement, getCockpitTechAdvancement, getCockpitType, getCockpitTypeString, getCockpitTypeString, getConstructionTechAdvancement, getCritDamageString, getCriticalEffect, getCurrentDamage, getCurrentVelocity, getCurrentVelocityActual, getDependentLocation, getDesignType, getECCMBonus, getECCMRoll, getECCMStrength, getECCMTarget, getECMRange, getElevation, getEngineCritHeat, getEngineHits, getEnginesLostRound, getEscapeCapacity, getEscapeCraft, getEscapePods, getExtBombChoices, getFatalThresh, getFCSHits, getForwardArc, getFuelPointsPerTon, getFuelTonnage, getGravPrimaryThreshold, getGravSecondaryThreshold, getHeatCapacityWithWater, getHeatSinkHits, getHeatType, getHighestThresh, getIgnoredCrewHits, getIntBombChoices, getLandingGearMod, getLandingGearPartialRepairs, getLaunchedEscapePods, getLaunchedLifeBoats, getLeftThrustHits, getLifeBoats, getLifeBoatsLeft, getLocationAbbrs, getLocationDamage, getLocationNames, getMarineCount, getMarines, getMaxBombPoints, getMaxElevationChange, getMaxEngineHits, getMaxExtBombPoints, getMaxIntBombPoints, getMovementAbbr, getMovementString, getNBattleArmor, getNCrew, getNextVelocity, getNGunners, getNMarines, getNOfficers, getNoOfSlots, getNoseArmor, getNPassenger, getOHeatSinks, getOppositeLocation, getOriginalFuel, getPodHeatSinks, getPodsLeft, getPotCrit, getPriceMultiplier, getRearArc, getRightThrustHits, getRunMP, getSensorHits, getSpriteDrawPriority, getStealthModifier, getStraightMoves, getStrategicFuelUse, getSuspensionFactor, getThresh, getTotalAboard, getTotalCommGearTons, getTransferLocation, getUsedInternalBombs, getWeaponArc, getWeaponGroups, getWhoFirst, groupWeaponsByLocation, hasArmoredEngine, hasCase, hasCommandConsoleBonus, hasEjectSeat, hasEscapeSystemsLeft, hasLifeSupport, hasRearArmor, implicitClanCASE, increaseUsedInternalBombs, initializeSI, initializeThresh, isAero, isAeroSensorDestroyed, isAutoEject, isCondEjectAmmo, isCondEjectFuel, isCondEjectSIDest, isCrewProtected, isCrippled, isDmgHeavy, isDmgLight, isDmgModerate, isEjecting, isGearHit, isImmobile, isLocationProhibited, isNightwalker, isNuclearHardened, isOutControl, isOutControlTotal, isOutCtrlHeat, isPrimitive, isRandomMove, isRepairable, isRolled, isSecondaryArcWeapon, isStealthActive, isStealthOn, isSTOL, isValidSecondaryFacing, isVSTOL, locations, primitiveFuelFactor, removeEscapeCraft, removeMarine, resetAltLoss, resetAltLossThisRound, setAccDecNow, setAccLast, setAltLoss, setAltLossThisRound, setArmorType, setArmorType, setAutoEject, setAvionicsHits, setCapArmor, setCICHits, setCockpitType, setCondEjectAmmo, setCondEjectFuel, setCondEjectSIDest, setCritThresh, setCurrentDamage, setCurrentFuel, setCurrentVelocity, setDesignType, setDestroyed, setECCMRoll, setEjecting, setEngine, setEngineHits, setEnginesLostRound, setExtBombChoices, setFailedManeuver, setFCSHits, setFuel, setFuelTankHit, setFuelTonnage, setGearHit, setHeatSinks, setHeatType, setIgnoredCrewHits, setIntBombChoices, setLaunchedEscapePods, setLaunchedLifeBoats, setLeftThrustHits, setLifeSupport, setNextVelocity, setOHeatSinks, setOmni, setOSI, setOutControl, setOutCtrlHeat, setPodHeatSinks, setPotCrit, setRandomMove, setRightThrustHits, setRolled, setSensorHits, setSI, setSpheroid, setStraightMoves, setThresh, setUsedInternalBombs, setVSTOL, setWhoFirst, setWingsHit, shouldMoveBackHex, sideTableRam, tracksHeat, updateSensorOptions, victoryReport, wasCritThresh
Methods inherited from class megamek.common.Entity
addAttackedByThisTurn, addBeenDetectedBy, addBeenSeenBy, addBomb, addBomb, addConditionBonuses, addCoolantFailureAmount, addCritical, addCritical, addCritical, addEquipment, addEquipment, addEquipment, addEquipment, addEquipment, addEquipment, addEquipment, addEquipment, addEquipment, addEquipment, addFailedEquipment, addFiringSolution, addGroundAttackedByThisTurn, addIMPHits, addKill, addOffBoardObserver, addPassedThrough, addPilotingModifierForTerrain, addPilotingModifierForTerrain, addPilotingModifierForTerrain, addPilotingModifierForTerrain, addSensorContact, addTargetedBySwarm, addTechComponent, addTowedUnit, addTransporter, addTransporter, addTsempHitThisTurn, addWeaponGroup, antiTSMVulnerable, applyDamage, applyGravityEffectsOnMP, armorStringFor, assignAMS, assignTMAMS, assignWeaponQuirk, attachINarcPod, attachNarcPod, braceLocation, C3MasterIs, calcElevation, calcElevation, calcElevation, calculateBattleValue, calculateBattleValue, calculateBattleValue, calculateBattleValue, calculateFreeC3MNodes, calculateFreeC3Nodes, canActivateBloodStalker, canAssaultDrop, canAssist, canBrace, canEscape, canFall, canFall, canFireWeapon, canFlee, canFlipArms, canGoDown, canGoHullDown, canGoUp, canLayMine, canLoad, canonUnitWithInvalidBuild, canPickupGroundObject, canTow, canTransferCriticals, canUnjamRAC, canUnstickByJumping, 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, clearNarcAndiNarcPods, clearPartialRepairs, clearSeenBy, clearSensorContacts, climbMode, countEquipment, countForStrengthSum, countMisc, countPartialRepairs, countQuirks, countQuirks, countWeaponQuirks, countWorkingMisc, countWorkingMisc, countWorkingMisc, critStateCount, damageBayDoor, damagedJumpJets, damageDockCollar, damageDoorRecovery, damagedSCMCritCount, damageSystem, damageSystem, deactivateRadicalHS, defaultCrewType, deployOffBoard, destroy, destroyLocation, destroyLocation, destroyOneSearchlight, destroyRetractableBlade, disconnectUnit, doCheckEngineStallRoll, dropGroundObject, dropGroundObject, dropGroundObjects, elevationOccupied, elevationOccupied, endOfTurnCargoInteraction, entityIsQuad, equals, extendBlade, factionTechLevel, findTargetedDisplacement, firstArmorIndex, fixElevation, formatHeat, gameOptions, generalName, generateDisplayName, generateShortName, getActiveSensor, getActiveUMUCount, getActiveVibrobladeHeat, getActiveVibrobladeHeat, getAllGyroCodeName, getAllowedPhysicalAttacks, getAllTowedUnits, getAllUMUCount, getAlreadyTwisted, getAlternateCost, getAltitude, getAmmo, getAmmo, getAnyTypeMaxJumpMP, getArmedMPBoosters, getArmor, getArmor, getArmor, getArmoredComponentTechAdvancement, getArmorForReal, getArmorForReal, getArmorString, getArmorString, getArmorTechLevel, getArmorTechRating, getArmorType, getArmorWeight, getArmorWeight, getArmsFlipped, getASEWAffected, getAttackedByThisTurn, getBAPRange, getBARRating, getBase64Icon, getBaseAvailability, getBaseChassisFireConWeight, getBaseChassisValue, getBaseEngineValue, getBasePilotingRoll, getBasePilotingRoll, getBay, getBayByAmmo, getBayById, getBayLoadedUnitIds, getBayPersonnel, getBlockedFiringLocations, getBloodStalkerTarget, getBlueShieldRounds, getBombLoadout, getBombs, getBombs, getBraceMPCost, getBvCalculator, getC3iNextUUIDAsString, getC3Master, getC3MasterId, getC3MasterIsUUIDAsString, getC3NetId, getC3Top, getC3UUIDAsString, getCamouflage, getCamouflageOrElse, getCamouflageOrElse, getCamouflageOrElseOwners, getCarriedObject, getCarriedObjects, getChassis, getClanChassisName, getClubs, getCollarById, getCommonDate, getConnectedUnits, getConsecutiveRHSUses, getConversionMode, getCoolantFailureAmount, getCost, getCrew, getCritical, getCriticalSlots, getCustomWeaponOrder, getCustomWeaponOrder, getDamagedCriticals, getDamageLevel, getDamageLevel, getDamageReductionFromModularArmor, getDefaultPickupLocations, getDeployRound, getDisplacementAttack, getDisplayName, getDistinctCarriedObjects, getDockingCollars, getDocks, getDocks, getDroppableUnits, getDuplicateMarker, getEarliestTechDate, getECCMInfo, getECMInfo, getECMStrength, getEmptyCriticals, getEngineTechRating, getEngineType, getEntityMajorTypeName, getEntityTypeName, getEquipment, getEquipment, getEquipmentForWeaponQuirk, getEquipmentNum, getEquipmentType, getEvasionBonus, getExternalBombLoadout, getExternalId, getExternalIdAsString, getExternalUnits, getExtinctionDate, getExtinctionDate, getExtinctionRange, getExtraC3BV, getExtraCommGearTons, getExtremeRangeModifier, getFacing, getFacingName, getFailedEquipment, getFighterBays, getFiringSolutions, getFleeZone, getFluff, getFluffImage, getForceId, getForceString, getFreeC3iUUID, getFreeNC3UUID, getFullChassis, getGame, getGaveKillCredit, getGhostTargetOverride, getGhostTargetRoll, getGhostTargetRollMoS, getGoodCriticals, getGrappled, getGrappleSide, getGroundAttackedByThisTurn, getGyroType, getHeading, getHeat, getHeatCapacity, getHeatFiringModifier, getHeatInArc, getHeatMPReduction, getHeight, getHiddenActivationPhase, getHitchById, getHitchCarrying, getHitchLocations, getHitCriticals, getHittableCriticals, getHQIniBonus, getIcon, getId, getIMPMoveMod, getINarcPodsAttached, getIndividualWeaponList, getInitialBV, getInternal, getInternal, getInternalBombLoadout, getInternalForReal, getInternalString, getIntroductionDate, getIntroductionDate, getInvalidSourceBuildReasons, getIsJumpingNow, getJumpHeat, getJumpMP, getJumpMP, getJumpMPWithTerrain, getJumpType, getKillerId, getKillNumber, getKills, getLabArmorTonnage, getLabTotalArmorPoints, getLastTarget, getLastTargetDisplayName, getLaunchableDropships, getLaunchableFighters, getLaunchableSmallCraft, getLoadedKeepers, getLoadedTrailers, getLocationAbbr, getLocationAbbr, getLocationFromAbbr, getLocationName, getLocationName, getLocationStatus, getLongRangeModifier, getLOSRangeModifier, getManualBV, getMASC, getMASCTarget, getMASCTurns, getMaxElevationDown, getMaxElevationDown, getMaxWeaponRange, getMaxWeaponRange, getMechanicalJumpBoosterMP, getMechanicalJumpBoosterMP, getMediumRangeModifier, getMisc, getMisc, getMiscEquipment, getMixedTechAdvancement, getModel, getMotiveSideMod, getMovedBackwards, getMovementBeforeSkidPSRModifier, getMovementModeAsString, getMPBoosters, getMPBoosters, getMpUsedLastRound, getMulId, getNC3NextUUIDAsString, getNewRoundNovaNetworkString, getNextSensor, getNumberOfCriticals, getNumberOfCriticals, getNumberOfCriticals, getNumberOfCriticals, getNumberOfShields, getOArmor, getOArmor, getOArmor, getOccupiedCoords, getOffBoardDirection, getOffBoardDistance, getOInternal, getOInternal, getOmniAdvancement, getOmniAdvancement, getOriginalBuildYear, getOriginalJumpMP, getOriginalJumpMP, getOriginalNovaC3NetId, getOriginalRunMP, getOriginalWalkMP, getOwner, getOwnerId, getPartialRepairs, getPassedThrough, getPassedThroughFacing, getPatchworkArmorAdvancement, getPickedUpMekWarriors, getPlayerPickedPassThrough, getPodMountedTroopCarryingSpace, getPosition, getPowerAmplifierWeight, getPriorPosition, getProductionDate, getProductionDate, getPrototypeDate, getPrototypeDate, getQuirkIniBonus, getQuirkList, getQuirks, getRecoveryTurn, getReintroductionDate, getReintroductionDate, getRemovalCondition, getRetreatedDirection, getRole, getRunHeat, getRunMP, getRunMPasString, getRunMPwithoutMASC, getRunningGravityLimit, getsAutoExternalSearchlight, getSecondaryFacing, getSecondaryPositions, getSelfDestructedThisTurn, getSelfDestructing, getSelfDestructInitiated, getSensorCheck, getSensorContacts, getSensors, getShortName, getShortNameRaw, getShortRangeModifier, getSource, getSpotTargetId, getSprintHeat, getSprintMP, getSprintMP, getSprintMPwithOneMASC, getSprintMPwithoutMASC, getStandingHeat, getStartingAnyNWx, getStartingAnyNWx, getStartingAnyNWy, getStartingAnyNWy, getStartingAnySEx, getStartingAnySEx, getStartingAnySEy, getStartingAnySEy, getStartingOffset, getStartingOffset, getStartingPos, getStartingPos, getStartingWidth, getStartingWidth, getStaticTechLevel, getStrength, getStructuralTechRating, getStructureTechLevel, getStructureType, getSuperCharger, getSuperchargerTarget, getSuperchargerTurns, getSwarmAttackerId, getSwarmTargetId, getTaggedBy, getTargetBay, getTargetedBySwarm, getTargetType, getTaserFeedBackRounds, getTaserInterference, getTaserInterferenceHeat, getTaserInterferenceRounds, getTaserShutdownRounds, getTechBase, getTechBaseDescription, getTechBaseDescriptions, getTechLevel, getTechLevelYear, getTechRating, getTilesetModeString, getTMTracker, getTotalAmmoOfType, getTotalInternal, getTotalMunitionsOfType, getTotalOInternal, getTotalWeaponList, getTowedBy, getTowing, getTractor, getTraitorId, getTransferLocation, getTransportBays, getTransportId, getTransports, getTroopCarryingSpace, getTrooperAtLocation, getTsempEffect, getTsempHitsThisTurn, getUnitNumber, getUnitsUnloadableFromBays, getUnitsUnloadableFromNonBays, getUnloadableUnits, getUnusedString, getUseManualBV, getValidBraceLocations, getValidHalfWeightPickupLocations, getVector, getVectors, getVelocity, getVibroClaws, getWalkHeat, getWalkMP, getWeapon, getWeaponBayList, getWeaponGroupList, getWeaponList, getWeapons, getWeaponSortOrder, getWeightClass, getWeightClassName, getWhoCanDetect, getWhoCanSee, getYear, hasAbility, hasAbility, hasActivatedRadicalHS, hasActiveBlueShield, hasActiveECCM, hasActiveECM, hasActiveEiCockpit, hasActiveNovaCEWS, hasActiveShield, hasActiveShield, hasAimModeTargComp, hasAnyC3System, hasAnyTypeNarcPodsAttached, hasArcFired, hasArmoredChassis, hasBAP, hasBAP, hasBARArmor, hasBattleArmorHandles, hasBoostedC3, hasC3, hasC3i, hasC3M, hasC3MM, hasC3S, hasCASEII, hasCASEII, hasDamagedRHS, hasDetectedEntity, hasDisplacementAttack, hasDroneOs, hasECM, hasEiCockpit, hasEmbeddedIcon, hasEnvironmentalSealing, hasETypeFlag, hasExternalSearchlight, hasFallen, hasFiredTsemp, hasFiringSolutionFor, hasFleeZone, hasFlotationHull, hasFunctionalArmAES, hasFunctionalLegAES, hasGhostTargets, hasHardenedArmor, hasHarJelIn, hashCode, hasHipCrit, hasINarcPodsAttached, hasInfernoAmmo, hasLegActuatorCrit, hasLinkedMGA, hasMisc, hasMisc, hasMisc, hasModularArmor, hasModularArmor, hasMulId, hasNarcPodsAttached, hasNavalC3, hasNhC3, hasNoDefenseShield, hasNovaCEWS, hasOccupiedHex, hasPassiveShield, hasPassiveShield, hasPatchworkArmor, hasQuirk, hasSCM, hasSearchlight, hasSeenEntity, hasSensorContactFor, hasShield, hasStealth, hasSystem, hasTAG, hasUMU, hasUndamagedCriticalSlots, hasUnloadedUnitsFromBays, hasViableWeapons, hasVibroblades, hasWorkingMisc, hasWorkingMisc, hasWorkingMisc, hasWorkingMisc, hasWorkingSCM, hasWorkingSystem, height, hitAllCriticals, incrementMASCAndSuperchargerLevels, initializeArmor, initializeInternal, initMilitary, initTechAdvancement, isActive, isActive, isAirborne, isAirborneAeroOnGroundMap, isAirborneVTOLorWIGE, isAssaultDropInProgress, isAttackingThisTurn, isBATaserShutdown, isBoardProhibited, isBracing, isC3CompanyCommander, isC3IndependentMaster, isCanon, isCapitalFighter, isCaptured, isCarcass, isCarefulStand, isChainWhipGrappled, isChameleonShieldActive, isChameleonShieldOn, isCharging, isClan, isClanArmor, isClearingMinefield, isCommander, isConvertingNow, isDeployed, isDesignValid, isDestroyed, isDetectedByEnemy, isDone, isDoomed, isDropping, isEjectionPossible, isElevationValid, isEligibleFor, isEligibleForArtyAutoHitHexes, isEligibleForFiring, isEligibleForMovement, isEligibleForOffboard, isEligibleForPavementOrRoadBonus, isEligibleForPhysical, isEligibleForTargetingPhase, isEnemyOf, isEvading, isEverSeenByEnemy, isFindingClub, isFiredTsempThisTurn, isGrappleAttacker, isGrappledThisRound, isGyroDestroyed, isHardenedArmorDamaged, isHidden, isHullDown, isIlluminated, isImmobile, isImmobileForJump, isINarcedBy, isINarcedWith, isIntroLevel, isJumpingWithMechanicalBoosters, isLargeCraft, isLayingMines, isLoadableThisTurn, isLocationBad, isLocationBlownOff, isLocationBlownOffThisPhase, isLocationDeadly, isLocationDoomed, isLocationProhibited, isLocationTrulyDestroyed, isMakingDfa, isMakingVTOLGroundAttack, isManualShutdown, isMASCUsed, isMilitary, isMixedTech, isNarcedBy, isNaval, isNOE, isNullSigActive, isNullSigOn, isOffBoard, isOffBoardObserved, isOmni, isOnAtmosphericGroundMap, isPartOfFighterSquadron, isPermanentlyImmobilized, isPodMountedTransport, isPowerReverse, isProne, isPushing, isRamming, isReckless, isSalvage, isSelectableThisTurn, isSensorReturn, isShutDown, isShutDownThisPhase, isSpaceborne, isSpotting, isStalled, isStartupThisPhase, isStuck, isSufferingEMI, isSuperchargerUsed, isSuperHeavy, isSurfaceNaval, isTargetable, isTargetOfDisplacementAttack, isTractor, isTrailer, isTrapped, isUnderwater, isUnjammingRAC, isUnloadedThisTurn, isUnofficial, isUsingManAce, isUsingSearchlight, isVisibleToEnemy, isVoidSigActive, isVoidSigOn, isWeaponBlockedByTowing, isWeaponValidForPhase, isWeapOrderChanged, itemOppositeTech, joinLocationAbbr, load, load, load, loadAllWeapons, loadDefaultCustomWeaponOrder, loadQuirks, loadWeapon, loadWeapon, loadWeaponWithSameAmmo, loadWeaponWithSameAmmo, locationHasCase, locationIsLeg, madePointblankShot, maxGroundObjectTonnage, modifyPhysicalDamageForMeleeSpecialist, needsRollToStand, newPhase, newRoundNovaNetSwitch, nextConversionMode, onSameC3NetworkAs, onSameC3NetworkAs, passedOver, passedThrough, passedThroughPrevious, passedWithin, performManualShutdown, performManualStartup, pickUp, pickupGroundObject, postProcessFacingChange, recalculateTechAdvancement, recover, refreshLocations, relHeight, reloadEmptyWeapons, removeAllINarcPods, removeAllTransporters, removeCriticals, removeFiringSolution, removeFleeZone, removeINarcPod, removeMisc, removePartialCoverHits, removeSensorContact, removeTowedUnit, removeTransporter, resetBayDoors, resetBays, resetBombAttacks, resetCoolantFailureAmount, resetFiringArcs, resetTransporter, restore, rollMovementInBuilding, scmCritStateCount, setAlreadyTwisted, setAltitude, setArcFired, setArmor, setArmor, setArmor, setArmorTechLevel, setArmorTechLevel, setArmorTechRating, setArmorTonnage, setArmorType, setArmorType, setArmorType, setArmsFlipped, setArmsFlipped, setASEWAffected, setAssaultDropInProgress, setBARRating, setBARRating, setBaseChassisFireConWeight, setBATaserShutdown, setBloodStalkerTarget, setBraceLocation, setC3iNextUUIDAsString, setC3Master, setC3Master, setC3MasterIsUUIDAsString, setC3NetId, setC3NetIdSelf, setC3UUID, setC3UUIDAsString, setCamouflage, setCanon, setCanUnstickByJumping, setCaptured, setCarcass, setCarefulStand, setCarriedObjects, setChassis, setClanChassisName, setClearingMinefield, setClimbMode, setCommander, setConsecutiveRHSUses, setConversionMode, setConvertingNow, setCrew, setCritical, setCustomWeaponOrder, setCustomWeaponOrder, setDeployed, setDeployRound, setDesignValid, setDetectedByEnemy, setDisplacementAttack, setDisplayName, setDone, setDoomed, setDuplicateMarker, setElevation, setEMI, setEngineTechRating, setEvading, setEverSeenByEnemy, setExternalId, setExternalIdAsString, setExternalSearchlight, setFacing, setFallen, setFindingClub, setFiredTsempThisTurn, setFleeZone, setForceId, setForceString, setGame, setGameOptions, setGrappled, setGrappledThisRound, setGrappleSide, setHardenedArmorDamaged, setHasDamagedRHS, setHasFiredTsemp, setHidden, setHiddenActivationPhase, setHullDown, setIcon, setId, setIGame, setIlluminated, setInitialBV, setInternal, setInternal, setInvalidSourceBuildReasons, setIsJumpingNow, setJumpingWithMechanicalBoosters, setLandedAssaultDrop, setLastTarget, setLastTargetDisplayName, setLayingMines, setLoadedKeepers, setLoadedThisTurn, setLocationBlownOff, setLocationBlownOffThisPhase, setLocationStatus, setLocationStatus, setMadePointblankShot, setManualBV, setManualShutdown, setMASCUsed, setMixedTech, setModel, setMovedBackwards, setMovementMode, setMpUsedLastRound, setMulId, setNC3NextUUIDAsString, setNCrew, setNeverDeployed, setNewRoundNovaNetworkString, setNextSensor, setNMarines, setNPassenger, setOffBoard, setOriginalBuildYear, setOriginalJumpMP, setOwner, setOwnerId, setPassedThrough, setPassedThroughFacing, setPlayerPickedPassThrough, setPosition, setPosition, setPowerReverse, setProne, setQuirks, setRamming, setRapidFire, setReckless, setRecoveryTurn, setRemovalCondition, setRetreatedDirection, setSalvage, setSearchlightState, setSecondaryFacing, setSecondaryFacing, setSelfDestructedThisTurn, setSelfDestructing, setSelfDestructInitiated, setShutDown, setShutDownThisPhase, setSource, setSpotTargetId, setSpotting, setStartingAnyNWx, setStartingAnyNWy, setStartingAnySEx, setStartingAnySEy, setStartingOffset, setStartingPos, setStartingWidth, setStartupThisPhase, setStruck, setStructuralTechRating, setStructureTechLevel, setStructureType, setStructureType, setStuck, setSuperchargerUsed, setSwarmAttackerId, setSwarmTargetId, setTaggedBy, setTargetBay, setTaserFeedback, setTaserInterference, setTaserShutdownRounds, setTechLevel, setTowedBy, setTowing, setTractor, setTraitorId, setTsempEffect, setTurnInterrupted, setUnitNumber, setUnitRole, setUnjammingRAC, setUnloaded, setUsedSearchlight, setUseManualBV, setVectors, setVisibleToEnemy, setWeaponHit, setWeaponSortOrder, setWeapOrderChanged, setWhoCanDetect, setWhoCanSee, setWigeLiftoffHover, setYear, shouldDeploy, shouldOffBoardDeploy, shouldUseEdge, sideTable, sideTable, sideTable, sideTable, sideTableRam, slotNumber, specificName, statusToString, statusToString, statusToString, taserShutdown, toggleConversionMode, toString, towUnit, turnWasInterrupted, updateBays, updateDuplicateMarkerAfterDelete, usedSearchlight, usedTag, usesTurnMode, usesWeaponBays, wasLoadedThisTurn, wasNeverDeployed, wasStruck, weaponFired, weaponFiredFrom, whichBay, wigeLiftoffHover
Methods inherited from class megamek.common.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, rollInitiative, setInitCompensationBonus, setInitiative
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface megamek.common.BTObject
hasAerodyneSpheroidDistinction, isAerodyne, isAerospace, isAerospaceSV, isBattleArmor, isBattleMek, isCarryableObject, isCombatVehicle, isConventionalFighter, isConventionalInfantry, isDropShip, isFixedWingSupport, isGround, isHandheldWeapon, isIndustrialMek, isInfantry, isJumpShip, isLargeAerospace, isMek, isObjectiveMarker, isProtoMek, isQuadMek, isSingleUnit, isSmallCraft, isSpaceStation, isSupportVehicle, isTripodMek, isVehicle, isWarShip
Methods inherited from interface megamek.common.CombatRole
hasRole
Methods inherited from interface megamek.common.ForceAssignable
partOfForce
Methods inherited from interface megamek.common.IAero
canLandHorizontally, canLandVertically, canTakeOffHorizontally, canTakeOffVertically, checkDown, checkHover, checkLanding, checkManeuver, checkRolls, checkStall, checkThrustSI, checkThrustSITotal, checkVelocityDouble, checkVerticalTakeOff, getAltitude, getFuelUsed, getLandingCoords, getLandingLength, getTakeOffLength, hasRoomForHorizontalLanding, hasRoomForHorizontalTakeOff, hasRoomForVerticalLanding, isAirborne, isSpaceborne, land, liftOff, requiresFuel, rollArcs
Methods inherited from interface megamek.common.IBomber
clearBombs, getBombChoices, getBombPoints, getBombPoints, getBombs, getExternalBombPoints, getInternalBombsDamageTotal, getMaxExtBombSize, getMaxIntBombSize, getVTOLBombTarget, isVTOLBombing, setVTOLBombTarget
Methods inherited from interface megamek.common.InGameObject
hasOwner
Methods inherited from interface megamek.common.ITechnology
calcEraAvailability, calcEraAvailability, calcYearAvailability, calcYearAvailability, calcYearAvailability, findMinimumRulesLevel, findMinimumRulesLevel, getAdvancedRange, getAdvancedRange, 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, isLegal
Methods inherited from interface megamek.common.Targetable
isHexBeingBombed
Methods inherited from interface megamek.common.Transporter
canTow, getNumberLoadedThisTurn, getNumberUnloadedThisTurn, getType, hardpointCost
-
Field Details
-
MAX_SIZE
public static final int MAX_SIZE- See Also:
-
ALTERNATE_MAX_SIZE
public static final int ALTERNATE_MAX_SIZE- See Also:
-
-
Constructor Details
-
FighterSquadron
public FighterSquadron() -
FighterSquadron
-
-
Method Details
-
getCost
Description copied from class:Entity
Calculates 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. -
isCapitalFighter
public boolean isCapitalFighter()- Overrides:
isCapitalFighter
in classEntity
-
getOSI
public int getOSI() -
getSI
public int getSI() -
getTotalArmor
public int getTotalArmor()Description copied from class:Entity
Returns the total amount of armor on the entity.- Overrides:
getTotalArmor
in classEntity
-
getTotalOArmor
public int getTotalOArmor()Description copied from class:Entity
Returns the total amount of armor on the entity.- Overrides:
getTotalOArmor
in classEntity
-
isCrippled
public boolean isCrippled(boolean checkCrew) Per SO, fighter squadrons can't actually be crippled Individual crippled fighters should be detached and sent home, but it isn't required by the rules- Overrides:
isCrippled
in classAero
- Returns:
- boolean
- See Also:
-
getArmorRemainingPercent
public double getArmorRemainingPercent()Description copied from class:Entity
Returns the percent of the armor remaining- Overrides:
getArmorRemainingPercent
in classAero
-
getWalkMP
-
getCurrentThrust
public int getCurrentThrust()- Specified by:
getCurrentThrust
in interfaceIAero
- Overrides:
getCurrentThrust
in classAero
- Returns:
- same as
Aero.getWalkMP(megamek.common.MPCalculationSetting)
, but does not divide by 2 when grounded
-
getFuel
public int getFuel() -
getCurrentFuel
public int getCurrentFuel()- Specified by:
getCurrentFuel
in interfaceIAero
- Overrides:
getCurrentFuel
in classAero
-
getInternalRemainingPercent
public double getInternalRemainingPercent()Squadrons have an SI for PSR purposes, but don't take SI damage. This should return 100%.- Overrides:
getInternalRemainingPercent
in classAero
-
hasTargComp
public boolean hasTargComp()Description copied from class:Entity
Returns whether or not this entity has a Targeting Computer.- Overrides:
hasTargComp
in classEntity
-
hasActiveECM
public boolean hasActiveECM()Description copied from class:Entity
Does the Mek have a functioning ECM unit?- Overrides:
hasActiveECM
in classEntity
-
loadedUnitsHaveActiveECM
public boolean loadedUnitsHaveActiveECM()Description copied from class:Entity
Do units loaded onto this entity still have active ECM/ECCM/etc.?- Overrides:
loadedUnitsHaveActiveECM
in classEntity
-
addEntityBonuses
Description copied from class:Entity
Add in any piloting skill mods- Overrides:
addEntityBonuses
in classAero
-
getClusterMods
public int getClusterMods()Description copied from class:Aero
get modifications to the cluster hit table for critical hits- Specified by:
getClusterMods
in interfaceIAero
- Overrides:
getClusterMods
in classAero
-
doBattleValueCalculation
public int doBattleValueCalculation(boolean ignoreC3, boolean ignoreSkill, CalculationReport calculationReport) Description copied from class:Entity
Calculates 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:
doBattleValueCalculation
in classEntity
- Parameters:
ignoreC3
- When true, the BV contributions of any C3 computers are not addedignoreSkill
- When true, the skill of the crew / pilot is not taken into account for BVcalculationReport
- A CalculationReport to write the BV calculation to- Returns:
- The Battle Value of this unit calculated from its current state
-
getHeatSinks
public int getHeatSinks()- Specified by:
getHeatSinks
in interfaceIAero
- Overrides:
getHeatSinks
in classAero
-
getHeatCapacity
public int getHeatCapacity(boolean includeRadicalHeatSink) - Overrides:
getHeatCapacity
in classAero
-
resetHeatCapacity
public void resetHeatCapacity() -
getWeight
public double getWeight() -
rollHitLocation
public HitData rollHitLocation(int table, int side, int aimedLocation, AimingMode aimingMode, int cover) Description copied from class:Aero
Rolls up a hit location- Overrides:
rollHitLocation
in classAero
-
rollHitLocation
Description copied from class:Entity
Rolls up a hit location- Overrides:
rollHitLocation
in classAero
-
newRound
public void newRound(int roundNumber) Description copied from class:Entity
Start a new round- Specified by:
newRound
in interfaceRoundUpdated
- Overrides:
newRound
in classAero
- Parameters:
roundNumber
- theint
number of the new round
-
updateSensors
public void updateSensors()Update sensors. Use the active sensor of the first fighter in the squadron that hasn't taken 3 sensor hits BAPs don't count as active sensors in space, but they do make detection rolls easier -
updateWeaponGroups
public void updateWeaponGroups()instead of trying to track the individual units weapons, just recompile the weapon groups for this squadron each round -
updateSkills
public void updateSkills() -
getAmmo
-
useFuel
public void useFuel(int fuel) Description copied from interface:IAero
use the specified amount of fuel for this Aero. The amount may be adjusted by certain game options- Parameters:
fuel
- The number of fuel points to use
-
autoSetMaxBombPoints
public void autoSetMaxBombPoints()- Overrides:
autoSetMaxBombPoints
in classAeroSpaceFighter
-
setBombChoices
public void setBombChoices(int... bc) Description copied from interface:IBomber
Backwards compatibility bomb choice setter that only affects external stores. -
getBombLoadout
public int[] getBombLoadout()Produce an int array of the number of bombs of each type based on the current bomblist. Since this is a FighterSquadron, these numbers represent the number of bombs in a salvo. That is, it is a count of the number of fighters in the squadron that have a bomb of the particular type mounted.- Overrides:
getBombLoadout
in classEntity
- Returns:
- an int array of the number of bombs of each type based on the current bomb list
-
applyBombs
public void applyBombs()Description copied from interface:IBomber
Iterate through the bomb choices that were configured prior to deployment and add the corresponding equipment. -
computeSquadronBombLoadout
public void computeSquadronBombLoadout()This method looks at the bombs equipped on all the fighters in the squadron and determines what possible bombing attacks the squadrons can make. TODO: Make this into a generic "clean up bomb loadout" method -
getMaxSize
public int getMaxSize()- Returns:
- The maximum fighter count of a fighter squadron. This depends on game options ("Large Squadrons").
-
canLoad
Description copied from class:Aero
Determines if this object can accept the given unit. The unit may not be of the appropriate type or there may be no room for the unit. -
load
Description copied from class:Entity
Load the given unit.- Overrides:
load
in classEntity
- Parameters:
unit
- - theEntity
to be loaded.- Throws:
IllegalArgumentException
- If the unit can't be loaded
-
unload
Description copied from interface:Transporter
Unload the given unit.- Specified by:
unload
in interfaceTransporter
- Overrides:
unload
in classEntity
- Parameters:
unit
- - theEntity
to be unloaded.- Returns:
true
if the unit was contained in this space,false
otherwise.
-
getLoadedUnits
Description copied from class:Entity
Get aList
of the units currently loaded into this payload.- Specified by:
getLoadedUnits
in interfaceTransporter
- Overrides:
getLoadedUnits
in classEntity
- Returns:
- A
List
of loadedEntity
units. This list will never benull
, but it may be empty. The returnedList
is independent from the under- lying data structure; modifying one does not affect the other.
-
getUnusedString
Description copied from interface:Transporter
Return a string that identifies the unused capacity of this transporter.- Specified by:
getUnusedString
in interfaceTransporter
- Overrides:
getUnusedString
in classEntity
- Returns:
- A
String
meant for a human.
-
getUnused
public double getUnused()- Specified by:
getUnused
in interfaceTransporter
- Overrides:
getUnused
in classEntity
- Returns:
- the number of unused spaces in this transporter.
-
getUnused
Description copied from class:Entity
Returns the current amount of cargo space for an entity of the given type. -
isWeaponBlockedAt
public boolean isWeaponBlockedAt(int loc, boolean isRear) Description copied from interface:Transporter
Determine if transported units prevent a weapon in the given location from firing.- Specified by:
isWeaponBlockedAt
in interfaceTransporter
- Overrides:
isWeaponBlockedAt
in classEntity
- Parameters:
loc
- the location attempting to fire.isRear
- true if the weapon is rear-facing- Returns:
- True if a transported unit is in the way, false if the weapon can fire.
-
getExteriorUnitAt
Description copied from interface:Transporter
If a unit is being transported on the outside of the transporter, it can suffer damage when the transporter is hit by an attack. Currently, no more than one unit can be at any single location; that same unit can be "spread" over multiple locations.- Specified by:
getExteriorUnitAt
in interfaceTransporter
- Overrides:
getExteriorUnitAt
in classEntity
- Parameters:
loc
- - theint
location hit by attack.isRear
- - aboolean
value stating if the given location is rear facing; iffalse
, the location is front facing.- Returns:
- The
Entity
being transported on the outside at that location. This value will benull
if no unit is transported on the outside at that location.
-
getCargoMpReduction
- Specified by:
getCargoMpReduction
in interfaceTransporter
- Overrides:
getCargoMpReduction
in classEntity
- Returns:
- the MP reduction due to cargo carried by this transporter
-
getEntityType
public long getEntityType()- Overrides:
getEntityType
in classAeroSpaceFighter
-
getEngine
-
hasEngine
public boolean hasEngine() -
getMovementMode
Description copied from class:Entity
Get the movement mode of the entity- Overrides:
getMovementMode
in classEntity
-
getSubEntities
Description copied from class:Entity
This method (and getActiveSubEntities()) is meant for groups of entities handled as a singular one. Examples include fighter squadrons on space maps or lances in BattleForce game modes.To check if a given entity consists of multiple sub-entities, use
if (entity.getSubEntities().isPresent()) { ... }
To iterate over entities (if present), use:
entity.getSubEntities().ifPresent(entities -> entities.forEach( subEntity -> { ... });
- Overrides:
getSubEntities
in classEntity
- Returns:
- an optional collection of sub-entities, if this entity is considered a grouping of them.
-
getActiveSubEntities
Description copied from class:Entity
A list of all active sub-entities. In most cases, this is simply an empty list.- Overrides:
getActiveSubEntities
in classEntity
- Returns:
- an optional collection of sub-entities, if this entity is considered a grouping of them, pre-filtered to only contain active (non-destroyed and non-doomed) entities.
-
isUnitGroup
public boolean isUnitGroup()Description copied from interface:BTObject
Returns true when this is a group of units or elements such as a TW Squadron, BF Unit or SBF Formation even if it happens to contain only a single element at the time.- Returns:
- True when this is a group type unit
-
isFighter
public boolean isFighter()Description copied from interface:BTObject
Returns true when this object is a fighter (aerospace or conventional) including Fixed-Wing Support or of type CF/AF/SV(MV a) for Alpha Strike. Returns false for any type of unit group even if it is of the right type.- Specified by:
isFighter
in interfaceBTObject
- Overrides:
isFighter
in classAeroSpaceFighter
- Returns:
- True when this is a fighter including fixed-wing support
-
isCapitalScale
public boolean isCapitalScale()- Overrides:
isCapitalScale
in classEntity
- Returns:
- True when this unit has capital-scale armor.
-
setTransportId
public void setTransportId(int transportId) Override of Entity method. This needs to be set or we can't do a reverse lookup from a Capital Fighter to its Squadron.- Overrides:
setTransportId
in classEntity
- Parameters:
transportId
- - theint
ID of our transport. The ID is not validated. This value should beEntity.NONE
if this unit has been unloaded.
-
damageCapFighterWeapons
public void damageCapFighterWeapons(int loc) Damage a capital fighter's weapons. WeaponGroups are damaged by critical hits. This matches up the individual fighter's weapons and critical slots and damages those for MHQ resolution- Parameters:
loc
- - Int corresponding to the location struck
-