Skip to content

Commit

Permalink
Merge pull request #95 from pheonixstorm/AtB-IORatingFactor
Browse files Browse the repository at this point in the history
AtB Uses Int Ops Reputation Factor when IO rating is used
  • Loading branch information
HammerGS committed Jun 5, 2016
2 parents c4cd12f + d5c0c93 commit 8256d1c
Showing 1 changed file with 20 additions and 14 deletions.
34 changes: 20 additions & 14 deletions MekHQ/src/mekhq/campaign/mission/AtBContract.java
Original file line number Diff line number Diff line change
Expand Up @@ -354,19 +354,25 @@ public static boolean isMinorPower(String fName) {
public void calculatePaymentMultiplier(Campaign campaign) {
int unitRatingMod = campaign.getUnitRatingMod();
double multiplier = 1.0;
if (unitRatingMod >= IUnitRating.DRAGOON_A){
multiplier *= 2.0;
}
if (unitRatingMod == IUnitRating.DRAGOON_B){
multiplier *= 1.5;
}
if (unitRatingMod == IUnitRating.DRAGOON_D){
multiplier *= 0.8;
}
if (unitRatingMod == IUnitRating.DRAGOON_F){
multiplier *= 0.5;
}

// IntOps reputation factor then Dragoons rating
if (campaign.getCampaignOptions().useDragoonRating()
&& campaign.getCampaignOptions().getUnitRatingMethod().equals(mekhq.campaign.rating.UnitRatingMethod.INTERSTELLAR_OPS)) {
multiplier *= (unitRatingMod * .2) + .5;
} else {
if (unitRatingMod >= IUnitRating.DRAGOON_A){
multiplier *= 2.0;
}
if (unitRatingMod == IUnitRating.DRAGOON_B){
multiplier *= 1.5;
}
if (unitRatingMod == IUnitRating.DRAGOON_D){
multiplier *= 0.8;
}
if (unitRatingMod == IUnitRating.DRAGOON_F){
multiplier *= 0.5;
}
}

switch (missionType) {
case MT_CADREDUTY:
multiplier *= 0.8;
Expand Down Expand Up @@ -410,7 +416,7 @@ public void calculatePaymentMultiplier(Campaign campaign) {
enemyCode.equals("PIR")) {
multiplier *= 1.1;
}

int cmdrStrategy = 0;
if (campaign.getFlaggedCommander() != null &&
campaign.getFlaggedCommander().getSkill(SkillType.S_STRATEGY) != null) {
Expand Down

0 comments on commit 8256d1c

Please sign in to comment.