Use global difficulty.
This commit is contained in:
committed by
abcdefg30
parent
58b105f0d4
commit
d42edfc0b9
@@ -46,7 +46,7 @@ WorldLoaded = function()
|
|||||||
Trigger.AfterDelay(DateTime.Seconds(3), function() InitialUnitsArrived = true end)
|
Trigger.AfterDelay(DateTime.Seconds(3), function() InitialUnitsArrived = true end)
|
||||||
|
|
||||||
Trigger.AfterDelay(DateTime.Seconds(15), function() ReinforceWithLandingCraft(Nod, BazookaReinforcments, SeaEntryB.Location, BeachReinforceB.Location, BeachReinforceB.Location) end)
|
Trigger.AfterDelay(DateTime.Seconds(15), function() ReinforceWithLandingCraft(Nod, BazookaReinforcments, SeaEntryB.Location, BeachReinforceB.Location, BeachReinforceB.Location) end)
|
||||||
if Map.LobbyOption("difficulty") == "easy" then
|
if Difficulty == "easy" then
|
||||||
Trigger.AfterDelay(DateTime.Seconds(25), function() ReinforceWithLandingCraft(Nod, BikeReinforcments, SeaEntryA.Location, BeachReinforceA.Location, BeachReinforceA.Location) end)
|
Trigger.AfterDelay(DateTime.Seconds(25), function() ReinforceWithLandingCraft(Nod, BikeReinforcments, SeaEntryA.Location, BeachReinforceA.Location, BeachReinforceA.Location) end)
|
||||||
Trigger.AfterDelay(DateTime.Seconds(30), function() ReinforceWithLandingCraft(Nod, BikeReinforcments, SeaEntryB.Location, BeachReinforceB.Location, BeachReinforceB.Location) end)
|
Trigger.AfterDelay(DateTime.Seconds(30), function() ReinforceWithLandingCraft(Nod, BikeReinforcments, SeaEntryB.Location, BeachReinforceB.Location, BeachReinforceB.Location) end)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
the License, or (at your option) any later version. For more
|
the License, or (at your option) any later version. For more
|
||||||
information, see COPYING.
|
information, see COPYING.
|
||||||
]]
|
]]
|
||||||
Difficulty = Map.LobbyOption("difficulty")
|
|
||||||
|
|
||||||
RepairThreshold = { easy = 0.3, normal = 0.6, hard = 0.9 }
|
RepairThreshold = { easy = 0.3, normal = 0.6, hard = 0.9 }
|
||||||
|
|
||||||
|
|||||||
@@ -7,8 +7,6 @@
|
|||||||
information, see COPYING.
|
information, see COPYING.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
Difficulty = Map.LobbyOption("difficulty")
|
|
||||||
|
|
||||||
RepairThreshold = { easy = 0.3, normal = 0.6, hard = 0.9 }
|
RepairThreshold = { easy = 0.3, normal = 0.6, hard = 0.9 }
|
||||||
|
|
||||||
ActorRemovals =
|
ActorRemovals =
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
the License, or (at your option) any later version. For more
|
the License, or (at your option) any later version. For more
|
||||||
information, see COPYING.
|
information, see COPYING.
|
||||||
]]
|
]]
|
||||||
Difficulty = Map.LobbyOption("difficulty")
|
|
||||||
|
|
||||||
IslandSamSites = { SAM01, SAM02 }
|
IslandSamSites = { SAM01, SAM02 }
|
||||||
NodBase = { PowerPlant1, PowerPlant2, PowerPlant3, PowerPlant4, PowerPlant5, Refinery, HandOfNod, Silo1, Silo2, Silo3, Silo4, ConYard, CommCenter }
|
NodBase = { PowerPlant1, PowerPlant2, PowerPlant3, PowerPlant4, PowerPlant5, Refinery, HandOfNod, Silo1, Silo2, Silo3, Silo4, ConYard, CommCenter }
|
||||||
|
|||||||
@@ -7,8 +7,6 @@
|
|||||||
information, see COPYING.
|
information, see COPYING.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
Difficulty = Map.LobbyOption("difficulty")
|
|
||||||
|
|
||||||
SamSites = { sam1, sam2, sam3, sam4, sam5 }
|
SamSites = { sam1, sam2, sam3, sam4, sam5 }
|
||||||
|
|
||||||
NodRetaliateIfDestroyedUnits = { harv1, bggy, ltnk1, ltnk2, ltnk3, arty1, arty2, arty3}
|
NodRetaliateIfDestroyedUnits = { harv1, bggy, ltnk1, ltnk2, ltnk3, arty1, arty2, arty3}
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
the License, or (at your option) any later version. For more
|
the License, or (at your option) any later version. For more
|
||||||
information, see COPYING.
|
information, see COPYING.
|
||||||
]]
|
]]
|
||||||
Difficulty = Map.LobbyOption("difficulty")
|
|
||||||
|
|
||||||
NodStartUnitsRight =
|
NodStartUnitsRight =
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
the License, or (at your option) any later version. For more
|
the License, or (at your option) any later version. For more
|
||||||
information, see COPYING.
|
information, see COPYING.
|
||||||
]]
|
]]
|
||||||
Difficulty = Map.LobbyOption("difficulty")
|
|
||||||
|
|
||||||
NodUnitsVehicle1 =
|
NodUnitsVehicle1 =
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
the License, or (at your option) any later version. For more
|
the License, or (at your option) any later version. For more
|
||||||
information, see COPYING.
|
information, see COPYING.
|
||||||
]]
|
]]
|
||||||
Difficulty = Map.LobbyOption("difficulty")
|
|
||||||
|
|
||||||
if Difficulty == "easy" then
|
if Difficulty == "easy" then
|
||||||
Rambo = "rmbo.easy"
|
Rambo = "rmbo.easy"
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
the License, or (at your option) any later version. For more
|
the License, or (at your option) any later version. For more
|
||||||
information, see COPYING.
|
information, see COPYING.
|
||||||
]]
|
]]
|
||||||
Difficulty = Map.LobbyOption("difficulty")
|
|
||||||
|
|
||||||
if Difficulty == "easy" then
|
if Difficulty == "easy" then
|
||||||
Rambo = "rmbo.easy"
|
Rambo = "rmbo.easy"
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
the License, or (at your option) any later version. For more
|
the License, or (at your option) any later version. For more
|
||||||
information, see COPYING.
|
information, see COPYING.
|
||||||
]]
|
]]
|
||||||
Difficulty = Map.LobbyOption("difficulty")
|
|
||||||
|
|
||||||
if Difficulty == "easy" then
|
if Difficulty == "easy" then
|
||||||
Rambo = "rmbo.easy"
|
Rambo = "rmbo.easy"
|
||||||
|
|||||||
@@ -21,16 +21,16 @@ SovietBase = { SovietConyard, SovietRefinery, SovietPower1, SovietPower2, Soviet
|
|||||||
|
|
||||||
IdlingUnits = { }
|
IdlingUnits = { }
|
||||||
|
|
||||||
if Map.LobbyOption("difficulty") == "easy" then
|
if Difficulty == "easy" then
|
||||||
DateTime.TimeLimit = DateTime.Minutes(10) + DateTime.Seconds(3)
|
DateTime.TimeLimit = DateTime.Minutes(10) + DateTime.Seconds(3)
|
||||||
|
|
||||||
elseif Map.LobbyOption("difficulty") == "normal" then
|
elseif Difficulty == "normal" then
|
||||||
DateTime.TimeLimit = DateTime.Minutes(5) + DateTime.Seconds(3)
|
DateTime.TimeLimit = DateTime.Minutes(5) + DateTime.Seconds(3)
|
||||||
InfantryTypes = { "e1", "e1", "e1", "e2", "e2", "e1" }
|
InfantryTypes = { "e1", "e1", "e1", "e2", "e2", "e1" }
|
||||||
InfantryDelay = DateTime.Seconds(18)
|
InfantryDelay = DateTime.Seconds(18)
|
||||||
AttackGroupSize = 5
|
AttackGroupSize = 5
|
||||||
|
|
||||||
elseif Map.LobbyOption("difficulty") == "hard" then
|
elseif Difficulty == "hard" then
|
||||||
DateTime.TimeLimit = DateTime.Minutes(3) + DateTime.Seconds(3)
|
DateTime.TimeLimit = DateTime.Minutes(3) + DateTime.Seconds(3)
|
||||||
InfantryTypes = { "e1", "e1", "e1", "e2", "e2", "e1" }
|
InfantryTypes = { "e1", "e1", "e1", "e2", "e2", "e1" }
|
||||||
InfantryDelay = DateTime.Seconds(10)
|
InfantryDelay = DateTime.Seconds(10)
|
||||||
@@ -141,7 +141,7 @@ SendAttack = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
Utils.Do(units, function(unit)
|
Utils.Do(units, function(unit)
|
||||||
if Map.LobbyOption("difficulty") ~= "tough" then
|
if Difficulty ~= "tough" then
|
||||||
unit.AttackMove(DeployPoint.Location)
|
unit.AttackMove(DeployPoint.Location)
|
||||||
end
|
end
|
||||||
Trigger.OnIdle(unit, unit.Hunt)
|
Trigger.OnIdle(unit, unit.Hunt)
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ WaterTransportTriggerArea = { CPos.New(39, 54), CPos.New(40, 54), CPos.New(41, 5
|
|||||||
ParadropTriggerArea = { CPos.New(81, 60), CPos.New(82, 60), CPos.New(83, 60), CPos.New(63, 63), CPos.New(64, 63), CPos.New(65, 63), CPos.New(66, 63), CPos.New(67, 63), CPos.New(68, 63), CPos.New(69, 63), CPos.New(70, 63), CPos.New(71, 63), CPos.New(72, 63) }
|
ParadropTriggerArea = { CPos.New(81, 60), CPos.New(82, 60), CPos.New(83, 60), CPos.New(63, 63), CPos.New(64, 63), CPos.New(65, 63), CPos.New(66, 63), CPos.New(67, 63), CPos.New(68, 63), CPos.New(69, 63), CPos.New(70, 63), CPos.New(71, 63), CPos.New(72, 63) }
|
||||||
ReinforcementsTriggerArea = { CPos.New(96, 55), CPos.New(97, 55), CPos.New(97, 56), CPos.New(98, 56) }
|
ReinforcementsTriggerArea = { CPos.New(96, 55), CPos.New(97, 55), CPos.New(97, 56), CPos.New(98, 56) }
|
||||||
|
|
||||||
if Map.LobbyOption("difficulty") == "easy" then
|
if Difficulty == "easy" then
|
||||||
TanyaType = "e7"
|
TanyaType = "e7"
|
||||||
else
|
else
|
||||||
TanyaType = "e7.noautotarget"
|
TanyaType = "e7.noautotarget"
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ GuardTanks = { Heavy1, Heavy2, Heavy3 }
|
|||||||
CheckpointGuards = { USSRCheckpointGuard1, USSRCheckpointGuard2 }
|
CheckpointGuards = { USSRCheckpointGuard1, USSRCheckpointGuard2 }
|
||||||
CheckpointGuardWaypoints = { CheckpointGuardWaypoint1, CheckpointGuardWaypoint2 }
|
CheckpointGuardWaypoints = { CheckpointGuardWaypoint1, CheckpointGuardWaypoint2 }
|
||||||
|
|
||||||
if Map.LobbyOption("difficulty") == "easy" then
|
if Difficulty == "easy" then
|
||||||
TanyaType = "e7"
|
TanyaType = "e7"
|
||||||
else
|
else
|
||||||
TanyaType = "e7.noautotarget"
|
TanyaType = "e7.noautotarget"
|
||||||
|
|||||||
@@ -246,9 +246,8 @@ ActivateAI = function()
|
|||||||
InitAIUnits()
|
InitAIUnits()
|
||||||
ProtectHarvester(Harvester)
|
ProtectHarvester(Harvester)
|
||||||
|
|
||||||
local difficulty = Map.LobbyOption("difficulty")
|
AttackDelay = AttackDelays[Difficulty]
|
||||||
AttackDelay = AttackDelays[difficulty]
|
AttackGroupSize = AttackGroupSizes[Difficulty]
|
||||||
AttackGroupSize = AttackGroupSizes[difficulty]
|
|
||||||
Trigger.AfterDelay(DateTime.Seconds(10), function()
|
Trigger.AfterDelay(DateTime.Seconds(10), function()
|
||||||
ProduceInfantry()
|
ProduceInfantry()
|
||||||
ProduceVehicles()
|
ProduceVehicles()
|
||||||
|
|||||||
@@ -65,7 +65,7 @@ Paradrop = function()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
Paradropped = Paradropped + 1
|
Paradropped = Paradropped + 1
|
||||||
if Paradropped <= ParadropWaves[Map.LobbyOption("difficulty")] then
|
if Paradropped <= ParadropWaves[Difficulty] then
|
||||||
Paradrop()
|
Paradrop()
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
@@ -114,7 +114,7 @@ SendConvoys = function()
|
|||||||
Trigger.RemoveFootprintTrigger(id)
|
Trigger.RemoveFootprintTrigger(id)
|
||||||
|
|
||||||
ConvoysSent = ConvoysSent + 1
|
ConvoysSent = ConvoysSent + 1
|
||||||
if ConvoysSent <= Convoys[Map.LobbyOption("difficulty")] then
|
if ConvoysSent <= Convoys[Difficulty] then
|
||||||
SendConvoys()
|
SendConvoys()
|
||||||
else
|
else
|
||||||
player.MarkCompletedObjective(DestroyConvoys)
|
player.MarkCompletedObjective(DestroyConvoys)
|
||||||
@@ -173,9 +173,8 @@ WorldLoaded = function()
|
|||||||
|
|
||||||
InitObjectives()
|
InitObjectives()
|
||||||
|
|
||||||
local difficulty = Map.LobbyOption("difficulty")
|
ConvoyDelay = ConvoyDelays[Difficulty]
|
||||||
ConvoyDelay = ConvoyDelays[difficulty]
|
ParadropDelay = ParadropDelays[Difficulty]
|
||||||
ParadropDelay = ParadropDelays[difficulty]
|
|
||||||
PowerProxy = Actor.Create("powerproxy.paratroopers", false, { Owner = ussr })
|
PowerProxy = Actor.Create("powerproxy.paratroopers", false, { Owner = ussr })
|
||||||
Paradrop()
|
Paradrop()
|
||||||
SendConvoys()
|
SendConvoys()
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ InitProductionBuildings = function()
|
|||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
if Map.LobbyOption("difficulty") ~= "easy" then
|
if Difficulty ~= "easy" then
|
||||||
|
|
||||||
if not Airfield1.IsDead then
|
if not Airfield1.IsDead then
|
||||||
Trigger.OnKilled(Airfield1, function()
|
Trigger.OnKilled(Airfield1, function()
|
||||||
|
|||||||
@@ -7,12 +7,12 @@
|
|||||||
information, see COPYING.
|
information, see COPYING.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
if Map.LobbyOption("difficulty") == "easy" then
|
if Difficulty == "easy" then
|
||||||
TanyaType = "e7"
|
TanyaType = "e7"
|
||||||
ReinforceCash = 5000
|
ReinforceCash = 5000
|
||||||
HoldAITime = DateTime.Minutes(3)
|
HoldAITime = DateTime.Minutes(3)
|
||||||
SpecialCameras = true
|
SpecialCameras = true
|
||||||
elseif Map.LobbyOption("difficulty") == "normal" then
|
elseif Difficulty == "normal" then
|
||||||
TanyaType = "e7.noautotarget"
|
TanyaType = "e7.noautotarget"
|
||||||
ReinforceCash = 2250
|
ReinforceCash = 2250
|
||||||
HoldAITime = DateTime.Minutes(2)
|
HoldAITime = DateTime.Minutes(2)
|
||||||
@@ -89,7 +89,7 @@ Tick = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
if ussr.HasNoRequiredUnits() then
|
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()
|
SendWaterExtraction()
|
||||||
end
|
end
|
||||||
greece.MarkCompletedObjective(KillAll)
|
greece.MarkCompletedObjective(KillAll)
|
||||||
@@ -191,7 +191,7 @@ FreeTanya = function()
|
|||||||
|
|
||||||
Trigger.OnKilled(Tanya, function() ussr.MarkCompletedObjective(ussrObj) end)
|
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.")
|
KillSams = greece.AddObjective("Destroy all four SAM Sites that block\nour reinforcements' helicopter.")
|
||||||
|
|
||||||
greece.MarkCompletedObjective(mainObj)
|
greece.MarkCompletedObjective(mainObj)
|
||||||
@@ -316,7 +316,7 @@ InitTriggers = function()
|
|||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
if Map.LobbyOption("difficulty") ~= "tough" then
|
if Difficulty ~= "tough" then
|
||||||
Trigger.OnKilled(Mammoth, function()
|
Trigger.OnKilled(Mammoth, function()
|
||||||
Trigger.AfterDelay(HoldAITime - DateTime.Seconds(45), function() HoldProduction = false end)
|
Trigger.AfterDelay(HoldAITime - DateTime.Seconds(45), function() HoldProduction = false end)
|
||||||
Trigger.AfterDelay(HoldAITime, function() Attacking = true end)
|
Trigger.AfterDelay(HoldAITime, function() Attacking = true end)
|
||||||
@@ -342,7 +342,7 @@ InitTriggers = function()
|
|||||||
Trigger.AfterDelay(DateTime.Seconds(7), flare.Destroy)
|
Trigger.AfterDelay(DateTime.Seconds(7), flare.Destroy)
|
||||||
Media.PlaySpeechNotification(greece, "SignalFlare")
|
Media.PlaySpeechNotification(greece, "SignalFlare")
|
||||||
|
|
||||||
if Map.LobbyOption("difficulty") == "tough" then
|
if Difficulty == "tough" then
|
||||||
Reinforcements.ReinforceWithTransport(greece, InsertionHeliType, HeliReinforcements, ExtractionPath, { ExtractionPath[1] })
|
Reinforcements.ReinforceWithTransport(greece, InsertionHeliType, HeliReinforcements, ExtractionPath, { ExtractionPath[1] })
|
||||||
if not Harvester.IsDead then
|
if not Harvester.IsDead then
|
||||||
Harvester.FindResources()
|
Harvester.FindResources()
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ ProduceUSSRInfantry = function()
|
|||||||
USSR.Build({ Utils.Random(SovietInfantry) }, function(units)
|
USSR.Build({ Utils.Random(SovietInfantry) }, function(units)
|
||||||
table.insert(AttackGroup, units[1])
|
table.insert(AttackGroup, units[1])
|
||||||
SendAttackGroup()
|
SendAttackGroup()
|
||||||
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceUSSRInfantry)
|
Trigger.AfterDelay(ProductionInterval[Difficulty], ProduceUSSRInfantry)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ ProduceUSSRVehicles = function()
|
|||||||
USSR.Build({ Utils.Random(SovietVehicles) }, function(units)
|
USSR.Build({ Utils.Random(SovietVehicles) }, function(units)
|
||||||
table.insert(AttackGroup, units[1])
|
table.insert(AttackGroup, units[1])
|
||||||
SendAttackGroup()
|
SendAttackGroup()
|
||||||
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceUSSRVehicles)
|
Trigger.AfterDelay(ProductionInterval[Difficulty], ProduceUSSRVehicles)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -73,7 +73,7 @@ ProduceAircraft = function()
|
|||||||
|
|
||||||
local alive = Utils.Where(Planes, function(y) return not y.IsDead end)
|
local alive = Utils.Where(Planes, function(y) return not y.IsDead end)
|
||||||
if #alive < 2 then
|
if #alive < 2 then
|
||||||
Trigger.AfterDelay(DateTime.Seconds(ProductionInterval[Map.LobbyOption("difficulty")] / 2), ProduceAircraft)
|
Trigger.AfterDelay(DateTime.Seconds(ProductionInterval[Difficulty] / 2), ProduceAircraft)
|
||||||
end
|
end
|
||||||
|
|
||||||
InitializeAttackAircraft(plane, Greece)
|
InitializeAttackAircraft(plane, Greece)
|
||||||
|
|||||||
@@ -413,12 +413,12 @@ WorldLoaded = function()
|
|||||||
SendSpy()
|
SendSpy()
|
||||||
ChurchFootprint()
|
ChurchFootprint()
|
||||||
|
|
||||||
if Map.LobbyOption("difficulty") == "easy" then
|
if Difficulty == "easy" then
|
||||||
TanyaType = "e7"
|
TanyaType = "e7"
|
||||||
ReinforceCash = 5000
|
ReinforceCash = 5000
|
||||||
USSR.Cash = 8000
|
USSR.Cash = 8000
|
||||||
SpecialCameras = true
|
SpecialCameras = true
|
||||||
elseif Map.LobbyOption("difficulty") == "normal" then
|
elseif Difficulty == "normal" then
|
||||||
TanyaType = "e7.noautotarget"
|
TanyaType = "e7.noautotarget"
|
||||||
ReinforceCash = 2250
|
ReinforceCash = 2250
|
||||||
USSR.Cash = 15000
|
USSR.Cash = 15000
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ ProduceUSSRInfantry = function()
|
|||||||
USSR.Build({ Utils.Random(SovietInfantry) }, function(units)
|
USSR.Build({ Utils.Random(SovietInfantry) }, function(units)
|
||||||
table.insert(AttackGroup, units[1])
|
table.insert(AttackGroup, units[1])
|
||||||
SendAttackGroup()
|
SendAttackGroup()
|
||||||
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceUSSRInfantry)
|
Trigger.AfterDelay(ProductionInterval[Difficulty], ProduceUSSRInfantry)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -56,7 +56,7 @@ ProduceUSSRVehicles = function()
|
|||||||
USSR.Build({ Utils.Random(SovietVehicles) }, function(units)
|
USSR.Build({ Utils.Random(SovietVehicles) }, function(units)
|
||||||
table.insert(AttackGroup, units[1])
|
table.insert(AttackGroup, units[1])
|
||||||
SendAttackGroup()
|
SendAttackGroup()
|
||||||
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceUSSRVehicles)
|
Trigger.AfterDelay(ProductionInterval[Difficulty], ProduceUSSRVehicles)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -73,7 +73,7 @@ ProduceAircraft = function()
|
|||||||
|
|
||||||
local alive = Utils.Where(Planes, function(y) return not y.IsDead end)
|
local alive = Utils.Where(Planes, function(y) return not y.IsDead end)
|
||||||
if #alive < 2 then
|
if #alive < 2 then
|
||||||
Trigger.AfterDelay(DateTime.Seconds(ProductionInterval[Map.LobbyOption("difficulty")] / 2), ProduceAircraft)
|
Trigger.AfterDelay(DateTime.Seconds(ProductionInterval[Difficulty] / 2), ProduceAircraft)
|
||||||
end
|
end
|
||||||
|
|
||||||
InitializeAttackAircraft(plane, Greece)
|
InitializeAttackAircraft(plane, Greece)
|
||||||
|
|||||||
@@ -6,12 +6,12 @@
|
|||||||
the License, or (at your option) any later version. For more
|
the License, or (at your option) any later version. For more
|
||||||
information, see COPYING.
|
information, see COPYING.
|
||||||
]]
|
]]
|
||||||
if Map.LobbyOption("difficulty") == "easy" then
|
if Difficulty == "easy" then
|
||||||
TanyaType = "e7"
|
TanyaType = "e7"
|
||||||
ReinforceCash = 5000
|
ReinforceCash = 5000
|
||||||
HoldAITime = DateTime.Minutes(3)
|
HoldAITime = DateTime.Minutes(3)
|
||||||
SpecialCameras = true
|
SpecialCameras = true
|
||||||
elseif Map.LobbyOption("difficulty") == "normal" then
|
elseif Difficulty == "normal" then
|
||||||
TanyaType = "e7.noautotarget"
|
TanyaType = "e7.noautotarget"
|
||||||
ReinforceCash = 3500
|
ReinforceCash = 3500
|
||||||
HoldAITime = DateTime.Minutes(2)
|
HoldAITime = DateTime.Minutes(2)
|
||||||
@@ -190,7 +190,7 @@ FreeTanya = function()
|
|||||||
|
|
||||||
Trigger.OnKilled(Tanya, function() USSR.MarkCompletedObjective(USSRObj) end)
|
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.")
|
KillSams = Greece.AddObjective("Destroy all six SAM Sites that block\nour reinforcements' helicopter.")
|
||||||
|
|
||||||
Greece.MarkCompletedObjective(MainObj)
|
Greece.MarkCompletedObjective(MainObj)
|
||||||
@@ -324,7 +324,7 @@ Tick = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
if USSR.HasNoRequiredUnits() then
|
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()
|
SendWaterExtraction()
|
||||||
end
|
end
|
||||||
Greece.MarkCompletedObjective(KillAll)
|
Greece.MarkCompletedObjective(KillAll)
|
||||||
|
|||||||
@@ -197,12 +197,11 @@ WTransWaves = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
ActivateAI = function()
|
ActivateAI = function()
|
||||||
local difficulty = Map.LobbyOption("difficulty")
|
WaterAttackTypes = WaterAttackTypes[Difficulty]
|
||||||
WaterAttackTypes = WaterAttackTypes[difficulty]
|
WaterAttacks = WaterAttacks[Difficulty]
|
||||||
WaterAttacks = WaterAttacks[difficulty]
|
WTransUnits = WTransUnits[Difficulty]
|
||||||
WTransUnits = WTransUnits[difficulty]
|
WTransDelays = WTransDelays[Difficulty]
|
||||||
WTransDelays = WTransDelays[difficulty]
|
BuildDelays = BuildDelays[Difficulty]
|
||||||
BuildDelays = BuildDelays[difficulty]
|
|
||||||
|
|
||||||
InitialiseAttack()
|
InitialiseAttack()
|
||||||
Trigger.AfterDelay(DateTime.Seconds(10), ProduceInfantry)
|
Trigger.AfterDelay(DateTime.Seconds(10), ProduceInfantry)
|
||||||
|
|||||||
@@ -121,14 +121,14 @@ CaptureRadarDome = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
Beacon.New(player, a.CenterPosition)
|
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) })
|
Actor.Create("TECH.CAM", true, { Owner = player, Location = a.Location + CVec.New(1, 1) })
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
Media.DisplayMessage("Coordinates of the Soviet tech centers discovered.")
|
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 })
|
Actor.Create("Camera", true, { Owner = player, Location = Weapcam.Location })
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
@@ -145,7 +145,7 @@ InfiltrateTechCenter = function()
|
|||||||
player.MarkCompletedObjective(InfiltrateTechCenterObj)
|
player.MarkCompletedObjective(InfiltrateTechCenterObj)
|
||||||
|
|
||||||
local Proxy = Actor.Create("powerproxy.paratroopers", false, { Owner = ussr })
|
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)
|
Proxy.TargetParatroopers(waypoint.CenterPosition, Angle.South)
|
||||||
end)
|
end)
|
||||||
Proxy.Destroy()
|
Proxy.Destroy()
|
||||||
|
|||||||
@@ -209,12 +209,11 @@ WTransWaves = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
ActivateAI = function()
|
ActivateAI = function()
|
||||||
local difficulty = Map.LobbyOption("difficulty")
|
WaterAttackTypes = WaterAttackTypes[Difficulty]
|
||||||
WaterAttackTypes = WaterAttackTypes[difficulty]
|
WaterAttacks = WaterAttacks[Difficulty]
|
||||||
WaterAttacks = WaterAttacks[difficulty]
|
WTransUnits = WTransUnits[Difficulty]
|
||||||
WTransUnits = WTransUnits[difficulty]
|
WTransDelays = WTransDelays[Difficulty]
|
||||||
WTransDelays = WTransDelays[difficulty]
|
BuildDelays = BuildDelays[Difficulty]
|
||||||
BuildDelays = BuildDelays[difficulty]
|
|
||||||
|
|
||||||
InitialiseAttack()
|
InitialiseAttack()
|
||||||
Trigger.AfterDelay(DateTime.Seconds(40), ProduceInfantry)
|
Trigger.AfterDelay(DateTime.Seconds(40), ProduceInfantry)
|
||||||
|
|||||||
@@ -131,14 +131,14 @@ CaptureRadarDome = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
Beacon.New(player, a.CenterPosition)
|
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) })
|
Actor.Create("TECH.CAM", true, { Owner = player, Location = a.Location + CVec.New(1, 1) })
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
Media.DisplayMessage("Coordinates of the Soviet tech centers discovered.")
|
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 })
|
Actor.Create("Camera", true, { Owner = player, Location = Weapcam.Location })
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
@@ -207,7 +207,7 @@ WorldLoaded = function()
|
|||||||
|
|
||||||
Camera.Position = DefaultCameraPosition.CenterPosition
|
Camera.Position = DefaultCameraPosition.CenterPosition
|
||||||
|
|
||||||
if Map.LobbyOption("difficulty") == "easy" then
|
if Difficulty == "easy" then
|
||||||
Trigger.OnEnteredProximityTrigger(SovietDefenseCam.CenterPosition, WDist.New(1024 * 7), function(a, id)
|
Trigger.OnEnteredProximityTrigger(SovietDefenseCam.CenterPosition, WDist.New(1024 * 7), function(a, id)
|
||||||
if a.Owner == player then
|
if a.Owner == player then
|
||||||
Trigger.RemoveProximityTrigger(id)
|
Trigger.RemoveProximityTrigger(id)
|
||||||
@@ -225,7 +225,7 @@ WorldLoaded = function()
|
|||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
if Map.LobbyOption("difficulty") ~= "hard" then
|
if Difficulty ~= "hard" then
|
||||||
Trigger.OnKilled(DefBrl1, function(a, b)
|
Trigger.OnKilled(DefBrl1, function(a, b)
|
||||||
if not DefenseFlame1.IsDead then
|
if not DefenseFlame1.IsDead then
|
||||||
DefenseFlame1.Kill()
|
DefenseFlame1.Kill()
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ ProduceBadGuyInfantry = function()
|
|||||||
badguy.Build({ Utils.Random(SovietInfantry) }, function(units)
|
badguy.Build({ Utils.Random(SovietInfantry) }, function(units)
|
||||||
table.insert(BGAttackGroup, units[1])
|
table.insert(BGAttackGroup, units[1])
|
||||||
SendBGAttackGroup()
|
SendBGAttackGroup()
|
||||||
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceBadGuyInfantry)
|
Trigger.AfterDelay(ProductionInterval[Difficulty], ProduceBadGuyInfantry)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -97,7 +97,7 @@ ProduceUSSRInfantry = function()
|
|||||||
ussr.Build({ Utils.Random(SovietInfantry) }, function(units)
|
ussr.Build({ Utils.Random(SovietInfantry) }, function(units)
|
||||||
table.insert(AttackGroup, units[1])
|
table.insert(AttackGroup, units[1])
|
||||||
SendAttackGroup()
|
SendAttackGroup()
|
||||||
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceUSSRInfantry)
|
Trigger.AfterDelay(ProductionInterval[Difficulty], ProduceUSSRInfantry)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -109,7 +109,7 @@ ProduceVehicles = function()
|
|||||||
ussr.Build({ Utils.Random(SovietVehicles) }, function(units)
|
ussr.Build({ Utils.Random(SovietVehicles) }, function(units)
|
||||||
table.insert(AttackGroup, units[1])
|
table.insert(AttackGroup, units[1])
|
||||||
SendAttackGroup()
|
SendAttackGroup()
|
||||||
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceVehicles)
|
Trigger.AfterDelay(ProductionInterval[Difficulty], ProduceVehicles)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -126,7 +126,7 @@ ProduceAircraft = function()
|
|||||||
|
|
||||||
local alive = Utils.Where(Yaks, function(y) return not y.IsDead end)
|
local alive = Utils.Where(Yaks, function(y) return not y.IsDead end)
|
||||||
if #alive < 2 then
|
if #alive < 2 then
|
||||||
Trigger.AfterDelay(DateTime.Seconds(ProductionInterval[Map.LobbyOption("difficulty")] / 2), ProduceAircraft)
|
Trigger.AfterDelay(DateTime.Seconds(ProductionInterval[Difficulty] / 2), ProduceAircraft)
|
||||||
end
|
end
|
||||||
|
|
||||||
InitializeAttackAircraft(yak, greece)
|
InitializeAttackAircraft(yak, greece)
|
||||||
@@ -134,8 +134,7 @@ ProduceAircraft = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
ActivateAI = function()
|
ActivateAI = function()
|
||||||
local difficulty = Map.LobbyOption("difficulty")
|
SovietVehicles = SovietVehicles[Difficulty]
|
||||||
SovietVehicles = SovietVehicles[difficulty]
|
|
||||||
|
|
||||||
local buildings = Utils.Where(Map.ActorsInWorld, function(self) return self.Owner == ussr and self.HasProperty("StartBuildingRepairs") end)
|
local buildings = Utils.Where(Map.ActorsInWorld, function(self) return self.Owner == ussr and self.HasProperty("StartBuildingRepairs") end)
|
||||||
Utils.Do(buildings, function(actor)
|
Utils.Do(buildings, function(actor)
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ lstReinforcements =
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if Map.LobbyOption("difficulty") == "easy" then
|
if Difficulty == "easy" then
|
||||||
ActivateAIDelay = DateTime.Minutes(1)
|
ActivateAIDelay = DateTime.Minutes(1)
|
||||||
else
|
else
|
||||||
ActivateAIDelay = DateTime.Seconds(30)
|
ActivateAIDelay = DateTime.Seconds(30)
|
||||||
@@ -82,7 +82,7 @@ CaptureRadarDome = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
BaseRaids = function()
|
BaseRaids = function()
|
||||||
if Map.LobbyOption("difficulty") == "easy" then
|
if Difficulty == "easy" then
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
Trigger.AfterDelay(Utils.RandomInteger(BaseRaidDelay1[1], BaseRaidDelay1[2]), function()
|
Trigger.AfterDelay(Utils.RandomInteger(BaseRaidDelay1[1], BaseRaidDelay1[2]), function()
|
||||||
@@ -108,7 +108,7 @@ BaseRaids = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
StartTimerFunction = function()
|
StartTimerFunction = function()
|
||||||
if Map.LobbyOption("difficulty") == "hard" then
|
if Difficulty == "hard" then
|
||||||
StartTimer = true
|
StartTimer = true
|
||||||
Media.PlaySpeechNotification(greece, "TimerStarted")
|
Media.PlaySpeechNotification(greece, "TimerStarted")
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ ProduceInfantry = function()
|
|||||||
ussr.Build({ Utils.Random(SovietInfantry) }, function(units)
|
ussr.Build({ Utils.Random(SovietInfantry) }, function(units)
|
||||||
table.insert(AttackGroup, units[1])
|
table.insert(AttackGroup, units[1])
|
||||||
SendAttackGroup()
|
SendAttackGroup()
|
||||||
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceInfantry)
|
Trigger.AfterDelay(ProductionInterval[Difficulty], ProduceInfantry)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ ProduceVehicles = function()
|
|||||||
ussr.Build({ Utils.Random(SovietVehicles) }, function(units)
|
ussr.Build({ Utils.Random(SovietVehicles) }, function(units)
|
||||||
table.insert(AttackGroup, units[1])
|
table.insert(AttackGroup, units[1])
|
||||||
SendAttackGroup()
|
SendAttackGroup()
|
||||||
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceVehicles)
|
Trigger.AfterDelay(ProductionInterval[Difficulty], ProduceVehicles)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -120,7 +120,7 @@ ProduceAircraft = function()
|
|||||||
|
|
||||||
local alive = Utils.Where(Migs, function(y) return not y.IsDead end)
|
local alive = Utils.Where(Migs, function(y) return not y.IsDead end)
|
||||||
if #alive < 2 then
|
if #alive < 2 then
|
||||||
Trigger.AfterDelay(DateTime.Seconds(ProductionInterval[Map.LobbyOption("difficulty")] / 2), ProduceAircraft)
|
Trigger.AfterDelay(DateTime.Seconds(ProductionInterval[Difficulty] / 2), ProduceAircraft)
|
||||||
end
|
end
|
||||||
|
|
||||||
InitializeAttackAircraft(mig, greece)
|
InitializeAttackAircraft(mig, greece)
|
||||||
@@ -194,11 +194,10 @@ SendParabombs = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
ActivateAI = function()
|
ActivateAI = function()
|
||||||
local difficulty = Map.LobbyOption("difficulty")
|
GroundWavesDelays = GroundWavesDelays[Difficulty]
|
||||||
GroundWavesDelays = GroundWavesDelays[difficulty]
|
WTransDelays = WTransDelays[Difficulty]
|
||||||
WTransDelays = WTransDelays[difficulty]
|
ParadropDelays = ParadropDelays[Difficulty]
|
||||||
ParadropDelays = ParadropDelays[difficulty]
|
BombDelays = BombDelays[Difficulty]
|
||||||
BombDelays = BombDelays[difficulty]
|
|
||||||
|
|
||||||
local buildings = Utils.Where(Map.ActorsInWorld, function(self) return self.Owner == ussr and self.HasProperty("StartBuildingRepairs") end)
|
local buildings = Utils.Where(Map.ActorsInWorld, function(self) return self.Owner == ussr and self.HasProperty("StartBuildingRepairs") end)
|
||||||
Utils.Do(buildings, function(actor)
|
Utils.Do(buildings, function(actor)
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ ProduceInfantry = function()
|
|||||||
ussr.Build({ Utils.Random(SovietInfantry) }, function(units)
|
ussr.Build({ Utils.Random(SovietInfantry) }, function(units)
|
||||||
table.insert(AttackGroup, units[1])
|
table.insert(AttackGroup, units[1])
|
||||||
SendAttackGroup()
|
SendAttackGroup()
|
||||||
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceInfantry)
|
Trigger.AfterDelay(ProductionInterval[Difficulty], ProduceInfantry)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -102,7 +102,7 @@ ProduceVehicles = function()
|
|||||||
ussr.Build({ Utils.Random(SovietVehicles) }, function(units)
|
ussr.Build({ Utils.Random(SovietVehicles) }, function(units)
|
||||||
table.insert(AttackGroup, units[1])
|
table.insert(AttackGroup, units[1])
|
||||||
SendAttackGroup()
|
SendAttackGroup()
|
||||||
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceVehicles)
|
Trigger.AfterDelay(ProductionInterval[Difficulty], ProduceVehicles)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -119,7 +119,7 @@ ProduceAircraft = function()
|
|||||||
|
|
||||||
local alive = Utils.Where(Migs, function(y) return not y.IsDead end)
|
local alive = Utils.Where(Migs, function(y) return not y.IsDead end)
|
||||||
if #alive < 2 then
|
if #alive < 2 then
|
||||||
Trigger.AfterDelay(DateTime.Seconds(ProductionInterval[Map.LobbyOption("difficulty")] / 2), ProduceAircraft)
|
Trigger.AfterDelay(DateTime.Seconds(ProductionInterval[Difficulty] / 2), ProduceAircraft)
|
||||||
end
|
end
|
||||||
|
|
||||||
InitializeAttackAircraft(mig, greece)
|
InitializeAttackAircraft(mig, greece)
|
||||||
@@ -194,11 +194,10 @@ SendParabombs = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
ActivateAI = function()
|
ActivateAI = function()
|
||||||
local difficulty = Map.LobbyOption("difficulty")
|
GroundWavesDelays = GroundWavesDelays[Difficulty]
|
||||||
GroundWavesDelays = GroundWavesDelays[difficulty]
|
WTransDelays = WTransDelays[Difficulty]
|
||||||
WTransDelays = WTransDelays[difficulty]
|
ParadropDelays = ParadropDelays[Difficulty]
|
||||||
ParadropDelays = ParadropDelays[difficulty]
|
BombDelays = BombDelays[Difficulty]
|
||||||
BombDelays = BombDelays[difficulty]
|
|
||||||
|
|
||||||
local buildings = Utils.Where(Map.ActorsInWorld, function(self) return self.Owner == ussr and self.HasProperty("StartBuildingRepairs") end)
|
local buildings = Utils.Where(Map.ActorsInWorld, function(self) return self.Owner == ussr and self.HasProperty("StartBuildingRepairs") end)
|
||||||
Utils.Do(buildings, function(actor)
|
Utils.Do(buildings, function(actor)
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ SubAttackGroupSize =
|
|||||||
normal = 2,
|
normal = 2,
|
||||||
hard = 3
|
hard = 3
|
||||||
}
|
}
|
||||||
InfantryUnits =
|
InfantryUnits =
|
||||||
{
|
{
|
||||||
hard = { "e1", "e2", "e2", "e4", "e4" },
|
hard = { "e1", "e2", "e2", "e4", "e4" },
|
||||||
normal = { "e1", "e1", "e2", "e2", "e4" },
|
normal = { "e1", "e1", "e2", "e2", "e4" },
|
||||||
@@ -180,13 +180,12 @@ Paradrop = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
ActivateAI = function()
|
ActivateAI = function()
|
||||||
local difficulty = Map.LobbyOption("difficulty")
|
WTransUnits = WTransUnits[Difficulty]
|
||||||
WTransUnits = WTransUnits[difficulty]
|
WTransDelays = WTransDelays[Difficulty]
|
||||||
WTransDelays = WTransDelays[difficulty]
|
SubAttackGroupSize = SubAttackGroupSize[Difficulty]
|
||||||
SubAttackGroupSize = SubAttackGroupSize[difficulty]
|
InfantryUnits = InfantryUnits[Difficulty]
|
||||||
InfantryUnits = InfantryUnits[difficulty]
|
ProductionInterval = ProductionInterval[Difficulty]
|
||||||
ProductionInterval = ProductionInterval[difficulty]
|
ParadropDelay = ParadropDelay[Difficulty]
|
||||||
ParadropDelay = ParadropDelay[difficulty]
|
|
||||||
PowerProxy = Actor.Create("powerproxy.paratroopers", false, { Owner = USSR })
|
PowerProxy = Actor.Create("powerproxy.paratroopers", false, { Owner = USSR })
|
||||||
local buildings = Utils.Where(Map.ActorsInWorld, function(self) return self.Owner == USSR and self.HasProperty("StartBuildingRepairs") end)
|
local buildings = Utils.Where(Map.ActorsInWorld, function(self) return self.Owner == USSR and self.HasProperty("StartBuildingRepairs") end)
|
||||||
Utils.Do(buildings, function(actor)
|
Utils.Do(buildings, function(actor)
|
||||||
|
|||||||
@@ -12,7 +12,6 @@ baseDiscovered = false
|
|||||||
AtEndGame = false
|
AtEndGame = false
|
||||||
|
|
||||||
--Basic Vars
|
--Basic Vars
|
||||||
DifficultySetting = Map.LobbyOption("difficulty")
|
|
||||||
TimerColor = Player.GetPlayer("Spain").Color
|
TimerColor = Player.GetPlayer("Spain").Color
|
||||||
InsertionHelicopterType = "tran.insertion"
|
InsertionHelicopterType = "tran.insertion"
|
||||||
TimerTicks = DateTime.Minutes(18) -- 18 minutes is roughly 30 mins in the original game
|
TimerTicks = DateTime.Minutes(18) -- 18 minutes is roughly 30 mins in the original game
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
the License, or (at your option) any later version. For more
|
the License, or (at your option) any later version. For more
|
||||||
information, see COPYING.
|
information, see COPYING.
|
||||||
]]
|
]]
|
||||||
DifficultySetting = Map.LobbyOption("difficulty")
|
|
||||||
timeTracker = 0
|
timeTracker = 0
|
||||||
amount = 1
|
amount = 1
|
||||||
SendAnts = true
|
SendAnts = true
|
||||||
@@ -53,19 +52,19 @@ StartAntAttack = function()
|
|||||||
antType = Utils.Random(AntTypes)
|
antType = Utils.Random(AntTypes)
|
||||||
end
|
end
|
||||||
|
|
||||||
if antType == "warriorant" and DifficultySetting == "easy" then
|
if antType == "warriorant" and Difficulty == "easy" then
|
||||||
antType = "scoutant"
|
antType = "scoutant"
|
||||||
end
|
end
|
||||||
|
|
||||||
if DifficultySetting == "normal" and timeTracker < DateTime.Minutes(6) and antType == "scoutant" then
|
if Difficulty == "normal" and timeTracker < DateTime.Minutes(6) and antType == "scoutant" then
|
||||||
antType = "warriorant"
|
antType = "warriorant"
|
||||||
elseif DifficultySetting == "hard" and timeTracker < DateTime.Minutes(8) and antType == "scoutant" then
|
elseif Difficulty == "hard" and timeTracker < DateTime.Minutes(8) and antType == "scoutant" then
|
||||||
antType = "warriorant"
|
antType = "warriorant"
|
||||||
end
|
end
|
||||||
|
|
||||||
local max = MaxAnts[DifficultySetting] - math.ceil(timeTracker / DateTime.Minutes(6))
|
local max = MaxAnts[Difficulty] - math.ceil(timeTracker / DateTime.Minutes(6))
|
||||||
if timeTracker > DateTime.Minutes(3) and antType == "fireant" then
|
if timeTracker > DateTime.Minutes(3) and antType == "fireant" then
|
||||||
amount = Utils.RandomInteger(1, MaxFireAnts[DifficultySetting])
|
amount = Utils.RandomInteger(1, MaxFireAnts[Difficulty])
|
||||||
elseif timeTracker > 15 and antType == "fireant" then
|
elseif timeTracker > 15 and antType == "fireant" then
|
||||||
antType = "scoutant"
|
antType = "scoutant"
|
||||||
else
|
else
|
||||||
@@ -83,7 +82,7 @@ StartAntAttack = function()
|
|||||||
|
|
||||||
-- Setup next wave
|
-- Setup next wave
|
||||||
if SendAnts then
|
if SendAnts then
|
||||||
Trigger.AfterDelay(AttackInterval[DifficultySetting], function()
|
Trigger.AfterDelay(AttackInterval[Difficulty], function()
|
||||||
StartAntAttack()
|
StartAntAttack()
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -91,8 +91,7 @@ ActivateHive7 = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
ActivateAntHives = function()
|
ActivateAntHives = function()
|
||||||
local difficulty = Map.LobbyOption("difficulty")
|
AntSquad = AntSquad[Difficulty]
|
||||||
AntSquad = AntSquad[difficulty]
|
|
||||||
|
|
||||||
Trigger.AfterDelay(DateTime.Minutes(1), ActivateHive1)
|
Trigger.AfterDelay(DateTime.Minutes(1), ActivateHive1)
|
||||||
Trigger.AfterDelay(DateTime.Minutes(1) + DateTime.Seconds(30), ActivateHive2)
|
Trigger.AfterDelay(DateTime.Minutes(1) + DateTime.Seconds(30), ActivateHive2)
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ DeathThreshold =
|
|||||||
}
|
}
|
||||||
|
|
||||||
TanyaType = "e7"
|
TanyaType = "e7"
|
||||||
if Map.LobbyOption("difficulty") ~= "easy" then
|
if Difficulty ~= "easy" then
|
||||||
TanyaType = "e7.noautotarget"
|
TanyaType = "e7.noautotarget"
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -150,7 +150,7 @@ ProduceInfantry = function()
|
|||||||
soviets.Build({ Utils.Random(SovietInfantry) }, function(units)
|
soviets.Build({ Utils.Random(SovietInfantry) }, function(units)
|
||||||
table.insert(AttackGroup, units[1])
|
table.insert(AttackGroup, units[1])
|
||||||
SendAttackGroup()
|
SendAttackGroup()
|
||||||
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceInfantry)
|
Trigger.AfterDelay(ProductionInterval[Difficulty], ProduceInfantry)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -162,7 +162,7 @@ ProduceVehicles = function()
|
|||||||
soviets.Build({ Utils.Random(SovietVehicles[SovietVehicleType]) }, function(units)
|
soviets.Build({ Utils.Random(SovietVehicles[SovietVehicleType]) }, function(units)
|
||||||
table.insert(AttackGroup, units[1])
|
table.insert(AttackGroup, units[1])
|
||||||
SendAttackGroup()
|
SendAttackGroup()
|
||||||
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceVehicles)
|
Trigger.AfterDelay(ProductionInterval[Difficulty], ProduceVehicles)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -183,7 +183,7 @@ Tick = function()
|
|||||||
allies2.MarkCompletedObjective(objCutSovietPower)
|
allies2.MarkCompletedObjective(objCutSovietPower)
|
||||||
end
|
end
|
||||||
|
|
||||||
if not allies2.IsObjectiveCompleted(objLimitLosses) and allies2.UnitsLost > DeathThreshold[Map.LobbyOption("difficulty")] then
|
if not allies2.IsObjectiveCompleted(objLimitLosses) and allies2.UnitsLost > DeathThreshold[Difficulty] then
|
||||||
allies2.MarkFailedObjective(objLimitLosses)
|
allies2.MarkFailedObjective(objLimitLosses)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -197,7 +197,7 @@ end
|
|||||||
SetupSoviets = function()
|
SetupSoviets = function()
|
||||||
soviets.Cash = 1000
|
soviets.Cash = 1000
|
||||||
|
|
||||||
if Map.LobbyOption("difficulty") == "easy" then
|
if Difficulty == "easy" then
|
||||||
Utils.Do(Sams, function(sam)
|
Utils.Do(Sams, function(sam)
|
||||||
local camera = Actor.Create("Camera.SAM", true, { Owner = allies1, Location = sam.Location })
|
local camera = Actor.Create("Camera.SAM", true, { Owner = allies1, Location = sam.Location })
|
||||||
Trigger.OnKilledOrCaptured(sam, function()
|
Trigger.OnKilledOrCaptured(sam, function()
|
||||||
@@ -209,7 +209,7 @@ SetupSoviets = function()
|
|||||||
local buildings = Utils.Where(Map.ActorsInWorld, function(self) return self.Owner == soviets and self.HasProperty("StartBuildingRepairs") end)
|
local buildings = Utils.Where(Map.ActorsInWorld, function(self) return self.Owner == soviets and self.HasProperty("StartBuildingRepairs") end)
|
||||||
Utils.Do(buildings, function(actor)
|
Utils.Do(buildings, function(actor)
|
||||||
Trigger.OnDamaged(actor, function(building)
|
Trigger.OnDamaged(actor, function(building)
|
||||||
if building.Owner == soviets and building.Health < (building.MaxHealth * RepairTriggerThreshold[Map.LobbyOption("difficulty")] / 100) then
|
if building.Owner == soviets and building.Health < (building.MaxHealth * RepairTriggerThreshold[Difficulty] / 100) then
|
||||||
building.StartBuildingRepairs()
|
building.StartBuildingRepairs()
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
@@ -290,7 +290,7 @@ end
|
|||||||
SpawnTanya = function()
|
SpawnTanya = function()
|
||||||
Tanya = Actor.Create(TanyaType, true, { Owner = allies1, Location = TanyaLocation.Location })
|
Tanya = Actor.Create(TanyaType, true, { Owner = allies1, Location = TanyaLocation.Location })
|
||||||
|
|
||||||
if Map.LobbyOption("difficulty") ~= "easy" and allies1.IsLocalPlayer then
|
if Difficulty ~= "easy" and allies1.IsLocalPlayer then
|
||||||
Trigger.AfterDelay(DateTime.Seconds(2), function()
|
Trigger.AfterDelay(DateTime.Seconds(2), function()
|
||||||
Media.DisplayMessage("According to the rules of engagement I need your explicit orders to fire, Commander!", "Tanya")
|
Media.DisplayMessage("According to the rules of engagement I need your explicit orders to fire, Commander!", "Tanya")
|
||||||
end)
|
end)
|
||||||
@@ -362,7 +362,7 @@ WorldLoaded = function()
|
|||||||
objDestroySamSites = allies1.AddObjective("Destroy the SAM sites.")
|
objDestroySamSites = allies1.AddObjective("Destroy the SAM sites.")
|
||||||
|
|
||||||
objHoldPosition = allies2.AddObjective("Hold your position and protect the base.")
|
objHoldPosition = allies2.AddObjective("Hold your position and protect the base.")
|
||||||
objLimitLosses = allies2.AddObjective("Do not lose more than " .. DeathThreshold[Map.LobbyOption("difficulty")] .. " units.", "Secondary", false)
|
objLimitLosses = allies2.AddObjective("Do not lose more than " .. DeathThreshold[Difficulty] .. " units.", "Secondary", false)
|
||||||
objCutSovietPower = allies2.AddObjective("Take out the Soviet power grid.", "Secondary", false)
|
objCutSovietPower = allies2.AddObjective("Take out the Soviet power grid.", "Secondary", false)
|
||||||
|
|
||||||
SetupTriggers()
|
SetupTriggers()
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
the License, or (at your option) any later version. For more
|
the License, or (at your option) any later version. For more
|
||||||
information, see COPYING.
|
information, see COPYING.
|
||||||
]]
|
]]
|
||||||
Difficulty = Map.LobbyOption("difficulty")
|
|
||||||
|
|
||||||
UnitsEvacuatedThreshold =
|
UnitsEvacuatedThreshold =
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -62,7 +62,7 @@ MissionStart = function()
|
|||||||
local insertionFlare = Actor.Create("flare", true, { Owner = Allies, Location = LightFlare.Location })
|
local insertionFlare = Actor.Create("flare", true, { Owner = Allies, Location = LightFlare.Location })
|
||||||
Trigger.AfterDelay(DateTime.Seconds(2), function()
|
Trigger.AfterDelay(DateTime.Seconds(2), function()
|
||||||
FlareBoy.AttackMove(FlareBoyAttack.Location)
|
FlareBoy.AttackMove(FlareBoyAttack.Location)
|
||||||
if Map.LobbyOption("difficulty") == "normal" then
|
if Difficulty == "normal" then
|
||||||
local normalDrop = InsertionDrop.TargetParatroopers(InsertionPoint.CenterPosition, Angle.New(892))
|
local normalDrop = InsertionDrop.TargetParatroopers(InsertionPoint.CenterPosition, Angle.New(892))
|
||||||
Utils.Do(normalDrop, function(a)
|
Utils.Do(normalDrop, function(a)
|
||||||
Trigger.OnPassengerExited(a, function(t,p)
|
Trigger.OnPassengerExited(a, function(t,p)
|
||||||
@@ -77,7 +77,7 @@ MissionStart = function()
|
|||||||
VIPs[#VIPs + 1] = p
|
VIPs[#VIPs + 1] = p
|
||||||
FailTrigger()
|
FailTrigger()
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
Trigger.AfterDelay(DateTime.Seconds(6), function()
|
Trigger.AfterDelay(DateTime.Seconds(6), function()
|
||||||
Media.DisplayMessage("Commander, there are several civilians in the area.\nWe'll need you to call out targets.", "Tanya")
|
Media.DisplayMessage("Commander, there are several civilians in the area.\nWe'll need you to call out targets.", "Tanya")
|
||||||
end)
|
end)
|
||||||
@@ -95,7 +95,7 @@ FailTrigger = function()
|
|||||||
Trigger.OnAnyKilled(VIPs, function()
|
Trigger.OnAnyKilled(VIPs, function()
|
||||||
Allies.MarkFailedObjective(ProtectVIPs)
|
Allies.MarkFailedObjective(ProtectVIPs)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
FootprintTriggers = function()
|
FootprintTriggers = function()
|
||||||
local foot1Triggered
|
local foot1Triggered
|
||||||
@@ -208,7 +208,7 @@ FootprintTriggers = function()
|
|||||||
Media.DisplayMessage("Extraction point is compromised. Evacuate the base!", "Headquarters")
|
Media.DisplayMessage("Extraction point is compromised. Evacuate the base!", "Headquarters")
|
||||||
local defenders = Reinforcements.Reinforce(England, TentTeam, { Tent.Location, TentMove.Location }, 0)
|
local defenders = Reinforcements.Reinforce(England, TentTeam, { Tent.Location, TentMove.Location }, 0)
|
||||||
Utils.Do(defenders, IdleHunt)
|
Utils.Do(defenders, IdleHunt)
|
||||||
if Map.LobbyOption("difficulty") == "hard" then
|
if Difficulty == "hard" then
|
||||||
Trigger.AfterDelay(DateTime.Seconds(30), function()
|
Trigger.AfterDelay(DateTime.Seconds(30), function()
|
||||||
local wave2 = Reinforcements.Reinforce(USSR, SovietAttackers, { BaseAttackersSpawn.Location, SovietAttack.Location })
|
local wave2 = Reinforcements.Reinforce(USSR, SovietAttackers, { BaseAttackersSpawn.Location, SovietAttack.Location })
|
||||||
Utils.Do(wave2, IdleHunt)
|
Utils.Do(wave2, IdleHunt)
|
||||||
@@ -367,7 +367,7 @@ FootprintTriggers = function()
|
|||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
SetupTriggers = function()
|
SetupTriggers = function()
|
||||||
Utils.Do(USSR.GetGroundAttackers(), function(unit)
|
Utils.Do(USSR.GetGroundAttackers(), function(unit)
|
||||||
Trigger.OnDamaged(unit, function() IdleHunt(unit) end)
|
Trigger.OnDamaged(unit, function() IdleHunt(unit) end)
|
||||||
end)
|
end)
|
||||||
@@ -451,7 +451,7 @@ SovBaseAttack = function()
|
|||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
if Map.LobbyOption("difficulty") == "hard" then
|
if Difficulty == "hard" then
|
||||||
local barracksTeam = Reinforcements.Reinforce(USSR, RaxTeam, { SovRaxSpawn.Location, SovBaseCam.Location }, 0)
|
local barracksTeam = Reinforcements.Reinforce(USSR, RaxTeam, { SovRaxSpawn.Location, SovBaseCam.Location }, 0)
|
||||||
Utils.Do(barracksTeam, IdleHunt)
|
Utils.Do(barracksTeam, IdleHunt)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -51,7 +51,7 @@ ProduceInfantry = function()
|
|||||||
USSR.Build({ Utils.Random(SovietInfantry) }, function(units)
|
USSR.Build({ Utils.Random(SovietInfantry) }, function(units)
|
||||||
table.insert(AttackGroup, units[1])
|
table.insert(AttackGroup, units[1])
|
||||||
SendAttackGroup()
|
SendAttackGroup()
|
||||||
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceInfantry)
|
Trigger.AfterDelay(ProductionInterval[Difficulty], ProduceInfantry)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@ ProduceVehicles = function()
|
|||||||
USSR.Build({ Utils.Random(SovietVehicles) }, function(units)
|
USSR.Build({ Utils.Random(SovietVehicles) }, function(units)
|
||||||
table.insert(AttackGroup, units[1])
|
table.insert(AttackGroup, units[1])
|
||||||
SendAttackGroup()
|
SendAttackGroup()
|
||||||
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceVehicles)
|
Trigger.AfterDelay(ProductionInterval[Difficulty], ProduceVehicles)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -80,7 +80,7 @@ ProduceAircraft = function()
|
|||||||
|
|
||||||
local alive = Utils.Where(Yaks, function(y) return not y.IsDead end)
|
local alive = Utils.Where(Yaks, function(y) return not y.IsDead end)
|
||||||
if #alive < 2 then
|
if #alive < 2 then
|
||||||
Trigger.AfterDelay(DateTime.Seconds(ProductionInterval[Map.LobbyOption("difficulty")] / 2), ProduceAircraft)
|
Trigger.AfterDelay(DateTime.Seconds(ProductionInterval[Difficulty] / 2), ProduceAircraft)
|
||||||
end
|
end
|
||||||
|
|
||||||
InitializeAttackAircraft(yak, Allies)
|
InitializeAttackAircraft(yak, Allies)
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
the License, or (at your option) any later version. For more
|
the License, or (at your option) any later version. For more
|
||||||
information, see COPYING.
|
information, see COPYING.
|
||||||
]]
|
]]
|
||||||
Difficulty = Map.LobbyOption("difficulty")
|
|
||||||
AlliedReinforcementsA = { "jeep", "jeep" }
|
AlliedReinforcementsA = { "jeep", "jeep" }
|
||||||
AlliedReinforcementsB = { "e1", "e1", "e1", "e3", "e3" }
|
AlliedReinforcementsB = { "e1", "e1", "e1", "e3", "e3" }
|
||||||
AlliedReinforcementsC = { "jeep", "mcv" }
|
AlliedReinforcementsC = { "jeep", "mcv" }
|
||||||
@@ -238,9 +237,9 @@ WorldLoaded = function()
|
|||||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
|
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
|
||||||
end)
|
end)
|
||||||
|
|
||||||
if Map.LobbyOption("difficulty") == "easy" then
|
if Difficulty == "easy" then
|
||||||
RescueCivilians = Allies.AddObjective("Evacuate at least half of the civilians to the island\nshelter.")
|
RescueCivilians = Allies.AddObjective("Evacuate at least half of the civilians to the island\nshelter.")
|
||||||
elseif Map.LobbyOption("difficulty") == "normal" then
|
elseif Difficulty == "normal" then
|
||||||
RescueCivilians = Allies.AddObjective("Evacuate at least three quarters of the civilians to\nthe island shelter.")
|
RescueCivilians = Allies.AddObjective("Evacuate at least three quarters of the civilians to\nthe island shelter.")
|
||||||
else
|
else
|
||||||
RescueCivilians = Allies.AddObjective("Evacuate all civilians to the island shelter.")
|
RescueCivilians = Allies.AddObjective("Evacuate all civilians to the island shelter.")
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ Walls =
|
|||||||
{ WallBottomRight1, WallBottomRight2, WallBottomRight3, WallBottomRight4, WallBottomRight5, WallBottomRight6, WallBottomRight7, WallBottomRight8, WallBottomRight9 }
|
{ WallBottomRight1, WallBottomRight2, WallBottomRight3, WallBottomRight4, WallBottomRight5, WallBottomRight6, WallBottomRight7, WallBottomRight8, WallBottomRight9 }
|
||||||
}
|
}
|
||||||
|
|
||||||
if Map.LobbyOption("difficulty") == "veryeasy" then
|
if Difficulty == "veryeasy" then
|
||||||
ParaChance = 20
|
ParaChance = 20
|
||||||
Patrol = { "e1", "e2", "e1" }
|
Patrol = { "e1", "e2", "e1" }
|
||||||
Infantry = { "e4", "e1", "e1", "e2", "e2" }
|
Infantry = { "e4", "e1", "e1", "e2", "e2" }
|
||||||
@@ -30,7 +30,7 @@ if Map.LobbyOption("difficulty") == "veryeasy" then
|
|||||||
LongRange = { "arty" }
|
LongRange = { "arty" }
|
||||||
Boss = { "v2rl" }
|
Boss = { "v2rl" }
|
||||||
Swarm = { "shok", "shok", "shok" }
|
Swarm = { "shok", "shok", "shok" }
|
||||||
elseif Map.LobbyOption("difficulty") == "easy" then
|
elseif Difficulty == "easy" then
|
||||||
ParaChance = 25
|
ParaChance = 25
|
||||||
Patrol = { "e1", "e2", "e1" }
|
Patrol = { "e1", "e2", "e1" }
|
||||||
Infantry = { "e4", "e1", "e1", "e2", "e1", "e2", "e1" }
|
Infantry = { "e4", "e1", "e1", "e2", "e1", "e2", "e1" }
|
||||||
@@ -39,7 +39,7 @@ elseif Map.LobbyOption("difficulty") == "easy" then
|
|||||||
LongRange = { "v2rl" }
|
LongRange = { "v2rl" }
|
||||||
Boss = { "4tnk" }
|
Boss = { "4tnk" }
|
||||||
Swarm = { "shok", "shok", "shok", "shok", "ttnk" }
|
Swarm = { "shok", "shok", "shok", "shok", "ttnk" }
|
||||||
elseif Map.LobbyOption("difficulty") == "normal" then
|
elseif Difficulty == "normal" then
|
||||||
ParaChance = 30
|
ParaChance = 30
|
||||||
Patrol = { "e1", "e2", "e1", "e1" }
|
Patrol = { "e1", "e2", "e1", "e1" }
|
||||||
Infantry = { "e4", "e1", "e1", "e2", "e1", "e2", "e1" }
|
Infantry = { "e4", "e1", "e1", "e2", "e1", "e2", "e1" }
|
||||||
@@ -48,7 +48,7 @@ elseif Map.LobbyOption("difficulty") == "normal" then
|
|||||||
LongRange = { "v2rl" }
|
LongRange = { "v2rl" }
|
||||||
Boss = { "4tnk" }
|
Boss = { "4tnk" }
|
||||||
Swarm = { "shok", "shok", "shok", "shok", "ttnk", "ttnk", "ttnk" }
|
Swarm = { "shok", "shok", "shok", "shok", "ttnk", "ttnk", "ttnk" }
|
||||||
elseif Map.LobbyOption("difficulty") == "hard" then
|
elseif Difficulty == "hard" then
|
||||||
ParaChance = 35
|
ParaChance = 35
|
||||||
Patrol = { "e1", "e2", "e1", "e1", "e4" }
|
Patrol = { "e1", "e2", "e1", "e1", "e4" }
|
||||||
Infantry = { "e4", "e1", "e1", "e2", "e1", "e2", "e1" }
|
Infantry = { "e4", "e1", "e1", "e2", "e1", "e2", "e1" }
|
||||||
@@ -85,7 +85,7 @@ Waves =
|
|||||||
}
|
}
|
||||||
|
|
||||||
-- Now do some adjustments to the waves
|
-- Now do some adjustments to the waves
|
||||||
if Map.LobbyOption("difficulty") == "tough" or Map.LobbyOption("difficulty") == "endless" then
|
if Difficulty == "tough" or Difficulty == "endless" then
|
||||||
Waves[8] = { delay = 1500, units = { Infantry, Infantry, Patrol, Infantry, Infantry, Infantry }, ironUnits = { LongRange } }
|
Waves[8] = { delay = 1500, units = { Infantry, Infantry, Patrol, Infantry, Infantry, Infantry }, ironUnits = { LongRange } }
|
||||||
Waves[9] = { delay = 1500, units = { Infantry, Infantry, Patrol, Infantry, Infantry, Infantry, Infantry, Infantry, LongRange, LongRange, Vehicles, Tank }, ironUnits = { Tank } }
|
Waves[9] = { delay = 1500, units = { Infantry, Infantry, Patrol, Infantry, Infantry, Infantry, Infantry, Infantry, LongRange, LongRange, Vehicles, Tank }, ironUnits = { Tank } }
|
||||||
Waves[11] = { delay = 1500, units = { Vehicles, Infantry, Patrol, Patrol, Patrol, Infantry, LongRange, Tank, Boss, Infantry, Infantry, Patrol } }
|
Waves[11] = { delay = 1500, units = { Vehicles, Infantry, Patrol, Patrol, Patrol, Infantry, LongRange, Tank, Boss, Infantry, Infantry, Patrol } }
|
||||||
@@ -159,7 +159,7 @@ SendWave = function()
|
|||||||
SendWave()
|
SendWave()
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
if Map.LobbyOption("difficulty") == "endless" then
|
if Difficulty == "endless" then
|
||||||
Wave = 0
|
Wave = 0
|
||||||
IncreaseDifficulty()
|
IncreaseDifficulty()
|
||||||
SendWave()
|
SendWave()
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ World:
|
|||||||
FlashPaletteEffect@LIGHTNINGSTRIKE:
|
FlashPaletteEffect@LIGHTNINGSTRIKE:
|
||||||
Type: LightningStrike
|
Type: LightningStrike
|
||||||
LuaScript:
|
LuaScript:
|
||||||
Scripts: fort-lonestar.lua, fort-lonestar-AI.lua
|
Scripts: fort-lonestar.lua, fort-lonestar-AI.lua, campaign.lua
|
||||||
MapBuildRadius:
|
MapBuildRadius:
|
||||||
AllyBuildRadiusCheckboxVisible: False
|
AllyBuildRadiusCheckboxVisible: False
|
||||||
BuildRadiusCheckboxVisible: False
|
BuildRadiusCheckboxVisible: False
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
the License, or (at your option) any later version. For more
|
the License, or (at your option) any later version. For more
|
||||||
information, see COPYING.
|
information, see COPYING.
|
||||||
]]
|
]]
|
||||||
Difficulty = Map.LobbyOption("difficulty")
|
|
||||||
|
|
||||||
if Difficulty == "hard" then
|
if Difficulty == "hard" then
|
||||||
TimerTicks = DateTime.Minutes(25)
|
TimerTicks = DateTime.Minutes(25)
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
the License, or (at your option) any later version. For more
|
the License, or (at your option) any later version. For more
|
||||||
information, see COPYING.
|
information, see COPYING.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
BeachheadTrigger =
|
BeachheadTrigger =
|
||||||
{
|
{
|
||||||
CPos.New(120, 90), CPos.New(120, 89), CPos.New(120, 88), CPos.New(121, 88), CPos.New(122, 88), CPos.New(123, 88), CPos.New(124, 88),
|
CPos.New(120, 90), CPos.New(120, 89), CPos.New(120, 88), CPos.New(121, 88), CPos.New(122, 88), CPos.New(123, 88), CPos.New(124, 88),
|
||||||
@@ -17,8 +18,6 @@ BeachheadTrigger =
|
|||||||
CPos.New(137, 104), CPos.New(137, 105), CPos.New(137, 106), CPos.New(136, 106), CPos.New(136, 107)
|
CPos.New(137, 104), CPos.New(137, 105), CPos.New(137, 106), CPos.New(136, 106), CPos.New(136, 107)
|
||||||
}
|
}
|
||||||
|
|
||||||
Difficulty = Map.LobbyOption("difficulty")
|
|
||||||
|
|
||||||
if Difficulty == "normal" then
|
if Difficulty == "normal" then
|
||||||
BaseRaidInterval = DateTime.Minutes(3)
|
BaseRaidInterval = DateTime.Minutes(3)
|
||||||
BaseFrontAttackInterval = DateTime.Minutes(3) + DateTime.Seconds(30)
|
BaseFrontAttackInterval = DateTime.Minutes(3) + DateTime.Seconds(30)
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ SubEscapePath = { SubPath1, SubPath2, SubPath3 }
|
|||||||
MissionStart = function()
|
MissionStart = function()
|
||||||
LZCamera = Actor.Create("camera", true, { Owner = Greece, Location = LZ.Location })
|
LZCamera = Actor.Create("camera", true, { Owner = Greece, Location = LZ.Location })
|
||||||
Chalk1.TargetParatroopers(LZ.CenterPosition, Angle.New(740))
|
Chalk1.TargetParatroopers(LZ.CenterPosition, Angle.New(740))
|
||||||
if Map.LobbyOption("difficulty") == "normal" then
|
if Difficulty == "normal" then
|
||||||
Actor.Create("tsla", true, { Owner = USSR, Location = EasyCamera.Location })
|
Actor.Create("tsla", true, { Owner = USSR, Location = EasyCamera.Location })
|
||||||
Actor.Create("4tnk", true, { Owner = USSR, Facing = Angle.South, Location = Mammoth.Location })
|
Actor.Create("4tnk", true, { Owner = USSR, Facing = Angle.South, Location = Mammoth.Location })
|
||||||
Actor.Create("4tnk", true, { Owner = USSR, Facing = Angle.South, Location = Mammoth.Location + CVec.New(1,0) })
|
Actor.Create("4tnk", true, { Owner = USSR, Facing = Angle.South, Location = Mammoth.Location + CVec.New(1,0) })
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ ProduceBadGuyInfantry = function()
|
|||||||
badguy.Build({ Utils.Random(SovietInfantry) }, function(units)
|
badguy.Build({ Utils.Random(SovietInfantry) }, function(units)
|
||||||
table.insert(BGAttackGroup, units[1])
|
table.insert(BGAttackGroup, units[1])
|
||||||
SendBGAttackGroup()
|
SendBGAttackGroup()
|
||||||
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceBadGuyInfantry)
|
Trigger.AfterDelay(ProductionInterval[Difficulty], ProduceBadGuyInfantry)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@ ProduceUSSRInfantry = function()
|
|||||||
ussr.Build({ Utils.Random(SovietInfantry) }, function(units)
|
ussr.Build({ Utils.Random(SovietInfantry) }, function(units)
|
||||||
table.insert(AttackGroup, units[1])
|
table.insert(AttackGroup, units[1])
|
||||||
SendAttackGroup()
|
SendAttackGroup()
|
||||||
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceUSSRInfantry)
|
Trigger.AfterDelay(ProductionInterval[Difficulty], ProduceUSSRInfantry)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -93,7 +93,7 @@ ProduceVehicles = function()
|
|||||||
ussr.Build({ Utils.Random(SovietVehicles) }, function(units)
|
ussr.Build({ Utils.Random(SovietVehicles) }, function(units)
|
||||||
table.insert(AttackGroup, units[1])
|
table.insert(AttackGroup, units[1])
|
||||||
SendAttackGroup()
|
SendAttackGroup()
|
||||||
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceVehicles)
|
Trigger.AfterDelay(ProductionInterval[Difficulty], ProduceVehicles)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -106,8 +106,7 @@ GroundWaves = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
ActivateAI = function()
|
ActivateAI = function()
|
||||||
local difficulty = Map.LobbyOption("difficulty")
|
GroundWavesDelays = GroundWavesDelays[Difficulty]
|
||||||
GroundWavesDelays = GroundWavesDelays[difficulty]
|
|
||||||
|
|
||||||
ProduceBadGuyInfantry()
|
ProduceBadGuyInfantry()
|
||||||
ProduceUSSRInfantry()
|
ProduceUSSRInfantry()
|
||||||
|
|||||||
@@ -86,8 +86,7 @@ MissionStart = function()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
Trigger.AfterDelay(DateTime.Minutes(1), function()
|
Trigger.AfterDelay(DateTime.Minutes(1), function()
|
||||||
local difficulty = Map.LobbyOption("difficulty")
|
CombatTeam2 = CombatTeam2[Difficulty]
|
||||||
CombatTeam2 = CombatTeam2[difficulty]
|
|
||||||
Reinforcements.Reinforce(greece, CombatTeam2, { TruckEscapeCenter.Location, DefaultCameraPosition.Location })
|
Reinforcements.Reinforce(greece, CombatTeam2, { TruckEscapeCenter.Location, DefaultCameraPosition.Location })
|
||||||
Media.PlaySpeechNotification(greece, "ReinforcementsArrived")
|
Media.PlaySpeechNotification(greece, "ReinforcementsArrived")
|
||||||
end)
|
end)
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ ObjectiveTriggers = function()
|
|||||||
EscapeGoalTrigger = true
|
EscapeGoalTrigger = true
|
||||||
|
|
||||||
greece.MarkCompletedObjective(ExitBase)
|
greece.MarkCompletedObjective(ExitBase)
|
||||||
if Map.LobbyOption("difficulty") == "hard" then
|
if Difficulty == "hard" then
|
||||||
greece.MarkCompletedObjective(NoCasualties)
|
greece.MarkCompletedObjective(NoCasualties)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -444,7 +444,7 @@ Tick = function()
|
|||||||
greece.MarkFailedObjective(ExitBase)
|
greece.MarkFailedObjective(ExitBase)
|
||||||
end
|
end
|
||||||
|
|
||||||
if Map.LobbyOption("difficulty") == "hard" and greece.UnitsLost > AcceptableLosses then
|
if Difficulty == "hard" and greece.UnitsLost > AcceptableLosses then
|
||||||
greece.MarkFailedObjective(NoCasualties)
|
greece.MarkFailedObjective(NoCasualties)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@@ -466,7 +466,7 @@ WorldLoaded = function()
|
|||||||
FreeTanya = greece.AddObjective("Free Tanya and keep her alive.")
|
FreeTanya = greece.AddObjective("Free Tanya and keep her alive.")
|
||||||
KillVIPs = greece.AddObjective("Kill all Soviet officers and scientists.", "Secondary", false)
|
KillVIPs = greece.AddObjective("Kill all Soviet officers and scientists.", "Secondary", false)
|
||||||
StealTank = greece.AddObjective("Steal a Soviet mammoth tank.", "Secondary", false)
|
StealTank = greece.AddObjective("Steal a Soviet mammoth tank.", "Secondary", false)
|
||||||
if Map.LobbyOption("difficulty") == "hard" then
|
if Difficulty == "hard" then
|
||||||
NoCasualties = greece.AddPrimaryObjective("Do not lose a single soldier or civilian\nunder your command.")
|
NoCasualties = greece.AddPrimaryObjective("Do not lose a single soldier or civilian\nunder your command.")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ ProduceBadGuyInfantry = function()
|
|||||||
BadGuy.Build({ Utils.Random(SovietInfantry) }, function(units)
|
BadGuy.Build({ Utils.Random(SovietInfantry) }, function(units)
|
||||||
table.insert(BGAttackGroup, units[1])
|
table.insert(BGAttackGroup, units[1])
|
||||||
SendBGAttackGroup()
|
SendBGAttackGroup()
|
||||||
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceBadGuyInfantry)
|
Trigger.AfterDelay(ProductionInterval[Difficulty], ProduceBadGuyInfantry)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -70,7 +70,7 @@ ProduceUSSRInfantry = function()
|
|||||||
USSR.Build({ Utils.Random(SovietInfantry) }, function(units)
|
USSR.Build({ Utils.Random(SovietInfantry) }, function(units)
|
||||||
table.insert(AttackGroup, units[1])
|
table.insert(AttackGroup, units[1])
|
||||||
SendAttackGroup()
|
SendAttackGroup()
|
||||||
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceUSSRInfantry)
|
Trigger.AfterDelay(ProductionInterval[Difficulty], ProduceUSSRInfantry)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -82,14 +82,14 @@ ProduceVehicles = function()
|
|||||||
USSR.Build({ Utils.Random(SovietVehicles) }, function(units)
|
USSR.Build({ Utils.Random(SovietVehicles) }, function(units)
|
||||||
table.insert(AttackGroup, units[1])
|
table.insert(AttackGroup, units[1])
|
||||||
SendAttackGroup()
|
SendAttackGroup()
|
||||||
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceVehicles)
|
Trigger.AfterDelay(ProductionInterval[Difficulty], ProduceVehicles)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
GroundAttackUnits = { {"4tnk", "3tnk", "e2", "e2", "e2", "e2" }, { "3tnk", "3tnk", "v2rl", "e4", "e4", "e4" }, {"ttnk", "ttnk", "ttnk", "shok", "shok", "shok" } }
|
GroundAttackUnits = { {"4tnk", "3tnk", "e2", "e2", "e2", "e2" }, { "3tnk", "3tnk", "v2rl", "e4", "e4", "e4" }, {"ttnk", "ttnk", "ttnk", "shok", "shok", "shok" } }
|
||||||
|
|
||||||
GroundAttackPaths =
|
GroundAttackPaths =
|
||||||
{
|
{
|
||||||
{ SovietGroundEntry1.Location },
|
{ SovietGroundEntry1.Location },
|
||||||
{ SovietGroundEntry2.Location },
|
{ SovietGroundEntry2.Location },
|
||||||
{ SovietGroundEntry3.Location }
|
{ SovietGroundEntry3.Location }
|
||||||
@@ -124,7 +124,7 @@ ProduceAircraft = function()
|
|||||||
|
|
||||||
local alive = Utils.Where(Planes, function(y) return not y.IsDead end)
|
local alive = Utils.Where(Planes, function(y) return not y.IsDead end)
|
||||||
if #alive < 2 then
|
if #alive < 2 then
|
||||||
Trigger.AfterDelay(DateTime.Seconds(ProductionInterval[Map.LobbyOption("difficulty")] / 2), ProduceAircraft)
|
Trigger.AfterDelay(DateTime.Seconds(ProductionInterval[Difficulty] / 2), ProduceAircraft)
|
||||||
end
|
end
|
||||||
|
|
||||||
InitializeAttackAircraft(plane, Greece)
|
InitializeAttackAircraft(plane, Greece)
|
||||||
@@ -132,8 +132,7 @@ ProduceAircraft = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
ActivateAI = function()
|
ActivateAI = function()
|
||||||
local difficulty = Map.LobbyOption("difficulty")
|
GroundWavesDelays = GroundWavesDelays[Difficulty]
|
||||||
GroundWavesDelays = GroundWavesDelays[difficulty]
|
|
||||||
|
|
||||||
local buildings = Utils.Where(Map.ActorsInWorld, function(self) return self.Owner == USSR and self.HasProperty("StartBuildingRepairs") end)
|
local buildings = Utils.Where(Map.ActorsInWorld, function(self) return self.Owner == USSR and self.HasProperty("StartBuildingRepairs") end)
|
||||||
Utils.Do(buildings, function(actor)
|
Utils.Do(buildings, function(actor)
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ SetupTriggers = function()
|
|||||||
if actor.Owner == Greece then
|
if actor.Owner == Greece then
|
||||||
Trigger.RemoveProximityTrigger(trigger1)
|
Trigger.RemoveProximityTrigger(trigger1)
|
||||||
local baseCamera = Actor.Create("camera", true, { Owner = Greece, Location = BaseCam.Location })
|
local baseCamera = Actor.Create("camera", true, { Owner = Greece, Location = BaseCam.Location })
|
||||||
if Map.LobbyOption("difficulty") == "hard" then
|
if Difficulty == "hard" then
|
||||||
Reinforcements.Reinforce(BadGuy, RaxTeam, { BadGuyRaxSpawn.Location, BaseCam.Location }, 0)
|
Reinforcements.Reinforce(BadGuy, RaxTeam, { BadGuyRaxSpawn.Location, BaseCam.Location }, 0)
|
||||||
end
|
end
|
||||||
Trigger.AfterDelay(DateTime.Seconds(10), function()
|
Trigger.AfterDelay(DateTime.Seconds(10), function()
|
||||||
@@ -76,7 +76,7 @@ PowerDownTeslas = function()
|
|||||||
KillBase = Greece.AddObjective("Destroy the enemy compound.")
|
KillBase = Greece.AddObjective("Destroy the enemy compound.")
|
||||||
Greece.MarkCompletedObjective(TakeOutPower)
|
Greece.MarkCompletedObjective(TakeOutPower)
|
||||||
Media.PlaySpeechNotification(Greece, "ReinforcementsArrived")
|
Media.PlaySpeechNotification(Greece, "ReinforcementsArrived")
|
||||||
Reinforcements.Reinforce(Greece, MCVReinforcements[Map.LobbyOption("difficulty")], { AlliesSpawn.Location, AlliesMove.Location })
|
Reinforcements.Reinforce(Greece, MCVReinforcements[Difficulty], { AlliesSpawn.Location, AlliesMove.Location })
|
||||||
local baseFlare = Actor.Create("flare", true, { Owner = Greece, Location = AlliedBase.Location })
|
local baseFlare = Actor.Create("flare", true, { Owner = Greece, Location = AlliedBase.Location })
|
||||||
Actor.Create("proc", true, { Owner = USSR, Location = Proc1.Location })
|
Actor.Create("proc", true, { Owner = USSR, Location = Proc1.Location })
|
||||||
Actor.Create("proc", true, { Owner = USSR, Location = Proc2.Location })
|
Actor.Create("proc", true, { Owner = USSR, Location = Proc2.Location })
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ AttackWaveDelays =
|
|||||||
}
|
}
|
||||||
|
|
||||||
AttackWaves = function()
|
AttackWaves = function()
|
||||||
local attackpath = Utils.Random(AttackPaths)
|
local attackpath = Utils.Random(AttackPaths)
|
||||||
local attackers = Reinforcements.Reinforce(USSR, Utils.Random(AttackWaveUnits), { attackpath[1] })
|
local attackers = Reinforcements.Reinforce(USSR, Utils.Random(AttackWaveUnits), { attackpath[1] })
|
||||||
Utils.Do(attackers, function(unit)
|
Utils.Do(attackers, function(unit)
|
||||||
Trigger.OnAddedToWorld(unit, function()
|
Trigger.OnAddedToWorld(unit, function()
|
||||||
@@ -75,7 +75,7 @@ AttackWaves = function()
|
|||||||
Trigger.AfterDelay(Utils.RandomInteger(AttackWaveDelay[1], AttackWaveDelay[2]), AttackWaves)
|
Trigger.AfterDelay(Utils.RandomInteger(AttackWaveDelay[1], AttackWaveDelay[2]), AttackWaves)
|
||||||
end
|
end
|
||||||
|
|
||||||
ConvoyWaves =
|
ConvoyWaves =
|
||||||
{
|
{
|
||||||
easy = 2,
|
easy = 2,
|
||||||
normal = 3,
|
normal = 3,
|
||||||
@@ -109,7 +109,7 @@ SendConvoys = function()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
ConvoysPassed = ConvoysPassed + 1
|
ConvoysPassed = ConvoysPassed + 1
|
||||||
if ConvoysPassed <= ConvoyWaves[Map.LobbyOption("difficulty")] then
|
if ConvoysPassed <= ConvoyWaves[Difficulty] then
|
||||||
Trigger.AfterDelay(DateTime.Seconds(90), SendConvoys)
|
Trigger.AfterDelay(DateTime.Seconds(90), SendConvoys)
|
||||||
else
|
else
|
||||||
FinalTrucks()
|
FinalTrucks()
|
||||||
@@ -274,7 +274,6 @@ WorldLoaded = function()
|
|||||||
ConvoyExit()
|
ConvoyExit()
|
||||||
BridgeTriggers()
|
BridgeTriggers()
|
||||||
|
|
||||||
local difficulty = Map.LobbyOption("difficulty")
|
ConvoyUnits = ConvoyUnits[Difficulty]
|
||||||
ConvoyUnits = ConvoyUnits[difficulty]
|
AttackWaveDelay = AttackWaveDelays[Difficulty]
|
||||||
AttackWaveDelay = AttackWaveDelays[difficulty]
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ ProduceBadGuyInfantry = function()
|
|||||||
BadGuy.Build({ Utils.Random(SovietInfantry) }, function(units)
|
BadGuy.Build({ Utils.Random(SovietInfantry) }, function(units)
|
||||||
table.insert(BGAttackGroup, units[1])
|
table.insert(BGAttackGroup, units[1])
|
||||||
SendBGAttackGroup()
|
SendBGAttackGroup()
|
||||||
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceBadGuyInfantry)
|
Trigger.AfterDelay(ProductionInterval[Difficulty], ProduceBadGuyInfantry)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@ ProduceBadGuyVehicles = function()
|
|||||||
BadGuy.Build({ Utils.Random(SovietVehicles) }, function(units)
|
BadGuy.Build({ Utils.Random(SovietVehicles) }, function(units)
|
||||||
table.insert(BGAttackGroup, units[1])
|
table.insert(BGAttackGroup, units[1])
|
||||||
SendBGAttackGroup()
|
SendBGAttackGroup()
|
||||||
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceBadGuyVehicles)
|
Trigger.AfterDelay(ProductionInterval[Difficulty], ProduceBadGuyVehicles)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -107,7 +107,7 @@ ProduceUSSRInfantry = function()
|
|||||||
USSR.Build({ Utils.Random(SovietInfantry) }, function(units)
|
USSR.Build({ Utils.Random(SovietInfantry) }, function(units)
|
||||||
table.insert(AttackGroup, units[1])
|
table.insert(AttackGroup, units[1])
|
||||||
SendAttackGroup()
|
SendAttackGroup()
|
||||||
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceUSSRInfantry)
|
Trigger.AfterDelay(ProductionInterval[Difficulty], ProduceUSSRInfantry)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -119,7 +119,7 @@ ProduceUSSRVehicles = function()
|
|||||||
USSR.Build({ Utils.Random(SovietVehicles) }, function(units)
|
USSR.Build({ Utils.Random(SovietVehicles) }, function(units)
|
||||||
table.insert(AttackGroup, units[1])
|
table.insert(AttackGroup, units[1])
|
||||||
SendAttackGroup()
|
SendAttackGroup()
|
||||||
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceUSSRVehicles)
|
Trigger.AfterDelay(ProductionInterval[Difficulty], ProduceUSSRVehicles)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -136,7 +136,7 @@ ProduceAircraft = function()
|
|||||||
|
|
||||||
local alive = Utils.Where(Planes, function(y) return not y.IsDead end)
|
local alive = Utils.Where(Planes, function(y) return not y.IsDead end)
|
||||||
if #alive < 2 then
|
if #alive < 2 then
|
||||||
Trigger.AfterDelay(DateTime.Seconds(ProductionInterval[Map.LobbyOption("difficulty")] / 2), ProduceAircraft)
|
Trigger.AfterDelay(DateTime.Seconds(ProductionInterval[Difficulty] / 2), ProduceAircraft)
|
||||||
end
|
end
|
||||||
|
|
||||||
InitializeAttackAircraft(plane, Allies)
|
InitializeAttackAircraft(plane, Allies)
|
||||||
@@ -183,11 +183,10 @@ USSRMammoths = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
ActivateAI = function()
|
ActivateAI = function()
|
||||||
local difficulty = Map.LobbyOption("difficulty")
|
ParadropDelays = ParadropDelays[Difficulty]
|
||||||
ParadropDelays = ParadropDelays[difficulty]
|
MammothDelays = MammothDelays[Difficulty]
|
||||||
MammothDelays = MammothDelays[difficulty]
|
StartBGMammoths = StartBGMammoths[Difficulty]
|
||||||
StartBGMammoths = StartBGMammoths[difficulty]
|
StartUSSRMammoths = StartUSSRMammoths[Difficulty]
|
||||||
StartUSSRMammoths = StartUSSRMammoths[difficulty]
|
|
||||||
|
|
||||||
local buildings = Utils.Where(Map.ActorsInWorld, function(self) return self.Owner == USSR and self.HasProperty("StartBuildingRepairs") end)
|
local buildings = Utils.Where(Map.ActorsInWorld, function(self) return self.Owner == USSR and self.HasProperty("StartBuildingRepairs") end)
|
||||||
Utils.Do(buildings, function(actor)
|
Utils.Do(buildings, function(actor)
|
||||||
|
|||||||
@@ -6,11 +6,11 @@
|
|||||||
the License, or (at your option) any later version. For more
|
the License, or (at your option) any later version. For more
|
||||||
information, see COPYING.
|
information, see COPYING.
|
||||||
]]
|
]]
|
||||||
if Map.LobbyOption("difficulty") == "easy" then
|
if Difficulty == "easy" then
|
||||||
remainingTime = DateTime.Minutes(7)
|
remainingTime = DateTime.Minutes(7)
|
||||||
elseif Map.LobbyOption("difficulty") == "normal" then
|
elseif Difficulty == "normal" then
|
||||||
remainingTime = DateTime.Minutes(6)
|
remainingTime = DateTime.Minutes(6)
|
||||||
elseif Map.LobbyOption("difficulty") == "hard" then
|
elseif Difficulty == "hard" then
|
||||||
remainingTime = DateTime.Minutes(5)
|
remainingTime = DateTime.Minutes(5)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -264,7 +264,7 @@ end)
|
|||||||
Trigger.OnEnteredFootprint(SpyHideout3Trigger, function(a, id)
|
Trigger.OnEnteredFootprint(SpyHideout3Trigger, function(a, id)
|
||||||
if not spyHideout3Trigger and a.Owner == player then
|
if not spyHideout3Trigger and a.Owner == player then
|
||||||
spyHideout3Trigger = true
|
spyHideout3Trigger = true
|
||||||
if Map.LobbyOption("difficulty") ~= "hard" then
|
if Difficulty ~= "hard" then
|
||||||
Reinforcements.Reinforce(player, USSRReinforcements2, { ReinforcementSpawn.Location, CameraSpyHideout33.Location }, 0)
|
Reinforcements.Reinforce(player, USSRReinforcements2, { ReinforcementSpawn.Location, CameraSpyHideout33.Location }, 0)
|
||||||
Media.PlaySpeechNotification(player, "ReinforcementsArrived")
|
Media.PlaySpeechNotification(player, "ReinforcementsArrived")
|
||||||
end
|
end
|
||||||
@@ -371,7 +371,7 @@ Tick = function()
|
|||||||
if not SpyHideout4.IsDead and SpyHideout4.HasPassengers then
|
if not SpyHideout4.IsDead and SpyHideout4.HasPassengers then
|
||||||
spyReachedHideout4 = true
|
spyReachedHideout4 = true
|
||||||
end
|
end
|
||||||
if remainingTime == DateTime.Minutes(5) and Map.LobbyOption("difficulty") ~= "hard" then
|
if remainingTime == DateTime.Minutes(5) and Difficulty ~= "hard" then
|
||||||
Media.PlaySpeechNotification(player, "WarningFiveMinutesRemaining")
|
Media.PlaySpeechNotification(player, "WarningFiveMinutesRemaining")
|
||||||
elseif remainingTime == DateTime.Minutes(4) then
|
elseif remainingTime == DateTime.Minutes(4) then
|
||||||
Media.PlaySpeechNotification(player, "WarningFourMinutesRemaining")
|
Media.PlaySpeechNotification(player, "WarningFourMinutesRemaining")
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ Patrol2Path = { BridgeEntrancePoint.Location, NERoadTurnPoint.Location, Crossroa
|
|||||||
|
|
||||||
VillageCamArea = { CPos.New(68, 75),CPos.New(68, 76),CPos.New(68, 77),CPos.New(68, 78),CPos.New(68, 79), CPos.New(68, 80), CPos.New(68, 81), CPos.New(68, 82) }
|
VillageCamArea = { CPos.New(68, 75),CPos.New(68, 76),CPos.New(68, 77),CPos.New(68, 78),CPos.New(68, 79), CPos.New(68, 80), CPos.New(68, 81), CPos.New(68, 82) }
|
||||||
|
|
||||||
if Map.LobbyOption("difficulty") == "easy" then
|
if Difficulty == "easy" then
|
||||||
ArmorReinfGreece = { "jeep", "1tnk", "1tnk" }
|
ArmorReinfGreece = { "jeep", "1tnk", "1tnk" }
|
||||||
else
|
else
|
||||||
ArmorReinfGreece = { "jeep", "jeep", "1tnk", "1tnk", "1tnk" }
|
ArmorReinfGreece = { "jeep", "jeep", "1tnk", "1tnk", "1tnk" }
|
||||||
@@ -68,7 +68,7 @@ BringPatrol1 = function()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
Trigger.OnAllKilled(units, function()
|
Trigger.OnAllKilled(units, function()
|
||||||
if Map.LobbyOption("difficulty") == "hard" then
|
if Difficulty == "hard" then
|
||||||
Trigger.AfterDelay(DateTime.Minutes(4), BringPatrol1)
|
Trigger.AfterDelay(DateTime.Minutes(4), BringPatrol1)
|
||||||
else
|
else
|
||||||
Trigger.AfterDelay(DateTime.Minutes(7), BringPatrol1)
|
Trigger.AfterDelay(DateTime.Minutes(7), BringPatrol1)
|
||||||
@@ -87,7 +87,7 @@ BringPatrol2 = function()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
Trigger.OnAllKilled(units, function()
|
Trigger.OnAllKilled(units, function()
|
||||||
if Map.LobbyOption("difficulty") == "hard" then
|
if Difficulty == "hard" then
|
||||||
Trigger.AfterDelay(DateTime.Minutes(4), BringPatrol2)
|
Trigger.AfterDelay(DateTime.Minutes(4), BringPatrol2)
|
||||||
else
|
else
|
||||||
Trigger.AfterDelay(DateTime.Minutes(7), BringPatrol2)
|
Trigger.AfterDelay(DateTime.Minutes(7), BringPatrol2)
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ RunInitialActivities = function()
|
|||||||
Trigger.AfterDelay(DateTime.Minutes(1), ProduceInfantry)
|
Trigger.AfterDelay(DateTime.Minutes(1), ProduceInfantry)
|
||||||
Trigger.AfterDelay(DateTime.Minutes(2), ProduceArmor)
|
Trigger.AfterDelay(DateTime.Minutes(2), ProduceArmor)
|
||||||
|
|
||||||
if Map.LobbyOption("difficulty") == "hard" or Map.LobbyOption("difficulty") == "normal" then
|
if Difficulty == "hard" or Difficulty == "normal" then
|
||||||
Trigger.AfterDelay(DateTime.Seconds(15), ReinfInf)
|
Trigger.AfterDelay(DateTime.Seconds(15), ReinfInf)
|
||||||
end
|
end
|
||||||
Trigger.AfterDelay(DateTime.Minutes(1), ReinfInf)
|
Trigger.AfterDelay(DateTime.Minutes(1), ReinfInf)
|
||||||
@@ -116,9 +116,9 @@ Tick = function()
|
|||||||
|
|
||||||
if RCheck then
|
if RCheck then
|
||||||
RCheck = false
|
RCheck = false
|
||||||
if Map.LobbyOption("difficulty") == "hard" then
|
if Difficulty == "hard" then
|
||||||
Trigger.AfterDelay(DateTime.Seconds(150), ReinfArmor)
|
Trigger.AfterDelay(DateTime.Seconds(150), ReinfArmor)
|
||||||
elseif Map.LobbyOption("difficulty") == "normal" then
|
elseif Difficulty == "normal" then
|
||||||
Trigger.AfterDelay(DateTime.Minutes(5), ReinfArmor)
|
Trigger.AfterDelay(DateTime.Minutes(5), ReinfArmor)
|
||||||
else
|
else
|
||||||
Trigger.AfterDelay(DateTime.Minutes(8), ReinfArmor)
|
Trigger.AfterDelay(DateTime.Minutes(8), ReinfArmor)
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ Patrol2Path = { EntranceSouthPoint.Location, ToRadarBridgePoint.Location, Island
|
|||||||
|
|
||||||
VillageCamArea = { CPos.New(37, 58),CPos.New(37, 59),CPos.New(37, 60),CPos.New(38, 60),CPos.New(39, 60), CPos.New(40, 60), CPos.New(41, 60), CPos.New(35, 57), CPos.New(34, 57), CPos.New(33, 57), CPos.New(32, 57) }
|
VillageCamArea = { CPos.New(37, 58),CPos.New(37, 59),CPos.New(37, 60),CPos.New(38, 60),CPos.New(39, 60), CPos.New(40, 60), CPos.New(41, 60), CPos.New(35, 57), CPos.New(34, 57), CPos.New(33, 57), CPos.New(32, 57) }
|
||||||
|
|
||||||
if Map.LobbyOption("difficulty") == "easy" then
|
if Difficulty == "easy" then
|
||||||
ArmorReinfGreece = { "jeep", "1tnk", "1tnk" }
|
ArmorReinfGreece = { "jeep", "1tnk", "1tnk" }
|
||||||
else
|
else
|
||||||
ArmorReinfGreece = { "jeep", "jeep", "1tnk", "1tnk", "1tnk" }
|
ArmorReinfGreece = { "jeep", "jeep", "1tnk", "1tnk", "1tnk" }
|
||||||
@@ -68,7 +68,7 @@ BringPatrol1 = function()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
Trigger.OnAllKilled(units, function()
|
Trigger.OnAllKilled(units, function()
|
||||||
if Map.LobbyOption("difficulty") == "hard" then
|
if Difficulty == "hard" then
|
||||||
Trigger.AfterDelay(DateTime.Minutes(4), BringPatrol1)
|
Trigger.AfterDelay(DateTime.Minutes(4), BringPatrol1)
|
||||||
else
|
else
|
||||||
Trigger.AfterDelay(DateTime.Minutes(7), BringPatrol1)
|
Trigger.AfterDelay(DateTime.Minutes(7), BringPatrol1)
|
||||||
@@ -87,7 +87,7 @@ BringPatrol2 = function()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
Trigger.OnAllKilled(units, function()
|
Trigger.OnAllKilled(units, function()
|
||||||
if Map.LobbyOption("difficulty") == "hard" then
|
if Difficulty == "hard" then
|
||||||
Trigger.AfterDelay(DateTime.Minutes(4), BringPatrol2)
|
Trigger.AfterDelay(DateTime.Minutes(4), BringPatrol2)
|
||||||
else
|
else
|
||||||
Trigger.AfterDelay(DateTime.Minutes(7), BringPatrol2)
|
Trigger.AfterDelay(DateTime.Minutes(7), BringPatrol2)
|
||||||
|
|||||||
@@ -76,7 +76,7 @@ RunInitialActivities = function()
|
|||||||
Trigger.AfterDelay(DateTime.Minutes(1), ProduceInfantry)
|
Trigger.AfterDelay(DateTime.Minutes(1), ProduceInfantry)
|
||||||
Trigger.AfterDelay(DateTime.Minutes(2), ProduceArmor)
|
Trigger.AfterDelay(DateTime.Minutes(2), ProduceArmor)
|
||||||
|
|
||||||
if Map.LobbyOption("difficulty") == "hard" or Map.LobbyOption("difficulty") == "normal" then
|
if Difficulty == "hard" or Difficulty == "normal" then
|
||||||
Trigger.AfterDelay(DateTime.Seconds(5), ReinfInf)
|
Trigger.AfterDelay(DateTime.Seconds(5), ReinfInf)
|
||||||
end
|
end
|
||||||
Trigger.AfterDelay(DateTime.Minutes(1), ReinfInf)
|
Trigger.AfterDelay(DateTime.Minutes(1), ReinfInf)
|
||||||
@@ -101,9 +101,9 @@ Tick = function()
|
|||||||
|
|
||||||
if RCheck then
|
if RCheck then
|
||||||
RCheck = false
|
RCheck = false
|
||||||
if Map.LobbyOption("difficulty") == "hard" then
|
if Difficulty == "hard" then
|
||||||
Trigger.AfterDelay(DateTime.Seconds(150), ReinfArmor)
|
Trigger.AfterDelay(DateTime.Seconds(150), ReinfArmor)
|
||||||
elseif Map.LobbyOption("difficulty") == "normal" then
|
elseif Difficulty == "normal" then
|
||||||
Trigger.AfterDelay(DateTime.Minutes(5), ReinfArmor)
|
Trigger.AfterDelay(DateTime.Minutes(5), ReinfArmor)
|
||||||
else
|
else
|
||||||
Trigger.AfterDelay(DateTime.Minutes(8), ReinfArmor)
|
Trigger.AfterDelay(DateTime.Minutes(8), ReinfArmor)
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ SovietStartToBasePath = { StartPoint.Location, SovietBasePoint.Location }
|
|||||||
SovietMCVReinf = { "mcv", "3tnk", "3tnk", "e1", "e1" }
|
SovietMCVReinf = { "mcv", "3tnk", "3tnk", "e1", "e1" }
|
||||||
SovExpansionPointGuard = { "2tnk", "2tnk", "e3", "e3", "e3" }
|
SovExpansionPointGuard = { "2tnk", "2tnk", "e3", "e3", "e3" }
|
||||||
|
|
||||||
if Map.LobbyOption("difficulty") == "easy" then
|
if Difficulty == "easy" then
|
||||||
ArmorReinfGreece = { "jeep", "1tnk", "1tnk" }
|
ArmorReinfGreece = { "jeep", "1tnk", "1tnk" }
|
||||||
else
|
else
|
||||||
ArmorReinfGreece = { "jeep", "jeep", "1tnk", "1tnk", "1tnk" }
|
ArmorReinfGreece = { "jeep", "jeep", "1tnk", "1tnk", "1tnk" }
|
||||||
@@ -79,11 +79,11 @@ IslandTroops1 = function()
|
|||||||
end)
|
end)
|
||||||
if not CheckForCYard() then
|
if not CheckForCYard() then
|
||||||
return
|
return
|
||||||
elseif Map.LobbyOption("difficulty") == "easy" then
|
elseif Difficulty == "easy" then
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
Trigger.OnAllKilled(units, function()
|
Trigger.OnAllKilled(units, function()
|
||||||
if Map.LobbyOption("difficulty") == "hard" then
|
if Difficulty == "hard" then
|
||||||
Trigger.AfterDelay(DateTime.Minutes(3), IslandTroops1)
|
Trigger.AfterDelay(DateTime.Minutes(3), IslandTroops1)
|
||||||
else
|
else
|
||||||
Trigger.AfterDelay(DateTime.Minutes(5), IslandTroops1)
|
Trigger.AfterDelay(DateTime.Minutes(5), IslandTroops1)
|
||||||
@@ -101,11 +101,11 @@ IslandTroops2 = function()
|
|||||||
end)
|
end)
|
||||||
if not CheckForCYard() then
|
if not CheckForCYard() then
|
||||||
return
|
return
|
||||||
elseif Map.LobbyOption("difficulty") == "easy" then
|
elseif Difficulty == "easy" then
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
Trigger.OnAllKilled(units, function()
|
Trigger.OnAllKilled(units, function()
|
||||||
if Map.LobbyOption("difficulty") == "hard" then
|
if Difficulty == "hard" then
|
||||||
Trigger.AfterDelay(DateTime.Minutes(3), IslandTroops2)
|
Trigger.AfterDelay(DateTime.Minutes(3), IslandTroops2)
|
||||||
else
|
else
|
||||||
Trigger.AfterDelay(DateTime.Minutes(5), IslandTroops2)
|
Trigger.AfterDelay(DateTime.Minutes(5), IslandTroops2)
|
||||||
@@ -123,11 +123,11 @@ IslandTroops3 = function()
|
|||||||
end)
|
end)
|
||||||
if not CheckForCYard() then
|
if not CheckForCYard() then
|
||||||
return
|
return
|
||||||
elseif Map.LobbyOption("difficulty") == "easy" then
|
elseif Difficulty == "easy" then
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
Trigger.OnAllKilled(units, function()
|
Trigger.OnAllKilled(units, function()
|
||||||
if Map.LobbyOption("difficulty") == "hard" then
|
if Difficulty == "hard" then
|
||||||
Trigger.AfterDelay(DateTime.Minutes(3), IslandTroops3)
|
Trigger.AfterDelay(DateTime.Minutes(3), IslandTroops3)
|
||||||
else
|
else
|
||||||
Trigger.AfterDelay(DateTime.Minutes(5), IslandTroops3)
|
Trigger.AfterDelay(DateTime.Minutes(5), IslandTroops3)
|
||||||
@@ -147,7 +147,7 @@ BringDDPatrol1 = function()
|
|||||||
return
|
return
|
||||||
else
|
else
|
||||||
Trigger.OnAllKilled(units, function()
|
Trigger.OnAllKilled(units, function()
|
||||||
if Map.LobbyOption("difficulty") == "hard" then
|
if Difficulty == "hard" then
|
||||||
Trigger.AfterDelay(DateTime.Minutes(4), BringDDPatrol1)
|
Trigger.AfterDelay(DateTime.Minutes(4), BringDDPatrol1)
|
||||||
else
|
else
|
||||||
Trigger.AfterDelay(DateTime.Minutes(7), BringDDPatrol1)
|
Trigger.AfterDelay(DateTime.Minutes(7), BringDDPatrol1)
|
||||||
@@ -167,7 +167,7 @@ BringDDPatrol2 = function()
|
|||||||
return
|
return
|
||||||
else
|
else
|
||||||
Trigger.OnAllKilled(units, function()
|
Trigger.OnAllKilled(units, function()
|
||||||
if Map.LobbyOption("difficulty") == "hard" then
|
if Difficulty == "hard" then
|
||||||
Trigger.AfterDelay(DateTime.Minutes(4), BringDDPatrol2)
|
Trigger.AfterDelay(DateTime.Minutes(4), BringDDPatrol2)
|
||||||
else
|
else
|
||||||
Trigger.AfterDelay(DateTime.Minutes(7), BringDDPatrol2)
|
Trigger.AfterDelay(DateTime.Minutes(7), BringDDPatrol2)
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ CheckForSPen = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
RunInitialActivities = function()
|
RunInitialActivities = function()
|
||||||
if Map.LobbyOption("difficulty") == "hard" then
|
if Difficulty == "hard" then
|
||||||
Expand()
|
Expand()
|
||||||
ExpansionCheck = true
|
ExpansionCheck = true
|
||||||
else
|
else
|
||||||
@@ -65,7 +65,7 @@ RunInitialActivities = function()
|
|||||||
ProduceInfantry()
|
ProduceInfantry()
|
||||||
Trigger.AfterDelay(DateTime.Minutes(2), ProduceShips)
|
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)
|
Trigger.AfterDelay(DateTime.Seconds(25), ReinfInf)
|
||||||
end
|
end
|
||||||
Trigger.AfterDelay(DateTime.Minutes(2), ReinfInf)
|
Trigger.AfterDelay(DateTime.Minutes(2), ReinfInf)
|
||||||
@@ -171,9 +171,9 @@ Tick = function()
|
|||||||
|
|
||||||
if not RCheck then
|
if not RCheck then
|
||||||
RCheck = true
|
RCheck = true
|
||||||
if Map.LobbyOption("difficulty") == "easy" and ReinfCheck then
|
if Difficulty == "easy" and ReinfCheck then
|
||||||
Trigger.AfterDelay(DateTime.Minutes(6), ReinfArmor)
|
Trigger.AfterDelay(DateTime.Minutes(6), ReinfArmor)
|
||||||
elseif Map.LobbyOption("difficulty") == "normal" then
|
elseif Difficulty == "normal" then
|
||||||
Trigger.AfterDelay(DateTime.Minutes(4), ReinfArmor)
|
Trigger.AfterDelay(DateTime.Minutes(4), ReinfArmor)
|
||||||
else
|
else
|
||||||
Trigger.AfterDelay(DateTime.Minutes(3), ReinfArmor)
|
Trigger.AfterDelay(DateTime.Minutes(3), ReinfArmor)
|
||||||
@@ -226,7 +226,7 @@ WorldLoaded = function()
|
|||||||
HoldObjective = player.AddObjective("Defend the Radar Dome.")
|
HoldObjective = player.AddObjective("Defend the Radar Dome.")
|
||||||
player.MarkCompletedObjective(CaptureObjective)
|
player.MarkCompletedObjective(CaptureObjective)
|
||||||
Beacon.New(player, MCVDeploy.CenterPosition)
|
Beacon.New(player, MCVDeploy.CenterPosition)
|
||||||
if Map.LobbyOption("difficulty") == "easy" then
|
if Difficulty == "easy" then
|
||||||
Actor.Create("camera", true, { Owner = player, Location = MCVDeploy.Location })
|
Actor.Create("camera", true, { Owner = player, Location = MCVDeploy.Location })
|
||||||
Media.DisplayMessage("Movement of an Allied expansion base discovered.")
|
Media.DisplayMessage("Movement of an Allied expansion base discovered.")
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ EnemyPaths =
|
|||||||
|
|
||||||
wave = 0
|
wave = 0
|
||||||
SendEnemies = function()
|
SendEnemies = function()
|
||||||
Trigger.AfterDelay(EnemyAttackDelay[Map.LobbyOption("difficulty")], function()
|
Trigger.AfterDelay(EnemyAttackDelay[Difficulty], function()
|
||||||
|
|
||||||
wave = wave + 1
|
wave = wave + 1
|
||||||
if wave > 3 then
|
if wave > 3 then
|
||||||
@@ -53,10 +53,10 @@ SendEnemies = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
if wave == 1 then
|
if wave == 1 then
|
||||||
local units = Reinforcements.ReinforceWithTransport(enemy, "tran", EnemyReinforcements[Map.LobbyOption("difficulty")][wave], EnemyPaths[1], { EnemyPaths[1][1] })[2]
|
local units = Reinforcements.ReinforceWithTransport(enemy, "tran", EnemyReinforcements[Difficulty][wave], EnemyPaths[1], { EnemyPaths[1][1] })[2]
|
||||||
Utils.Do(units, IdleHunt)
|
Utils.Do(units, IdleHunt)
|
||||||
else
|
else
|
||||||
local units = Reinforcements.ReinforceWithTransport(enemy, "lst", EnemyReinforcements[Map.LobbyOption("difficulty")][wave], EnemyPaths[2], { EnemyPaths[2][1] })[2]
|
local units = Reinforcements.ReinforceWithTransport(enemy, "lst", EnemyReinforcements[Difficulty][wave], EnemyPaths[2], { EnemyPaths[2][1] })[2]
|
||||||
Utils.Do(units, IdleHunt)
|
Utils.Do(units, IdleHunt)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ EnemyPaths =
|
|||||||
|
|
||||||
wave = 0
|
wave = 0
|
||||||
SendEnemies = function()
|
SendEnemies = function()
|
||||||
Trigger.AfterDelay(EnemyAttackDelay[Map.LobbyOption("difficulty")], function()
|
Trigger.AfterDelay(EnemyAttackDelay[Difficulty], function()
|
||||||
|
|
||||||
wave = wave + 1
|
wave = wave + 1
|
||||||
if wave > 3 then
|
if wave > 3 then
|
||||||
@@ -53,10 +53,10 @@ SendEnemies = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
if wave == 1 then
|
if wave == 1 then
|
||||||
local units = Reinforcements.ReinforceWithTransport(enemy, "tran", EnemyReinforcements[Map.LobbyOption("difficulty")][wave], EnemyPaths[1], { EnemyPaths[1][1] })[2]
|
local units = Reinforcements.ReinforceWithTransport(enemy, "tran", EnemyReinforcements[Difficulty][wave], EnemyPaths[1], { EnemyPaths[1][1] })[2]
|
||||||
Utils.Do(units, IdleHunt)
|
Utils.Do(units, IdleHunt)
|
||||||
else
|
else
|
||||||
local units = Reinforcements.ReinforceWithTransport(enemy, "lst", EnemyReinforcements[Map.LobbyOption("difficulty")][wave], EnemyPaths[2], { EnemyPaths[2][1] })[2]
|
local units = Reinforcements.ReinforceWithTransport(enemy, "lst", EnemyReinforcements[Difficulty][wave], EnemyPaths[2], { EnemyPaths[2][1] })[2]
|
||||||
Utils.Do(units, IdleHunt)
|
Utils.Do(units, IdleHunt)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -6,11 +6,11 @@
|
|||||||
the License, or (at your option) any later version. For more
|
the License, or (at your option) any later version. For more
|
||||||
information, see COPYING.
|
information, see COPYING.
|
||||||
]]
|
]]
|
||||||
if Map.LobbyOption("difficulty") == "easy" then
|
if Difficulty == "easy" then
|
||||||
remainingTime = DateTime.Minutes(7)
|
remainingTime = DateTime.Minutes(7)
|
||||||
elseif Map.LobbyOption("difficulty") == "normal" then
|
elseif Difficulty == "normal" then
|
||||||
remainingTime = DateTime.Minutes(6)
|
remainingTime = DateTime.Minutes(6)
|
||||||
elseif Map.LobbyOption("difficulty") == "hard" then
|
elseif Difficulty == "hard" then
|
||||||
remainingTime = DateTime.Minutes(5)
|
remainingTime = DateTime.Minutes(5)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -307,7 +307,7 @@ Tick = function()
|
|||||||
enemy.MarkCompletedObjective(alliedObjective)
|
enemy.MarkCompletedObjective(alliedObjective)
|
||||||
end
|
end
|
||||||
|
|
||||||
if remainingTime == DateTime.Minutes(5) and Map.LobbyOption("difficulty") ~= "hard" then
|
if remainingTime == DateTime.Minutes(5) and Difficulty ~= "hard" then
|
||||||
Media.PlaySpeechNotification(player, "WarningFiveMinutesRemaining")
|
Media.PlaySpeechNotification(player, "WarningFiveMinutesRemaining")
|
||||||
elseif remainingTime == DateTime.Minutes(4) then
|
elseif remainingTime == DateTime.Minutes(4) then
|
||||||
Media.PlaySpeechNotification(player, "WarningFourMinutesRemaining")
|
Media.PlaySpeechNotification(player, "WarningFourMinutesRemaining")
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ ProduceInfantry = function()
|
|||||||
Greece.Build({ Utils.Random(AlliedInfantry) }, function(units)
|
Greece.Build({ Utils.Random(AlliedInfantry) }, function(units)
|
||||||
table.insert(AttackGroup, units[1])
|
table.insert(AttackGroup, units[1])
|
||||||
SendAttackGroup()
|
SendAttackGroup()
|
||||||
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceInfantry)
|
Trigger.AfterDelay(ProductionInterval[Difficulty], ProduceInfantry)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -104,7 +104,7 @@ ProduceVehicles = function()
|
|||||||
Greece.Build({ Utils.Random(AlliedVehicles[AlliedVehicleType]) }, function(units)
|
Greece.Build({ Utils.Random(AlliedVehicles[AlliedVehicleType]) }, function(units)
|
||||||
table.insert(AttackGroup, units[1])
|
table.insert(AttackGroup, units[1])
|
||||||
SendAttackGroup()
|
SendAttackGroup()
|
||||||
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceVehicles)
|
Trigger.AfterDelay(ProductionInterval[Difficulty], ProduceVehicles)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -120,7 +120,7 @@ BringDDPatrol = function(patrolPath)
|
|||||||
if GreeceNavalYard.IsDead then
|
if GreeceNavalYard.IsDead then
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
if Map.LobbyOption("difficulty") == "easy" then
|
if Difficulty == "easy" then
|
||||||
Trigger.AfterDelay(DateTime.Minutes(7), function() BringDDPatrol(patrolPath) end)
|
Trigger.AfterDelay(DateTime.Minutes(7), function() BringDDPatrol(patrolPath) end)
|
||||||
else
|
else
|
||||||
Trigger.AfterDelay(DateTime.Minutes(4), function() BringDDPatrol(patrolPath) end)
|
Trigger.AfterDelay(DateTime.Minutes(4), function() BringDDPatrol(patrolPath) end)
|
||||||
@@ -130,9 +130,8 @@ BringDDPatrol = function(patrolPath)
|
|||||||
end
|
end
|
||||||
|
|
||||||
ActivateAI = function()
|
ActivateAI = function()
|
||||||
local difficulty = Map.LobbyOption("difficulty")
|
WTransUnits = WTransUnits[Difficulty]
|
||||||
WTransUnits = WTransUnits[difficulty]
|
WTransDelays = WTransDelays[Difficulty]
|
||||||
WTransDelays = WTransDelays[difficulty]
|
|
||||||
|
|
||||||
local buildings = Utils.Where(Map.ActorsInWorld, function(self) return self.Owner == Greece and self.HasProperty("StartBuildingRepairs") end)
|
local buildings = Utils.Where(Map.ActorsInWorld, function(self) return self.Owner == Greece and self.HasProperty("StartBuildingRepairs") end)
|
||||||
Utils.Do(buildings, function(actor)
|
Utils.Do(buildings, function(actor)
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ ProduceInfantry = function()
|
|||||||
Greece.Build({ Utils.Random(AlliedInfantry) }, function(units)
|
Greece.Build({ Utils.Random(AlliedInfantry) }, function(units)
|
||||||
table.insert(AttackGroup, units[1])
|
table.insert(AttackGroup, units[1])
|
||||||
SendAttackGroup()
|
SendAttackGroup()
|
||||||
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceInfantry)
|
Trigger.AfterDelay(ProductionInterval[Difficulty], ProduceInfantry)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -104,7 +104,7 @@ ProduceVehicles = function()
|
|||||||
Greece.Build({ Utils.Random(AlliedVehicles[AlliedVehicleType]) }, function(units)
|
Greece.Build({ Utils.Random(AlliedVehicles[AlliedVehicleType]) }, function(units)
|
||||||
table.insert(AttackGroup, units[1])
|
table.insert(AttackGroup, units[1])
|
||||||
SendAttackGroup()
|
SendAttackGroup()
|
||||||
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceVehicles)
|
Trigger.AfterDelay(ProductionInterval[Difficulty], ProduceVehicles)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -120,7 +120,7 @@ BringDDPatrol = function(patrolPath)
|
|||||||
if GreeceNavalYard.IsDead then
|
if GreeceNavalYard.IsDead then
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
if Map.LobbyOption("difficulty") == "easy" then
|
if Difficulty == "easy" then
|
||||||
Trigger.AfterDelay(DateTime.Minutes(7), function() BringDDPatrol(patrolPath) end)
|
Trigger.AfterDelay(DateTime.Minutes(7), function() BringDDPatrol(patrolPath) end)
|
||||||
else
|
else
|
||||||
Trigger.AfterDelay(DateTime.Minutes(4), function() BringDDPatrol(patrolPath) end)
|
Trigger.AfterDelay(DateTime.Minutes(4), function() BringDDPatrol(patrolPath) end)
|
||||||
@@ -130,9 +130,8 @@ BringDDPatrol = function(patrolPath)
|
|||||||
end
|
end
|
||||||
|
|
||||||
ActivateAI = function()
|
ActivateAI = function()
|
||||||
local difficulty = Map.LobbyOption("difficulty")
|
WTransUnits = WTransUnits[Difficulty]
|
||||||
WTransUnits = WTransUnits[difficulty]
|
WTransDelays = WTransDelays[Difficulty]
|
||||||
WTransDelays = WTransDelays[difficulty]
|
|
||||||
|
|
||||||
local buildings = Utils.Where(Map.ActorsInWorld, function(self) return self.Owner == Greece and self.HasProperty("StartBuildingRepairs") end)
|
local buildings = Utils.Where(Map.ActorsInWorld, function(self) return self.Owner == Greece and self.HasProperty("StartBuildingRepairs") end)
|
||||||
Utils.Do(buildings, function(actor)
|
Utils.Do(buildings, function(actor)
|
||||||
@@ -145,7 +144,7 @@ ActivateAI = function()
|
|||||||
|
|
||||||
Trigger.AfterDelay(DateTime.Minutes(3), WTransWaves)
|
Trigger.AfterDelay(DateTime.Minutes(3), WTransWaves)
|
||||||
|
|
||||||
Trigger.AfterDelay(AlliedVehiclesUpgradeDelay, function() AlliedVehicleType = "Upgraded" end)
|
Trigger.AfterDelay(AlliedVehiclesUpgradeDelay, function() AlliedVehicleType = "Upgraded" end)
|
||||||
|
|
||||||
ProduceInfantry()
|
ProduceInfantry()
|
||||||
ProduceVehicles()
|
ProduceVehicles()
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ ChinookAttack = function()
|
|||||||
end)
|
end)
|
||||||
|
|
||||||
ChinookAttacks = ChinookAttacks + 1
|
ChinookAttacks = ChinookAttacks + 1
|
||||||
if ChinookAttacks <= ChinookWaves[Map.LobbyOption("difficulty")] then
|
if ChinookAttacks <= ChinookWaves[Difficulty] then
|
||||||
ChinookAttack()
|
ChinookAttack()
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
@@ -87,7 +87,7 @@ ProduceInfantry = function()
|
|||||||
Germany.Build({ Utils.Random(AlliedInfantry) }, function(units)
|
Germany.Build({ Utils.Random(AlliedInfantry) }, function(units)
|
||||||
table.insert(AttackGroup, units[1])
|
table.insert(AttackGroup, units[1])
|
||||||
SendAttackGroup()
|
SendAttackGroup()
|
||||||
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceInfantry)
|
Trigger.AfterDelay(ProductionInterval[Difficulty], ProduceInfantry)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -99,7 +99,7 @@ ProduceVehicles = function()
|
|||||||
Germany.Build({ Utils.Random(AlliedVehicles) }, function(units)
|
Germany.Build({ Utils.Random(AlliedVehicles) }, function(units)
|
||||||
table.insert(AttackGroup, units[1])
|
table.insert(AttackGroup, units[1])
|
||||||
SendAttackGroup()
|
SendAttackGroup()
|
||||||
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceVehicles)
|
Trigger.AfterDelay(ProductionInterval[Difficulty], ProduceVehicles)
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -146,7 +146,7 @@ GermanAircraft = function()
|
|||||||
|
|
||||||
local alive = Utils.Where(Longbows, function(y) return not y.IsDead end)
|
local alive = Utils.Where(Longbows, function(y) return not y.IsDead end)
|
||||||
if #alive < 2 then
|
if #alive < 2 then
|
||||||
Trigger.AfterDelay(DateTime.Seconds(ProductionInterval[Map.LobbyOption("difficulty")] / 2), GermanAircraft)
|
Trigger.AfterDelay(DateTime.Seconds(ProductionInterval[Difficulty] / 2), GermanAircraft)
|
||||||
end
|
end
|
||||||
|
|
||||||
InitializeAttackAircraft(longbow, USSR)
|
InitializeAttackAircraft(longbow, USSR)
|
||||||
@@ -168,9 +168,8 @@ WTransWaves = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
ActivateAI = function()
|
ActivateAI = function()
|
||||||
local difficulty = Map.LobbyOption("difficulty")
|
WTransDelays = WTransDelays[Difficulty]
|
||||||
WTransDelays = WTransDelays[difficulty]
|
ChinookDelay = ChinookDelay[Difficulty]
|
||||||
ChinookDelay = ChinookDelay[difficulty]
|
|
||||||
|
|
||||||
local buildings = Utils.Where(Map.ActorsInWorld, function(self) return self.Owner ~= USSR and self.HasProperty("StartBuildingRepairs") end)
|
local buildings = Utils.Where(Map.ActorsInWorld, function(self) return self.Owner ~= USSR and self.HasProperty("StartBuildingRepairs") end)
|
||||||
Utils.Do(buildings, function(actor)
|
Utils.Do(buildings, function(actor)
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ MissionSetup = function()
|
|||||||
if not attackTriggered and unit.Type == "3tnk" then
|
if not attackTriggered and unit.Type == "3tnk" then
|
||||||
Trigger.RemoveFootprintTrigger(id)
|
Trigger.RemoveFootprintTrigger(id)
|
||||||
attackTriggered = true
|
attackTriggered = true
|
||||||
|
|
||||||
Utils.Do(LightVehicleAttack, function(unit)
|
Utils.Do(LightVehicleAttack, function(unit)
|
||||||
if not unit.IsDead then
|
if not unit.IsDead then
|
||||||
IdleHunt(unit)
|
IdleHunt(unit)
|
||||||
@@ -177,7 +177,7 @@ MissionSetup = function()
|
|||||||
if not chinookTriggered and unit.Owner == USSR then
|
if not chinookTriggered and unit.Owner == USSR then
|
||||||
Trigger.RemoveFootprintTrigger(id)
|
Trigger.RemoveFootprintTrigger(id)
|
||||||
chinookTriggered = true
|
chinookTriggered = true
|
||||||
|
|
||||||
local chalk = Reinforcements.ReinforceWithTransport(Greece, "tran", ChinookChalk , ChinookPath, { ChinookPath[1] })[2]
|
local chalk = Reinforcements.ReinforceWithTransport(Greece, "tran", ChinookChalk , ChinookPath, { ChinookPath[1] })[2]
|
||||||
Utils.Do(chalk, function(unit)
|
Utils.Do(chalk, function(unit)
|
||||||
Trigger.OnAddedToWorld(unit, IdleHunt)
|
Trigger.OnAddedToWorld(unit, IdleHunt)
|
||||||
@@ -336,9 +336,8 @@ WorldLoaded = function()
|
|||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
difficulty = Map.LobbyOption("difficulty")
|
ConvoyEscort = ConvoyEscort[Difficulty]
|
||||||
ConvoyEscort = ConvoyEscort[difficulty]
|
StartTimerDelay = StartTimerDelay[Difficulty]
|
||||||
StartTimerDelay = StartTimerDelay[difficulty]
|
|
||||||
|
|
||||||
MissionStart()
|
MissionStart()
|
||||||
MissionSetup()
|
MissionSetup()
|
||||||
|
|||||||
@@ -33,7 +33,7 @@ TransportDelays =
|
|||||||
}
|
}
|
||||||
|
|
||||||
AlliedShips =
|
AlliedShips =
|
||||||
{
|
{
|
||||||
easy = { "pt", "pt", "dd" },
|
easy = { "pt", "pt", "dd" },
|
||||||
normal = { "pt", "dd", "dd" },
|
normal = { "pt", "dd", "dd" },
|
||||||
hard = { "dd", "dd" , "dd" }
|
hard = { "dd", "dd" , "dd" }
|
||||||
@@ -44,7 +44,7 @@ Helis = { }
|
|||||||
PatrolWay = { ShipWaypoint1.Location, ShipWaypoint2.Location, ShipWaypoint3.Location, ShipWaypoint4.Location, ShipWaypoint5.Location }
|
PatrolWay = { ShipWaypoint1.Location, ShipWaypoint2.Location, ShipWaypoint3.Location, ShipWaypoint4.Location, ShipWaypoint5.Location }
|
||||||
|
|
||||||
TransportWays =
|
TransportWays =
|
||||||
{
|
{
|
||||||
{ AlliedTransportEntry1.Location, AlliedTransportDrop1.Location },
|
{ AlliedTransportEntry1.Location, AlliedTransportDrop1.Location },
|
||||||
{ AlliedTransportEntry2.Location, AlliedTransportDrop2.Location },
|
{ AlliedTransportEntry2.Location, AlliedTransportDrop2.Location },
|
||||||
{ AlliedTransportEntry3.Location, AlliedTransportDrop3.Location }
|
{ AlliedTransportEntry3.Location, AlliedTransportDrop3.Location }
|
||||||
@@ -169,7 +169,7 @@ ProduceHelicopters = function()
|
|||||||
Greece.Build(HeliType, function(helis)
|
Greece.Build(HeliType, function(helis)
|
||||||
local heli = helis[1]
|
local heli = helis[1]
|
||||||
Helis[#Helis+1] = heli
|
Helis[#Helis+1] = heli
|
||||||
|
|
||||||
Trigger.OnKilled(heli, ProduceHelicopters)
|
Trigger.OnKilled(heli, ProduceHelicopters)
|
||||||
|
|
||||||
local alive = Utils.Where(Helis, function(y) return not y.IsDead end)
|
local alive = Utils.Where(Helis, function(y) return not y.IsDead end)
|
||||||
@@ -205,11 +205,11 @@ BridgeTrigger = function()
|
|||||||
TheBridge.Kill()
|
TheBridge.Kill()
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
Trigger.OnEnteredProximityTrigger(BaseBridge.CenterPosition, WDist.FromCells(3), function(actor, id)
|
Trigger.OnEnteredProximityTrigger(BaseBridge.CenterPosition, WDist.FromCells(3), function(actor, id)
|
||||||
if actor.Owner == USSR and actor.Type ~= "badr" and actor.Type ~= "u2" and actor.Type ~= "camera.spyplane" then
|
if actor.Owner == USSR and actor.Type ~= "badr" and actor.Type ~= "u2" and actor.Type ~= "camera.spyplane" then
|
||||||
Trigger.RemoveProximityTrigger(id)
|
Trigger.RemoveProximityTrigger(id)
|
||||||
|
|
||||||
if not BridgeTank.IsDead and not BridgeBarrel.IsDead and not TheBridge.IsDead then
|
if not BridgeTank.IsDead and not BridgeBarrel.IsDead and not TheBridge.IsDead then
|
||||||
BridgeTank.Attack(BridgeBarrel, true, true)
|
BridgeTank.Attack(BridgeBarrel, true, true)
|
||||||
end
|
end
|
||||||
@@ -218,13 +218,12 @@ BridgeTrigger = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
ActivateAI = function()
|
ActivateAI = function()
|
||||||
local difficulty = Map.LobbyOption("difficulty")
|
TransportDelays = TransportDelays[Difficulty]
|
||||||
TransportDelays = TransportDelays[difficulty]
|
DestroyerDelays = DestroyerDelays[Difficulty]
|
||||||
DestroyerDelays = DestroyerDelays[difficulty]
|
TransportUnits = TransportUnits[Difficulty]
|
||||||
TransportUnits = TransportUnits[difficulty]
|
ProductionDelays = ProductionDelays[Difficulty]
|
||||||
ProductionDelays = ProductionDelays[difficulty]
|
AlliedShips = AlliedShips[Difficulty]
|
||||||
AlliedShips = AlliedShips[difficulty]
|
SurpriseTransportUnits = SurpriseTransportUnits[Difficulty]
|
||||||
SurpriseTransportUnits = SurpriseTransportUnits[difficulty]
|
|
||||||
|
|
||||||
BuildingsHealing()
|
BuildingsHealing()
|
||||||
AlliedTransportAmbush()
|
AlliedTransportAmbush()
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ TransportDelays =
|
|||||||
}
|
}
|
||||||
|
|
||||||
AlliedShips =
|
AlliedShips =
|
||||||
{
|
{
|
||||||
easy = { "pt", "pt", "dd" },
|
easy = { "pt", "pt", "dd" },
|
||||||
normal = { "pt", "dd", "dd" },
|
normal = { "pt", "dd", "dd" },
|
||||||
hard = { "dd", "dd" , "dd" }
|
hard = { "dd", "dd" , "dd" }
|
||||||
@@ -47,7 +47,7 @@ Helis = { }
|
|||||||
PatrolWay = { ShipWaypoint1.Location, ShipWaypoint2.Location, ShipWaypoint3.Location, ShipWaypoint4.Location, ShipWaypoint5.Location }
|
PatrolWay = { ShipWaypoint1.Location, ShipWaypoint2.Location, ShipWaypoint3.Location, ShipWaypoint4.Location, ShipWaypoint5.Location }
|
||||||
|
|
||||||
TransportWays =
|
TransportWays =
|
||||||
{
|
{
|
||||||
{ AlliedTransportEntry1.Location, AlliedTransportDrop1.Location },
|
{ AlliedTransportEntry1.Location, AlliedTransportDrop1.Location },
|
||||||
{ AlliedTransportEntry2.Location, AlliedTransportDrop2.Location },
|
{ AlliedTransportEntry2.Location, AlliedTransportDrop2.Location },
|
||||||
{ AlliedTransportEntry3.Location, AlliedTransportDrop3.Location }
|
{ AlliedTransportEntry3.Location, AlliedTransportDrop3.Location }
|
||||||
@@ -175,7 +175,7 @@ ProduceHelicopters = function()
|
|||||||
Greece.Build(HeliType, function(helis)
|
Greece.Build(HeliType, function(helis)
|
||||||
local heli = helis[1]
|
local heli = helis[1]
|
||||||
Helis[#Helis+1] = heli
|
Helis[#Helis+1] = heli
|
||||||
|
|
||||||
Trigger.OnKilled(heli, ProduceHelicopters)
|
Trigger.OnKilled(heli, ProduceHelicopters)
|
||||||
|
|
||||||
local alive = Utils.Where(Helis, function(y) return not y.IsDead end)
|
local alive = Utils.Where(Helis, function(y) return not y.IsDead end)
|
||||||
@@ -211,11 +211,11 @@ BridgeTrigger = function()
|
|||||||
TheBridge.Kill()
|
TheBridge.Kill()
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
Trigger.OnEnteredProximityTrigger(BaseBridge.CenterPosition, WDist.FromCells(3), function(actor, id)
|
Trigger.OnEnteredProximityTrigger(BaseBridge.CenterPosition, WDist.FromCells(3), function(actor, id)
|
||||||
if actor.Owner == USSR and actor.Type ~= "badr" and actor.Type ~= "u2" and actor.Type ~= "camera.spyplane" then
|
if actor.Owner == USSR and actor.Type ~= "badr" and actor.Type ~= "u2" and actor.Type ~= "camera.spyplane" then
|
||||||
Trigger.RemoveProximityTrigger(id)
|
Trigger.RemoveProximityTrigger(id)
|
||||||
|
|
||||||
if not BridgeTank.IsDead and not BridgeBarrel.IsDead and not TheBridge.IsDead then
|
if not BridgeTank.IsDead and not BridgeBarrel.IsDead and not TheBridge.IsDead then
|
||||||
BridgeTank.Attack(BridgeBarrel, true, true)
|
BridgeTank.Attack(BridgeBarrel, true, true)
|
||||||
end
|
end
|
||||||
@@ -224,13 +224,12 @@ BridgeTrigger = function()
|
|||||||
end
|
end
|
||||||
|
|
||||||
ActivateAI = function()
|
ActivateAI = function()
|
||||||
local difficulty = Map.LobbyOption("difficulty")
|
TransportDelays = TransportDelays[Difficulty]
|
||||||
TransportDelays = TransportDelays[difficulty]
|
DestroyerDelays = DestroyerDelays[Difficulty]
|
||||||
DestroyerDelays = DestroyerDelays[difficulty]
|
TransportUnits = TransportUnits[Difficulty]
|
||||||
TransportUnits = TransportUnits[difficulty]
|
ProductionDelays = ProductionDelays[Difficulty]
|
||||||
ProductionDelays = ProductionDelays[difficulty]
|
AlliedShips = AlliedShips[Difficulty]
|
||||||
AlliedShips = AlliedShips[difficulty]
|
SurpriseTransportUnits = SurpriseTransportUnits[Difficulty]
|
||||||
SurpriseTransportUnits = SurpriseTransportUnits[difficulty]
|
|
||||||
|
|
||||||
BuildingsHealing()
|
BuildingsHealing()
|
||||||
AlliedTransportAmbush()
|
AlliedTransportAmbush()
|
||||||
|
|||||||
@@ -8,12 +8,12 @@
|
|||||||
]]
|
]]
|
||||||
|
|
||||||
AlliedInfantryTypes = { "e1", "e3" }
|
AlliedInfantryTypes = { "e1", "e3" }
|
||||||
if Map.LobbyOption("difficulty") == "easy" then
|
if Difficulty == "easy" then
|
||||||
AlliedArmorTypes = { "1tnk", "1tnk" }
|
AlliedArmorTypes = { "1tnk", "1tnk" }
|
||||||
else
|
else
|
||||||
AlliedArmorTypes = { "1tnk", "2tnk" }
|
AlliedArmorTypes = { "1tnk", "2tnk" }
|
||||||
end
|
end
|
||||||
if Map.LobbyOption("difficulty") == "hard" then
|
if Difficulty == "hard" then
|
||||||
AlliedNavyGuard = { "ca", "ca" }
|
AlliedNavyGuard = { "ca", "ca" }
|
||||||
else
|
else
|
||||||
AlliedNavyGuard = { "ca" }
|
AlliedNavyGuard = { "ca" }
|
||||||
@@ -87,10 +87,10 @@ ProduceArmor = function()
|
|||||||
greece.Build(toBuild, function(unit)
|
greece.Build(toBuild, function(unit)
|
||||||
ArmorAttack[#ArmorAttack + 1] = unit[1]
|
ArmorAttack[#ArmorAttack + 1] = unit[1]
|
||||||
|
|
||||||
if #ArmorAttack >= ArmorAttackNumbers[Map.LobbyOption("difficulty")] then
|
if #ArmorAttack >= ArmorAttackNumbers[Difficulty] then
|
||||||
SendAttackToBase(ArmorAttack)
|
SendAttackToBase(ArmorAttack)
|
||||||
ArmorAttack = { }
|
ArmorAttack = { }
|
||||||
Trigger.AfterDelay(ArmorAttackDelays[Map.LobbyOption("difficulty")], ProduceArmor)
|
Trigger.AfterDelay(ArmorAttackDelays[Difficulty], ProduceArmor)
|
||||||
else
|
else
|
||||||
Trigger.AfterDelay(delay, ProduceArmor)
|
Trigger.AfterDelay(delay, ProduceArmor)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -53,11 +53,11 @@ WorldLoaded = function()
|
|||||||
--AI Production Setup
|
--AI Production Setup
|
||||||
ProduceArmor()
|
ProduceArmor()
|
||||||
|
|
||||||
if Map.LobbyOption("difficulty") == "easy" then
|
if Difficulty == "easy" then
|
||||||
Trigger.AfterDelay(DateTime.Minutes(10), ProduceNavyGuard)
|
Trigger.AfterDelay(DateTime.Minutes(10), ProduceNavyGuard)
|
||||||
elseif Map.LobbyOption("difficulty") == "normal" then
|
elseif Difficulty == "normal" then
|
||||||
Trigger.AfterDelay(DateTime.Minutes(5), ProduceNavyGuard)
|
Trigger.AfterDelay(DateTime.Minutes(5), ProduceNavyGuard)
|
||||||
elseif Map.LobbyOption("difficulty") == "hard" then
|
elseif Difficulty == "hard" then
|
||||||
ProduceNavyGuard()
|
ProduceNavyGuard()
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -334,7 +334,7 @@ WorldLoaded = function()
|
|||||||
Trigger.AfterDelay(DateTime.Seconds(10), function()
|
Trigger.AfterDelay(DateTime.Seconds(10), function()
|
||||||
if prtcamera.IsInWorld then prtcamera.Destroy() end
|
if prtcamera.IsInWorld then prtcamera.Destroy() end
|
||||||
end)
|
end)
|
||||||
if Map.LobbyOption("difficulty") == "hard" and not RiflemanGuard01.IsDead then
|
if Difficulty == "hard" and not RiflemanGuard01.IsDead then
|
||||||
Trigger.ClearAll(RiflemanGuard01)
|
Trigger.ClearAll(RiflemanGuard01)
|
||||||
ProduceInfantry() --Greece will start infantry production right away if the difficulty is set to hard
|
ProduceInfantry() --Greece will start infantry production right away if the difficulty is set to hard
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
the License, or (at your option) any later version. For more
|
the License, or (at your option) any later version. For more
|
||||||
information, see COPYING.
|
information, see COPYING.
|
||||||
]]
|
]]
|
||||||
Difficulty = Map.LobbyOption("difficulty")
|
|
||||||
|
|
||||||
if Difficulty == "easy" then
|
if Difficulty == "easy" then
|
||||||
AttackAtFrameIncrement = DateTime.Seconds(22)
|
AttackAtFrameIncrement = DateTime.Seconds(22)
|
||||||
|
|||||||
@@ -22,11 +22,11 @@ AlliedSquad02 = { AlliedSquad02RifleInf01, AlliedSquad02RifleInf02, AlliedSquad0
|
|||||||
AlliedSquad03 = { AlliedSquad03LTank01, AlliedSquad03RocketInf01, AlliedSquad03RocketInf02, AlliedSquad03RocketInf03 }
|
AlliedSquad03 = { AlliedSquad03LTank01, AlliedSquad03RocketInf01, AlliedSquad03RocketInf02, AlliedSquad03RocketInf03 }
|
||||||
AlliedSquad04 = { AlliedSquad04MGG01, AlliedSquad04MTank01, AlliedSquad04MTank02, AlliedSquad04MTank03, AlliedSquad04MTank04, AlliedSquad04MTank05, AlliedSquad04Arty01, AlliedSquad04Arty02, AlliedSquad04Arty03 }
|
AlliedSquad04 = { AlliedSquad04MGG01, AlliedSquad04MTank01, AlliedSquad04MTank02, AlliedSquad04MTank03, AlliedSquad04MTank04, AlliedSquad04MTank05, AlliedSquad04Arty01, AlliedSquad04Arty02, AlliedSquad04Arty03 }
|
||||||
AlliedTanksReinforcement = { "2tnk", "2tnk" }
|
AlliedTanksReinforcement = { "2tnk", "2tnk" }
|
||||||
if Map.LobbyOption("difficulty") == "easy" then
|
if Difficulty == "easy" then
|
||||||
AlliedHuntingParty = { "1tnk" }
|
AlliedHuntingParty = { "1tnk" }
|
||||||
elseif Map.LobbyOption("difficulty") == "normal" then
|
elseif Difficulty == "normal" then
|
||||||
AlliedHuntingParty = { "1tnk", "1tnk" }
|
AlliedHuntingParty = { "1tnk", "1tnk" }
|
||||||
elseif Map.LobbyOption("difficulty") == "hard" then
|
elseif Difficulty == "hard" then
|
||||||
AlliedHuntingParty = { "1tnk", "1tnk", "1tnk" }
|
AlliedHuntingParty = { "1tnk", "1tnk", "1tnk" }
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -197,12 +197,12 @@ WorldLoaded = function()
|
|||||||
if bridgecamera01.IsInWorld then bridgecamera01.Destroy() end
|
if bridgecamera01.IsInWorld then bridgecamera01.Destroy() end
|
||||||
if bridgecamera02.IsInWorld then bridgecamera02.Destroy() end
|
if bridgecamera02.IsInWorld then bridgecamera02.Destroy() end
|
||||||
end)
|
end)
|
||||||
if Map.LobbyOption("difficulty") == "normal" then
|
if Difficulty == "normal" then
|
||||||
Reinforcements.Reinforce(goodguy, { "dd" }, { AlliedDestroyer01Spawn.Location, AlliedDestroyer01WP01.Location, AlliedDestroyer01WP02.Location }, 0, function(unit)
|
Reinforcements.Reinforce(goodguy, { "dd" }, { AlliedDestroyer01Spawn.Location, AlliedDestroyer01WP01.Location, AlliedDestroyer01WP02.Location }, 0, function(unit)
|
||||||
unit.Stance = "Defend"
|
unit.Stance = "Defend"
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
if Map.LobbyOption("difficulty") == "hard" then
|
if Difficulty == "hard" then
|
||||||
Reinforcements.Reinforce(goodguy, { "dd" }, { AlliedDestroyer01Spawn.Location, AlliedDestroyer01WP01.Location, AlliedDestroyer01WP02.Location }, 0, function(unit)
|
Reinforcements.Reinforce(goodguy, { "dd" }, { AlliedDestroyer01Spawn.Location, AlliedDestroyer01WP01.Location, AlliedDestroyer01WP02.Location }, 0, function(unit)
|
||||||
unit.Stance = "Defend"
|
unit.Stance = "Defend"
|
||||||
end)
|
end)
|
||||||
|
|||||||
Reference in New Issue
Block a user