Class RulesPilot

java.lang.Object
megamek.common.rules.RulesPilot
Direct Known Subclasses:
CoreRulesPilot, TWRulesPilot

public abstract class RulesPilot extends Object
  • Constructor Details

    • RulesPilot

      public RulesPilot()
  • Method Details

    • pilotHits

      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.
      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
    • getExplosionPilotHits

      public abstract int getExplosionPilotHits()
      How many pilot hits for an explosion.
      Returns:
      the number of pilot hits caused by an explosion
    • createCrewTakeoverReport

      public Report createCrewTakeoverReport(Entity e, int slot, boolean wasPilot, boolean wasGunner)
      Crew takeover report. Required by damage. Convenience method that fills in a report showing that a crew member of a multicrew cockpit has taken over for another incapacitated crew member.
      Parameters:
      e - the entity with the crew
      slot - the crew slot being taken over
      wasPilot - true if the crew member was the pilot
      wasGunner - true if the crew member was the gunner
      Returns:
      a report of the crew takeover
    • getSeatbeltGyroModifier

      public abstract int getSeatbeltGyroModifier(int piloting)
      Is there a modifier for the gyro being destroyed.
      Parameters:
      piloting - the piloting skill
      Returns:
      the seatbelt gyro modifier
    • getSeatbeltLegModifier

      public abstract int getSeatbeltLegModifier(int piloting, int legsDestroyed)
      Do we modify seatbelt by legs destroyed.
      Parameters:
      piloting - the piloting skill
      legsDestroyed - the number of legs destroyed
      Returns:
      the seatbelt leg modifier
    • getSeatbeltShutdown

      public abstract int getSeatbeltShutdown(int piloting)
      What is the seatbelt check on shutdown.
      Parameters:
      piloting - the piloting skill
      Returns:
      the seatbelt shutdown target number
    • rollSensorCheck

      public int rollSensorCheck(Entity entity, int modifier, Vector<Report> vDesc)
      Returns the result of a sensor roll, and adds to a report.
      Parameters:
      entity - the entity rolling
      modifier - any external modifiers
      vDesc - vector to add report to
      Returns:
      the margin of success or failure. negative is a failure, 0 or higher is a success.
    • getSeatbeltHeightModifier

      public int getSeatbeltHeightModifier(int fallHeight)
      Get the height modifier for pilot hit checks
      Parameters:
      fallHeight - the height of the fall
      Returns:
      return the fall height, unmodified
    • getSeatbeltRoll

      public abstract PilotingRollData getSeatbeltRoll(Entity entity, int fallHeight, int piloting, List<TargetRollModifier> modifiers, PilotingRollData roll)
      Seatbelt checks for potentially multiple crew
      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
    • rollConRolls

      @Nullable public Vector<Report> rollConRolls(Entity entity, boolean toughness)
      Rolls any pending con checks
      Parameters:
      entity - The entity to roll
      Returns:
      The reports