Package megamek.common.actions.sbf
Class AbstractSBFAttackAction
java.lang.Object
megamek.common.actions.sbf.AbstractSBFAttackAction
- All Implemented Interfaces:
Serializable,EntityAction,SBFAction,SBFAttackAction
- Direct Known Subclasses:
SBFArtilleryAttack,SBFStandardUnitAttack,SBFUnitToHexAttack
public abstract class AbstractSBFAttackAction
extends Object
implements SBFAttackAction, Serializable
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface megamek.common.actions.EntityAction
toAccessibilityDescription, toSummaryStringMethods inherited from interface megamek.common.actions.sbf.SBFAction
getHandler, isDataValid
-
Constructor Details
-
AbstractSBFAttackAction
public AbstractSBFAttackAction(int entityId, int targetId)
-
-
Method Details
-
getEntityId
public int getEntityId()- Specified by:
getEntityIdin 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 allInGameObjects that are handled in the game.
-
getTargetId
public int getTargetId()- Specified by:
getTargetIdin interfaceSBFAttackAction- Returns:
- The game ID of the target of the attack
-
toString
-