Enum Class VariableRangeTargetingMode

java.lang.Object
java.lang.Enum<VariableRangeTargetingMode>
megamek.common.enums.VariableRangeTargetingMode
All Implemented Interfaces:
Serializable, Comparable<VariableRangeTargetingMode>, Constable

public enum VariableRangeTargetingMode extends Enum<VariableRangeTargetingMode>
Represents the targeting mode for the Variable Range Targeting quirk.

Per BMM pg. 86: - Player selects Long or Short mode during End Phase for the NEXT turn - LONG mode: -1 TN at long range, +1 TN at short range - SHORT mode: -1 TN at short range, +1 TN at long range - Medium range is unaffected by either mode

  • Enum Constant Details

    • LONG

      public static final VariableRangeTargetingMode LONG
      Long range preference: -1 to long range attacks, +1 to short range attacks
    • SHORT

      public static final VariableRangeTargetingMode SHORT
      Short range preference: -1 to short range attacks, +1 to long range attacks
  • Method Details

    • values

      public static VariableRangeTargetingMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static VariableRangeTargetingMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • isLong

      public boolean isLong()
    • isShort

      public boolean isShort()
    • defaultMode

      public static VariableRangeTargetingMode defaultMode()
      Returns the default targeting mode (LONG).
      Returns:
      the default VariableRangeTargetingMode
    • getShortRangeModifier

      public int getShortRangeModifier()
      Returns the short range modifier for this mode.
      Returns:
      -1 for SHORT mode (bonus), +1 for LONG mode (penalty)
    • getLongRangeModifier

      public int getLongRangeModifier()
      Returns the long range modifier for this mode.
      Returns:
      -1 for LONG mode (bonus), +1 for SHORT mode (penalty)