Use global difficulty.

This commit is contained in:
Matthias Mailänder
2021-10-10 22:06:03 +02:00
committed by abcdefg30
parent 58b105f0d4
commit d42edfc0b9
70 changed files with 241 additions and 279 deletions

View File

@@ -12,7 +12,7 @@ SovietStartToBasePath = { StartPoint.Location, SovietBasePoint.Location }
SovietMCVReinf = { "mcv", "3tnk", "3tnk", "e1", "e1" }
SovExpansionPointGuard = { "2tnk", "2tnk", "e3", "e3", "e3" }
if Map.LobbyOption("difficulty") == "easy" then
if Difficulty == "easy" then
ArmorReinfGreece = { "jeep", "1tnk", "1tnk" }
else
ArmorReinfGreece = { "jeep", "jeep", "1tnk", "1tnk", "1tnk" }
@@ -79,11 +79,11 @@ IslandTroops1 = function()
end)
if not CheckForCYard() then
return
elseif Map.LobbyOption("difficulty") == "easy" then
elseif Difficulty == "easy" then
return
else
Trigger.OnAllKilled(units, function()
if Map.LobbyOption("difficulty") == "hard" then
if Difficulty == "hard" then
Trigger.AfterDelay(DateTime.Minutes(3), IslandTroops1)
else
Trigger.AfterDelay(DateTime.Minutes(5), IslandTroops1)
@@ -101,11 +101,11 @@ IslandTroops2 = function()
end)
if not CheckForCYard() then
return
elseif Map.LobbyOption("difficulty") == "easy" then
elseif Difficulty == "easy" then
return
else
Trigger.OnAllKilled(units, function()
if Map.LobbyOption("difficulty") == "hard" then
if Difficulty == "hard" then
Trigger.AfterDelay(DateTime.Minutes(3), IslandTroops2)
else
Trigger.AfterDelay(DateTime.Minutes(5), IslandTroops2)
@@ -123,11 +123,11 @@ IslandTroops3 = function()
end)
if not CheckForCYard() then
return
elseif Map.LobbyOption("difficulty") == "easy" then
elseif Difficulty == "easy" then
return
else
Trigger.OnAllKilled(units, function()
if Map.LobbyOption("difficulty") == "hard" then
if Difficulty == "hard" then
Trigger.AfterDelay(DateTime.Minutes(3), IslandTroops3)
else
Trigger.AfterDelay(DateTime.Minutes(5), IslandTroops3)
@@ -147,7 +147,7 @@ BringDDPatrol1 = function()
return
else
Trigger.OnAllKilled(units, function()
if Map.LobbyOption("difficulty") == "hard" then
if Difficulty == "hard" then
Trigger.AfterDelay(DateTime.Minutes(4), BringDDPatrol1)
else
Trigger.AfterDelay(DateTime.Minutes(7), BringDDPatrol1)
@@ -167,7 +167,7 @@ BringDDPatrol2 = function()
return
else
Trigger.OnAllKilled(units, function()
if Map.LobbyOption("difficulty") == "hard" then
if Difficulty == "hard" then
Trigger.AfterDelay(DateTime.Minutes(4), BringDDPatrol2)
else
Trigger.AfterDelay(DateTime.Minutes(7), BringDDPatrol2)

View File

@@ -28,7 +28,7 @@ CheckForSPen = function()
end
RunInitialActivities = function()
if Map.LobbyOption("difficulty") == "hard" then
if Difficulty == "hard" then
Expand()
ExpansionCheck = true
else
@@ -65,7 +65,7 @@ RunInitialActivities = function()
ProduceInfantry()
Trigger.AfterDelay(DateTime.Minutes(2), ProduceShips)
if Map.LobbyOption("difficulty") == "hard" or Map.LobbyOption("difficulty") == "normal" then
if Difficulty == "hard" or Difficulty == "normal" then
Trigger.AfterDelay(DateTime.Seconds(25), ReinfInf)
end
Trigger.AfterDelay(DateTime.Minutes(2), ReinfInf)
@@ -171,9 +171,9 @@ Tick = function()
if not RCheck then
RCheck = true
if Map.LobbyOption("difficulty") == "easy" and ReinfCheck then
if Difficulty == "easy" and ReinfCheck then
Trigger.AfterDelay(DateTime.Minutes(6), ReinfArmor)
elseif Map.LobbyOption("difficulty") == "normal" then
elseif Difficulty == "normal" then
Trigger.AfterDelay(DateTime.Minutes(4), ReinfArmor)
else
Trigger.AfterDelay(DateTime.Minutes(3), ReinfArmor)
@@ -226,7 +226,7 @@ WorldLoaded = function()
HoldObjective = player.AddObjective("Defend the Radar Dome.")
player.MarkCompletedObjective(CaptureObjective)
Beacon.New(player, MCVDeploy.CenterPosition)
if Map.LobbyOption("difficulty") == "easy" then
if Difficulty == "easy" then
Actor.Create("camera", true, { Owner = player, Location = MCVDeploy.Location })
Media.DisplayMessage("Movement of an Allied expansion base discovered.")
else