Use global difficulty.
This commit is contained in:
committed by
abcdefg30
parent
58b105f0d4
commit
d42edfc0b9
@@ -44,7 +44,7 @@ ProduceUSSRInfantry = function()
|
||||
USSR.Build({ Utils.Random(SovietInfantry) }, function(units)
|
||||
table.insert(AttackGroup, units[1])
|
||||
SendAttackGroup()
|
||||
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceUSSRInfantry)
|
||||
Trigger.AfterDelay(ProductionInterval[Difficulty], ProduceUSSRInfantry)
|
||||
end)
|
||||
end
|
||||
|
||||
@@ -56,7 +56,7 @@ ProduceUSSRVehicles = function()
|
||||
USSR.Build({ Utils.Random(SovietVehicles) }, function(units)
|
||||
table.insert(AttackGroup, units[1])
|
||||
SendAttackGroup()
|
||||
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceUSSRVehicles)
|
||||
Trigger.AfterDelay(ProductionInterval[Difficulty], ProduceUSSRVehicles)
|
||||
end)
|
||||
end
|
||||
|
||||
@@ -73,7 +73,7 @@ ProduceAircraft = function()
|
||||
|
||||
local alive = Utils.Where(Planes, function(y) return not y.IsDead end)
|
||||
if #alive < 2 then
|
||||
Trigger.AfterDelay(DateTime.Seconds(ProductionInterval[Map.LobbyOption("difficulty")] / 2), ProduceAircraft)
|
||||
Trigger.AfterDelay(DateTime.Seconds(ProductionInterval[Difficulty] / 2), ProduceAircraft)
|
||||
end
|
||||
|
||||
InitializeAttackAircraft(plane, Greece)
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
the License, or (at your option) any later version. For more
|
||||
information, see COPYING.
|
||||
]]
|
||||
if Map.LobbyOption("difficulty") == "easy" then
|
||||
if Difficulty == "easy" then
|
||||
TanyaType = "e7"
|
||||
ReinforceCash = 5000
|
||||
HoldAITime = DateTime.Minutes(3)
|
||||
SpecialCameras = true
|
||||
elseif Map.LobbyOption("difficulty") == "normal" then
|
||||
elseif Difficulty == "normal" then
|
||||
TanyaType = "e7.noautotarget"
|
||||
ReinforceCash = 3500
|
||||
HoldAITime = DateTime.Minutes(2)
|
||||
@@ -190,7 +190,7 @@ FreeTanya = function()
|
||||
|
||||
Trigger.OnKilled(Tanya, function() USSR.MarkCompletedObjective(USSRObj) end)
|
||||
|
||||
if Map.LobbyOption("difficulty") == "tough" then
|
||||
if Difficulty == "tough" then
|
||||
KillSams = Greece.AddObjective("Destroy all six SAM Sites that block\nour reinforcements' helicopter.")
|
||||
|
||||
Greece.MarkCompletedObjective(MainObj)
|
||||
@@ -324,7 +324,7 @@ Tick = function()
|
||||
end
|
||||
|
||||
if USSR.HasNoRequiredUnits() then
|
||||
if not Greece.IsObjectiveCompleted(KillAll) and Map.LobbyOption("difficulty") == "tough" then
|
||||
if not Greece.IsObjectiveCompleted(KillAll) and Difficulty == "tough" then
|
||||
SendWaterExtraction()
|
||||
end
|
||||
Greece.MarkCompletedObjective(KillAll)
|
||||
|
||||
Reference in New Issue
Block a user