diff --git a/MekHQ/src/mekhq/campaign/mission/CommonObjectiveFactory.java b/MekHQ/src/mekhq/campaign/mission/CommonObjectiveFactory.java index 85bca986e6..a9e15a7c77 100644 --- a/MekHQ/src/mekhq/campaign/mission/CommonObjectiveFactory.java +++ b/MekHQ/src/mekhq/campaign/mission/CommonObjectiveFactory.java @@ -71,7 +71,7 @@ public static ScenarioObjective getKeepAttachedGroundUnitsAlive(AtBContract cont /** * Generates a "keep at least X% or X of [force] units" objective from the bot force with the specified name */ - public static ScenarioObjective getPreserveSpecificFriendlies(String forceName, int number, boolean fixedAmount) { + public static ScenarioObjective getPreserveSpecificFriendlies(String forceName, int OperationalVP, int number, boolean fixedAmount) { ScenarioObjective keepFriendliesAlive = new ScenarioObjective(); if (fixedAmount) { keepFriendliesAlive.setDescription(String.format(resourceMap.getString("commonObjectives.preserveFriendlyUnits.text"), number, "")); @@ -85,12 +85,12 @@ public static ScenarioObjective getPreserveSpecificFriendlies(String forceName, ObjectiveEffect successEffect = new ObjectiveEffect(); successEffect.effectType = ObjectiveEffectType.ScenarioVictory; - successEffect.howMuch = 1; + successEffect.howMuch = OperationalVP; keepFriendliesAlive.addSuccessEffect(successEffect); ObjectiveEffect friendlyFailureEffect = new ObjectiveEffect(); friendlyFailureEffect.effectType = ObjectiveEffectType.ScenarioDefeat; - friendlyFailureEffect.howMuch = 1; + friendlyFailureEffect.howMuch = OperationalVP; keepFriendliesAlive.addFailureEffect(friendlyFailureEffect); return keepFriendliesAlive; @@ -101,7 +101,7 @@ public static ScenarioObjective getPreserveSpecificFriendlies(String forceName, * as well as any attached allies, alive */ public static ScenarioObjective getKeepFriendliesAlive(Campaign campaign, AtBContract contract, - AtBScenario scenario, int number, + AtBScenario scenario, int OperationalVP, int number, boolean fixedAmount) { ScenarioObjective keepFriendliesAlive = new ScenarioObjective(); if (fixedAmount) { @@ -119,12 +119,12 @@ public static ScenarioObjective getKeepFriendliesAlive(Campaign campaign, AtBCon ObjectiveEffect successEffect = new ObjectiveEffect(); successEffect.effectType = ObjectiveEffectType.ScenarioVictory; - successEffect.howMuch = 1; + successEffect.howMuch = OperationalVP; keepFriendliesAlive.addSuccessEffect(successEffect); ObjectiveEffect friendlyFailureEffect = new ObjectiveEffect(); friendlyFailureEffect.effectType = ObjectiveEffectType.ScenarioDefeat; - friendlyFailureEffect.howMuch = 1; + friendlyFailureEffect.howMuch = OperationalVP; keepFriendliesAlive.addFailureEffect(friendlyFailureEffect); return keepFriendliesAlive; @@ -134,7 +134,7 @@ public static ScenarioObjective getKeepFriendliesAlive(Campaign campaign, AtBCon * Generates a "destroy x% of all units" from the given force name objective * @param forcename Explicit enemy force name */ - public static ScenarioObjective getDestroyEnemies(String forcename, int percentage) { + public static ScenarioObjective getDestroyEnemies(String forcename, int OperationalVP, int percentage) { ScenarioObjective destroyHostiles = new ScenarioObjective(); destroyHostiles.setDescription(String.format(resourceMap.getString("commonObjectives.forceWithdraw.text"), percentage)); destroyHostiles.setObjectiveCriterion(ObjectiveCriterion.ForceWithdraw); @@ -143,12 +143,12 @@ public static ScenarioObjective getDestroyEnemies(String forcename, int percenta ObjectiveEffect successEffect = new ObjectiveEffect(); successEffect.effectType = ObjectiveEffectType.ScenarioVictory; - successEffect.howMuch = 1; + successEffect.howMuch = OperationalVP; destroyHostiles.addSuccessEffect(successEffect); ObjectiveEffect failureEffect = new ObjectiveEffect(); failureEffect.effectType = ObjectiveEffectType.ScenarioDefeat; - failureEffect.howMuch = 1; + failureEffect.howMuch = OperationalVP; destroyHostiles.addFailureEffect(failureEffect); return destroyHostiles; @@ -158,14 +158,14 @@ public static ScenarioObjective getDestroyEnemies(String forcename, int percenta * Generates a "destroy x% of all units" objective from the primary opposing force * @param contract Contract to examine for enemy force name. */ - public static ScenarioObjective getDestroyEnemies(AtBContract contract, int percentage) { - return getDestroyEnemies(contract.getEnemyBotName(), percentage); + public static ScenarioObjective getDestroyEnemies(AtBContract contract, int OperationalVP, int percentage) { + return getDestroyEnemies(contract.getEnemyBotName(), OperationalVP, percentage); } /** * Generates a "prevent x% of all units from reaching given edge" objective from the primary opposing force */ - public static ScenarioObjective getPreventEnemyBreakthrough(AtBContract contract, int percentage, OffBoardDirection direction) { + public static ScenarioObjective getPreventEnemyBreakthrough(AtBContract contract, int OperationalVP, int percentage, OffBoardDirection direction) { ScenarioObjective destroyHostiles = new ScenarioObjective(); destroyHostiles.setDescription( String.format(resourceMap.getString("commonObjectives.preventBreakthrough.text"), percentage, direction)); @@ -176,12 +176,12 @@ public static ScenarioObjective getPreventEnemyBreakthrough(AtBContract contract ObjectiveEffect successEffect = new ObjectiveEffect(); successEffect.effectType = ObjectiveEffectType.ScenarioVictory; - successEffect.howMuch = 1; + successEffect.howMuch = OperationalVP; destroyHostiles.addSuccessEffect(successEffect); ObjectiveEffect failureEffect = new ObjectiveEffect(); failureEffect.effectType = ObjectiveEffectType.ScenarioDefeat; - failureEffect.howMuch = 1; + failureEffect.howMuch = OperationalVP; destroyHostiles.addFailureEffect(failureEffect); return destroyHostiles; @@ -190,7 +190,7 @@ public static ScenarioObjective getPreventEnemyBreakthrough(AtBContract contract /** * Generates a "reach X edge with x% of all allied + player units" objective */ - public static ScenarioObjective getBreakthrough(AtBContract contract, AtBScenario scenario, Campaign campaign, + public static ScenarioObjective getBreakthrough(AtBContract contract, AtBScenario scenario, Campaign campaign, int OperationalVP, int percentage, OffBoardDirection direction) { ScenarioObjective breakthrough = new ScenarioObjective(); breakthrough.setDescription( @@ -204,12 +204,12 @@ public static ScenarioObjective getBreakthrough(AtBContract contract, AtBScenari ObjectiveEffect successEffect = new ObjectiveEffect(); successEffect.effectType = ObjectiveEffectType.ScenarioVictory; - successEffect.howMuch = 1; + successEffect.howMuch = OperationalVP; breakthrough.addSuccessEffect(successEffect); ObjectiveEffect failureEffect = new ObjectiveEffect(); failureEffect.effectType = ObjectiveEffectType.ScenarioDefeat; - failureEffect.howMuch = 1; + failureEffect.howMuch = OperationalVP; breakthrough.addFailureEffect(failureEffect); return breakthrough; diff --git a/MekHQ/src/mekhq/campaign/mission/atb/scenario/AceDuelBuiltInScenario.java b/MekHQ/src/mekhq/campaign/mission/atb/scenario/AceDuelBuiltInScenario.java index a93599390f..39461b9bd8 100644 --- a/MekHQ/src/mekhq/campaign/mission/atb/scenario/AceDuelBuiltInScenario.java +++ b/MekHQ/src/mekhq/campaign/mission/atb/scenario/AceDuelBuiltInScenario.java @@ -141,8 +141,8 @@ public void setExtraScenarioForces(Campaign campaign, ArrayList allyEnti public void setObjectives(Campaign campaign, AtBContract contract) { super.setObjectives(campaign, contract); - ScenarioObjective destroyHostiles = CommonObjectiveFactory.getDestroyEnemies(contract, 100); - ScenarioObjective keepFriendliesAlive = CommonObjectiveFactory.getKeepFriendliesAlive(campaign, contract, this, 100, false); + ScenarioObjective destroyHostiles = CommonObjectiveFactory.getDestroyEnemies(contract, 1, 100); + ScenarioObjective keepFriendliesAlive = CommonObjectiveFactory.getKeepFriendliesAlive(campaign, contract, this, 1, 100, false); getScenarioObjectives().add(destroyHostiles); getScenarioObjectives().add(keepFriendliesAlive); diff --git a/MekHQ/src/mekhq/campaign/mission/atb/scenario/AlliedTraitorsBuiltInScenario.java b/MekHQ/src/mekhq/campaign/mission/atb/scenario/AlliedTraitorsBuiltInScenario.java index 6674c6f4d9..7becb76781 100644 --- a/MekHQ/src/mekhq/campaign/mission/atb/scenario/AlliedTraitorsBuiltInScenario.java +++ b/MekHQ/src/mekhq/campaign/mission/atb/scenario/AlliedTraitorsBuiltInScenario.java @@ -81,11 +81,11 @@ public void setObjectives(Campaign campaign, AtBContract contract) { String allyBotName = getContract(campaign).getAllyBotName(); - ScenarioObjective destroyHostiles = CommonObjectiveFactory.getDestroyEnemies(contract, 100); + ScenarioObjective destroyHostiles = CommonObjectiveFactory.getDestroyEnemies(contract, 1, 100); // this is a special case where the target is actually the "allied" bot. destroyHostiles.clearForces(); destroyHostiles.addForce(allyBotName); - ScenarioObjective keepFriendliesAlive = CommonObjectiveFactory.getKeepFriendliesAlive(campaign, contract, this, 100, false); + ScenarioObjective keepFriendliesAlive = CommonObjectiveFactory.getKeepFriendliesAlive(campaign, contract, this, 1, 100, false); keepFriendliesAlive.removeForce(allyBotName); getScenarioObjectives().add(destroyHostiles); diff --git a/MekHQ/src/mekhq/campaign/mission/atb/scenario/AllyRescueBuiltInScenario.java b/MekHQ/src/mekhq/campaign/mission/atb/scenario/AllyRescueBuiltInScenario.java index 9f0dac76a4..a9e57b86fe 100644 --- a/MekHQ/src/mekhq/campaign/mission/atb/scenario/AllyRescueBuiltInScenario.java +++ b/MekHQ/src/mekhq/campaign/mission/atb/scenario/AllyRescueBuiltInScenario.java @@ -122,9 +122,9 @@ public void setExtraScenarioForces(Campaign campaign, ArrayList allyEnti public void setObjectives(Campaign campaign, AtBContract contract) { super.setObjectives(campaign, contract); - ScenarioObjective destroyHostiles = CommonObjectiveFactory.getDestroyEnemies(contract, 50); + ScenarioObjective destroyHostiles = CommonObjectiveFactory.getDestroyEnemies(contract, 1, 50); ScenarioObjective keepFriendliesAlive = CommonObjectiveFactory.getKeepFriendliesAlive(campaign, contract, this, - 50, false); + 1, 50, false); // in addition to the standard destroy 50/preserve 50, you need to keep // at least 3/8 of the "allied" units alive. diff --git a/MekHQ/src/mekhq/campaign/mission/atb/scenario/AmbushBuiltInScenario.java b/MekHQ/src/mekhq/campaign/mission/atb/scenario/AmbushBuiltInScenario.java index bcaaa0d9a8..f6e1b8ddeb 100644 --- a/MekHQ/src/mekhq/campaign/mission/atb/scenario/AmbushBuiltInScenario.java +++ b/MekHQ/src/mekhq/campaign/mission/atb/scenario/AmbushBuiltInScenario.java @@ -92,9 +92,9 @@ public void setExtraScenarioForces(Campaign campaign, ArrayList allyEnti @Override public void setObjectives(Campaign campaign, AtBContract contract) { super.setObjectives(campaign, contract); - ScenarioObjective destroyHostiles = CommonObjectiveFactory.getDestroyEnemies(contract, 66); + ScenarioObjective destroyHostiles = CommonObjectiveFactory.getDestroyEnemies(contract, 1, 66); ScenarioObjective keepFriendliesAlive = CommonObjectiveFactory.getKeepFriendliesAlive(campaign, contract, this, - 100, false); + 1, 100, false); getScenarioObjectives().add(destroyHostiles); getScenarioObjectives().add(keepFriendliesAlive); diff --git a/MekHQ/src/mekhq/campaign/mission/atb/scenario/BaseAttackBuiltInScenario.java b/MekHQ/src/mekhq/campaign/mission/atb/scenario/BaseAttackBuiltInScenario.java index 7bd389d680..fcb4dcba06 100644 --- a/MekHQ/src/mekhq/campaign/mission/atb/scenario/BaseAttackBuiltInScenario.java +++ b/MekHQ/src/mekhq/campaign/mission/atb/scenario/BaseAttackBuiltInScenario.java @@ -162,14 +162,14 @@ public void setExtraScenarioForces(Campaign campaign, ArrayList allyEnti public void setObjectives(Campaign campaign, AtBContract contract) { super.setObjectives(campaign, contract); - ScenarioObjective destroyHostiles = CommonObjectiveFactory.getDestroyEnemies(contract, 50); + ScenarioObjective destroyHostiles = CommonObjectiveFactory.getDestroyEnemies(contract, 1, 50); destroyHostiles.addForce(String.format("%s%s", contract.getEnemyBotName(), SECOND_ENEMY_FORCE_SUFFIX)); ScenarioObjective keepFriendliesAlive = CommonObjectiveFactory.getKeepFriendliesAlive(campaign, contract, this, - 50, false); + 1, 50, false); ScenarioObjective preserveBaseUnits = null; if (!isAttacker()) { - preserveBaseUnits = CommonObjectiveFactory.getPreserveSpecificFriendlies(BASE_CIVILIAN_FORCE_ID, 3, true); + preserveBaseUnits = CommonObjectiveFactory.getPreserveSpecificFriendlies(BASE_CIVILIAN_FORCE_ID, 1, 3, true); preserveBaseUnits.addForce(BASE_TURRET_FORCE_ID); ObjectiveEffect defeatEffect = new ObjectiveEffect(); diff --git a/MekHQ/src/mekhq/campaign/mission/atb/scenario/BreakthroughBuiltInScenario.java b/MekHQ/src/mekhq/campaign/mission/atb/scenario/BreakthroughBuiltInScenario.java index 43d3389a68..ec972bd9b9 100644 --- a/MekHQ/src/mekhq/campaign/mission/atb/scenario/BreakthroughBuiltInScenario.java +++ b/MekHQ/src/mekhq/campaign/mission/atb/scenario/BreakthroughBuiltInScenario.java @@ -120,9 +120,9 @@ public void setObjectives(Campaign campaign, AtBContract contract) { super.setObjectives(campaign, contract); ScenarioObjective destroyHostiles = isAttacker() - ? CommonObjectiveFactory.getBreakthrough(contract, this, campaign, 66, + ? CommonObjectiveFactory.getBreakthrough(contract, this, campaign, 1, 66, OffBoardDirection.getOpposite(OffBoardDirection.translateBoardStart(getStart()))) - : CommonObjectiveFactory.getPreventEnemyBreakthrough(contract, 50, + : CommonObjectiveFactory.getPreventEnemyBreakthrough(contract, 1, 50, OffBoardDirection.translateBoardStart(getEnemyHome())); ScenarioObjective keepAttachedUnitsAlive = CommonObjectiveFactory.getKeepAttachedGroundUnitsAlive(contract, this); diff --git a/MekHQ/src/mekhq/campaign/mission/atb/scenario/ChaseBuiltInScenario.java b/MekHQ/src/mekhq/campaign/mission/atb/scenario/ChaseBuiltInScenario.java index c94074af0e..60b4efc14d 100644 --- a/MekHQ/src/mekhq/campaign/mission/atb/scenario/ChaseBuiltInScenario.java +++ b/MekHQ/src/mekhq/campaign/mission/atb/scenario/ChaseBuiltInScenario.java @@ -140,9 +140,9 @@ public void setObjectives(Campaign campaign, AtBContract contract) { super.setObjectives(campaign, contract); ScenarioObjective destroyHostiles = isAttacker() - ? CommonObjectiveFactory.getBreakthrough(contract, this, campaign, 50, + ? CommonObjectiveFactory.getBreakthrough(contract, this, campaign, 1, 50, OffBoardDirection.translateBoardStart(AtBDynamicScenarioFactory.getOppositeEdge(getStart()))) - : CommonObjectiveFactory.getPreventEnemyBreakthrough(contract, 50, + : CommonObjectiveFactory.getPreventEnemyBreakthrough(contract, 1, 50, OffBoardDirection.translateBoardStart(getEnemyHome())); ScenarioObjective keepAttachedUnitsAlive = CommonObjectiveFactory.getKeepAttachedGroundUnitsAlive(contract, this); diff --git a/MekHQ/src/mekhq/campaign/mission/atb/scenario/CivilianHelpBuiltInScenario.java b/MekHQ/src/mekhq/campaign/mission/atb/scenario/CivilianHelpBuiltInScenario.java index 0fca45b8cb..6d787d5bf7 100644 --- a/MekHQ/src/mekhq/campaign/mission/atb/scenario/CivilianHelpBuiltInScenario.java +++ b/MekHQ/src/mekhq/campaign/mission/atb/scenario/CivilianHelpBuiltInScenario.java @@ -102,11 +102,11 @@ public void setExtraScenarioForces(Campaign campaign, ArrayList allyEnti public void setObjectives(Campaign campaign, AtBContract contract) { super.setObjectives(campaign, contract); - ScenarioObjective destroyHostiles = CommonObjectiveFactory.getDestroyEnemies(contract, 66); + ScenarioObjective destroyHostiles = CommonObjectiveFactory.getDestroyEnemies(contract, 1, 66); ScenarioObjective keepFriendliesAlive = CommonObjectiveFactory.getKeepFriendliesAlive(campaign, contract, this, - 1, true); + 1, 1, true); ScenarioObjective keepCiviliansAlive = CommonObjectiveFactory.getPreserveSpecificFriendlies(CIVILIAN_FORCE_ID, - 1, true); + 1, 1, true); // not losing the scenario also gets you a "bonus" ObjectiveEffect bonusEffect = new ObjectiveEffect(); diff --git a/MekHQ/src/mekhq/campaign/mission/atb/scenario/CivilianRiotBuiltInScenario.java b/MekHQ/src/mekhq/campaign/mission/atb/scenario/CivilianRiotBuiltInScenario.java index 46fee22f1d..7205d41d9b 100644 --- a/MekHQ/src/mekhq/campaign/mission/atb/scenario/CivilianRiotBuiltInScenario.java +++ b/MekHQ/src/mekhq/campaign/mission/atb/scenario/CivilianRiotBuiltInScenario.java @@ -130,12 +130,12 @@ public void setExtraScenarioForces(Campaign campaign, ArrayList allyEnti public void setObjectives(Campaign campaign, AtBContract contract) { super.setObjectives(campaign, contract); - ScenarioObjective destroyRioters = CommonObjectiveFactory.getDestroyEnemies(RIOTER_FORCE_ID, 100); - ScenarioObjective destroyRebels = CommonObjectiveFactory.getDestroyEnemies(REBEL_FORCE_ID, 50); + ScenarioObjective destroyRioters = CommonObjectiveFactory.getDestroyEnemies(RIOTER_FORCE_ID, 1, 100); + ScenarioObjective destroyRebels = CommonObjectiveFactory.getDestroyEnemies(REBEL_FORCE_ID, 1, 50); ScenarioObjective keepFriendliesAlive = CommonObjectiveFactory.getKeepFriendliesAlive(campaign, contract, this, - 50, false); + 1, 50, false); ScenarioObjective keepLoyalistsAlive = CommonObjectiveFactory.getPreserveSpecificFriendlies(LOYALIST_FORCE_ID, - 1, true); + 1, 1, true); // not losing the scenario also gets you a "bonus" ObjectiveEffect bonusEffect = new ObjectiveEffect(); diff --git a/MekHQ/src/mekhq/campaign/mission/atb/scenario/ConvoyAttackBuiltInScenario.java b/MekHQ/src/mekhq/campaign/mission/atb/scenario/ConvoyAttackBuiltInScenario.java index 50fd7f1a0a..f16763d350 100644 --- a/MekHQ/src/mekhq/campaign/mission/atb/scenario/ConvoyAttackBuiltInScenario.java +++ b/MekHQ/src/mekhq/campaign/mission/atb/scenario/ConvoyAttackBuiltInScenario.java @@ -110,9 +110,9 @@ public void setExtraScenarioForces(Campaign campaign, ArrayList allyEnti public void setObjectives(Campaign campaign, AtBContract contract) { super.setObjectives(campaign, contract); - ScenarioObjective destroyConvoy = CommonObjectiveFactory.getDestroyEnemies(CONVOY_FORCE_ID, 100); + ScenarioObjective destroyConvoy = CommonObjectiveFactory.getDestroyEnemies(CONVOY_FORCE_ID, 1, 100); ScenarioObjective keepFriendliesAlive = CommonObjectiveFactory.getKeepFriendliesAlive(campaign, contract, this, - 50, false); + 1, 50, false); getScenarioObjectives().add(destroyConvoy); getScenarioObjectives().add(keepFriendliesAlive); diff --git a/MekHQ/src/mekhq/campaign/mission/atb/scenario/ConvoyRescueBuiltInScenario.java b/MekHQ/src/mekhq/campaign/mission/atb/scenario/ConvoyRescueBuiltInScenario.java index 1baf80ae42..9f4b800e3f 100644 --- a/MekHQ/src/mekhq/campaign/mission/atb/scenario/ConvoyRescueBuiltInScenario.java +++ b/MekHQ/src/mekhq/campaign/mission/atb/scenario/ConvoyRescueBuiltInScenario.java @@ -117,11 +117,11 @@ public void setExtraScenarioForces(Campaign campaign, ArrayList allyEnti public void setObjectives(Campaign campaign, AtBContract contract) { super.setObjectives(campaign, contract); - ScenarioObjective destroyHostiles = CommonObjectiveFactory.getDestroyEnemies(contract, 50); + ScenarioObjective destroyHostiles = CommonObjectiveFactory.getDestroyEnemies(contract, 1, 50); ScenarioObjective keepFriendliesAlive = CommonObjectiveFactory.getKeepFriendliesAlive(campaign, contract, this, - 50, false); + 1, 50, false); ScenarioObjective keepConvoyAlive = CommonObjectiveFactory.getPreserveSpecificFriendlies(CONVOY_FORCE_ID, 1, - true); + 1, true); // not losing the scenario also gets you a "bonus" ObjectiveEffect bonusEffect = new ObjectiveEffect(); diff --git a/MekHQ/src/mekhq/campaign/mission/atb/scenario/ExtractionBuiltInScenario.java b/MekHQ/src/mekhq/campaign/mission/atb/scenario/ExtractionBuiltInScenario.java index 00d5dccb79..c8395ebd85 100644 --- a/MekHQ/src/mekhq/campaign/mission/atb/scenario/ExtractionBuiltInScenario.java +++ b/MekHQ/src/mekhq/campaign/mission/atb/scenario/ExtractionBuiltInScenario.java @@ -136,8 +136,8 @@ public void setObjectives(Campaign campaign, AtBContract contract) { ScenarioObjective civilianObjective; if (isAttacker()) { - civilianObjective = CommonObjectiveFactory.getPreserveSpecificFriendlies(CIVILIAN_FORCE_ID, 50, false); - keepFriendliesAlive = CommonObjectiveFactory.getKeepFriendliesAlive(campaign, contract, this, 66, false); + civilianObjective = CommonObjectiveFactory.getPreserveSpecificFriendlies(CIVILIAN_FORCE_ID, 1, 50, false); + keepFriendliesAlive = CommonObjectiveFactory.getKeepFriendliesAlive(campaign, contract, this, 1, 66, false); civilianObjective.setTimeLimit(12); civilianObjective.setTimeLimitAtMost(false); @@ -156,11 +156,11 @@ public void setObjectives(Campaign campaign, AtBContract contract) { civilianObjective.addDetail(String .format(defaultResourceBundle.getString("commonObjectives.bonusRolls.text"), bonusEffect.howMuch)); } else { - civilianObjective = CommonObjectiveFactory.getDestroyEnemies(CIVILIAN_FORCE_ID, 100); + civilianObjective = CommonObjectiveFactory.getDestroyEnemies(CIVILIAN_FORCE_ID, 1, 100); civilianObjective.setTimeLimit(10); civilianObjective.setTimeLimitAtMost(true); civilianObjective.setTimeLimitType(TimeLimitType.Fixed); - destroyHostiles = CommonObjectiveFactory.getDestroyEnemies(contract, 33); + destroyHostiles = CommonObjectiveFactory.getDestroyEnemies(contract, 1, 33); destroyHostiles.setTimeLimit(10); destroyHostiles.setTimeLimitAtMost(true); destroyHostiles.setTimeLimitType(TimeLimitType.Fixed); diff --git a/MekHQ/src/mekhq/campaign/mission/atb/scenario/HideAndSeekBuiltInScenario.java b/MekHQ/src/mekhq/campaign/mission/atb/scenario/HideAndSeekBuiltInScenario.java index e2ec8b5666..76ee08ec3e 100644 --- a/MekHQ/src/mekhq/campaign/mission/atb/scenario/HideAndSeekBuiltInScenario.java +++ b/MekHQ/src/mekhq/campaign/mission/atb/scenario/HideAndSeekBuiltInScenario.java @@ -123,10 +123,10 @@ public void setObjectives(Campaign campaign, AtBContract contract) { // Attacker must destroy 50% and keep 66% alive // Defender must destroy 33% and keep 50% alive - ScenarioObjective destroyHostiles = CommonObjectiveFactory.getDestroyEnemies(contract, + ScenarioObjective destroyHostiles = CommonObjectiveFactory.getDestroyEnemies(contract, 1, isAttacker() ? 50 : 33); ScenarioObjective keepFriendliesAlive = CommonObjectiveFactory.getKeepFriendliesAlive( - campaign, contract, this, isAttacker() ? 66 : 50, false); + campaign, contract, this, 1, isAttacker() ? 66 : 50, false); ScenarioObjective keepAttachedUnitsAlive = CommonObjectiveFactory.getKeepAttachedGroundUnitsAlive(contract, this); diff --git a/MekHQ/src/mekhq/campaign/mission/atb/scenario/HoldTheLineBuiltInScenario.java b/MekHQ/src/mekhq/campaign/mission/atb/scenario/HoldTheLineBuiltInScenario.java index 2825edd837..168b131a1d 100644 --- a/MekHQ/src/mekhq/campaign/mission/atb/scenario/HoldTheLineBuiltInScenario.java +++ b/MekHQ/src/mekhq/campaign/mission/atb/scenario/HoldTheLineBuiltInScenario.java @@ -96,10 +96,10 @@ public void setObjectives(Campaign campaign, AtBContract contract) { // Attacker must destroy 50% and keep 66% alive // Defender must destroy 33% and keep 50% alive - ScenarioObjective destroyHostiles = CommonObjectiveFactory.getDestroyEnemies(contract, + ScenarioObjective destroyHostiles = CommonObjectiveFactory.getDestroyEnemies(contract, 1, isAttacker() ? 50 : 33); ScenarioObjective keepFriendliesAlive = CommonObjectiveFactory.getKeepFriendliesAlive( - campaign, contract, this, isAttacker() ? 66 : 50, false); + campaign, contract, this, 1, isAttacker() ? 66 : 50,false); ScenarioObjective keepAttachedUnitsAlive = CommonObjectiveFactory.getKeepAttachedGroundUnitsAlive(contract, this); diff --git a/MekHQ/src/mekhq/campaign/mission/atb/scenario/OfficerDuelBuiltInScenario.java b/MekHQ/src/mekhq/campaign/mission/atb/scenario/OfficerDuelBuiltInScenario.java index a98738f056..209303948a 100644 --- a/MekHQ/src/mekhq/campaign/mission/atb/scenario/OfficerDuelBuiltInScenario.java +++ b/MekHQ/src/mekhq/campaign/mission/atb/scenario/OfficerDuelBuiltInScenario.java @@ -144,9 +144,9 @@ public void setExtraScenarioForces(Campaign campaign, ArrayList allyEnti public void setObjectives(Campaign campaign, AtBContract contract) { super.setObjectives(campaign, contract); - ScenarioObjective destroyHostiles = CommonObjectiveFactory.getDestroyEnemies(contract, 100); + ScenarioObjective destroyHostiles = CommonObjectiveFactory.getDestroyEnemies(contract, 1, 100); ScenarioObjective keepFriendliesAlive = CommonObjectiveFactory.getKeepFriendliesAlive(campaign, - contract, this, 100, false); + contract, this, 1,100, false); getScenarioObjectives().add(destroyHostiles); getScenarioObjectives().add(keepFriendliesAlive); diff --git a/MekHQ/src/mekhq/campaign/mission/atb/scenario/PirateFreeForAllBuiltInScenario.java b/MekHQ/src/mekhq/campaign/mission/atb/scenario/PirateFreeForAllBuiltInScenario.java index 5fe6eb5a09..639c86addf 100644 --- a/MekHQ/src/mekhq/campaign/mission/atb/scenario/PirateFreeForAllBuiltInScenario.java +++ b/MekHQ/src/mekhq/campaign/mission/atb/scenario/PirateFreeForAllBuiltInScenario.java @@ -113,10 +113,10 @@ public void setExtraScenarioForces(Campaign campaign, ArrayList allyEnti public void setObjectives(Campaign campaign, AtBContract contract) { super.setObjectives(campaign, contract); - ScenarioObjective destroyHostiles = CommonObjectiveFactory.getDestroyEnemies(contract, 50); - ScenarioObjective destroyPirates = CommonObjectiveFactory.getDestroyEnemies(PIRATE_FORCE_ID, 50); + ScenarioObjective destroyHostiles = CommonObjectiveFactory.getDestroyEnemies(contract, 1, 50); + ScenarioObjective destroyPirates = CommonObjectiveFactory.getDestroyEnemies(PIRATE_FORCE_ID, 1, 50); ScenarioObjective keepFriendliesAlive = CommonObjectiveFactory.getKeepFriendliesAlive(campaign, contract, this, - 50, false); + 1, 50, false); getScenarioObjectives().add(destroyHostiles); getScenarioObjectives().add(destroyPirates); diff --git a/MekHQ/src/mekhq/campaign/mission/atb/scenario/PrisonBreakBuiltInScenario.java b/MekHQ/src/mekhq/campaign/mission/atb/scenario/PrisonBreakBuiltInScenario.java index a7b5e05d30..d00bcce0a7 100644 --- a/MekHQ/src/mekhq/campaign/mission/atb/scenario/PrisonBreakBuiltInScenario.java +++ b/MekHQ/src/mekhq/campaign/mission/atb/scenario/PrisonBreakBuiltInScenario.java @@ -117,10 +117,10 @@ public void setObjectives(Campaign campaign, AtBContract contract) { super.setObjectives(campaign, contract); ScenarioObjective keepFriendliesAlive = CommonObjectiveFactory.getKeepFriendliesAlive(campaign, contract, this, - 1, true); + 1, 1, true); ScenarioObjective keepPrisonersAlive = CommonObjectiveFactory.getPreserveSpecificFriendlies(PRISONER_FORCE_ID, - 1, true); - ScenarioObjective destroyHostiles = CommonObjectiveFactory.getDestroyEnemies(GUARD_FORCE_ID, 100); + 1, 1, true); + ScenarioObjective destroyHostiles = CommonObjectiveFactory.getDestroyEnemies(GUARD_FORCE_ID, 1, 100); destroyHostiles.getSuccessEffects().clear(); destroyHostiles.addDetail(getResourceBundle().getString("commonObjectives.battlefieldControl")); destroyHostiles.setTimeLimit(8); diff --git a/MekHQ/src/mekhq/campaign/mission/atb/scenario/ProbeBuiltInScenario.java b/MekHQ/src/mekhq/campaign/mission/atb/scenario/ProbeBuiltInScenario.java index 3ac9604387..1a1f8cf658 100644 --- a/MekHQ/src/mekhq/campaign/mission/atb/scenario/ProbeBuiltInScenario.java +++ b/MekHQ/src/mekhq/campaign/mission/atb/scenario/ProbeBuiltInScenario.java @@ -88,9 +88,9 @@ public void setExtraScenarioForces(Campaign campaign, ArrayList allyEnti public void setObjectives(Campaign campaign, AtBContract contract) { super.setObjectives(campaign, contract); - ScenarioObjective destroyHostiles = CommonObjectiveFactory.getDestroyEnemies(contract, 25); + ScenarioObjective destroyHostiles = CommonObjectiveFactory.getDestroyEnemies(contract, 1, 25); ScenarioObjective keepFriendliesAlive = CommonObjectiveFactory.getKeepFriendliesAlive(campaign, contract, this, - 75, false); + 1, 75, false); ScenarioObjective keepAttachedUnitsAlive = CommonObjectiveFactory.getKeepAttachedGroundUnitsAlive(contract, this); diff --git a/MekHQ/src/mekhq/campaign/mission/atb/scenario/ReconRaidBuiltInScenario.java b/MekHQ/src/mekhq/campaign/mission/atb/scenario/ReconRaidBuiltInScenario.java index a59b156ac0..fb0db127af 100644 --- a/MekHQ/src/mekhq/campaign/mission/atb/scenario/ReconRaidBuiltInScenario.java +++ b/MekHQ/src/mekhq/campaign/mission/atb/scenario/ReconRaidBuiltInScenario.java @@ -100,7 +100,7 @@ public boolean canAddDropShips() { public void setObjectives(Campaign campaign, AtBContract contract) { super.setObjectives(campaign, contract); - ScenarioObjective destroyHostiles = CommonObjectiveFactory.getDestroyEnemies(contract, 50); + ScenarioObjective destroyHostiles = CommonObjectiveFactory.getDestroyEnemies(contract, 1, 50); ScenarioObjective keepAttachedUnitsAlive = CommonObjectiveFactory.getKeepAttachedGroundUnitsAlive(contract, this); @@ -110,7 +110,7 @@ public void setObjectives(Campaign campaign, AtBContract contract) { if (isAttacker()) { ScenarioObjective keepFriendliesAlive = CommonObjectiveFactory.getKeepFriendliesAlive(campaign, contract, - this, 75, false); + this, 1, 75, false); getScenarioObjectives().add(keepFriendliesAlive); ScenarioObjective raidObjective = new ScenarioObjective(); diff --git a/MekHQ/src/mekhq/campaign/mission/atb/scenario/StandUpBuiltInScenario.java b/MekHQ/src/mekhq/campaign/mission/atb/scenario/StandUpBuiltInScenario.java index 63210ae0dc..2c2e62eb14 100644 --- a/MekHQ/src/mekhq/campaign/mission/atb/scenario/StandUpBuiltInScenario.java +++ b/MekHQ/src/mekhq/campaign/mission/atb/scenario/StandUpBuiltInScenario.java @@ -77,9 +77,9 @@ public boolean canAddDropShips() { public void setObjectives(Campaign campaign, AtBContract contract) { super.setObjectives(campaign, contract); - ScenarioObjective destroyHostiles = CommonObjectiveFactory.getDestroyEnemies(contract, 50); + ScenarioObjective destroyHostiles = CommonObjectiveFactory.getDestroyEnemies(contract, 1, 50); ScenarioObjective keepFriendliesAlive = CommonObjectiveFactory.getKeepFriendliesAlive(campaign, contract, this, - 50, false); + 1, 50, false); ScenarioObjective keepAttachedUnitsAlive = CommonObjectiveFactory.getKeepAttachedGroundUnitsAlive(contract, this); diff --git a/MekHQ/src/mekhq/campaign/mission/atb/scenario/StarLeagueCache1BuiltInScenario.java b/MekHQ/src/mekhq/campaign/mission/atb/scenario/StarLeagueCache1BuiltInScenario.java index 84a4fd9009..b21c9293e9 100644 --- a/MekHQ/src/mekhq/campaign/mission/atb/scenario/StarLeagueCache1BuiltInScenario.java +++ b/MekHQ/src/mekhq/campaign/mission/atb/scenario/StarLeagueCache1BuiltInScenario.java @@ -138,10 +138,10 @@ public void setExtraScenarioForces(Campaign campaign, ArrayList allyEnti public void setObjectives(Campaign campaign, AtBContract contract) { super.setObjectives(campaign, contract); - ScenarioObjective destroyHostiles = CommonObjectiveFactory.getDestroyEnemies(contract, 100); - ScenarioObjective keepFriendliesAlive = CommonObjectiveFactory.getKeepFriendliesAlive(campaign, contract, this, + ScenarioObjective destroyHostiles = CommonObjectiveFactory.getDestroyEnemies(contract, 1, 100); + ScenarioObjective keepFriendliesAlive = CommonObjectiveFactory.getKeepFriendliesAlive(campaign, contract, this, 1, 1, true); - ScenarioObjective keepTechAlive = CommonObjectiveFactory.getPreserveSpecificFriendlies(TECH_FORCE_ID, 1, true); + ScenarioObjective keepTechAlive = CommonObjectiveFactory.getPreserveSpecificFriendlies(TECH_FORCE_ID, 1, 1, true); getScenarioObjectives().add(destroyHostiles); getScenarioObjectives().add(keepFriendliesAlive); diff --git a/MekHQ/src/mekhq/campaign/mission/atb/scenario/StarLeagueCache2BuiltInScenario.java b/MekHQ/src/mekhq/campaign/mission/atb/scenario/StarLeagueCache2BuiltInScenario.java index 0939a16e09..58593ba35a 100644 --- a/MekHQ/src/mekhq/campaign/mission/atb/scenario/StarLeagueCache2BuiltInScenario.java +++ b/MekHQ/src/mekhq/campaign/mission/atb/scenario/StarLeagueCache2BuiltInScenario.java @@ -79,9 +79,9 @@ public void setExtraScenarioForces(Campaign campaign, ArrayList allyEnti public void setObjectives(Campaign campaign, AtBContract contract) { getScenarioObjectives().clear(); - ScenarioObjective destroyHostiles = CommonObjectiveFactory.getDestroyEnemies(contract, 100); + ScenarioObjective destroyHostiles = CommonObjectiveFactory.getDestroyEnemies(contract, 1,100); ScenarioObjective keepFriendliesAlive = CommonObjectiveFactory.getKeepFriendliesAlive(campaign, contract, this, - 100, false); + 1, 100, false); getScenarioObjectives().add(destroyHostiles); getScenarioObjectives().add(keepFriendliesAlive);