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

@@ -197,12 +197,11 @@ WTransWaves = function()
end
ActivateAI = function()
local difficulty = Map.LobbyOption("difficulty")
WaterAttackTypes = WaterAttackTypes[difficulty]
WaterAttacks = WaterAttacks[difficulty]
WTransUnits = WTransUnits[difficulty]
WTransDelays = WTransDelays[difficulty]
BuildDelays = BuildDelays[difficulty]
WaterAttackTypes = WaterAttackTypes[Difficulty]
WaterAttacks = WaterAttacks[Difficulty]
WTransUnits = WTransUnits[Difficulty]
WTransDelays = WTransDelays[Difficulty]
BuildDelays = BuildDelays[Difficulty]
InitialiseAttack()
Trigger.AfterDelay(DateTime.Seconds(10), ProduceInfantry)

View File

@@ -121,14 +121,14 @@ CaptureRadarDome = function()
end
Beacon.New(player, a.CenterPosition)
if Map.LobbyOption("difficulty") ~= "hard" then
if Difficulty ~= "hard" then
Actor.Create("TECH.CAM", true, { Owner = player, Location = a.Location + CVec.New(1, 1) })
end
end)
Media.DisplayMessage("Coordinates of the Soviet tech centers discovered.")
if Map.LobbyOption("difficulty") == "easy" then
if Difficulty == "easy" then
Actor.Create("Camera", true, { Owner = player, Location = Weapcam.Location })
end
end)
@@ -145,7 +145,7 @@ InfiltrateTechCenter = function()
player.MarkCompletedObjective(InfiltrateTechCenterObj)
local Proxy = Actor.Create("powerproxy.paratroopers", false, { Owner = ussr })
Utils.Do(ParadropWaypoints[Map.LobbyOption("difficulty")], function(waypoint)
Utils.Do(ParadropWaypoints[Difficulty], function(waypoint)
Proxy.TargetParatroopers(waypoint.CenterPosition, Angle.South)
end)
Proxy.Destroy()