Record Class MPCalculationSetting

java.lang.Object
java.lang.Record
megamek.common.MPCalculationSetting

public record MPCalculationSetting(boolean ignoreGravity, boolean ignoreHeat, boolean ignoreModularArmor, boolean ignoreChainDrape, boolean ignoreMASC, boolean ignoreMyomerBooster, boolean ignoreDWP, boolean ignoreBurden, boolean ignoreCargo, boolean ignoreWeather, boolean singleMASC, boolean ignoreSubmergedJumpJets, boolean ignoreGrounded, boolean ignoreOptionalRules, boolean ignoreConversion, boolean forceTSM, boolean ignoreShield) extends Record
This class represents a setting used to calculate walk, run, jump or sprint MP. The setting contains info on whether to include gravity, MASC, weather, current heat and other circumstances in the MP calculation. All MPCalculationSettings can be used for all calculations though some settings may have no special effect; e.g. checking for submerged jump jets will not ever change the walk MP result. The baseline setting for in-game calculations is STANDARD.

This class is immutable.

  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    The setting for Alpha Strike conversion, excluding scenario circumstances as well as myomer boosters, DWP, BA burden and modular armor.
    A setting for finding full MP on BA, disregarding burdened status and DWP (Use: printing BA record sheets).
    The setting for Battle Value calculation, excluding scenario circumstances and heat as well as myomer boosters, DWP, MASC, Cargo and Bombs and grounded state of Aero's.
    A setting that reduces calculated jump MP for submerged jump jets.
    A setting that excludes gravity effects on MP.
    A setting that excludes the effects of being grounded for Aero's.
    A setting that excludes heat effects on MP.
    A setting for checking the MP not including heat or equipment
    A setting that excludes MASC effects on run MP.
    A setting that excludes myomer booster effects on BA/PM.
    A setting that includes the effect of at most a single MASC on run MP.
    A setting for testing if a unit is permanently immobilized.
    A setting for checking if a unit moved too fast under the effects of low gravity.
    The standard in-game setting, taking into account every circumstance except submerged jump jets (in this setting, submerged jump jets will not reduce the result of jump MP calculation).
  • Constructor Summary

    Constructors
    Constructor
    Description
    MPCalculationSetting(boolean ignoreGravity, boolean ignoreHeat, boolean ignoreModularArmor, boolean ignoreChainDrape, boolean ignoreMASC, boolean ignoreMyomerBooster, boolean ignoreDWP, boolean ignoreBurden, boolean ignoreCargo, boolean ignoreWeather, boolean singleMASC, boolean ignoreSubmergedJumpJets, boolean ignoreGrounded, boolean ignoreOptionalRules, boolean ignoreConversion, boolean forceTSM, boolean ignoreShield)
    Creates an instance of a MPCalculationSetting record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    boolean
    Returns the value of the forceTSM record component.
    final int
    Returns a hash code value for this object.
    boolean
    Returns the value of the ignoreBurden record component.
    boolean
    Returns the value of the ignoreCargo record component.
    boolean
    Returns the value of the ignoreChainDrape record component.
    boolean
    Returns the value of the ignoreConversion record component.
    boolean
    Returns the value of the ignoreDWP record component.
    boolean
    Returns the value of the ignoreGravity record component.
    boolean
    Returns the value of the ignoreGrounded record component.
    boolean
    Returns the value of the ignoreHeat record component.
    boolean
    Returns the value of the ignoreMASC record component.
    boolean
    Returns the value of the ignoreModularArmor record component.
    boolean
    Returns the value of the ignoreMyomerBooster record component.
    boolean
    Returns the value of the ignoreOptionalRules record component.
    boolean
    Returns the value of the ignoreShield record component.
    boolean
    Returns the value of the ignoreSubmergedJumpJets record component.
    boolean
    Returns the value of the ignoreWeather record component.
    boolean
    Returns the value of the singleMASC record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • STANDARD

      public static final MPCalculationSetting STANDARD
      The standard in-game setting, taking into account every circumstance except submerged jump jets (in this setting, submerged jump jets will not reduce the result of jump MP calculation).
    • NO_HEAT

      public static final MPCalculationSetting NO_HEAT
      A setting that excludes heat effects on MP.
    • NO_MYOMER_BOOSTER

      public static final MPCalculationSetting NO_MYOMER_BOOSTER
      A setting that excludes myomer booster effects on BA/PM.
    • NO_MASC

      public static final MPCalculationSetting NO_MASC
      A setting that excludes MASC effects on run MP.
    • NO_GRAVITY

      public static final MPCalculationSetting NO_GRAVITY
      A setting that excludes gravity effects on MP. (Use: e.g. gravity-related PSRs)
    • ONE_MASC

      public static final MPCalculationSetting ONE_MASC
      A setting that includes the effect of at most a single MASC on run MP.
    • NO_GROUNDED

      public static final MPCalculationSetting NO_GROUNDED
      A setting that excludes the effects of being grounded for Aero's.
    • SAFE_MOVE

      public static final MPCalculationSetting SAFE_MOVE
      A setting for checking if a unit moved too fast under the effects of low gravity.
    • NO_HEAT_OR_EQUIPMENT

      public static final MPCalculationSetting NO_HEAT_OR_EQUIPMENT
      A setting for checking the MP not including heat or equipment
    • PERM_IMMOBILIZED

      public static final MPCalculationSetting PERM_IMMOBILIZED
      A setting for testing if a unit is permanently immobilized. It excludes transient effects such as being grounded for Aero's and the effects of heat and cargo.
    • DEDUCT_SUBMERGED_JJ

      public static final MPCalculationSetting DEDUCT_SUBMERGED_JJ
      A setting that reduces calculated jump MP for submerged jump jets.
    • BA_UNBURDENED

      public static final MPCalculationSetting BA_UNBURDENED
      A setting for finding full MP on BA, disregarding burdened status and DWP (Use: printing BA record sheets).
    • AS_CONVERSION

      public static final MPCalculationSetting AS_CONVERSION
      The setting for Alpha Strike conversion, excluding scenario circumstances as well as myomer boosters, DWP, BA burden and modular armor.
    • BV_CALCULATION

      public static final MPCalculationSetting BV_CALCULATION
      The setting for Battle Value calculation, excluding scenario circumstances and heat as well as myomer boosters, DWP, MASC, Cargo and Bombs and grounded state of Aero's.
  • Constructor Details

    • MPCalculationSetting

      public MPCalculationSetting(boolean ignoreGravity, boolean ignoreHeat, boolean ignoreModularArmor, boolean ignoreChainDrape, boolean ignoreMASC, boolean ignoreMyomerBooster, boolean ignoreDWP, boolean ignoreBurden, boolean ignoreCargo, boolean ignoreWeather, boolean singleMASC, boolean ignoreSubmergedJumpJets, boolean ignoreGrounded, boolean ignoreOptionalRules, boolean ignoreConversion, boolean forceTSM, boolean ignoreShield)
      Creates an instance of a MPCalculationSetting record class.
      Parameters:
      ignoreGravity - the value for the ignoreGravity record component
      ignoreHeat - the value for the ignoreHeat record component
      ignoreModularArmor - the value for the ignoreModularArmor record component
      ignoreChainDrape - the value for the ignoreChainDrape record component
      ignoreMASC - the value for the ignoreMASC record component
      ignoreMyomerBooster - the value for the ignoreMyomerBooster record component
      ignoreDWP - the value for the ignoreDWP record component
      ignoreBurden - the value for the ignoreBurden record component
      ignoreCargo - the value for the ignoreCargo record component
      ignoreWeather - the value for the ignoreWeather record component
      singleMASC - the value for the singleMASC record component
      ignoreSubmergedJumpJets - the value for the ignoreSubmergedJumpJets record component
      ignoreGrounded - the value for the ignoreGrounded record component
      ignoreOptionalRules - the value for the ignoreOptionalRules record component
      ignoreConversion - the value for the ignoreConversion record component
      forceTSM - the value for the forceTSM record component
      ignoreShield - the value for the ignoreShield record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • ignoreGravity

      public boolean ignoreGravity()
      Returns the value of the ignoreGravity record component.
      Returns:
      the value of the ignoreGravity record component
    • ignoreHeat

      public boolean ignoreHeat()
      Returns the value of the ignoreHeat record component.
      Returns:
      the value of the ignoreHeat record component
    • ignoreModularArmor

      public boolean ignoreModularArmor()
      Returns the value of the ignoreModularArmor record component.
      Returns:
      the value of the ignoreModularArmor record component
    • ignoreChainDrape

      public boolean ignoreChainDrape()
      Returns the value of the ignoreChainDrape record component.
      Returns:
      the value of the ignoreChainDrape record component
    • ignoreMASC

      public boolean ignoreMASC()
      Returns the value of the ignoreMASC record component.
      Returns:
      the value of the ignoreMASC record component
    • ignoreMyomerBooster

      public boolean ignoreMyomerBooster()
      Returns the value of the ignoreMyomerBooster record component.
      Returns:
      the value of the ignoreMyomerBooster record component
    • ignoreDWP

      public boolean ignoreDWP()
      Returns the value of the ignoreDWP record component.
      Returns:
      the value of the ignoreDWP record component
    • ignoreBurden

      public boolean ignoreBurden()
      Returns the value of the ignoreBurden record component.
      Returns:
      the value of the ignoreBurden record component
    • ignoreCargo

      public boolean ignoreCargo()
      Returns the value of the ignoreCargo record component.
      Returns:
      the value of the ignoreCargo record component
    • ignoreWeather

      public boolean ignoreWeather()
      Returns the value of the ignoreWeather record component.
      Returns:
      the value of the ignoreWeather record component
    • singleMASC

      public boolean singleMASC()
      Returns the value of the singleMASC record component.
      Returns:
      the value of the singleMASC record component
    • ignoreSubmergedJumpJets

      public boolean ignoreSubmergedJumpJets()
      Returns the value of the ignoreSubmergedJumpJets record component.
      Returns:
      the value of the ignoreSubmergedJumpJets record component
    • ignoreGrounded

      public boolean ignoreGrounded()
      Returns the value of the ignoreGrounded record component.
      Returns:
      the value of the ignoreGrounded record component
    • ignoreOptionalRules

      public boolean ignoreOptionalRules()
      Returns the value of the ignoreOptionalRules record component.
      Returns:
      the value of the ignoreOptionalRules record component
    • ignoreConversion

      public boolean ignoreConversion()
      Returns the value of the ignoreConversion record component.
      Returns:
      the value of the ignoreConversion record component
    • forceTSM

      public boolean forceTSM()
      Returns the value of the forceTSM record component.
      Returns:
      the value of the forceTSM record component
    • ignoreShield

      public boolean ignoreShield()
      Returns the value of the ignoreShield record component.
      Returns:
      the value of the ignoreShield record component