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

@@ -164,7 +164,7 @@ InitProductionBuildings = function()
end)
end
if Map.LobbyOption("difficulty") ~= "easy" then
if Difficulty ~= "easy" then
if not Airfield1.IsDead then
Trigger.OnKilled(Airfield1, function()

View File

@@ -7,12 +7,12 @@
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 = 2250
HoldAITime = DateTime.Minutes(2)
@@ -89,7 +89,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)
@@ -191,7 +191,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 four SAM Sites that block\nour reinforcements' helicopter.")
greece.MarkCompletedObjective(mainObj)
@@ -316,7 +316,7 @@ InitTriggers = function()
end
end)
if Map.LobbyOption("difficulty") ~= "tough" then
if Difficulty ~= "tough" then
Trigger.OnKilled(Mammoth, function()
Trigger.AfterDelay(HoldAITime - DateTime.Seconds(45), function() HoldProduction = false end)
Trigger.AfterDelay(HoldAITime, function() Attacking = true end)
@@ -342,7 +342,7 @@ InitTriggers = function()
Trigger.AfterDelay(DateTime.Seconds(7), flare.Destroy)
Media.PlaySpeechNotification(greece, "SignalFlare")
if Map.LobbyOption("difficulty") == "tough" then
if Difficulty == "tough" then
Reinforcements.ReinforceWithTransport(greece, InsertionHeliType, HeliReinforcements, ExtractionPath, { ExtractionPath[1] })
if not Harvester.IsDead then
Harvester.FindResources()