Class SBFUnitToHexAttack

java.lang.Object
megamek.common.actions.sbf.AbstractSBFAttackAction
megamek.common.actions.sbf.SBFUnitToHexAttack
All Implemented Interfaces:
Serializable, EntityAction, SBFAction, SBFAttackAction

@Deprecated(since="0.51.0", forRemoval=true) public class SBFUnitToHexAttack extends AbstractSBFAttackAction
Deprecated, for removal: This API element is subject to removal in a future version.
See Also:
  • Constructor Details

    • SBFUnitToHexAttack

      public SBFUnitToHexAttack(int formationId, int unitNumber, BoardLocation target)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Creates a standard attack of an SBF Unit on another formation. The unit number identifies the SBF Unit making the attack, i.e. 1 for the first of the formation's units, 2 for the second etc.
      Parameters:
      formationId - The attacker's ID
      unitNumber - The number of the attacking SBF Unit inside the formation
      target - The location to attack
  • Method Details

    • getUnitNumber

      public int getUnitNumber()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the number of the SBF Unit making the attack, i.e. 1 for the first of the formation's units, 2 for the second.
      Returns:
      The unit number within the formation
    • getHandler

      public SBFActionHandler getHandler(SBFGameManager gameManager)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      A handler that will process this action as an extension of the SBFGameManager
    • isDataValid

      public boolean isDataValid(SBFGame game)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: SBFAction
      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.
      Parameters:
      game - The game
      Returns:
      true when this action is valid, false otherwise