Class RecoveringNerveAction
java.lang.Object
megamek.common.autoresolve.acar.action.RecoveringNerveAction
- All Implemented Interfaces:
EntityAction
,Action
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionint
getHandler
(SimulationManager gameManager) boolean
isDataValid
(SimulationContext context) Validates the data of this action.toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface megamek.common.actions.EntityAction
toAccessibilityDescription, toSummaryString
-
Constructor Details
-
RecoveringNerveAction
public RecoveringNerveAction(int formationId)
-
-
Method Details
-
getEntityId
public int getEntityId()- Specified by:
getEntityId
in interfaceEntityAction
- 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 allInGameObject
s that are handled in the game.
-
getHandler
- Specified by:
getHandler
in interfaceAction
- Returns:
- A handler that will process this action as an extension of the SBFGameManager
-
isDataValid
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 interfaceAction
- Parameters:
context
- The simulation context- Returns:
- true when this action is valid, false otherwise
-
toString
-