Package megamek.common
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
FieldsModifier and TypeFieldDescriptionstatic final MPCalculationSettingThe setting for Alpha Strike conversion, excluding scenario circumstances as well as myomer boosters, DWP, BA burden and modular armor.static final MPCalculationSettingA setting for finding full MP on BA, disregarding burdened status and DWP (Use: printing BA record sheets).static final MPCalculationSettingThe 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.static final MPCalculationSettingA setting that reduces calculated jump MP for submerged jump jets.static final MPCalculationSettingA setting that excludes gravity effects on MP.static final MPCalculationSettingA setting that excludes the effects of being grounded for Aero's.static final MPCalculationSettingA setting that excludes heat effects on MP.static final MPCalculationSettingA setting for checking the MP not including heat or equipmentstatic final MPCalculationSettingA setting that excludes MASC effects on run MP.static final MPCalculationSettingA setting that excludes myomer booster effects on BA/PM.static final MPCalculationSettingA setting that includes the effect of at most a single MASC on run MP.static final MPCalculationSettingA setting for testing if a unit is permanently immobilized.static final MPCalculationSettingA setting for checking if a unit moved too fast under the effects of low gravity.static final MPCalculationSettingThe 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
ConstructorsConstructorDescriptionMPCalculationSetting(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 aMPCalculationSettingrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.booleanforceTSM()Returns the value of theforceTSMrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theignoreBurdenrecord component.booleanReturns the value of theignoreCargorecord component.booleanReturns the value of theignoreChainDraperecord component.booleanReturns the value of theignoreConversionrecord component.booleanReturns the value of theignoreDWPrecord component.booleanReturns the value of theignoreGravityrecord component.booleanReturns the value of theignoreGroundedrecord component.booleanReturns the value of theignoreHeatrecord component.booleanReturns the value of theignoreMASCrecord component.booleanReturns the value of theignoreModularArmorrecord component.booleanReturns the value of theignoreMyomerBoosterrecord component.booleanReturns the value of theignoreOptionalRulesrecord component.booleanReturns the value of theignoreShieldrecord component.booleanReturns the value of theignoreSubmergedJumpJetsrecord component.booleanReturns the value of theignoreWeatherrecord component.booleanReturns the value of thesingleMASCrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
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
A setting that excludes heat effects on MP. -
NO_MYOMER_BOOSTER
A setting that excludes myomer booster effects on BA/PM. -
NO_MASC
A setting that excludes MASC effects on run MP. -
NO_GRAVITY
A setting that excludes gravity effects on MP. (Use: e.g. gravity-related PSRs) -
ONE_MASC
A setting that includes the effect of at most a single MASC on run MP. -
NO_GROUNDED
A setting that excludes the effects of being grounded for Aero's. -
SAFE_MOVE
A setting for checking if a unit moved too fast under the effects of low gravity. -
NO_HEAT_OR_EQUIPMENT
A setting for checking the MP not including heat or equipment -
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
A setting that reduces calculated jump MP for submerged jump jets. -
BA_UNBURDENED
A setting for finding full MP on BA, disregarding burdened status and DWP (Use: printing BA record sheets). -
AS_CONVERSION
The setting for Alpha Strike conversion, excluding scenario circumstances as well as myomer boosters, DWP, BA burden and modular armor. -
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 aMPCalculationSettingrecord class.- Parameters:
ignoreGravity- the value for theignoreGravityrecord componentignoreHeat- the value for theignoreHeatrecord componentignoreModularArmor- the value for theignoreModularArmorrecord componentignoreChainDrape- the value for theignoreChainDraperecord componentignoreMASC- the value for theignoreMASCrecord componentignoreMyomerBooster- the value for theignoreMyomerBoosterrecord componentignoreDWP- the value for theignoreDWPrecord componentignoreBurden- the value for theignoreBurdenrecord componentignoreCargo- the value for theignoreCargorecord componentignoreWeather- the value for theignoreWeatherrecord componentsingleMASC- the value for thesingleMASCrecord componentignoreSubmergedJumpJets- the value for theignoreSubmergedJumpJetsrecord componentignoreGrounded- the value for theignoreGroundedrecord componentignoreOptionalRules- the value for theignoreOptionalRulesrecord componentignoreConversion- the value for theignoreConversionrecord componentforceTSM- the value for theforceTSMrecord componentignoreShield- the value for theignoreShieldrecord component
-
-
Method Details
-
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. -
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. -
equals
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 '=='. -
ignoreGravity
public boolean ignoreGravity()Returns the value of theignoreGravityrecord component.- Returns:
- the value of the
ignoreGravityrecord component
-
ignoreHeat
public boolean ignoreHeat()Returns the value of theignoreHeatrecord component.- Returns:
- the value of the
ignoreHeatrecord component
-
ignoreModularArmor
public boolean ignoreModularArmor()Returns the value of theignoreModularArmorrecord component.- Returns:
- the value of the
ignoreModularArmorrecord component
-
ignoreChainDrape
public boolean ignoreChainDrape()Returns the value of theignoreChainDraperecord component.- Returns:
- the value of the
ignoreChainDraperecord component
-
ignoreMASC
public boolean ignoreMASC()Returns the value of theignoreMASCrecord component.- Returns:
- the value of the
ignoreMASCrecord component
-
ignoreMyomerBooster
public boolean ignoreMyomerBooster()Returns the value of theignoreMyomerBoosterrecord component.- Returns:
- the value of the
ignoreMyomerBoosterrecord component
-
ignoreDWP
public boolean ignoreDWP()Returns the value of theignoreDWPrecord component.- Returns:
- the value of the
ignoreDWPrecord component
-
ignoreBurden
public boolean ignoreBurden()Returns the value of theignoreBurdenrecord component.- Returns:
- the value of the
ignoreBurdenrecord component
-
ignoreCargo
public boolean ignoreCargo()Returns the value of theignoreCargorecord component.- Returns:
- the value of the
ignoreCargorecord component
-
ignoreWeather
public boolean ignoreWeather()Returns the value of theignoreWeatherrecord component.- Returns:
- the value of the
ignoreWeatherrecord component
-
singleMASC
public boolean singleMASC()Returns the value of thesingleMASCrecord component.- Returns:
- the value of the
singleMASCrecord component
-
ignoreSubmergedJumpJets
public boolean ignoreSubmergedJumpJets()Returns the value of theignoreSubmergedJumpJetsrecord component.- Returns:
- the value of the
ignoreSubmergedJumpJetsrecord component
-
ignoreGrounded
public boolean ignoreGrounded()Returns the value of theignoreGroundedrecord component.- Returns:
- the value of the
ignoreGroundedrecord component
-
ignoreOptionalRules
public boolean ignoreOptionalRules()Returns the value of theignoreOptionalRulesrecord component.- Returns:
- the value of the
ignoreOptionalRulesrecord component
-
ignoreConversion
public boolean ignoreConversion()Returns the value of theignoreConversionrecord component.- Returns:
- the value of the
ignoreConversionrecord component
-
forceTSM
public boolean forceTSM()Returns the value of theforceTSMrecord component.- Returns:
- the value of the
forceTSMrecord component
-
ignoreShield
public boolean ignoreShield()Returns the value of theignoreShieldrecord component.- Returns:
- the value of the
ignoreShieldrecord component
-