Class ReinforcementAdvisor

java.lang.Object
mekhq.campaign.digitalGM.stratCon.deployment.ReinforcementAdvisor

public class ReinforcementAdvisor extends Object
Campaign-context helper that answers the reinforcement questions the inspector needs for a focused force: how it is eligible to reinforce, and what its roll and odds are at a given support-point spend. It gathers the campaign inputs (command liaison, contract, base target number) once and defers the arithmetic to DeploymentEvaluator.
Since:
0.51.01
  • Constructor Details

  • Method Details

    • getBaseTargetRoll

      public megamek.common.rolls.TargetRoll getBaseTargetRoll()
      Returns:
      the contract-modified base target roll shared by every reinforcement attempt on this contract, before any support-point spend, with its individual modifiers preserved for display in the confirmation dialog
      Since:
      0.51.01
    • getBaseTargetNumber

      public int getBaseTargetNumber()
      Returns:
      the contract-modified base target number shared by every reinforcement attempt on this contract, before any support-point spend
      Since:
      0.51.01
    • getEligibility

      public StratConRulesManager.ReinforcementEligibilityType getEligibility(int forceId)
      Parameters:
      forceId - the force being evaluated
      Returns:
      how that force is eligible to reinforce this scenario (regular roll, improved roll, already deployed, or none)
      Since:
      0.51.01
    • getRoll

      public ReinforcementRoll getRoll(int chosenSupportPoints, boolean instant, boolean isManeuver)
      Parameters:
      chosenSupportPoints - the support points the player would spend per force to improve the roll
      instant - whether the reinforcements would arrive instantly
      isManeuver - if the formation is set to CombatRole.MANEUVER} and therefore enjoys improved reinforcement rolls
      Returns:
      the final target number and success odds for a single force at that spend
      Since:
      0.51.01