From 9a9c5911a6526f83f560c9f02373ef643dfe78c7 Mon Sep 17 00:00:00 2001 From: Scott_NZ Date: Sun, 9 Dec 2012 21:30:02 +1300 Subject: [PATCH] Hard difficulty for allies 03 --- OpenRA.Mods.RA/Missions/Allies03Script.cs | 13 ++++++++----- mods/ra/maps/allies-01/map.yaml | 2 -- mods/ra/maps/allies-02/map.yaml | 2 -- mods/ra/maps/allies-03/map.yaml | 2 +- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/OpenRA.Mods.RA/Missions/Allies03Script.cs b/OpenRA.Mods.RA/Missions/Allies03Script.cs index 646de1a6a8..3c1bc4218a 100644 --- a/OpenRA.Mods.RA/Missions/Allies03Script.cs +++ b/OpenRA.Mods.RA/Missions/Allies03Script.cs @@ -102,7 +102,7 @@ namespace OpenRA.Mods.RA.Missions static readonly string[] ParadropTerrainTypes = { "Clear", "Road", "Rough", "Beach", "Ore" }; static readonly string[] SovietParadroppers = { "e1", "e1", "e3", "e3", "e4" }; int paradrops = 20; - const int maxSovietYaks = 2; + int maxSovietYaks; int attackAtFrame; int attackAtFrameIncrement; @@ -407,23 +407,26 @@ namespace OpenRA.Mods.RA.Missions public void WorldLoaded(World w) { world = w; + var diff = w.LobbyInfo.GlobalSettings.Difficulty; + Game.Debug("{0} difficulty selected".F(diff)); allies1 = w.Players.Single(p => p.InternalName == "Allies1"); allies2 = w.Players.SingleOrDefault(p => p.InternalName == "Allies2"); if (allies2 != null) { attackAtFrame = 500; attackAtFrameIncrement = 500; - minAttackAtFrame = 200; - unitsEvacuatedThreshold = 100; + minAttackAtFrame = diff == "Hard" ? 50 : 100; + unitsEvacuatedThreshold = diff == "Hard" ? 200 : 100; } else { allies2 = allies1; attackAtFrame = 600; attackAtFrameIncrement = 600; - minAttackAtFrame = 100; - unitsEvacuatedThreshold = 50; + minAttackAtFrame = diff == "Hard" ? 100 : 200; + unitsEvacuatedThreshold = diff == "Hard" ? 100 : 50; } + maxSovietYaks = diff == "Hard" ? 4 : 2; objectives[EvacuateID].Text = objectives[EvacuateID].Text.F(unitsEvacuatedThreshold); allies = w.Players.Single(p => p.InternalName == "Allies"); soviets = w.Players.Single(p => p.InternalName == "Soviets"); diff --git a/mods/ra/maps/allies-01/map.yaml b/mods/ra/maps/allies-01/map.yaml index 46bcb19d27..c16e3b5433 100644 --- a/mods/ra/maps/allies-01/map.yaml +++ b/mods/ra/maps/allies-01/map.yaml @@ -20,8 +20,6 @@ UseAsShellmap: False Type: Campaign -Difficulties: Normal - Players: PlayerReference@Neutral: Name: Neutral diff --git a/mods/ra/maps/allies-02/map.yaml b/mods/ra/maps/allies-02/map.yaml index e9422b4fbd..e7733e6e99 100644 --- a/mods/ra/maps/allies-02/map.yaml +++ b/mods/ra/maps/allies-02/map.yaml @@ -20,8 +20,6 @@ UseAsShellmap: False Type: Campaign -Difficulties: Normal - Players: PlayerReference@Neutral: Name: Neutral diff --git a/mods/ra/maps/allies-03/map.yaml b/mods/ra/maps/allies-03/map.yaml index 5f04bc5f60..bd5da1630e 100644 --- a/mods/ra/maps/allies-03/map.yaml +++ b/mods/ra/maps/allies-03/map.yaml @@ -20,7 +20,7 @@ UseAsShellmap: False Type: Campaign -Difficulties: Normal +Difficulties: Normal, Hard Players: PlayerReference@Neutral: