Class RecoveringNerveAction

java.lang.Object
megamek.common.autoresolve.acar.action.RecoveringNerveAction
All Implemented Interfaces:
EntityAction, Action

public class RecoveringNerveAction extends Object implements Action
  • Constructor Details

    • RecoveringNerveAction

      public RecoveringNerveAction(int formationId)
  • Method Details

    • getEntityId

      public int getEntityId()
      Specified by:
      getEntityId in interface EntityAction
      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.
    • getHandler

      public ActionHandler getHandler(SimulationManager gameManager)
      Specified by:
      getHandler in interface Action
      Returns:
      A handler that will process this action as an extension of the SBFGameManager
    • isDataValid

      public boolean isDataValid(SimulationContext context)
      Description copied from interface: Action
      Validates the data of this action. Validation should not check game rule details, only if the action can be handled without running into missing or false data (NullPointerExceptions). Errors should be logged. The action will typically be ignored and removed if validation fails.
      Specified by:
      isDataValid in interface Action
      Parameters:
      context - The simulation context
      Returns:
      true when this action is valid, false otherwise
    • toString

      public String toString()
      Overrides:
      toString in class Object