Class AtBContract
- Direct Known Subclasses:
AtBContract.AtBContractRef
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classRepresents a reference to another AtBContract. -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Stringprotected megamek.common.icons.Camouflageprotected megamek.client.ui.util.PlayerColourprotected intprotected megamek.common.enums.SkillLevelprotected intprotected Personprotected intprotected AtBContractTypeprotected intprotected Stringprotected Personprotected intprotected Stringprotected megamek.common.icons.Camouflageprotected Stringprotected megamek.client.ui.util.PlayerColourprotected Stringprotected Stringprotected intprotected megamek.common.enums.SkillLevelprotected intstatic final doubleThe minimum intensity below which no scenarios will be generatedprotected AtBMoraleLevelprotected intprotected intprotected AtBContractprotected intprotected intprotected booleanprotected intprotected intprotected LocalDateprotected intprotected LocalDateIf the date is non-null, there will be a special scenario or big battle on that date, but the scenario is not generated until the other battle rolls for the week.protected int -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAtBContract(String name) AtBContract(Contract contract, Campaign campaign) -
Method Summary
Modifier and TypeMethodDescriptionvoidacceptContract(Campaign campaign) Calculations to be performed once the contract has been accepted.voidaddEmployerMinorBreaches(int num) Deprecated, for removal: This API element is subject to removal in a future version.no indicated uses.voidvoidaddPlayerMinorBreaches(int num) static intcalculateBaseNumberOfRequiredLances(Campaign campaign) Deprecated, for removal: This API element is subject to removal in a future version.intcalculateContractDifficulty(int gameYear, boolean useGenericBV, List<megamek.common.units.Entity> playerCombatUnits) Calculates the difficulty rating of a contract by comparing the estimated combat strength of the opposing force to the combat strength of the player's participating units.voidcalculateLength(boolean variable) changeMoraleLevel(int delta) Adjusts the currentAtBMoraleLevelby the specified delta and returns the resulting morale level.voidcheckEvents(Campaign campaign) voidcheckMorale(Campaign campaign, LocalDate today) Checks and updates the morale which depends on various conditions such as the rout end date, skill levels, victories, defeats, etc.voidApplies a salvage override rule for Clan technology based on the contract timeline and faction involvement.booleancontractExtended(Campaign campaign) voidcreateClanOpponent(Campaign campaign) voidcreateEmployerLiaison(Campaign campaign) booleandoBonusRoll(Campaign campaign, boolean isPostScenario) Performs a bonus roll to determine and execute a random campaign bonus.megamek.common.icons.Camouflagemegamek.client.ui.util.PlayerColourintmegamek.common.enums.SkillLevelintgetBelligerentsPanel(int gameYear) Creates and returns aJPanelcontaining the belligerent factions' logos for the specified game year.static intgetBestRepairLocation(List<AtBContract> activeContracts) Determines the best available repair location from a list of active contracts.intThis method returns aJPanelthat represents the difficulty skulls for a given mission.getContractDifficultySkulls(Campaign campaign) Deprecated, for removal: This API element is subject to removal in a future version.usegetContractDifficultySkulls()insteadintgetContractScore(boolean isUseMaplessMode) Calculates the overall contract score based on scenario outcomes and modifiers.intintintstatic intgetEffectiveNumUnits(Campaign campaign) Deprecated, for removal: This API element is subject to removal in a future version.getEmployerName(int year) getEnemy()megamek.common.icons.Camouflagemegamek.client.ui.util.PlayerColourgetEnemyName(int year) Retrieves the name of the enemy for this contract.intmegamek.common.enums.SkillLevelintgetRandomDayOfMonth(LocalDate today) intDetermines the repair location for the contract based on the contract type.intintintCalculates the number of required Victory Points (VP) needed to achieve overall success for this StratCon contract.intintRetrieves the percentage of shares for this contract.intintvoidinitContractDetails(Campaign campaign) booleaninitiateBatchall(Campaign campaign) Deprecated, for removal: This API element is subject to removal in a future version.booleanbooleanChecks if the Batchall has been accepted for the contract.booleanbooleanbooleanvoidloadFieldsFromXmlNode(Campaign campaign, megamek.Version version, Node node) static megamek.common.icons.CamouflagepickRandomCamouflage(int currentYear, String factionCode) Selects a random camouflage for the given faction based on the faction code and year.voidRestores any references to other contracts.voidsetAllyBotName(String name) voidsetAllyCamouflage(megamek.common.icons.Camouflage allyCamouflage) voidsetAllyColour(megamek.client.ui.util.PlayerColour allyColour) voidsetAllyQuality(int allyQuality) voidsetAllySkill(megamek.common.enums.SkillLevel allySkill) voidsetAtBSharesPercent(int pct) voidsetAttacker(boolean isAttacker) voidsetBatchallAccepted(boolean batchallAccepted) Sets thebatchallAcceptedflag for this contract.voidsetClanOpponent(Person clanOpponent) voidsetCommandRoll(int roll) voidsetContractScoreArbitraryModifier(int newModifier) voidsetContractType(AtBContractType contractType) voidsetDifficulty(int difficulty) voidsetEmployerCode(String code, int year) voidsetEmployerLiaison(Person employerLiaison) voidsetEnemyBotName(String name) voidsetEnemyCamouflage(megamek.common.icons.Camouflage enemyCamouflage) voidsetEnemyCode(String enemyCode) voidsetEnemyColour(megamek.client.ui.util.PlayerColour enemyColour) voidsetEnemyMercenaryEmployerCode(String enemyMercenaryEmployerCode) Sets the faction code representing the employer of the enemy mercenary forces.voidsetEnemyQuality(int enemyQuality) voidsetEnemySkill(megamek.common.enums.SkillLevel enemySkill) voidsetMercSubcontract(boolean sub) voidsetMoraleLevel(AtBMoraleLevel moraleLevel) voidsetParentContract(AtBContract parent) voidsetPartsAvailabilityLevel(int partsAvailabilityLevel) voidsetRequiredCombatElements(int required) voidsetRequiredCombatTeams(int required) voidsetRoutedPayout(Money routedPayout) voidsetRoutEnd(LocalDate routEnd) voidsetRoutEndDate(LocalDate routEnd) Sets the end date of the rout.voidsetSalvageRoll(int roll) voidvoidsetSupportRoll(int roll) voidsetTransportRoll(int roll) protected intwriteToXMLBegin(Campaign campaign, PrintWriter pw, int indent) Methods inherited from class mekhq.campaign.mission.Contract
addSalvageByEmployer, addSalvageByUnit, calculateContract, canSalvage, getAdvanceAmount, getAdvancePct, getBaseAmount, getBattleLossComp, getBattleLossCompString, getCachedJumpPath, getCommandRights, getEmployer, getEndingDate, getEstimatedPayrollExpenses, getEstimatedTotalProfit, getFeeAmount, getHoldingCellsRented, getHospitalBedsRented, getJumpPath, getKitchensRented, getLength, getLengthPlusTravel, getMonthsLeft, getMRBCFeePercentage, getMultiplier, getOverheadAmount, getOverheadComp, getOverheadCompName, getSalvagedByEmployer, getSalvagedByUnit, getSalvagePct, getSalvagePctString, getSigningBonusAmount, getSigningBonusPct, getStartDate, getStraightSupport, getStraightSupportString, getSupportAmount, getTotalAdvanceAmount, getTotalAmount, getTotalAmountPlusFees, getTotalAmountPlusFeesAndBonuses, getTotalEstimatedMaintenanceExpenses, getTotalEstimatedOverheadExpenses, getTotalEstimatedPayrollExpenses, getTotalMonthlyPayOut, getTotalTransportationFees, getTransitAmount, getTransportAmount, getTransportComp, getTransportCompString, getTravelDays, isActiveOn, isSalvageExchange, payMRBCFee, setAdvanceAmount, setAdvancePct, setBaseAmount, setBattleLossComp, setCachedJumpPath, setCommandRights, setEmployer, setEndDate, setFeeAmount, setHoldingCellsRented, setHospitalBedsRented, setKitchensRented, setLength, setMRBCFee, setMultiplier, setOverheadAmount, setOverheadComp, setSalvagedByEmployer, setSalvagedByUnit, setSalvageExchange, setSalvagePct, setSigningBonusAmount, setSigningBonusPct, setStartAndEndDate, setStartDate, setStraightSupport, setSupportAmount, setSystemId, setTransitAmount, setTransportAmount, setTransportComp, subtractSalvageByUnitMethods inherited from class mekhq.campaign.mission.Mission
addScenario, clearScenarios, generateInstanceFromXML, getCompletedScenarios, getCurrentAtBScenarios, getCurrentScenarios, getDescription, getHyperlinkedName, getId, getName, getScenarios, getStatus, getSystem, getSystemId, getSystemName, getType, getVisibleScenarios, hasPendingScenarios, isActiveOn, loadFieldsFromXmlNode, setDesc, setId, setLegacyPlanetName, setName, setStatus, setType, toString, writeToXML, writeToXML, writeToXMLBegin, writeToXMLEnd
-
Field Details
-
MINIMUM_INTENSITY
public static final double MINIMUM_INTENSITYThe minimum intensity below which no scenarios will be generated- See Also:
-
parentContract
-
employerLiaison
-
clanOpponent
-
employerCode
-
enemyCode
-
enemyMercenaryEmployerCode
-
enemyName
-
difficulty
protected int difficulty -
contractType
-
allySkill
protected megamek.common.enums.SkillLevel allySkill -
allyQuality
protected int allyQuality -
enemySkill
protected megamek.common.enums.SkillLevel enemySkill -
enemyQuality
protected int enemyQuality -
allyBotName
-
enemyBotName
-
allyCamouflage
protected megamek.common.icons.Camouflage allyCamouflage -
allyColour
protected megamek.client.ui.util.PlayerColour allyColour -
enemyCamouflage
protected megamek.common.icons.Camouflage enemyCamouflage -
enemyColour
protected megamek.client.ui.util.PlayerColour enemyColour -
extensionLength
protected int extensionLength -
requiredCombatTeams
protected int requiredCombatTeams -
requiredCombatElements
protected int requiredCombatElements -
moraleLevel
-
routEnd
-
partsAvailabilityLevel
protected int partsAvailabilityLevel -
playerMinorBreaches
protected int playerMinorBreaches -
employerMinorBreaches
protected int employerMinorBreaches -
contractScoreArbitraryModifier
protected int contractScoreArbitraryModifier -
moraleMod
protected int moraleMod -
priorLogisticsFailure
protected boolean priorLogisticsFailure -
specialEventScenarioDate
If the date is non-null, there will be a special scenario or big battle on that date, but the scenario is not generated until the other battle rolls for the week. -
specialEventScenarioType
protected int specialEventScenarioType -
battleTypeMod
protected int battleTypeMod -
nextWeekBattleTypeMod
protected int nextWeekBattleTypeMod
-
-
Constructor Details
-
AtBContract
protected AtBContract() -
AtBContract
-
AtBContract
-
-
Method Details
-
setRoutEndDate
Sets the end date of the rout. This should only be applied on contracts whose morale equals ROUTED- Parameters:
routEnd- theLocalDaterepresenting the end date of the rout
-
initContractDetails
-
pickRandomCamouflage
public static megamek.common.icons.Camouflage pickRandomCamouflage(int currentYear, String factionCode) Selects a random camouflage for the given faction based on the faction code and year. If there are no available files in the faction directory, it logs a warning and uses default camouflage.- Parameters:
currentYear- the current year in the game.factionCode- the code representing the faction for which the camouflage is to be selected.
-
calculateLength
public void calculateLength(boolean variable) -
calculateBaseNumberOfRequiredLances
@Deprecated(since="0.50.07", forRemoval=true) public static int calculateBaseNumberOfRequiredLances(Campaign campaign) Deprecated, for removal: This API element is subject to removal in a future version.useContractUtilities.calculateBaseNumberOfRequiredLances(Campaign, boolean, boolean, double)Calculates the number of lances required for this contract, based on [campaign].
- Parameters:
campaign- The campaign to reference.- Returns:
- The number of lances required.
-
getEffectiveNumUnits
@Deprecated(since="0.50.07", forRemoval=true) public static int getEffectiveNumUnits(Campaign campaign) Deprecated, for removal: This API element is subject to removal in a future version.useContractUtilities.getEffectiveNumUnits(Campaign)Calculates the effective number of units available in the given campaign based on unit types and roles.
This method iterates through all combat teams in the specified campaign, ignoring combat teams with the auxiliary role. For each valid combat team, it retrieves the associated force and evaluates all units within that force. The unit contribution to the total is determined based on its type:
- TANK, VTOL, NAVAL, CONV_FIGHTER, AEROSPACE_FIGHTER: Adds 1 for non-clan factions, and 0.5 for clan factions.
- PROTOMEK: Adds 0.2 to the total.
- BATTLE_ARMOR, INFANTRY: Adds 0 (excluded from the total).
- Other types: Adds 1 to the total.
Units that aren’t associated with a valid combat team or can’t be fetched due to missing data are ignored. The final result is returned as an integer by flooring the calculated total.
- Parameters:
campaign- the campaign containing the combat teams and units to evaluate- Returns:
- the effective number of units as an integer
-
checkMorale
Checks and updates the morale which depends on various conditions such as the rout end date, skill levels, victories, defeats, etc. This method also updates the enemy status based on the morale level.- Parameters:
today- The current date in the context.
-
getRepairLocation
public int getRepairLocation()Determines the repair location for the contract based on the contract type.The returned repair location corresponds to the type of operation:
- Guerrilla warfare contracts:
Unit.SITE_IMPROVISED - Raid-type contracts:
Unit.SITE_FIELD_WORKSHOP - All other contracts:
Unit.SITE_FACILITY_BASIC
- Overrides:
getRepairLocationin classMission- Returns:
- the repair location constant based on the contract type
- Guerrilla warfare contracts:
-
getBestRepairLocation
Determines the best available repair location from a list of active contracts.This method evaluates all active contracts and returns the highest quality repair facility available. Repair locations are ranked numerically, with higher values representing better facilities. If no active contracts exist, a basic facility is assumed to be available.
- Parameters:
activeContracts- the list of active contracts to evaluate for repair facilities- Returns:
- the numeric value of the best available repair location; returns
Unit.SITE_FACILITY_BASICif no contracts are active
-
getContractScore
public int getContractScore(boolean isUseMaplessMode) Calculates the overall contract score based on scenario outcomes and modifiers.For StratCon campaigns, this returns the current victory points from the campaign state.
For standard contracts, this aggregates scores from all completed scenarios and applies any arbitrary modifiers that have been set for this contract.
- Parameters:
isUseMaplessMode-trueif mapless mode is enabled in StratCon- Returns:
- the total contract score, including victory points or scenario scores plus modifiers
-
getCurrentSupportPoints
public int getCurrentSupportPoints()- Returns:
- the total available support points, or 0 if StratCon is not enabled for this contract
- Since:
- 0.50.10
-
getContractScoreArbitraryModifier
public int getContractScoreArbitraryModifier() -
doBonusRoll
Performs a bonus roll to determine and execute a random campaign bonus. The roll is simulated using 1d6, and the outcome triggers different bonus effects based on the roll value. The effects may involve recruiting dependents, adding new units, or other benefits as determined by the campaign options and roll outcome.- Parameters:
campaign- the currentCampaigninstance.isPostScenario- abooleanindicating if this roll occurs post-scenario (used to determine specific behaviors for roll = 3).- Returns:
trueif specific post-scenario behavior is triggered (roll = 3), otherwisefalse.- Throws:
IllegalStateException- if an unexpected roll value is encountered.
-
isSubcontract
public boolean isSubcontract() -
getParentContract
-
setParentContract
-
isMercSubcontract
public boolean isMercSubcontract() -
setMercSubcontract
public void setMercSubcontract(boolean sub) -
isAttacker
public boolean isAttacker() -
setAttacker
public void setAttacker(boolean isAttacker) -
checkEvents
-
getRandomDayOfMonth
-
contractExtended
-
getMonthlyPayOut
- Overrides:
getMonthlyPayOutin classContract
-
writeToXMLBegin
- Overrides:
writeToXMLBeginin classContract
-
loadFieldsFromXmlNode
public void loadFieldsFromXmlNode(Campaign campaign, megamek.Version version, Node node) throws ParseException - Overrides:
loadFieldsFromXmlNodein classContract- Throws:
ParseException
-
restore
Restores any references to other contracts.- Parameters:
c- The Campaign which holds this contract.
-
getEmployerFaction
-
getEmployerLiaison
-
setEmployerLiaison
-
createEmployerLiaison
-
getClanOpponent
-
setClanOpponent
-
createClanOpponent
-
getEmployerCode
-
setEmployerCode
-
getEmployerName
-
getEnemy
-
getEnemyCode
-
setEnemyCode
-
getEnemyName
Retrieves the name of the enemy for this contract.- Parameters:
year- The current year in the game.- Returns:
- The name of the enemy.
-
getEnemyMercenaryEmployerCode
-
getEnemyMercenaryEmployer
-
setEnemyMercenaryEmployerCode
Sets the faction code representing the employer of the enemy mercenary forces.- Parameters:
enemyMercenaryEmployerCode- the faction code to assign as the employer of opposing mercenary units- Since:
- 0.50.10
-
getDifficulty
public int getDifficulty() -
setDifficulty
public void setDifficulty(int difficulty) -
getContractType
-
setContractType
-
getAllySkill
public megamek.common.enums.SkillLevel getAllySkill() -
setAllySkill
public void setAllySkill(megamek.common.enums.SkillLevel allySkill) -
getEnemySkill
public megamek.common.enums.SkillLevel getEnemySkill() -
setEnemySkill
public void setEnemySkill(megamek.common.enums.SkillLevel enemySkill) -
getAllyQuality
public int getAllyQuality() -
setAllyQuality
public void setAllyQuality(int allyQuality) -
getEnemyQuality
public int getEnemyQuality() -
setEnemyQuality
public void setEnemyQuality(int enemyQuality) -
getAllyBotName
-
setAllyBotName
-
getEnemyBotName
-
setEnemyBotName
-
getAllyCamouflage
public megamek.common.icons.Camouflage getAllyCamouflage() -
setAllyCamouflage
public void setAllyCamouflage(megamek.common.icons.Camouflage allyCamouflage) -
getAllyColour
public megamek.client.ui.util.PlayerColour getAllyColour() -
setAllyColour
public void setAllyColour(megamek.client.ui.util.PlayerColour allyColour) -
getEnemyCamouflage
public megamek.common.icons.Camouflage getEnemyCamouflage() -
setEnemyCamouflage
public void setEnemyCamouflage(megamek.common.icons.Camouflage enemyCamouflage) -
getEnemyColour
public megamek.client.ui.util.PlayerColour getEnemyColour() -
setEnemyColour
public void setEnemyColour(megamek.client.ui.util.PlayerColour enemyColour) -
getRequiredCombatTeams
public int getRequiredCombatTeams() -
setRequiredCombatTeams
public void setRequiredCombatTeams(int required) -
getRequiredCombatElements
public int getRequiredCombatElements() -
setRequiredCombatElements
public void setRequiredCombatElements(int required) -
getPartsAvailabilityLevel
public int getPartsAvailabilityLevel() -
setPartsAvailabilityLevel
public void setPartsAvailabilityLevel(int partsAvailabilityLevel) -
getMoraleLevel
-
setMoraleLevel
-
changeMoraleLevel
Adjusts the currentAtBMoraleLevelby the specified delta and returns the resulting morale level.The method computes a new integer morale value by adding the given
deltato the unit's current morale level, then clamps the result to the valid range defined byMINIMUM_MORALE_LEVELandMAXIMUM_MORALE_LEVEL. It then attempts to resolve the resulting value to a correspondingAtBMoraleLevel.If the resolved morale level is valid (i.e., non-
null), the unit's internal morale state is updated. If no valid enum constant exists for the computed level, the method leaves the current morale unchanged and returns the existing level.Note: a positive delta improves the enemy morale, a negative delta decreases enemy morale.
- Parameters:
delta- the amount to adjust the current morale level by; may be positive or negative- Returns:
- the new
AtBMoraleLevelafter applying the delta; if no corresponding morale level exists for the computed value, the current morale level is returned unchanged - Since:
- 0.50.10
-
isPeaceful
public boolean isPeaceful() -
getRoutEnd
-
setRoutEnd
-
isBatchallAccepted
public boolean isBatchallAccepted()Checks if the Batchall has been accepted for the contract.- Returns:
trueif the Batchall has been accepted,falseotherwise.
-
setBatchallAccepted
public void setBatchallAccepted(boolean batchallAccepted) Sets thebatchallAcceptedflag for this contract.- Parameters:
batchallAccepted- The value to set for thebatchallAcceptedflag.
-
addPlayerMinorBreach
public void addPlayerMinorBreach() -
addPlayerMinorBreaches
public void addPlayerMinorBreaches(int num) -
addEmployerMinorBreaches
Deprecated, for removal: This API element is subject to removal in a future version.no indicated uses. -
setContractScoreArbitraryModifier
public void setContractScoreArbitraryModifier(int newModifier) -
getBattleTypeMod
public int getBattleTypeMod() -
getStratconCampaignState
-
setStratConCampaignState
-
acceptContract
Description copied from class:ContractCalculations to be performed once the contract has been accepted.- Overrides:
acceptContractin classContract
-
clanTechSalvageOverride
public void clanTechSalvageOverride()Applies a salvage override rule for Clan technology based on the contract timeline and faction involvement. This method checks the factions of both the enemy and employer and determines if a salvage exchange should be forced based on whether the battle occurs before the Battle of Tukayyid.This rule was implemented to better match canon employer behavior during this period.
-
initiateBatchall
Deprecated, for removal: This API element is subject to removal in a future version.This method initiates a batchall, a challenge/dialog to decide on the conduct of a campaign. Prompts the player with a message and options to accept or refuse the batchall.- Parameters:
campaign- The current campaign.- Returns:
trueif the batchall is accepted,falseotherwise.
-
getContractDifficultySkulls
@Deprecated(since="0.50.06", forRemoval=true) public JPanel getContractDifficultySkulls(Campaign campaign) Deprecated, for removal: This API element is subject to removal in a future version.usegetContractDifficultySkulls()instead -
getContractDifficultySkulls
This method returns aJPanelthat represents the difficulty skulls for a given mission.- Returns:
- a
JPanelwith the difficulty skulls displayed
-
getBelligerentsPanel
Creates and returns aJPanelcontaining the belligerent factions' logos for the specified game year.This panel displays the employer and enemy faction logos side by side, separated by a styled divider. The logos are determined based on the provided game year and faction codes, scaled appropriately for the GUI.
- Parameters:
gameYear- the year used to determine which faction logos to display- Returns:
- a
JPanelwith the employer and enemy faction logos, with a divider in between - Since:
- 0.50.06
-
calculateContractDifficulty
public int calculateContractDifficulty(int gameYear, boolean useGenericBV, List<megamek.common.units.Entity> playerCombatUnits) Calculates the difficulty rating of a contract by comparing the estimated combat strength of the opposing force to the combat strength of the player's participating units.The method performs the following steps:
- Determines the opposing force's effective skill level by applying any faction-based adjustments to
their base
SkillLevel. - Computes a skill multiplier and applies it to the estimated enemy force power, derived from the game year, force quality, and whether generic BV values are used.
- Estimates the total combat power of the player's units based on their BV values and optionally using generic BV rules.
- Computes the percentage difference between enemy and player power.
- Maps that percentage difference into a difficulty scale ranging from
1(easiest) to10(hardest), centered around5as an even match.
A negative percentage difference indicates that the player is stronger than the opposing force; a positive difference indicates the enemy is stronger. Each 20% shift away from parity increases (or decreases) difficulty by one step.
If enemy combat strength cannot be computed, the method returns
-99to signal an error.- Parameters:
gameYear- the current in-game year used for estimating enemy technology and BV baselinesuseGenericBV- whether generic BV values should be used instead of unit-specific BV calculationsplayerCombatUnits- the list of playerEntityobjects expected to participate in the contract- Returns:
- a difficulty rating from
1to10, where5represents roughly even forces; or-99if the enemy power estimation fails
- Determines the opposing force's effective skill level by applying any faction-based adjustments to
their base
-
getCommandRoll
public int getCommandRoll()- Returns:
- the command roll that was used to determine command rights. Only used by CamOps Contract Market.
-
setCommandRoll
public void setCommandRoll(int roll) - Parameters:
roll- the command roll that was used to determine command rights. Only used by CamOps Contract Market.
-
getSalvageRoll
public int getSalvageRoll()- Returns:
- the salvage roll that was used to determine salvage rights. Only used by CamOps Contract Market.
-
setSalvageRoll
public void setSalvageRoll(int roll) - Parameters:
roll- the salvage roll that was used to determine salvage rights. Only used by CamOps Contract Market.
-
getSupportRoll
public int getSupportRoll()- Returns:
- the support roll that was used to determine support rights. Only used by CamOps Contract Market.
-
setSupportRoll
public void setSupportRoll(int roll) - Parameters:
roll- the support roll that was used to determine support rights. Only used by CamOps Contract Market.
-
getTransportRoll
public int getTransportRoll()- Returns:
- the transport roll that was used to determine transport rights. Only used by CamOps Contract Market.
-
setTransportRoll
public void setTransportRoll(int roll) - Parameters:
roll- the transport roll that was used to determine transport rights. Only used by CamOps Contract Market.
-
setRoutedPayout
-
getRoutedPayout
-
getRequiredVictoryPoints
public int getRequiredVictoryPoints()Calculates the number of required Victory Points (VP) needed to achieve overall success for this StratCon contract.The calculation is based on several averaged campaign parameters:
- Base requirement — Required number of combat teams multiplied by the contract length.
- Scenario odds — The mean scenario-odds percentage across all StratCon tracks, converted to a probability.
- Turning point chance — A scaling factor based on command rights:
INTEGRATEDcontracts assume a 100% chance, while all others use a one-third chance.
The final result estimates the expected number of Turning Points the player must win for overall contract success. If the player loses a handful of Turning Points, they should still be able to win the contract by being proactive in the Area of Operations.
- Returns:
- the required number of Victory Points, rounded up to the nearest integer
- Since:
- 0.50.10
-