Package megamek.common.alphaStrike
Interface ASCardDisplayable
- All Superinterfaces:
BattleForceSUAFormatter,BTObject,CombatRole
- All Known Implementing Classes:
AlphaStrikeElement,MekSummary
This interface is implemented by classes that can be displayed on an AlphaStrike card
ASCard. Implementing classes must be able to return the AlphaStrike
values printed on a card. Currently implemented by MekSummary and AlphaStrikeElement. This interface also offers some
utility methods for unit information that can be directly derived from the available data; those don't require any
overriding (e.g. isLargeAerospace()). It also has methods that return current (= possibly damaged) values of
an element. These return an undamaged state by default and thus require overriding in AlphaStrikeElement (e.g.
getCurrentArmor()).-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefault StringReturns the general name or type name of this unit/object.default intdefault intintintgetModel()intgetMulId()intgetOV()intintgetSize()default intgetSkill()intintintgetTMM()default booleanReturns true when this element has air movement of any kind.default booleanReturns true when this element has ground movement of any kind.default booleanhasMovementMode(String mode) default booleanhasOV()default booleanReturns true when this element has any water movement of any kind.default booleanisAero()Returns true when this object uses or can use aerospace movement.default booleanReturns true when this object is an aerospace fighter (not conventional, nor Fixed-Wing Support) or of type AF for Alpha Strike.default booleanReturns true if this AS element is an aerospace SV, i.e.default booleanReturns true when this object is a BattleArmor unit or of type BA for Alpha Strike.default booleanReturns true when this object is a BattleMek or of type BM for Alpha Strike.default booleanReturns true when this object is a ground Combat Vehicle, including VTOL but not including Support Vehicles, or of type CV for Alpha Strike.default booleanReturns true when this object is a conventional fighter (not aerospace, nor Fixed-Wing Support) or of type CF for Alpha Strike.default booleanReturns true when this object is a Conventional Infantry unit or of type CI for Alpha Strike.default booleanReturns true when this object is a DropShip.default booleanReturns 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.default booleanReturns true when this object is a Fixed-Wing Support or of type SV(MV a) for Alpha Strike.default booleanReturns true when this object is an Industrial Mek or of type IM for Alpha Strike.default booleandefault booleanReturns true when this object is a JumpShip (but not a Space Station nor a WarShip).default booleanReturns true when this object is a large aerospace unit (SmallCraft, DropShip, JumpShip, WarShip, Space Station).default booleanisMek()Returns true when this object is a Mek (Industrial Mek or BattleMek) or of type BM/IM for Alpha Strike.default booleanReturns true when this object is a ProtoMek or of type PM for Alpha Strike.default booleanReturns true when this object is a Quad Mek or QuadVee, regardless of conversion state.default booleanReturns true when this object is a SmallCraft (not a DropShip).default booleanReturns true when this object is a SpaceStation (but not a WarShip nor a JumpShip).default booleanReturns true when this object has the distinction between aerodyne and spheroid, i.e.default booleanReturns true when this AS element is a submarine.default booleanReturns true when this object is a Support Vehicle of any kind (including ground and aerospace).default booleanReturns true when this object is a Tripod Mek.default booleanisType(ASUnitType type, ASUnitType... furtherTypes) default booleanReturns true when this object is a WarShip (but not a Space Station nor a JumpShip).default StringReturns the specific name or type name of this unit/object.default booleanusesArcs()Returns true if this unit uses the 4 firing arcs of Warships, Dropships and other units.default booleandefault booleanusesOV()default booleanusesSML()default booleanusesSMLE()default booleandefault booleanusesTMM()Methods inherited from interface megamek.common.strategicBattleSystems.BattleForceSUAFormatter
formatSUA, showSUAMethods inherited from interface megamek.common.units.BTObject
getFluffImage, getIcon, hasAerodyneSpheroidDistinction, isAerodyne, isAerospace, isBattlefieldSupportAsset, isCarryableObject, isGround, isHandheldWeapon, isInfantry, isObjectiveMarker, isSingleUnit, isUnitGroup, isVehicleMethods inherited from interface megamek.common.interfaces.CombatRole
getRole, hasRole
-
Method Details
-
generalName
Description copied from interface:BTObjectReturns the general name or type name of this unit/object. For standard individual units, this is the chassis. For other types of units or objects this can be the full designation or a general part of the designation. Much like the chassis, this can be much more narrow than the general type of unit ("Mek").The general name should not be empty and not return null. Return the chassis in Entity and AlphaStrikeElement.
- Specified by:
generalNamein interfaceBTObject- Returns:
- The general name / chassis
-
specificName
Description copied from interface:BTObjectReturns the specific name or type name of this unit/object. For standard individual units, this is the model. For other types of units or objects this can be a part of the designation, or empty.The specific name should not return null. Return the model in Entity and AlphaStrikeElement.
- Specified by:
specificNamein interfaceBTObject- Returns:
- The specific name / model
-
getModel
String getModel()- Returns:
- The AS element's model, such as "AS7-D".
-
getChassis
String getChassis()- Returns:
- The AS element's chassis, such as "Atlas".
-
getFullChassis
String getFullChassis() -
getMulId
int getMulId()- Returns:
- This AS element's MUL ID if it has one, -1 otherwise.
-
getPointValue
int getPointValue()- Returns:
- The AS element's Point Value (PV). This is not adjusted for damage on the element.
-
getSkill
default int getSkill()- Returns:
- The AS element's Pilot Skill (SKILL). Unless another skill has been set, this is 4.
-
getASUnitType
ASUnitType getASUnitType()- Returns:
- The AS element's type (TP), e.g. BM or CV.
-
getSize
int getSize()- Returns:
- The AS element's size (SZ).
-
getTMM
int getTMM()- Returns:
- The AS element's Target Movement Modifier (TMM).
-
getMovement
- Returns:
- The AS element's entire movement capability (MV).
-
getPrimaryMovementMode
String getPrimaryMovementMode()- Returns:
- The primary (= first) movement type String, such as "" for some ground units or "s" for submarines.
-
getStandardDamage
ASDamageVector getStandardDamage()- Returns:
- The standard damage (SML or SMLE depending on type). This will be empty for elements that use arcs.
-
getOV
int getOV()- Returns:
- The AS element's extra Overheat Damage capability (OV) (not the current heat buildup).
-
hasOV
default boolean hasOV()- Returns:
- True if this AS element has an OV value other than 0.
-
usesOV
default boolean usesOV()- Returns:
- True when this AS element is of a type that tracks heat levels and can have the OV and OVL abilities (BM, IM and AF).
-
getFrontArc
ASArcSummary getFrontArc()- Returns:
- The AS element's front arc. Returns an empty arc for elements that don't use arcs.
-
getLeftArc
ASArcSummary getLeftArc()- Returns:
- The AS element's left arc. Returns an empty arc for elements that don't use arcs.
-
getRightArc
ASArcSummary getRightArc()- Returns:
- The AS element's right arc. Returns an empty arc for elements that don't use arcs.
-
getRearArc
ASArcSummary getRearArc()- Returns:
- The AS element's rear arc. Returns an empty arc for elements that don't use arcs.
-
getThreshold
int getThreshold()- Returns:
- The AS element's armor threshold (TH), if it uses threshold.
-
usesThreshold
default boolean usesThreshold()- Returns:
- True if this AS element uses the Threshold value (equivalent to
BTObject.isAerospace()).
-
getFullArmor
int getFullArmor()- Returns:
- The AS element's full (=undamaged) Armor (A).
-
getCurrentArmor
default int getCurrentArmor()- Returns:
- The AS element's current Armor (A).
-
getFullStructure
int getFullStructure()- Returns:
- The AS element's full (=undamaged) Structure (S).
-
getCurrentStructure
default int getCurrentStructure()- Returns:
- The AS element's current Structure (S).
-
getSquadSize
int getSquadSize()- Returns:
- The squad size (typically 4, 5 or 6), if this AS element is a BA.
-
getSpecialAbilities
ASSpecialAbilityCollection getSpecialAbilities()- Returns:
- The element's central special abilities (not those in arcs).
-
hasMovementMode
- Returns:
- True if this AS element has the given movement mode, including LAM's a/g modes.
-
isFighter
default boolean isFighter()Description copied from interface:BTObjectReturns 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. -
isMek
default boolean isMek()Description copied from interface:BTObjectReturns true when this object is a Mek (Industrial Mek or BattleMek) or of type BM/IM for Alpha Strike. Returns false for any type of unit group even if it is of the right type. -
isBattleMek
default boolean isBattleMek()Description copied from interface:BTObjectReturns true when this object is a BattleMek or of type BM for Alpha Strike. Returns false for any type of unit group even if it is of the right type.- Specified by:
isBattleMekin interfaceBTObject- Returns:
- True if this AS element is a BattleMek (BM).
-
isProtoMek
default boolean isProtoMek()Description copied from interface:BTObjectReturns true when this object is a ProtoMek or of type PM for Alpha Strike. Returns false for any type of unit group even if it is of the right type.- Specified by:
isProtoMekin interfaceBTObject- Returns:
- True if this AS element is a ProtoMek (PM).
-
isLargeAerospace
default boolean isLargeAerospace()Description copied from interface:BTObjectReturns true when this object is a large aerospace unit (SmallCraft, DropShip, JumpShip, WarShip, Space Station). Returns false for any type of unit group even if it is of the right type.- Specified by:
isLargeAerospacein interfaceBTObject- Returns:
- True if this AS element is a large Aerospace unit, i.e. SC, DS, DA, SS, JS, WS.
-
isBattleArmor
default boolean isBattleArmor()Description copied from interface:BTObjectReturns true when this object is a BattleArmor unit or of type BA for Alpha Strike. Returns false for any type of unit group even if it is of the right type.- Specified by:
isBattleArmorin interfaceBTObject- Returns:
- True if this AS element is a BattleArmor unit, i.e. BA.
-
isConventionalInfantry
default boolean isConventionalInfantry()Description copied from interface:BTObjectReturns true when this object is a Conventional Infantry unit or of type CI for Alpha Strike. Returns false for any type of unit group even if it is of the right type.- Specified by:
isConventionalInfantryin interfaceBTObject- Returns:
- True if this AS element is a Conventional Infantry unit, i.e. CI.
-
isAero
default boolean isAero()Description copied from interface:BTObjectReturns true when this object uses or can use aerospace movement. This includes all aerospace units as well as LAMs (in fighter mode when in a TW game). Returns false for any type of unit group even if it is of the right type.Note that this is not equivalent to "this instanceof Aero" as LAMs are not an Aero subclass. It is also not equivalent to "this instanceof IAero" as LAMs are always IAero but only return true for isAero() when they are in fighter conversion mode. The following cast can be safely made:
if (entity.isAero()) { IAero iAero = (IAero) entity; } -
isAerospaceSV
default boolean isAerospaceSV()Returns true if this AS element is an aerospace SV, i.e. an SV with a movement mode of "a", "k", "i", and "p".- Specified by:
isAerospaceSVin interfaceBTObject- Returns:
- True if this AS element is an aerospace SV.
-
isSupportVehicle
default boolean isSupportVehicle()Description copied from interface:BTObjectReturns true when this object is a Support Vehicle of any kind (including ground and aerospace). Returns false for any type of unit group even if it is of the right type.- Specified by:
isSupportVehiclein interfaceBTObject- Returns:
- True if this AS element is a support vehicle of any kind (SV).
-
isConventionalFighter
default boolean isConventionalFighter()Description copied from interface:BTObjectReturns true when this object is a conventional fighter (not aerospace, nor Fixed-Wing Support) or of type CF for Alpha Strike. Returns false for any type of unit group even if it is of the right type.- Specified by:
isConventionalFighterin interfaceBTObject- Returns:
- True when this is a conventional fighter including fixed-wing support
-
isAerospaceFighter
default boolean isAerospaceFighter()Description copied from interface:BTObjectReturns true when this object is an aerospace fighter (not conventional, nor Fixed-Wing Support) or of type AF for Alpha Strike. Returns false for any type of unit group even if it is of the right type.- Specified by:
isAerospaceFighterin interfaceBTObject- Returns:
- True when this is an aerospace fighter
-
isFixedWingSupport
default boolean isFixedWingSupport()Description copied from interface:BTObjectReturns true when this object is a Fixed-Wing Support or of type SV(MV a) for Alpha Strike. Returns false for any type of unit group even if it is of the right type.- Specified by:
isFixedWingSupportin interfaceBTObject- Returns:
- True when this is a fixed-wing support unit
-
isCombatVehicle
default boolean isCombatVehicle()Description copied from interface:BTObjectReturns true when this object is a ground Combat Vehicle, including VTOL but not including Support Vehicles, or of type CV for Alpha Strike. Returns false for any type of unit group even if it is of the right type.- Specified by:
isCombatVehiclein interfaceBTObject- Returns:
- True if this AS element is a combat vehicle (CV, not support vehicle).
-
usesSML
default boolean usesSML()- Returns:
- True if this AS element uses three range bands S, M and L (equivalent to
BTObject.isGround()).
-
usesSMLE
default boolean usesSMLE()- Returns:
- True if this AS element uses four range bands S, M, L and E (equivalent to
BTObject.isAerospace()).
-
isTripodMek
default boolean isTripodMek()Description copied from interface:BTObjectReturns true when this object is a Tripod Mek. Returns false for any type of unit group even if it consists only of Tripods.- Specified by:
isTripodMekin interfaceBTObject- Returns:
- True when this is a Tripod Mek
-
isQuadMek
default boolean isQuadMek()Description copied from interface:BTObjectReturns true when this object is a Quad Mek or QuadVee, regardless of conversion state. Returns false for any type of unit group even if it consists only of Quad Meks. -
isSmallCraft
default boolean isSmallCraft()Description copied from interface:BTObjectReturns true when this object is a SmallCraft (not a DropShip). Returns false for any type of unit group.- Specified by:
isSmallCraftin interfaceBTObject- Returns:
- True when this is a SmallCraft
-
isDropShip
default boolean isDropShip()Description copied from interface:BTObjectReturns true when this object is a DropShip. Returns false for any type of unit group.- Specified by:
isDropShipin interfaceBTObject- Returns:
- True when this is a DropShip
-
isSpheroid
default boolean isSpheroid()Description copied from interface:BTObjectReturns true when this object has the distinction between aerodyne and spheroid, i.e. if it is a DropShip or SmallCraft, and it is spheroid, false for any other type of object. Returns false for any type of unit group and for any unit that does not have the distinction.- Specified by:
isSpheroidin interfaceBTObject- Returns:
- True when this is object is spheroid
-
usesArcs
default boolean usesArcs()Returns true if this unit uses the 4 firing arcs of Warships, Dropships and other units. When this is the case,getStandardDamage()will return zero damage and the actual damage values are contained in the arcs.- Returns:
- True if this unit uses firing arcs
-
usesCapitalWeapons
default boolean usesCapitalWeapons()- Returns:
- True if this AS element uses CAP weapons in its arcs, i.e. WS, SS or JS.
-
isType
- Returns:
- True if this AS element is any of the given types.
-
isJumpCapable
default boolean isJumpCapable()- Returns:
- True when this AS element is jump-capable. This is the case when its movement modes contains the "j" movement mode.
-
isSubmarine
default boolean isSubmarine()Returns true when this AS element is a submarine. This checks if it is a combat vehicle and has the "s" primary movement type.- Returns:
- True when this AS element is as a submarine
-
usesTMM
default boolean usesTMM()- Returns:
- True when this element uses TMM; equivalent to !
BTObject.isAerospace().
-
hasWaterMovement
default boolean hasWaterMovement()Returns true when this element has any water movement of any kind.movement type of (n, s, h, g) Mek ProtoMek
-
hasGroundMovement
default boolean hasGroundMovement()Returns true when this element has ground movement of any kind.movement type of (w, t, h, g, f, m, j) Mek ProtoMek
-
hasAirMovement
default boolean hasAirMovement()Returns true when this element has air movement of any kind.movement type of (v, g, a, p)
-
isIndustrialMek
default boolean isIndustrialMek()Description copied from interface:BTObjectReturns true when this object is an Industrial Mek or of type IM for Alpha Strike. Returns false for any type of unit group even if it is of the right type.- Specified by:
isIndustrialMekin interfaceBTObject- Returns:
- True when this is an Industrial Mek (not a BattleMek)
-
isWarShip
default boolean isWarShip()Description copied from interface:BTObjectReturns true when this object is a WarShip (but not a Space Station nor a JumpShip). Returns false for any type of unit group. -
isJumpShip
default boolean isJumpShip()Description copied from interface:BTObjectReturns true when this object is a JumpShip (but not a Space Station nor a WarShip). Returns false for any type of unit group.- Specified by:
isJumpShipin interfaceBTObject- Returns:
- True when this is a JumpShip
-
isSpaceStation
default boolean isSpaceStation()Description copied from interface:BTObjectReturns true when this object is a SpaceStation (but not a WarShip nor a JumpShip). Returns false for any type of unit group.- Specified by:
isSpaceStationin interfaceBTObject- Returns:
- True when this is a SpaceStation
-