Class CoreRulesPilot

java.lang.Object
megamek.common.rules.RulesPilot
megamek.common.rules.core.CoreRulesPilot

public class CoreRulesPilot extends RulesPilot
  • Constructor Details

    • CoreRulesPilot

      public CoreRulesPilot()
  • Method Details

    • pilotHits

      @Nullable public Vector<Report> pilotHits(Entity e, int totalHits, int damage, int crewPos, boolean toughness, GamePhase phase)
      Handle pilot hits. Core p.117, same as TW. Handle pilot hits. Core p.117. Only the highest roll is performed.
      Overrides:
      pilotHits in class RulesPilot
      Parameters:
      e - the entity taking pilot hits
      totalHits - the total number of hits
      damage - the damage amount
      crewPos - the crew position
      toughness - true if the pilot has toughness
      Returns:
      vector of reports describing the pilot hits
    • rollConRolls

      public Vector<Report> rollConRolls(Entity entity, boolean toughness)
      Rolls any pending con checks
      Overrides:
      rollConRolls in class RulesPilot
      Parameters:
      entity - The entity to roll
      Returns:
      The reports
    • getExplosionPilotHits

      public int getExplosionPilotHits()
      How many pilot hits for an explosion. How many pilot hits for an explosion Core p.117
      Specified by:
      getExplosionPilotHits in class RulesPilot
      Returns:
      the number of pilot hits caused by an explosion
    • getSeatbeltGyroModifier

      public int getSeatbeltGyroModifier(int piloting)
      Is there a modifier for the gyro being destroyed. Seatbelt check for gyro has no modifier Core p.117
      Specified by:
      getSeatbeltGyroModifier in class RulesPilot
      Parameters:
      piloting - the piloting skill
      Returns:
      the seatbelt gyro modifier
    • getSeatbeltLegModifier

      public int getSeatbeltLegModifier(int piloting, int legsDestroyed)
      Do we modify seatbelt by legs destroyed. Seatbelt check for legs destroyed has no modifier Core p.117
      Specified by:
      getSeatbeltLegModifier in class RulesPilot
      Parameters:
      piloting - the piloting skill
      legsDestroyed - the number of legs destroyed
      Returns:
      the seatbelt leg modifier
    • getSeatbeltShutdown

      public int getSeatbeltShutdown(int piloting)
      What is the seatbelt check on shutdown. Seatbelt check for shutdown has no modifier Core p.117
      Specified by:
      getSeatbeltShutdown in class RulesPilot
      Parameters:
      piloting - the piloting skill
      Returns:
      the seatbelt shutdown target number
    • getSeatbeltRoll

      public PilotingRollData getSeatbeltRoll(Entity entity, int fallHeight, int piloting, List<TargetRollModifier> modifiers, PilotingRollData roll)
      Seatbelt checks for potentially multiple crew Always create a new roll with just piloting and height of fall
      Specified by:
      getSeatbeltRoll in class RulesPilot
      Parameters:
      entity - the entity falling
      fallHeight - how big was the fall
      piloting - piloting skill
      modifiers - list of modifiers
      roll - the current Piloting Roll
      Returns:
      the new Piloting roll