Class AcquisitionPriceMultipliers
- Clan tech bought by a non-Clan campaign:
CampaignOption.CLAN_TECH_INVASION_PRICE_MULTIPLIERfrom 3049 to 3070, thenCampaignOption.CLAN_TECH_POST_INVASION_PRICE_MULTIPLIER. - Tech rating E and F bought by a campaign that is neither Clan nor ComStar (Word of Blake counts as
ComStar), from
2860 to 3040:
CampaignOption.SUCCESSION_WARS_ADVANCED_TECH_PRICE_MULTIPLIER. OtherwiseCampaignOption.TECH_RATING_E_PRICE_MULTIPLIERorCampaignOption.TECH_RATING_F_PRICE_MULTIPLIER.
Every surcharge that applies stacks additively: ×5 and ×1.25 together make ×5.25. Discounts (multipliers below ×1) are multiplied in afterwards, so no combination of them can make an item free: ×0.5 and ×0.5 make ×0.25. Outside the listed years, nothing replaces the era multipliers, so tech rating E and F fall back to their usual multipliers and Clan tech has no multiplier at all.
The multiplier for a unit covers its whole price. Parts only pay the multipliers when the unofficial
CampaignOption.APPLY_ACQUISITION_MULTIPLIERS_TO_PARTS option is on.
A mixed-tech unit pays none of the Clan tech multipliers, whatever its chassis: its mixed-tech unit price multiplier already covers its Clan equipment.
These multipliers only apply to what the campaign pays when buying and receives when selling (see
Unit.getPurchaseCost(), Unit.getSalePrice(),
Part.getPurchaseCost() and Part.getSalePrice()), and to the spare parts it buys each month for its
units (Unit.getSparePartsCost(), CO p.24), never to the value of what it owns
(maintenance, contract pay, battle loss compensation, salvage). They only apply under the
UnitCostModel.TOTAL_WARFARE CampaignOption.UNIT_COST_MODEL; every
other model leaves them at ×1.
- Since:
- 0.51.01
-
Method Summary
Modifier and TypeMethodDescriptionstatic doublegetPartMultiplier(CampaignOptions campaignOptions, Faction faction, int gameYear, Part part) static doublegetUnitMultiplier(CampaignOptions campaignOptions, Faction faction, int gameYear, boolean isClan, boolean isMixedTech, megamek.common.enums.TechRating techRating) For callers that cache a unit's traits rather than keep its entity loaded, such as unit market offers.static doublegetUnitMultiplier(CampaignOptions campaignOptions, Faction faction, int gameYear, megamek.common.loaders.MekSummary summary) static doublegetUnitMultiplier(CampaignOptions campaignOptions, Faction faction, int gameYear, megamek.common.units.Entity entity)
-
Method Details
-
getUnitMultiplier
public static double getUnitMultiplier(CampaignOptions campaignOptions, @Nullable Faction faction, int gameYear, megamek.common.units.Entity entity) - Parameters:
campaignOptions- the campaign options holding the multipliersfaction- the buying campaign's faction, ornullto treat it as neither Clan nor ComStargameYear- the current yearentity- the unit's entity- Returns:
- the acquisition price multiplier for the whole unit. Only a pure Clan unit pays the Clan tech multiplier: a mixed-tech unit, on either chassis, is covered by its mixed-tech unit price multiplier.
- Since:
- 0.51.01
-
getUnitMultiplier
public static double getUnitMultiplier(CampaignOptions campaignOptions, @Nullable Faction faction, int gameYear, boolean isClan, boolean isMixedTech, @Nullable megamek.common.enums.TechRating techRating) For callers that cache a unit's traits rather than keep its entity loaded, such as unit market offers.- Parameters:
campaignOptions- the campaign options holding the multipliersfaction- the buying campaign's faction, ornullto treat it as neither Clan nor ComStargameYear- the current yearisClan- whether the unit is Clan techisMixedTech- whether the unit is mixed tech, which never pays the Clan tech multipliertechRating- the unit's tech rating, ornullif it is unknown- Returns:
- the acquisition price multiplier for the whole unit, as
getUnitMultiplier(CampaignOptions, Faction, int, Entity)works it out - Since:
- 0.51.01
-
getUnitMultiplier
public static double getUnitMultiplier(CampaignOptions campaignOptions, @Nullable Faction faction, int gameYear, megamek.common.loaders.MekSummary summary) - Parameters:
campaignOptions- the campaign options holding the multipliersfaction- the buying campaign's faction, ornullto treat it as neither Clan nor ComStargameYear- the current yearsummary- the unit's summary- Returns:
- the acquisition price multiplier for the whole unit, as
getUnitMultiplier(CampaignOptions, Faction, int, Entity)works it out once the unit is loaded - Since:
- 0.51.01
-
getPartMultiplier
public static double getPartMultiplier(CampaignOptions campaignOptions, @Nullable Faction faction, int gameYear, Part part) - Parameters:
campaignOptions- the campaign options holding the multipliersfaction- the buying campaign's faction, ornullto treat it as neither Clan nor ComStargameYear- the current yearpart- the part- Returns:
- the acquisition price multiplier for the part; ×1 unless
CampaignOption.APPLY_ACQUISITION_MULTIPLIERS_TO_PARTSis on - Since:
- 0.51.01
-