Package megamek.common.actions
Class SearchlightAttackAction
java.lang.Object
megamek.common.actions.AbstractEntityAction
megamek.common.actions.AbstractAttackAction
megamek.common.actions.SearchlightAttackAction
- All Implemented Interfaces:
Serializable,AttackAction,EntityAction
Used for aiming a searchlight at a target.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSearchlightAttackAction(int entityId, int targetId) SearchlightAttackAction(int entityId, int targetType, int targetId) -
Method Summary
Modifier and TypeMethodDescriptionbooleanisPossible(Game game) static booleanisPossible(Game game, int attackerId, Targetable target, SearchlightAttackAction exempt) resolveAction(Game game) illuminate an entity and all entities that are between us and the hexbooleansetHexesIlluminated(Game game) Updates the supplied Game's list of hexes illuminated.toSummaryString(Game game) Returns a short one-line description of the action that is used in the UI, e.g.booleanwillIlluminate(Game game, Entity who) Methods inherited from class megamek.common.actions.AbstractAttackAction
getEntity, getEntity, getTarget, getTargetId, getTargetType, nightModifiers, setTargetId, setTargetType, toAccessibilityDescription, toStringMethods inherited from class megamek.common.actions.AbstractEntityAction
getEntityIdMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface megamek.common.actions.EntityAction
getEntityId
-
Constructor Details
-
SearchlightAttackAction
public SearchlightAttackAction(int entityId, int targetId) -
SearchlightAttackAction
public SearchlightAttackAction(int entityId, int targetType, int targetId)
-
-
Method Details
-
isPossible
-
isPossible
public static boolean isPossible(Game game, int attackerId, Targetable target, SearchlightAttackAction exempt) -
resolveAction
illuminate an entity and all entities that are between us and the hex -
setHexesIlluminated
Updates the supplied Game's list of hexes illuminated.- Parameters:
game- TheGameto update- Returns:
- True if new hexes were added, else false.
-
willIlluminate
-
toSummaryString
Description copied from interface:EntityActionReturns 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:
-