Class CriticalSlot

java.lang.Object
megamek.common.CriticalSlot
All Implemented Interfaces:
Serializable

public class CriticalSlot extends Object implements Serializable
See Also:
  • Field Details

  • Constructor Details

    • CriticalSlot

      public CriticalSlot(int type, int index)
    • CriticalSlot

      public CriticalSlot(int type, int index, boolean hittable, boolean armored)
    • CriticalSlot

      public CriticalSlot(Mounted<?> mount)
  • Method Details

    • getType

      public int getType()
    • getIndex

      public int getIndex()
    • setIndex

      public void setIndex(int i)
    • isHit

      public boolean isHit()
    • setHit

      public void setHit(boolean hit)
      set that this CriticalSlot was or was not hit with a crit this phase Note: stuff that was hit in a phase can still be used in that phase, if that's not desired, use setDestroyed instead
      See Also:
    • isDestroyed

      public boolean isDestroyed()
    • setDestroyed

      public void setDestroyed(boolean destroyed)
      Set this Mounted's destroyed status NOTE: only set this if this Mounted cannot be used in the current phase anymore. If it still can, use setHit instead
      See Also:
    • isMissing

      public boolean isMissing()
    • setMissing

      public void setMissing(boolean missing)
    • isBreached

      public boolean isBreached()
    • setBreached

      public void setBreached(boolean breached)
    • isDamaged

      public boolean isDamaged()
      Has this slot been damaged?
    • isHittable

      public boolean isHittable()
      Can this slot be hit by a critical hit roll?
    • isEverHittable

      public boolean isEverHittable()
      Was this critical slot ever hittable?
    • isRepairing

      public boolean isRepairing()
      is the slot being repaired?
    • setRepairing

      public void setRepairing(boolean repairing)
    • equals

      public boolean equals(Object object)
      Two CriticalSlots are equal if their type, index and mount are equal
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • setMount

      public void setMount(Mounted<?> mount)
      Parameters:
      mount - the mount to set
    • getMount

      public Mounted<?> getMount()
      Returns:
      the mount
    • setMount2

      public void setMount2(Mounted<?> mount)
      Parameters:
      mount - the mount to set
    • getMount2

      public Mounted<?> getMount2()
      Returns:
      the mount
    • setArmored

      public void setArmored(boolean armored)
    • hitArmored

      public void hitArmored()
    • isArmored

      public boolean isArmored()
    • isOriginalArmored

      public boolean isOriginalArmored()
    • setRepairable

      public void setRepairable(boolean repair)
    • isRepairable

      public boolean isRepairable()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • isArmorable

      public boolean isArmorable()
      Returns:
      True if this crit slot is eligible for being an armored component, TO:AUE p.95