Class CoreRulesUnderwater

java.lang.Object
megamek.common.rules.RulesUnderwater
megamek.common.rules.core.CoreRulesUnderwater

public class CoreRulesUnderwater extends RulesUnderwater
  • Constructor Details

    • CoreRulesUnderwater

      public CoreRulesUnderwater()
  • Method Details

    • getBreachTarget

      public int getBreachTarget()
      What is the target number for the breach. Underwater target number is 5+ to avoid
      Specified by:
      getBreachTarget in class RulesUnderwater
      Returns:
      the breach target number
    • treatBreachedLegAsDestroyed

      public boolean treatBreachedLegAsDestroyed()
      Core p.127 treats a breached leg as destroyed, replacing its actuator damage effects.
      Specified by:
      treatBreachedLegAsDestroyed in class RulesUnderwater
      Returns:
      true if a breached leg is treated as destroyed
    • waterBlocksLOS

      public boolean waterBlocksLOS()
      Does water block LOS? Underwater does not break LOS. Core p.58, 62
      Specified by:
      waterBlocksLOS in class RulesUnderwater
      Returns:
      true if water blocks line of sight
    • getShortRange

      public int getShortRange(WeaponType weaponType)
      Get the short range of the weapon in water
      Specified by:
      getShortRange in class RulesUnderwater
      Parameters:
      weaponType -
      Returns:
      short range
    • getMediumRange

      public int getMediumRange(WeaponType weaponType)
      Get the medium range of the weapon in water
      Specified by:
      getMediumRange in class RulesUnderwater
      Parameters:
      weaponType -
      Returns:
      medium range
    • getLongRange

      public int getLongRange(WeaponType weaponType)
      Get the long range of the weapon in water
      Specified by:
      getLongRange in class RulesUnderwater
      Parameters:
      weaponType -
      Returns:
      long range
    • getExtremeRange

      public int getExtremeRange(WeaponType weaponType)
      Get the extreme range of the weapon in water
      Specified by:
      getExtremeRange in class RulesUnderwater
      Parameters:
      weaponType -
      Returns:
      extreme range
    • allowsLosRange

      public boolean allowsLosRange(WeaponType weaponType)
      Underwater, an energy weapon's attack beyond its shifted long range "cannot be made"; the snub-nose PPC example "could not attack anything at a range of 14+" (Core p.127). Torpedoes keep the launcher's ranges (Core p.187).
      Specified by:
      allowsLosRange in class RulesUnderwater
      Parameters:
      weaponType - the weapon firing underwater
      Returns:
      true if the underwater attack can use line-of-sight range beyond its extreme range
    • breachOnLowRoll

      public boolean breachOnLowRoll()
      Description copied from class: RulesUnderwater
      Whether a breach occurs on a roll at or below the target.
      Specified by:
      breachOnLowRoll in class RulesUnderwater