Package megamek.common.rules.core
Class CoreRulesUnderwater
java.lang.Object
megamek.common.rules.RulesUnderwater
megamek.common.rules.core.CoreRulesUnderwater
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanallowsLosRange(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).booleanWhether a breach occurs on a roll at or below the target.intWhat is the target number for the breach.intgetExtremeRange(WeaponType weaponType) Get the extreme range of the weapon in waterintgetLongRange(WeaponType weaponType) Get the long range of the weapon in waterintgetMediumRange(WeaponType weaponType) Get the medium range of the weapon in waterintgetShortRange(WeaponType weaponType) Get the short range of the weapon in waterbooleanCore p.127 treats a breached leg as destroyed, replacing its actuator damage effects.booleanDoes water block LOS?
-
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:
getBreachTargetin classRulesUnderwater- 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:
treatBreachedLegAsDestroyedin classRulesUnderwater- 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:
waterBlocksLOSin classRulesUnderwater- Returns:
- true if water blocks line of sight
-
getShortRange
Get the short range of the weapon in water- Specified by:
getShortRangein classRulesUnderwater- Parameters:
weaponType-- Returns:
- short range
-
getMediumRange
Get the medium range of the weapon in water- Specified by:
getMediumRangein classRulesUnderwater- Parameters:
weaponType-- Returns:
- medium range
-
getLongRange
Get the long range of the weapon in water- Specified by:
getLongRangein classRulesUnderwater- Parameters:
weaponType-- Returns:
- long range
-
getExtremeRange
Get the extreme range of the weapon in water- Specified by:
getExtremeRangein classRulesUnderwater- Parameters:
weaponType-- Returns:
- extreme range
-
allowsLosRange
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:
allowsLosRangein classRulesUnderwater- 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:RulesUnderwaterWhether a breach occurs on a roll at or below the target.- Specified by:
breachOnLowRollin classRulesUnderwater
-