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 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 from Game.getOutOfGameEntity(int) or Game.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 to Entity; it can be used for all InGameObjects that are handled in the game.
    • toAccessibilityDescription

      default String toAccessibilityDescription(Client client)
      Returns a full description of the action that is (only) to be used in the AccessibilityDialog as 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

      default String toSummaryString(Game game)
      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 in TurnDetailsOverlay.
      Parameters:
      game - The game object to get information from
      Returns:
      A short String describing the action
      See Also: