From 21bed1c894cdae4038bc37a6a8775c3b7d8ae931 Mon Sep 17 00:00:00 2001 From: IllianiCBT Date: Sat, 22 Jun 2024 13:04:17 -0500 Subject: [PATCH] feat: Updated Guerilla Warfare XML and Dynamic scenario BV calculations - Adjusted formatting in `GuerillaWarfare.xml` for clarity - Corrected `forceBVBudget` calculation in `AtBDynamicScenarioFactory.java` for accurate scenario BV adjustment --- MekHQ/data/stratconcontractdefinitions/GuerillaWarfare.xml | 3 ++- .../src/mekhq/campaign/mission/AtBDynamicScenarioFactory.java | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/MekHQ/data/stratconcontractdefinitions/GuerillaWarfare.xml b/MekHQ/data/stratconcontractdefinitions/GuerillaWarfare.xml index fd711579e9..171d3a2686 100644 --- a/MekHQ/data/stratconcontractdefinitions/GuerillaWarfare.xml +++ b/MekHQ/data/stratconcontractdefinitions/GuerillaWarfare.xml @@ -21,7 +21,8 @@ -1 AnyScenarioVictory - OverwhelmingEnemyGroundReinforcements.xml + + OverwhelmingEnemyGroundReinforcements.xml OverwhelmingEnemyAirReinforcements.xml diff --git a/MekHQ/src/mekhq/campaign/mission/AtBDynamicScenarioFactory.java b/MekHQ/src/mekhq/campaign/mission/AtBDynamicScenarioFactory.java index cf21a0266a..854a512767 100644 --- a/MekHQ/src/mekhq/campaign/mission/AtBDynamicScenarioFactory.java +++ b/MekHQ/src/mekhq/campaign/mission/AtBDynamicScenarioFactory.java @@ -380,7 +380,7 @@ public static int generateForce(AtBDynamicScenario scenario, AtBContract contrac int forceBVBudget = (int) (effectiveBV * forceTemplate.getForceMultiplier()); if (isScenarioModifier) { - forceBVBudget *= campaign.getCampaignOptions().getScenarioModBV(); + forceBVBudget = (int) (forceBVBudget * ((double) campaign.getCampaignOptions().getScenarioModBV() / 100) * forceTemplate.getForceMultiplier()); } int forceUnitBudget = 0;