Package megamek.common.actions
Interface EntityAction
- All Known Subinterfaces:
Action,AttackAction,AttackAction,SBFAction,SBFAttackAction
- All Known Implementing Classes:
AbstractAttackAction,AbstractAttackAction,AbstractEntityAction,AbstractSBFAttackAction,ActivateBloodStalkerAction,AirMekRamAttackAction,ArtilleryAttackAction,BAVibroClawAttackAction,BreakGrappleAttackAction,BrushOffAttackAction,CallElevatorAction,ChargeAttackAction,ClearMinefieldAction,ClubAttackAction,DfaAttackAction,DirectionalMountFacingAction,DisengageAction,DisplacementAttackAction,DodgeAction,FindClubAction,FiringModeChangeAction,FlipArmsAction,GhostTargetAction,GrappleAttackAction,InfantryCombatAction,InitiateInfantryCombatAction,JumpJetAttackAction,KickAttackAction,LayExplosivesAttackAction,MoraleCheckAction,MoveAction,MoveToCoverAction,NukeDetonatedAction,OrbitToSurfaceAttackAction,PheromoneAttackAction,PhysicalAttackAction,ProtoMekPhysicalAttackAction,PunchAttackAction,PushAttackAction,RamAttackAction,RecoveringNerveAction,ReinforceInfantryCombatAction,RepairWeaponMalfunctionAction,SBFArtilleryAttack,SBFDirectArtilleryAttack,SBFIndirectArtilleryAttack,SBFMovePath,SBFStandardUnitAttack,SBFUnitToHexAttack,SearchlightAttackAction,SpotAction,StandardUnitAttack,SuicideImplantsAttackAction,TeleMissileAttackAction,ThrashAttackAction,TorsoTwistAction,ToxinAttackAction,TriggerAPPodAction,TriggerBPodAction,TripAttackAction,UnjamAction,UnjamTurretAction,UnloadStrandedAction,WeaponAttackAction,WithdrawAction,WithdrawInfantryCombatAction,WoodsClearingAttackAction
public interface EntityAction
This interface is implemented by all actions that game units - not restricted to Entity! - can perform, such as
attacks, charges or spotting. Basic movement is currently not represented by this interface.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionintdefault StringtoAccessibilityDescription(Client client) Returns a full description of the action that is (only) to be used in theAccessibilityDialogas a textual representation of the action.default StringtoSummaryString(Game game) Returns a short one-line description of the action that is used in the UI, e.g.
-
Method Details
-
getEntityId
int getEntityId()- Returns:
- The ID of the acting game unit. Note that when an entity is destroyed, it may no longer be available from
Game.getEntity(int)but rather only fromGame.getOutOfGameEntity(int)orGame.getEntityFromAllSources(int). As this can happen in the middle of resolving complicated situations in the GameManager, this is a potential cause for bugs.
Note that this is not restricted toEntity; it can be used for allInGameObjects that are handled in the game.
-
toAccessibilityDescription
Returns a full description of the action that is (only) to be used in theAccessibilityDialogas a textual representation of the action. By default, this method returns the value of toString().- Parameters:
client- The local client to obtain any necessary information for the description- Returns:
- A string describing the action
- See Also:
-
toSummaryString
Returns a short one-line description of the action that is used in the UI, e.g. on attack arrows in the BoardView and in the action summary inTurnDetailsOverlay.- Parameters:
game- The game object to get information from- Returns:
- A short String describing the action
- See Also:
-