Class TWRulesUnits

java.lang.Object
megamek.common.rules.RulesUnits
megamek.common.rules.totalwarfare.TWRulesUnits

public class TWRulesUnits extends RulesUnits
  • Constructor Details

    • TWRulesUnits

      public TWRulesUnits()
  • Method Details

    • getMuleKickModifier

      public int getMuleKickModifier()
      Mule kicks are +1 to hit
      Specified by:
      getMuleKickModifier in class RulesUnits
      Returns:
      the mule kick modifier
    • getDoesLegDestructionCauseImmobile

      public boolean getDoesLegDestructionCauseImmobile(Mek mek)
      Does removing legs cause it to be immobile? No
      Specified by:
      getDoesLegDestructionCauseImmobile in class RulesUnits
      Parameters:
      mek - the MEK to check
      Returns:
      always returns false
    • reduceQuadWalkMP

      public int reduceQuadWalkMP(int mp, int legsDestroyed, int hipHits, int actuatorHits, boolean bTOLegDamage)
      Reduce a quad's walk MP for legs destroyed, hip hits, and actuator hits.
      Specified by:
      reduceQuadWalkMP in class RulesUnits
      Parameters:
      mp - the base movement points
      legsDestroyed - the number of legs destroyed
      hipHits - the number of hip hits
      actuatorHits - the number of actuator hits
      bTOLegDamage - true if using tactical operations leg damage rules
      Returns:
      the reduced movement points
    • quadPilotModForLegsDestroyed

      public void quadPilotModForLegsDestroyed(int destroyedLegs, PilotingRollData roll)
      What modifiers to we add for legs destroyed on a quad.
      Specified by:
      quadPilotModForLegsDestroyed in class RulesUnits
      Parameters:
      destroyedLegs - the number of destroyed legs
      roll - the piloting roll data to modify
    • getMekMPReduction

      public int getMekMPReduction(int hipHits, boolean bTOLegDamage, int mp)
      Reduce MP for a mek with hip hits.
      Specified by:
      getMekMPReduction in class RulesUnits
      Parameters:
      hipHits - the number of hip hits
      bTOLegDamage - true if using tactical operations leg damage rules
      mp - the base movement points
      Returns:
      the reduced movement points
    • getMinimumMP

      public int getMinimumMP(int mp)
      Is there a limit to how much we can reduce MP? 0
      Specified by:
      getMinimumMP in class RulesUnits
      Parameters:
      mp - the movement points
      Returns:
      returns the input parameter with no change
    • hasBadLegs

      public boolean hasBadLegs(Entity entity)
      Bad legs check always returns false
      Specified by:
      hasBadLegs in class RulesUnits
      Parameters:
      entity - the entity to check
      Returns:
      always returns false