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 TypeMethodDescriptionboolean
isPossible
(Game game) static boolean
isPossible
(Game game, int attackerId, Targetable target, SearchlightAttackAction exempt) resolveAction
(Game game) illuminate an entity and all entities that are between us and the hexboolean
setHexesIlluminated
(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.boolean
willIlluminate
(Game game, Entity who) Methods inherited from class megamek.common.actions.AbstractAttackAction
getEntity, getEntity, getTarget, getTargetId, getTargetType, nightModifiers, setTargetId, setTargetType, toAccessibilityDescription, toString
Methods inherited from class megamek.common.actions.AbstractEntityAction
getEntityId
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
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
- TheGame
to update- Returns:
- True if new hexes were added, else false.
-
willIlluminate
-
toSummaryString
Description copied from interface:EntityAction
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 inTurnDetailsOverlay
.- Parameters:
game
- The game object to get information from- Returns:
- A short String describing the action
- See Also:
-