Class FactionStandingUtilities
java.lang.Object
mekhq.campaign.universe.factionStanding.FactionStandingUtilities
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic FactionStandingLevel
calculateFactionStandingLevel
(double regard) Determines theFactionStandingLevel
corresponding to the given regard value.static double
getBarrackCostsMultiplier
(double regard) Retrieves the barrack costs multiplier for the specified regard value.static double
getContractPayMultiplier
(double regard) Retrieves the contract pay multiplier corresponding to the specified regard value.static int
getNegotiationModifier
(double regard) Retrieves the negotiation modifier associated with the provided regard value.static int
getRecruitmentRollsModifier
(double regard) Returns the recruitment rolls modifier based on the specified regard value.static int
getRecruitmentTickets
(double regard) Returns the number of recruitment tickets granted for the given regard value.static double
getResupplyWeightModifier
(double regard) Returns the resupply weight modifier for the specified regard value.static int
getStandingLevel
(double regard) Retrieves the current standing level based on the provided regard value.static int
getSupportPointModifierContractStart
(double regard) Returns the support point modifier applied at the start of a contract for the given regard value.static int
getSupportPointModifierPeriodic
(double regard) Returns the periodic support point modifier for the specified regard value.static int
getUnitMarketRarityModifier
(double regard) Returns the unit market rarity modifier for the given regard value.static boolean
hasCommandCircuitAccess
(double regard) Determines if the command circuit access is available at the given regard value.static boolean
isBatchallAllowed
(double regard) Checks if Batchalls are allowed for the provided regard value.static boolean
isOutlawed
(double regard) Checks whether the specified regard value results in outlawed status.
-
Constructor Details
-
FactionStandingUtilities
public FactionStandingUtilities()
-
-
Method Details
-
calculateFactionStandingLevel
Determines theFactionStandingLevel
corresponding to the given regard value.Iterates through all defined standing levels and returns the one whose regard range (exclusive of minimum, and inclusive of maximum) contains the provided regard value.
If the regard value does not fall within any defined standing level range, this method logs a warning and returns
FactionStandingLevel.STANDING_LEVEL_4
as a default.- Parameters:
regard
- the regard value to evaluate- Returns:
- the matching
FactionStandingLevel
for the given regard, orSTANDING_LEVEL_4
if no match is found - Since:
- 0.50.07
-
getStandingLevel
public static int getStandingLevel(double regard) Retrieves the current standing level based on the provided regard value.- Parameters:
regard
- the regard value used to evaluate the faction standing level- Returns:
- the corresponding standing level as an integer
- Since:
- 0.50.07
- See Also:
-
getNegotiationModifier
public static int getNegotiationModifier(double regard) Retrieves the negotiation modifier associated with the provided regard value.- Parameters:
regard
- the regard value to evaluate- Returns:
- the negotiation modifier
- Since:
- 0.50.07
- See Also:
-
getResupplyWeightModifier
public static double getResupplyWeightModifier(double regard) Returns the resupply weight modifier for the specified regard value.- Parameters:
regard
- the regard value to evaluate- Returns:
- the resupply weight modifier as a double
- Since:
- 0.50.07
- See Also:
-
hasCommandCircuitAccess
public static boolean hasCommandCircuitAccess(double regard) Determines if the command circuit access is available at the given regard value.- Parameters:
regard
- the regard value to evaluate- Returns:
true
if command circuit access is granted;false
otherwise- Since:
- 0.50.07
- See Also:
-
isOutlawed
public static boolean isOutlawed(double regard) Checks whether the specified regard value results in outlawed status.- Parameters:
regard
- the regard value to evaluate- Returns:
true
if outlawed;false
otherwise- Since:
- 0.50.07
- See Also:
-
isBatchallAllowed
public static boolean isBatchallAllowed(double regard) Checks if Batchalls are allowed for the provided regard value.- Parameters:
regard
- the regard value to evaluate- Returns:
true
if Batchall is allowed;false
otherwise- Since:
- 0.50.07
- See Also:
-
getRecruitmentTickets
public static int getRecruitmentTickets(double regard) Returns the number of recruitment tickets granted for the given regard value.- Parameters:
regard
- the regard value to evaluate- Returns:
- the number of recruitment tickets
- Since:
- 0.50.07
- See Also:
-
getRecruitmentRollsModifier
public static int getRecruitmentRollsModifier(double regard) Returns the recruitment rolls modifier based on the specified regard value.- Parameters:
regard
- the regard value to evaluate- Returns:
- the recruitment rolls modifier
- Since:
- 0.50.07
- See Also:
-
getBarrackCostsMultiplier
public static double getBarrackCostsMultiplier(double regard) Retrieves the barrack costs multiplier for the specified regard value.- Parameters:
regard
- the regard value to evaluate- Returns:
- the barrack costs multiplier as a double
- Since:
- 0.50.07
- See Also:
-
getUnitMarketRarityModifier
public static int getUnitMarketRarityModifier(double regard) Returns the unit market rarity modifier for the given regard value.- Parameters:
regard
- the regard value to evaluate- Returns:
- the unit market rarity modifier
- Since:
- 0.50.07
- See Also:
-
getContractPayMultiplier
public static double getContractPayMultiplier(double regard) Retrieves the contract pay multiplier corresponding to the specified regard value.- Parameters:
regard
- the regard value to evaluate- Returns:
- the contract pay multiplier as a double
- Since:
- 0.50.07
- See Also:
-
getSupportPointModifierContractStart
public static int getSupportPointModifierContractStart(double regard) Returns the support point modifier applied at the start of a contract for the given regard value.- Parameters:
regard
- the regard value to evaluate- Returns:
- the support point modifier for contract start
- Since:
- 0.50.07
- See Also:
-
getSupportPointModifierPeriodic
public static int getSupportPointModifierPeriodic(double regard) Returns the periodic support point modifier for the specified regard value.- Parameters:
regard
- the regard value to evaluate- Returns:
- the periodic support point modifier
- Since:
- 0.50.07
- See Also:
-