Package megamek.common.units
Record Class InfantryMount
java.lang.Object
java.lang.Record
megamek.common.units.InfantryMount
- All Implemented Interfaces:
Serializable
public record InfantryMount(String name, InfantryMount.BeastSize size, double weight, int movementPoints, EntityMovementMode movementMode, int burstDamage, int vehicleDamage, double damageDivisor, int maxWaterDepth, int secondaryGroundMP, int uwEndurance, boolean custom)
extends Record
implements Serializable
Stats for beast mounted infantry units. See TO:AU&E, p. 106
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final InfantryMountstatic final InfantryMountstatic final InfantryMountstatic final InfantryMountstatic final InfantryMountstatic final InfantryMountstatic final InfantryMountstatic final InfantryMountstatic final InfantryMountstatic final List<InfantryMount> static final InfantryMountstatic final InfantryMount -
Constructor Summary
ConstructorsConstructorDescriptionInfantryMount(String name, InfantryMount.BeastSize size, double weight, int movementPoints, EntityMovementMode movementMode, int burstDamage, int vehicleDamage, double damageDivisor, int maxWaterDepth, int secondaryGroundMP, int uwEndurance) InfantryMount(String name, InfantryMount.BeastSize size, double weight, int movementPoints, EntityMovementMode movementMode, int burstDamage, int vehicleDamage, double damageDivisor, int maxWaterDepth, int secondaryGroundMP, int uwEndurance, boolean custom) Creates an instance of aInfantryMountrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the value of theburstDamagerecord component.booleancustom()Returns the value of thecustomrecord component.doubleReturns the value of thedamageDivisorrecord component.final booleanIndicates whether some other object is "equal to" this one.intintgetMP()intfinal inthashCode()Returns a hash code value for this object.intReturns the value of themaxWaterDepthrecord component.Returns the value of themovementModerecord component.intReturns the value of themovementPointsrecord component.name()Returns the value of thenamerecord component.static InfantryMountintReturns the value of thesecondaryGroundMPrecord component.size()Returns the value of thesizerecord component.toString()Returns a string representation of this record class.intReturns the value of theuwEndurancerecord component.intReturns the value of thevehicleDamagerecord component.doubleweight()Returns the value of theweightrecord component.
-
Field Details
-
DONKEY
-
COVENTRY_KANGAROO
-
HORSE
-
CAMEL
-
BRANTH
-
ODESSAN_RAXX
-
TABIRANTH
-
TARIQ
-
ELEPHANT
-
ORCA
-
HIPPOSAUR
-
sampleMounts
-
-
Constructor Details
-
InfantryMount
public InfantryMount(String name, InfantryMount.BeastSize size, double weight, int movementPoints, EntityMovementMode movementMode, int burstDamage, int vehicleDamage, double damageDivisor, int maxWaterDepth, int secondaryGroundMP, int uwEndurance) -
InfantryMount
public InfantryMount(String name, InfantryMount.BeastSize size, double weight, int movementPoints, EntityMovementMode movementMode, int burstDamage, int vehicleDamage, double damageDivisor, int maxWaterDepth, int secondaryGroundMP, int uwEndurance, boolean custom) Creates an instance of aInfantryMountrecord class.- Parameters:
name- the value for thenamerecord componentsize- the value for thesizerecord componentweight- the value for theweightrecord componentmovementPoints- the value for themovementPointsrecord componentmovementMode- the value for themovementModerecord componentburstDamage- the value for theburstDamagerecord componentvehicleDamage- the value for thevehicleDamagerecord componentdamageDivisor- the value for thedamageDivisorrecord componentmaxWaterDepth- the value for themaxWaterDepthrecord componentsecondaryGroundMP- the value for thesecondaryGroundMPrecord componentuwEndurance- the value for theuwEndurancerecord componentcustom- the value for thecustomrecord component
-
-
Method Details
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
size
Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-
weight
public double weight()Returns the value of theweightrecord component.- Returns:
- the value of the
weightrecord component
-
getMP
public int getMP()- Returns:
- The number of movement points using the primary movement node.
-
movementMode
Returns the value of themovementModerecord component.- Returns:
- the value of the
movementModerecord component
-
getBurstDamageDice
public int getBurstDamageDice()- Returns:
- The number of damage dice to use as burst damage against conventional infantry in the same hex.
-
vehicleDamage
public int vehicleDamage()Returns the value of thevehicleDamagerecord component.- Returns:
- the value of the
vehicleDamagerecord component
-
damageDivisor
public double damageDivisor()Returns the value of thedamageDivisorrecord component.- Returns:
- the value of the
damageDivisorrecord component
-
maxWaterDepth
public int maxWaterDepth()Returns the value of themaxWaterDepthrecord component.- Returns:
- the value of the
maxWaterDepthrecord component
-
secondaryGroundMP
public int secondaryGroundMP()Returns the value of thesecondaryGroundMPrecord component.- Returns:
- the value of the
secondaryGroundMPrecord component
-
getUWEndurance
public int getUWEndurance()- Returns:
- For creatures with underwater movement, this is the number of turns they can stay underwater before needing to resurface.
-
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. -
parse
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
movementPoints
public int movementPoints()Returns the value of themovementPointsrecord component.- Returns:
- the value of the
movementPointsrecord component
-
burstDamage
public int burstDamage()Returns the value of theburstDamagerecord component.- Returns:
- the value of the
burstDamagerecord component
-
uwEndurance
public int uwEndurance()Returns the value of theuwEndurancerecord component.- Returns:
- the value of the
uwEndurancerecord component
-
custom
public boolean custom()Returns the value of thecustomrecord component.- Returns:
- the value of the
customrecord component
-