Package megamek.common.units
Interface Deployable
- All Known Implementing Classes:
AbstractBuildingEntity,Aero,AeroSpaceFighter,AlphaStrikeElement,BattleArmor,BattlefieldSupportAsset,BipedMek,BuildingEntity,CombatVehicleEscapePod,ConvFighter,ConvInfantry,Dropship,EjectedCrew,Entity,EscapePods,FighterSquadron,FixedWingSupport,Formation,GunEmplacement,HandheldWeapon,Infantry,Jumpship,LandAirMek,LargeSupportTank,Mek,MekWarrior,MekWithArms,MobileStructure,ProtoMek,QuadMek,QuadVee,SBFFormation,SmallCraft,SpaceStation,SuperHeavyTank,SupportTank,SupportVTOL,Tank,TeleMissile,TripodMek,VTOL,Warship
public interface Deployable
This interface is implemented by those units (by InGameObjects) that can be deployed either offboard or on a board.
There are InGameObjects that are only targets (HexTarget) and may thus not actually be deployable. All Deployable
objects could theoretically be listed in the lobby's unit list.
-
Method Summary
Modifier and TypeMethodDescriptiondefault intintReturns the round that this unit/object is to be deployed on the board or offboard.default HexAreadefault booleanbooleanReturns true when this unit/object is deployed, i.e.
-
Method Details
-
isDeployed
boolean isDeployed()Returns true when this unit/object is deployed, i.e. it has arrived in the game and may perform actions or be targeted by actions. Usually that means it has a fixed position on a board. Offboard units also count as un-deployed as long as they cannot perform actions and as deployed when they can. -
getDeployRound
int getDeployRound()Returns the round that this unit/object is to be deployed on the board or offboard. -
hasFleeZone
default boolean hasFleeZone()- Returns:
- True if this unit has its own area it is allowed to flee the board(s) from; false if the unit's owner should be asked instead.
-
getFleeZone
- Returns:
- The area of the board(s) this unit is allowed to flee from; the return value is only valid when
hasFleeZone()returns true. Normally this method should not be called, useAbstractGame.canFleeFrom(Deployable, Coords)instead. - See Also:
-
getBoardId
default int getBoardId()- Returns:
- The board ID of the board this deployable is on.
-