Package megamek.common
Class ManeuverType
java.lang.Object
megamek.common.ManeuverType
Maneuver types for Aerospace
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic 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 TypeMethodDescriptionstatic booleancanPerform(int type, int velocity, int altitude, int ceiling, boolean isVTOL, int distance, Board board, MovePath mp) determines whether the maneuver can be performedstatic intgetCost(int type, int velocity) Thrust cost of maneuverstatic StringgetManeuverTooltip(int type, boolean canPerform, int velocity, int altitude, int ceiling, boolean isVSTOL_CF) Generates an HTML-formatted tooltip for the specified maneuver type showing requirements, thrust cost, control modifier, and effect.static intgetMod(int type, boolean isVSTOL_CF) Returns the Control Roll modifier for a particular maneuver.static StringgetTypeName(int type)
-
Field Details
-
MAN_NONE
public static final int MAN_NONE- See Also:
-
MAN_LOOP
public static final int MAN_LOOP- See Also:
-
MAN_IMMELMAN
public static final int MAN_IMMELMAN- See Also:
-
MAN_SPLIT_S
public static final int MAN_SPLIT_S- See Also:
-
MAN_HAMMERHEAD
public static final int MAN_HAMMERHEAD- See Also:
-
MAN_HALF_ROLL
public static final int MAN_HALF_ROLL- See Also:
-
MAN_BARREL_ROLL
public static final int MAN_BARREL_ROLL- See Also:
-
MAN_SIDE_SLIP_LEFT
public static final int MAN_SIDE_SLIP_LEFT- See Also:
-
MAN_SIDE_SLIP_RIGHT
public static final int MAN_SIDE_SLIP_RIGHT- See Also:
-
MAN_VIFF
public static final int MAN_VIFF- See Also:
-
MAN_SIZE
public static final int MAN_SIZE
-
-
Constructor Details
-
ManeuverType
public ManeuverType()
-
-
Method Details
-
getTypeName
-
canPerform
public static boolean canPerform(int type, int velocity, int altitude, int ceiling, boolean isVTOL, int distance, Board board, MovePath mp) determines whether the maneuver can be performed -
getCost
public static int getCost(int type, int velocity) Thrust cost of maneuver -
getMod
public static int getMod(int type, boolean isVSTOL_CF) Returns the Control Roll modifier for a particular maneuver.- Parameters:
type- The type of maneuver performedisVSTOL_CF- Flag that determines whether the maneuvering unit is a conventional fighter with VSTOl, which has effects for side-slips- Returns:
- The control roll modifier
-
getManeuverTooltip
public static String getManeuverTooltip(int type, boolean canPerform, int velocity, int altitude, int ceiling, boolean isVSTOL_CF) Generates an HTML-formatted tooltip for the specified maneuver type showing requirements, thrust cost, control modifier, and effect. Uses localized strings from messages.properties.- Parameters:
type- The maneuver type constant from ManeuverTypecanPerform- Whether the maneuver can currently be performedvelocity- Current unit velocityaltitude- Current unit altitudeceiling- Terrain ceiling altitude below the unit (0 on ground maps)isVSTOL_CF- Whether the entity is a VSTOL with Improved Avionics- Returns:
- HTML-formatted tooltip string
-