163
163
import static mekhq .campaign .personnel .education .EducationController .getAcademy ;
164
164
import static mekhq .campaign .personnel .education .TrainingCombatTeams .processTrainingCombatTeams ;
165
165
import static mekhq .campaign .personnel .turnoverAndRetention .RetirementDefectionTracker .Payout .isBreakingContract ;
166
- import static mekhq .campaign .randomEvents .GrayMonday .EVENT_DATE_CLARION_NOTE ;
167
- import static mekhq .campaign .randomEvents .GrayMonday .EVENT_DATE_GRAY_MONDAY ;
168
- import static mekhq .campaign .randomEvents .GrayMonday .isGrayMonday ;
166
+ import static mekhq .campaign .randomEvents .GrayMonday .*;
169
167
import static mekhq .campaign .randomEvents .prisoners .PrisonerEventManager .DEFAULT_TEMPORARY_CAPACITY ;
170
168
import static mekhq .campaign .randomEvents .prisoners .enums .PrisonerStatus .BONDSMAN ;
171
169
import static mekhq .campaign .stratcon .SupportPointNegotiation .negotiateAdditionalSupportPoints ;
@@ -8027,7 +8025,15 @@ public int calculatePartTransitTime(PlanetarySystem system) {
8027
8025
// if you are delivering from the same planet then no transit times
8028
8026
int currentTransitTime = (distance > 0 ) ? (int ) Math .ceil (getCurrentSystem ().getTimeToJumpPoint (1.0 )) : 0 ;
8029
8027
int originTransitTime = (distance > 0 ) ? (int ) Math .ceil (system .getTimeToJumpPoint (1.0 )) : 0 ;
8030
- int amazonFreeShipping = d6 (1 + jumps );
8028
+
8029
+ // CO 51 (latest) has much longer average part times. Let's adjust amazonFreeShipping
8030
+ // based on what getUnitTransitTime is set in the options in an attempt to get some
8031
+ // delivery times more in line with RAW's one-month minimum. Default is TRANSIT_UNIT_MONTH
8032
+ int amazonFreeShipping = switch (campaignOptions .getUnitTransitTime ()) {
8033
+ case TRANSIT_UNIT_MONTH -> 7 + (d6 (7 * (1 + jumps )));
8034
+ case TRANSIT_UNIT_WEEK -> 2 + (d6 (2 * (1 + jumps )));
8035
+ default -> d6 (1 + jumps );
8036
+ };
8031
8037
return (recharges * 7 ) + currentTransitTime + originTransitTime + amazonFreeShipping ;
8032
8038
}
8033
8039
@@ -8050,6 +8056,9 @@ public int calculatePartTransitTime(PlanetarySystem system) {
8050
8056
* calculated transit time.
8051
8057
*/
8052
8058
public int calculatePartTransitTime (int availability ) {
8059
+ // This is accurate as of the latest rules. It was
8060
+ // (BASE_MODIFIER - (roll + availability) / 4 months
8061
+ // in the older version.
8053
8062
final int BASE_MODIFIER = 7 ; // CamOps p51
8054
8063
final int roll = d6 (1 );
8055
8064
final int total = max (1 , (BASE_MODIFIER + roll + availability ) / 4 ); // CamOps p51
0 commit comments