Package megamek.common
Class RangeType
java.lang.Object
megamek.common.RangeType
-
Field Summary
FieldsModifier and TypeFieldDescriptionintintintintintstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintgetMinRangeMod(int range) Deprecated, for removal: This API element is subject to removal in a future version.intgetRangeID(int range) Deprecated, for removal: This API element is subject to removal in a future version.static intrangeBracket(int distance, int[] ranges, boolean useExtremeRange, boolean useLOSRange) Returns the range bracket a distance falls into.static intrangeBracketC3(int c3SpotterDistance, int attackerDistance, int[] ranges, boolean useExtremeRange, boolean useLOSRange) Returns the range bracket considering C3 network data.
-
Field Details
-
RANGE_MINIMUM
public static final int RANGE_MINIMUM- See Also:
-
RANGE_SHORT
public static final int RANGE_SHORT- See Also:
-
RANGE_MEDIUM
public static final int RANGE_MEDIUM- See Also:
-
RANGE_LONG
public static final int RANGE_LONG- See Also:
-
RANGE_EXTREME
public static final int RANGE_EXTREME- See Also:
-
RANGE_LOS
public static final int RANGE_LOS- See Also:
-
RANGE_OUT
public static final int RANGE_OUT- See Also:
-
RANGE_BEARINGS_ONLY_MINIMUM
public static final int RANGE_BEARINGS_ONLY_MINIMUM- See Also:
-
RANGE_BEARINGS_ONLY_OUT
public static final int RANGE_BEARINGS_ONLY_OUT- See Also:
-
r_min
public int r_min -
r_short
public int r_short -
r_med
public int r_med -
r_long
public int r_long -
r_extreme
public int r_extreme
-
-
Constructor Details
-
RangeType
public RangeType(int r_min, int r_short, int r_med, int r_long, int r_extreme) -
RangeType
public RangeType(int r_short, int r_med, int r_long, int r_extreme) -
RangeType
public RangeType(int r_short, int r_med, int r_long)
-
-
Method Details
-
getRangeID
Deprecated, for removal: This API element is subject to removal in a future version. -
getMinRangeMod
Deprecated, for removal: This API element is subject to removal in a future version. -
rangeBracket
public static int rangeBracket(int distance, int[] ranges, boolean useExtremeRange, boolean useLOSRange) Returns the range bracket a distance falls into.- Parameters:
distance- - the distance to the targetranges- - the array of distances of the weaponuseExtremeRange- - true if extreme range rules should be useduseLOSRange- - true if LOS range rules should be used- Returns:
- the constant for the range bracket
-
rangeBracketC3
public static int rangeBracketC3(int c3SpotterDistance, int attackerDistance, int[] ranges, boolean useExtremeRange, boolean useLOSRange) Returns the range bracket considering C3 network data.- Parameters:
c3SpotterDistance- - the distance from the spotter to the targetattackerDistance- - the distance from the attacker to the targetranges- - the array of distances of the weaponuseExtremeRange- - true if extreme range rules should be useduseLOSRange- - true if LOS range rules should be used- Returns:
- the constant for the range bracket
-