Enum Class PreExistingDamageLevel

java.lang.Object
java.lang.Enum<PreExistingDamageLevel>
megamek.common.compute.damage.PreExistingDamageLevel
All Implemented Interfaces:
Serializable, Comparable<PreExistingDamageLevel>, Constable

public enum PreExistingDamageLevel extends Enum<PreExistingDamageLevel>
The pre-existing damage levels from the Pre-Existing Damage Table (First Succession War, p.145). Each level states how many points of damage a unit receives per 5 tons of mass and how many guaranteed critical hits it suffers.

Damage is distributed randomly in 5-point (or fraction thereof) groups. LIGHT never rolls critical hits, even when internal structure is damaged; MODERATE and HEAVY also roll for critical hits caused by internal structure damage.

  • Enum Constant Details

    • NONE

      public static final PreExistingDamageLevel NONE
      1D6 roll of 1: no pre-existing damage.
    • LIGHT

      public static final PreExistingDamageLevel LIGHT
      1D6 roll of 2-3: 1 point per 5 tons, no critical hits even if internal structure is damaged.
    • MODERATE

      public static final PreExistingDamageLevel MODERATE
      1D6 roll of 4-5: 2 points per 5 tons, one guaranteed critical hit plus internal structure crits.
    • HEAVY

      public static final PreExistingDamageLevel HEAVY
      1D6 roll of 6: 4 points per 5 tons, two guaranteed critical hits plus internal structure crits.
  • Method Details

    • values

      public static PreExistingDamageLevel[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PreExistingDamageLevel valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getGuaranteedCritCount

      public int getGuaranteedCritCount()
      Returns:
      the number of guaranteed critical hits rolled to a random location
    • rollsInternalStructureCrits

      public boolean rollsInternalStructureCrits()
      Returns:
      true if this level determines critical hits from internal structure damage
    • totalDamage

      public int totalDamage(double weight)
      Parameters:
      weight - the unit's weight in tons
      Returns:
      the total pre-existing damage for a unit of the given weight at this level