Package mekhq.campaign.personnel.medical
Class InjurySPAUtility
java.lang.Object
mekhq.campaign.personnel.medical.InjurySPAUtility
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
adjustInjuriesAndFatigueForSPAs
(Person person, boolean isUseInjuryFatigue, int fatigueRate, int injuries) Adjusts the number of injuries for a person based on their Special Pilot Abilities (SPAs) and optionally updates their fatigue.
-
Constructor Details
-
InjurySPAUtility
public InjurySPAUtility()
-
-
Method Details
-
adjustInjuriesAndFatigueForSPAs
public static int adjustInjuriesAndFatigueForSPAs(Person person, boolean isUseInjuryFatigue, int fatigueRate, int injuries) Adjusts the number of injuries for a person based on their Special Pilot Abilities (SPAs) and optionally updates their fatigue.If the person has the "Glass Jaw" flaw (but not both "Glass Jaw" and "Toughness"), the number of injuries is doubled. If the person has the "Toughness" ability (but not both "Glass Jaw" and "Toughness"), the number of injuries is reduced to 75% (rounded up). If both traits are present, no adjustment is made.
If
isUseInjuryFatigue
istrue
, the method also increases the person's fatigue byfatigueRate
multiplied by the (possibly modified) number of injuries.- Parameters:
person
- thePerson
whose injuries and fatigue are to be adjustedisUseInjuryFatigue
- whether to apply fatigue increase based on injuriesfatigueRate
- the rate at which fatigue increases per injuryinjuries
- the base number of injuries before adjustments- Returns:
- the adjusted number of injuries after applying SPAs
- Since:
- 0.50.07
-