Package megamek.common.rules
Class RulesPilot
java.lang.Object
megamek.common.rules.RulesPilot
- Direct Known Subclasses:
CoreRulesPilot,TWRulesPilot
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateCrewTakeoverReport(Entity e, int slot, boolean wasPilot, boolean wasGunner) Crew takeover report.abstract intHow many pilot hits for an explosion.abstract intgetSeatbeltGyroModifier(int piloting) Is there a modifier for the gyro being destroyed.intgetSeatbeltHeightModifier(int fallHeight) Get the height modifier for pilot hit checksabstract intgetSeatbeltLegModifier(int piloting, int legsDestroyed) Do we modify seatbelt by legs destroyed.abstract PilotingRollDatagetSeatbeltRoll(Entity entity, int fallHeight, int piloting, List<TargetRollModifier> modifiers, PilotingRollData roll) Seatbelt checks for potentially multiple crewabstract intgetSeatbeltShutdown(int piloting) What is the seatbelt check on shutdown.Handle pilot hits.rollConRolls(Entity entity, boolean toughness) Rolls any pending con checksintrollSensorCheck(Entity entity, int modifier, Vector<Report> vDesc) Returns the result of a sensor roll, and adds to a report.
-
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 hitstotalHits- the total number of hitsdamage- the damage amountcrewPos- the crew positiontoughness- 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
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 crewslot- the crew slot being taken overwasPilot- true if the crew member was the pilotwasGunner- 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 skilllegsDestroyed- 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
Returns the result of a sensor roll, and adds to a report.- Parameters:
entity- the entity rollingmodifier- any external modifiersvDesc- 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 fallingfallHeight- how big was the fallpiloting- piloting skillmodifiers- list of modifiersroll- the current Piloting Roll- Returns:
- the new Piloting roll
-
rollConRolls
Rolls any pending con checks- Parameters:
entity- The entity to roll- Returns:
- The reports
-