Class CamOpsContractMarket

java.lang.Object
mekhq.campaign.market.contractMarket.AbstractContractMarket
mekhq.campaign.market.contractMarket.CamOpsContractMarket

public class CamOpsContractMarket extends AbstractContractMarket
Contract Market as described in Campaign Operations, 4th printing.
  • Constructor Details

    • CamOpsContractMarket

      public CamOpsContractMarket()
  • Method Details

    • addAtBContract

      public AtBContract addAtBContract(Campaign campaign)
      Description copied from class: AbstractContractMarket
      Generate a new contract and add it to the market.
      Specified by:
      addAtBContract in class AbstractContractMarket
      Returns:
      The newly generated contract
    • generateContractOffers

      public void generateContractOffers(Campaign campaign, boolean newCampaign)
      Description copied from class: AbstractContractMarket
      Generate available contract offers for the player's force.
      Specified by:
      generateContractOffers in class AbstractContractMarket
      newCampaign - Boolean indicating whether this is a fresh campaign.
    • calculatePaymentMultiplier

      public double calculatePaymentMultiplier(Campaign campaign, AtBContract contract)
      Description copied from class: AbstractContractMarket
      Calculate the total payment modifier for the contract based on the configured market method (e.g., CAM_OPS, ATB_MONTHLY).
      Specified by:
      calculatePaymentMultiplier in class AbstractContractMarket
      Returns:
      a double representing the total payment multiplier.
    • checkForFollowup

      public void checkForFollowup(Campaign campaign, AtBContract contract)
      Description copied from class: AbstractContractMarket
      Generate followup contracts and add them to the market if the currently selected market type supports them.
      Specified by:
      checkForFollowup in class AbstractContractMarket
      Parameters:
      campaign - The current campaign.
      contract - The AtBContract being completed and used as a basis for followup missions
    • rerollClause

      public void rerollClause(AtBContract contract, int clause, Campaign campaign)
      Description copied from class: AbstractContractMarket
      Rerolls a specific clause in a contract, typically as part of a negotiation process. This method adjusts the clause based on the provided clause type and associated modifiers, ensuring the contract reflects updated terms.

      The recalculated clause values can affect aspects such as command, salvage, transport, or support terms. Special rules, such as overrides for Clan technology salvage, may also be applied when rerolling specific clauses.

      Overrides:
      rerollClause in class AbstractContractMarket
      Parameters:
      contract - the contract being negotiated, which will have its terms modified
      clause - the type of clause to be rerolled (e.g., command, salvage, transport, or support)
      campaign - the active campaign context, used to access campaign-specific options and rules
    • rollCommandClause

      protected void rollCommandClause(Contract contract, int modifier, boolean isMercenary)
      Description copied from class: AbstractContractMarket
      Calculates and sets the command rights clause for a contract based on a roll and modifier.

      This method determines the appropriate ContractCommandRights for the given Contract, using the result of a dice roll (with modifiers). The logic differentiates between mercenary and non-mercenary contracts, as these have different thresholds for command rights determination.

      Overrides:
      rollCommandClause in class AbstractContractMarket
      Parameters:
      contract - The Contract whose command rights will be set based on the roll outcome.
      modifier - The numeric modifier applied to the dice roll value.
      isMercenary - Indicates whether the contract applies to a mercenary, which affects the thresholds used for determining command rights.