Replace Map.Difficulty with Map.LobbyOption in scripts.

This commit is contained in:
Paul Chote
2016-06-12 20:43:54 +01:00
parent 8ce4ab0bd1
commit d08a8eb1f6
32 changed files with 203 additions and 203 deletions

View File

@@ -79,7 +79,7 @@ WorldLoaded = function()
Trigger.AfterDelay(DateTime.Seconds(1), function() InitialUnitsArrived = true end) Trigger.AfterDelay(DateTime.Seconds(1), function() InitialUnitsArrived = true end)
Trigger.AfterDelay(DateTime.Seconds(15), function() ReinforceWithLandingCraft(BazookaReinforcments, SeaEntryB.Location, BeachReinforceB.Location, BeachReinforceB.Location) end) Trigger.AfterDelay(DateTime.Seconds(15), function() ReinforceWithLandingCraft(BazookaReinforcments, SeaEntryB.Location, BeachReinforceB.Location, BeachReinforceB.Location) end)
if Map.Difficulty == "Easy" then if Map.LobbyOption("difficulty") == "easy" then
Trigger.AfterDelay(DateTime.Seconds(25), function() ReinforceWithLandingCraft(BikeReinforcments, SeaEntryA.Location, BeachReinforceA.Location, BeachReinforceA.Location) end) Trigger.AfterDelay(DateTime.Seconds(25), function() ReinforceWithLandingCraft(BikeReinforcments, SeaEntryA.Location, BeachReinforceA.Location, BeachReinforceA.Location) end)
Trigger.AfterDelay(DateTime.Seconds(30), function() ReinforceWithLandingCraft(BikeReinforcments, SeaEntryB.Location, BeachReinforceB.Location, BeachReinforceB.Location) end) Trigger.AfterDelay(DateTime.Seconds(30), function() ReinforceWithLandingCraft(BikeReinforcments, SeaEntryB.Location, BeachReinforceB.Location, BeachReinforceB.Location) end)
end end

View File

@@ -1,10 +1,10 @@
RepairThreshold = { Easy = 0.3, Normal = 0.6, Hard = 0.9 } RepairThreshold = { easy = 0.3, normal = 0.6, hard = 0.9 }
ActorRemovals = ActorRemovals =
{ {
Easy = { Actor167, Actor168, Actor190, Actor191, Actor193, Actor194, Actor196, Actor198, Actor200 }, easy = { Actor167, Actor168, Actor190, Actor191, Actor193, Actor194, Actor196, Actor198, Actor200 },
Normal = { Actor167, Actor194, Actor196, Actor197 }, normal = { Actor167, Actor194, Actor196, Actor197 },
Hard = { }, hard = { },
} }
GdiTanks = { "mtnk", "mtnk" } GdiTanks = { "mtnk", "mtnk" }
@@ -16,31 +16,31 @@ CoreNodBase = { NodConYard, NodRefinery, HandOfNod, Airfield }
Grd1UnitTypes = { "bggy" } Grd1UnitTypes = { "bggy" }
Grd1Path = { waypoint4.Location, waypoint5.Location, waypoint10.Location } Grd1Path = { waypoint4.Location, waypoint5.Location, waypoint10.Location }
Grd1Delay = { Easy = DateTime.Minutes(2), Normal = DateTime.Minutes(1), Hard = DateTime.Seconds(30) } Grd1Delay = { easy = DateTime.Minutes(2), normal = DateTime.Minutes(1), hard = DateTime.Seconds(30) }
Grd2UnitTypes = { "bggy" } Grd2UnitTypes = { "bggy" }
Grd2Path = { waypoint0.Location, waypoint1.Location, waypoint2.Location } Grd2Path = { waypoint0.Location, waypoint1.Location, waypoint2.Location }
Grd3Units = { GuardTank1, GuardTank2 } Grd3Units = { GuardTank1, GuardTank2 }
Grd3Path = { waypoint4.Location, waypoint5.Location, waypoint9.Location } Grd3Path = { waypoint4.Location, waypoint5.Location, waypoint9.Location }
AttackDelayMin = { Easy = DateTime.Minutes(1), Normal = DateTime.Seconds(45), Hard = DateTime.Seconds(30) } AttackDelayMin = { easy = DateTime.Minutes(1), normal = DateTime.Seconds(45), hard = DateTime.Seconds(30) }
AttackDelayMax = { Easy = DateTime.Minutes(2), Normal = DateTime.Seconds(90), Hard = DateTime.Minutes(1) } AttackDelayMax = { easy = DateTime.Minutes(2), normal = DateTime.Seconds(90), hard = DateTime.Minutes(1) }
AttackUnitTypes = AttackUnitTypes =
{ {
Easy = easy =
{ {
{ factory = HandOfNod, types = { "e1", "e1" } }, { factory = HandOfNod, types = { "e1", "e1" } },
{ factory = HandOfNod, types = { "e1", "e3" } }, { factory = HandOfNod, types = { "e1", "e3" } },
{ factory = HandOfNod, types = { "e1", "e1", "e3" } }, { factory = HandOfNod, types = { "e1", "e1", "e3" } },
{ factory = HandOfNod, types = { "e1", "e3", "e3" } }, { factory = HandOfNod, types = { "e1", "e3", "e3" } },
}, },
Normal = normal =
{ {
{ factory = HandOfNod, types = { "e1", "e1", "e3" } }, { factory = HandOfNod, types = { "e1", "e1", "e3" } },
{ factory = HandOfNod, types = { "e1", "e3", "e3" } }, { factory = HandOfNod, types = { "e1", "e3", "e3" } },
{ factory = HandOfNod, types = { "e1", "e1", "e3", "e3" } }, { factory = HandOfNod, types = { "e1", "e1", "e3", "e3" } },
{ factory = Airfield, types = { "bggy" } }, { factory = Airfield, types = { "bggy" } },
}, },
Hard = hard =
{ {
{ factory = HandOfNod, types = { "e1", "e1", "e3", "e3" } }, { factory = HandOfNod, types = { "e1", "e1", "e3", "e3" } },
{ factory = HandOfNod, types = { "e1", "e1", "e1", "e3", "e3" } }, { factory = HandOfNod, types = { "e1", "e1", "e1", "e3", "e3" } },
@@ -68,7 +68,7 @@ Build = function(factory, units, action)
end end
Attack = function() Attack = function()
local production = Utils.Random(AttackUnitTypes[Map.Difficulty]) local production = Utils.Random(AttackUnitTypes[Map.LobbyOption("difficulty")])
local path = Utils.Random(AttackPaths) local path = Utils.Random(AttackPaths)
Build(production.factory, production.types, function(units) Build(production.factory, production.types, function(units)
Utils.Do(units, function(unit) Utils.Do(units, function(unit)
@@ -78,7 +78,7 @@ Attack = function()
end) end)
end) end)
Trigger.AfterDelay(Utils.RandomInteger(AttackDelayMin[Map.Difficulty], AttackDelayMax[Map.Difficulty]), Attack) Trigger.AfterDelay(Utils.RandomInteger(AttackDelayMin[Map.LobbyOption("difficulty")], AttackDelayMax[Map.LobbyOption("difficulty")]), Attack)
end end
Grd1Action = function() Grd1Action = function()
@@ -86,7 +86,7 @@ Grd1Action = function()
Utils.Do(units, function(unit) Utils.Do(units, function(unit)
if unit.Owner ~= enemy then return end if unit.Owner ~= enemy then return end
Trigger.OnKilled(unit, function() Trigger.OnKilled(unit, function()
Trigger.AfterDelay(Grd1Delay[Map.Difficulty], Grd1Action) Trigger.AfterDelay(Grd1Delay[Map.LobbyOption("difficulty")], Grd1Action)
end) end)
unit.Patrol(Grd1Path, true, DateTime.Seconds(7)) unit.Patrol(Grd1Path, true, DateTime.Seconds(7))
end) end)
@@ -138,7 +138,7 @@ DiscoverGdiBase = function(actor, discoverer)
end end
SetupWorld = function() SetupWorld = function()
Utils.Do(ActorRemovals[Map.Difficulty], function(unit) Utils.Do(ActorRemovals[Map.LobbyOption("difficulty")], function(unit)
unit.Destroy() unit.Destroy()
end) end)
@@ -152,7 +152,7 @@ SetupWorld = function()
Utils.Do(Map.NamedActors, function(actor) Utils.Do(Map.NamedActors, function(actor)
if actor.Owner == enemy and actor.HasProperty("StartBuildingRepairs") then if actor.Owner == enemy and actor.HasProperty("StartBuildingRepairs") then
Trigger.OnDamaged(actor, function(building) Trigger.OnDamaged(actor, function(building)
if building.Owner == enemy and building.Health < RepairThreshold[Map.Difficulty] * building.MaxHealth then if building.Owner == enemy and building.Health < RepairThreshold[Map.LobbyOption("difficulty")] * building.MaxHealth then
building.StartBuildingRepairs() building.StartBuildingRepairs()
end end
end) end)
@@ -166,11 +166,11 @@ SetupWorld = function()
GdiHarv.Stop() GdiHarv.Stop()
NodHarv.FindResources() NodHarv.FindResources()
if Map.Difficulty ~= "Easy" then if Map.LobbyOption("difficulty") ~= "easy" then
Trigger.OnDamaged(NodHarv, function() Trigger.OnDamaged(NodHarv, function()
Utils.Do(enemy.GetGroundAttackers(), function(unit) Utils.Do(enemy.GetGroundAttackers(), function(unit)
unit.AttackMove(NodHarv.Location) unit.AttackMove(NodHarv.Location)
if Map.Difficulty == "Hard" then if Map.LobbyOption("difficulty") == "hard" then
unit.Hunt() unit.Hunt()
end end
end) end)

View File

@@ -89,10 +89,10 @@ WorldLoaded = function()
Media.PlaySpeechNotification(player, "Lose") Media.PlaySpeechNotification(player, "Lose")
end) end)
if Map.Difficulty == "Easy" then if Map.LobbyOption("difficulty") == "easy" then
CommandoType = "rmbo.easy" CommandoType = "rmbo.easy"
KillCounterHuntThreshold = 30 KillCounterHuntThreshold = 30
elseif Map.Difficulty == "Hard" then elseif Map.LobbyOption("difficulty") == "hard" then
CommandoType = "rmbo.hard" CommandoType = "rmbo.hard"
KillCounterHuntThreshold = 15 KillCounterHuntThreshold = 15
else else

View File

@@ -1,6 +1,6 @@
if Map.Difficulty == "Easy" then if Map.LobbyOption("difficulty") == "easy" then
Rambo = "rmbo.easy" Rambo = "rmbo.easy"
elseif Map.Difficulty == "Hard" then elseif Map.LobbyOption("difficulty") == "hard" then
Rambo = "rmbo.hard" Rambo = "rmbo.hard"
else else
Rambo = "rmbo" Rambo = "rmbo"

View File

@@ -1,18 +1,18 @@
HarkonnenReinforcements = { } HarkonnenReinforcements = { }
HarkonnenReinforcements["Easy"] = HarkonnenReinforcements["easy"] =
{ {
{ "light_inf", "light_inf" } { "light_inf", "light_inf" }
} }
HarkonnenReinforcements["Normal"] = HarkonnenReinforcements["normal"] =
{ {
{ "light_inf", "light_inf" }, { "light_inf", "light_inf" },
{ "light_inf", "light_inf", "light_inf" }, { "light_inf", "light_inf", "light_inf" },
{ "light_inf", "trike" }, { "light_inf", "trike" },
} }
HarkonnenReinforcements["Hard"] = HarkonnenReinforcements["hard"] =
{ {
{ "light_inf", "light_inf" }, { "light_inf", "light_inf" },
{ "trike", "trike" }, { "trike", "trike" },
@@ -25,14 +25,14 @@ HarkonnenEntryWaypoints = { HarkonnenWaypoint1.Location, HarkonnenWaypoint2.Loca
HarkonnenAttackDelay = DateTime.Seconds(30) HarkonnenAttackDelay = DateTime.Seconds(30)
HarkonnenAttackWaves = { } HarkonnenAttackWaves = { }
HarkonnenAttackWaves["Easy"] = 1 HarkonnenAttackWaves["easy"] = 1
HarkonnenAttackWaves["Normal"] = 5 HarkonnenAttackWaves["normal"] = 5
HarkonnenAttackWaves["Hard"] = 12 HarkonnenAttackWaves["hard"] = 12
ToHarvest = { } ToHarvest = { }
ToHarvest["Easy"] = 2500 ToHarvest["easy"] = 2500
ToHarvest["Normal"] = 3000 ToHarvest["normal"] = 3000
ToHarvest["Hard"] = 3500 ToHarvest["hard"] = 3500
AtreidesReinforcements = { "light_inf", "light_inf", "light_inf" } AtreidesReinforcements = { "light_inf", "light_inf", "light_inf" }
AtreidesEntryPath = { AtreidesWaypoint.Location, AtreidesRally.Location } AtreidesEntryPath = { AtreidesWaypoint.Location, AtreidesRally.Location }
@@ -57,7 +57,7 @@ Tick = function()
player.MarkCompletedObjective(KillHarkonnen) player.MarkCompletedObjective(KillHarkonnen)
end end
if player.Resources > ToHarvest[Map.Difficulty] - 1 then if player.Resources > ToHarvest[Map.LobbyOption("difficulty")] - 1 then
player.MarkCompletedObjective(GatherSpice) player.MarkCompletedObjective(GatherSpice)
end end
@@ -78,7 +78,7 @@ Tick = function()
Media.DisplayMessage(Messages[4], "Mentat") Media.DisplayMessage(Messages[4], "Mentat")
end end
UserInterface.SetMissionText("Harvested resources: " .. player.Resources .. "/" .. ToHarvest[Map.Difficulty], player.Color) UserInterface.SetMissionText("Harvested resources: " .. player.Resources .. "/" .. ToHarvest[Map.LobbyOption("difficulty")], player.Color)
end end
WorldLoaded = function() WorldLoaded = function()
@@ -106,12 +106,12 @@ WorldLoaded = function()
Reinforcements.Reinforce(player, AtreidesReinforcements, AtreidesEntryPath) Reinforcements.Reinforce(player, AtreidesReinforcements, AtreidesEntryPath)
end) end)
WavesLeft = HarkonnenAttackWaves[Map.Difficulty] WavesLeft = HarkonnenAttackWaves[Map.LobbyOption("difficulty")]
SendReinforcements() SendReinforcements()
end end
SendReinforcements = function() SendReinforcements = function()
local units = HarkonnenReinforcements[Map.Difficulty] local units = HarkonnenReinforcements[Map.LobbyOption("difficulty")]
local delay = Utils.RandomInteger(HarkonnenAttackDelay - DateTime.Seconds(2), HarkonnenAttackDelay) local delay = Utils.RandomInteger(HarkonnenAttackDelay - DateTime.Seconds(2), HarkonnenAttackDelay)
HarkonnenAttackDelay = HarkonnenAttackDelay - (#units * 3 - 3 - WavesLeft) * DateTime.Seconds(1) HarkonnenAttackDelay = HarkonnenAttackDelay - (#units * 3 - 3 - WavesLeft) * DateTime.Seconds(1)
if HarkonnenAttackDelay < 0 then HarkonnenAttackDelay = 0 end if HarkonnenAttackDelay < 0 then HarkonnenAttackDelay = 0 end
@@ -134,7 +134,7 @@ InitObjectives = function()
end) end)
KillAtreides = harkonnen.AddPrimaryObjective("Kill all Atreides units.") KillAtreides = harkonnen.AddPrimaryObjective("Kill all Atreides units.")
GatherSpice = player.AddPrimaryObjective("Harvest " .. tostring(ToHarvest[Map.Difficulty]) .. " Solaris worth of Spice.") GatherSpice = player.AddPrimaryObjective("Harvest " .. tostring(ToHarvest[Map.LobbyOption("difficulty")]) .. " Solaris worth of Spice.")
KillHarkonnen = player.AddSecondaryObjective("Eliminate all Harkonnen units and reinforcements\nin the area.") KillHarkonnen = player.AddSecondaryObjective("Eliminate all Harkonnen units and reinforcements\nin the area.")
Trigger.OnObjectiveCompleted(player, function(p, id) Trigger.OnObjectiveCompleted(player, function(p, id)

View File

@@ -1,18 +1,18 @@
HarkonnenReinforcements = { } HarkonnenReinforcements = { }
HarkonnenReinforcements["Easy"] = HarkonnenReinforcements["easy"] =
{ {
{ "light_inf", "light_inf" } { "light_inf", "light_inf" }
} }
HarkonnenReinforcements["Normal"] = HarkonnenReinforcements["normal"] =
{ {
{ "light_inf", "light_inf" }, { "light_inf", "light_inf" },
{ "light_inf", "light_inf", "light_inf" }, { "light_inf", "light_inf", "light_inf" },
{ "light_inf", "trike" }, { "light_inf", "trike" },
} }
HarkonnenReinforcements["Hard"] = HarkonnenReinforcements["hard"] =
{ {
{ "light_inf", "light_inf" }, { "light_inf", "light_inf" },
{ "trike", "trike" }, { "trike", "trike" },
@@ -25,14 +25,14 @@ HarkonnenEntryWaypoints = { HarkonnenWaypoint1.Location, HarkonnenWaypoint2.Loca
HarkonnenAttackDelay = DateTime.Seconds(30) HarkonnenAttackDelay = DateTime.Seconds(30)
HarkonnenAttackWaves = { } HarkonnenAttackWaves = { }
HarkonnenAttackWaves["Easy"] = 1 HarkonnenAttackWaves["easy"] = 1
HarkonnenAttackWaves["Normal"] = 5 HarkonnenAttackWaves["normal"] = 5
HarkonnenAttackWaves["Hard"] = 12 HarkonnenAttackWaves["hard"] = 12
ToHarvest = { } ToHarvest = { }
ToHarvest["Easy"] = 2500 ToHarvest["easy"] = 2500
ToHarvest["Normal"] = 3000 ToHarvest["normal"] = 3000
ToHarvest["Hard"] = 3500 ToHarvest["hard"] = 3500
AtreidesReinforcements = { "light_inf", "light_inf", "light_inf", "light_inf" } AtreidesReinforcements = { "light_inf", "light_inf", "light_inf", "light_inf" }
AtreidesEntryPath = { AtreidesWaypoint.Location, AtreidesRally.Location } AtreidesEntryPath = { AtreidesWaypoint.Location, AtreidesRally.Location }
@@ -57,7 +57,7 @@ Tick = function()
player.MarkCompletedObjective(KillHarkonnen) player.MarkCompletedObjective(KillHarkonnen)
end end
if player.Resources > ToHarvest[Map.Difficulty] - 1 then if player.Resources > ToHarvest[Map.LobbyOption("difficulty")] - 1 then
player.MarkCompletedObjective(GatherSpice) player.MarkCompletedObjective(GatherSpice)
end end
@@ -78,7 +78,7 @@ Tick = function()
Media.DisplayMessage(Messages[4], "Mentat") Media.DisplayMessage(Messages[4], "Mentat")
end end
UserInterface.SetMissionText("Harvested resources: " .. player.Resources .. "/" .. ToHarvest[Map.Difficulty], player.Color) UserInterface.SetMissionText("Harvested resources: " .. player.Resources .. "/" .. ToHarvest[Map.LobbyOption("difficulty")], player.Color)
end end
WorldLoaded = function() WorldLoaded = function()
@@ -106,12 +106,12 @@ WorldLoaded = function()
Reinforcements.Reinforce(player, AtreidesReinforcements, AtreidesEntryPath) Reinforcements.Reinforce(player, AtreidesReinforcements, AtreidesEntryPath)
end) end)
WavesLeft = HarkonnenAttackWaves[Map.Difficulty] WavesLeft = HarkonnenAttackWaves[Map.LobbyOption("difficulty")]
SendReinforcements() SendReinforcements()
end end
SendReinforcements = function() SendReinforcements = function()
local units = HarkonnenReinforcements[Map.Difficulty] local units = HarkonnenReinforcements[Map.LobbyOption("difficulty")]
local delay = Utils.RandomInteger(HarkonnenAttackDelay - DateTime.Seconds(2), HarkonnenAttackDelay) local delay = Utils.RandomInteger(HarkonnenAttackDelay - DateTime.Seconds(2), HarkonnenAttackDelay)
HarkonnenAttackDelay = HarkonnenAttackDelay - (#units * 3 - 3 - WavesLeft) * DateTime.Seconds(1) HarkonnenAttackDelay = HarkonnenAttackDelay - (#units * 3 - 3 - WavesLeft) * DateTime.Seconds(1)
if HarkonnenAttackDelay < 0 then HarkonnenAttackDelay = 0 end if HarkonnenAttackDelay < 0 then HarkonnenAttackDelay = 0 end
@@ -134,7 +134,7 @@ InitObjectives = function()
end) end)
KillAtreides = harkonnen.AddPrimaryObjective("Kill all Atreides units.") KillAtreides = harkonnen.AddPrimaryObjective("Kill all Atreides units.")
GatherSpice = player.AddPrimaryObjective("Harvest " .. tostring(ToHarvest[Map.Difficulty]) .. " Solaris worth of Spice.") GatherSpice = player.AddPrimaryObjective("Harvest " .. tostring(ToHarvest[Map.LobbyOption("difficulty")]) .. " Solaris worth of Spice.")
KillHarkonnen = player.AddSecondaryObjective("Eliminate all Harkonnen units and reinforcements\nin the area.") KillHarkonnen = player.AddSecondaryObjective("Eliminate all Harkonnen units and reinforcements\nin the area.")
Trigger.OnObjectiveCompleted(player, function(p, id) Trigger.OnObjectiveCompleted(player, function(p, id)

View File

@@ -2,14 +2,14 @@
HarkonnenBase = { HConyard, HPower1, HPower2, HBarracks } HarkonnenBase = { HConyard, HPower1, HPower2, HBarracks }
HarkonnenReinforcements = { } HarkonnenReinforcements = { }
HarkonnenReinforcements["Easy"] = HarkonnenReinforcements["easy"] =
{ {
{ "light_inf", "trike" }, { "light_inf", "trike" },
{ "light_inf", "trike" }, { "light_inf", "trike" },
{ "light_inf", "light_inf", "light_inf", "trike", "trike" } { "light_inf", "light_inf", "light_inf", "trike", "trike" }
} }
HarkonnenReinforcements["Normal"] = HarkonnenReinforcements["normal"] =
{ {
{ "light_inf", "trike" }, { "light_inf", "trike" },
{ "light_inf", "trike" }, { "light_inf", "trike" },
@@ -19,7 +19,7 @@ HarkonnenReinforcements["Normal"] =
{ "light_inf", "trike" }, { "light_inf", "trike" },
} }
HarkonnenReinforcements["Hard"] = HarkonnenReinforcements["hard"] =
{ {
{ "trike", "trike" }, { "trike", "trike" },
{ "light_inf", "trike" }, { "light_inf", "trike" },
@@ -41,25 +41,25 @@ HarkonnenAttackPaths =
} }
HarkonnenAttackDelay = { } HarkonnenAttackDelay = { }
HarkonnenAttackDelay["Easy"] = DateTime.Minutes(5) HarkonnenAttackDelay["easy"] = DateTime.Minutes(5)
HarkonnenAttackDelay["Normal"] = DateTime.Minutes(2) + DateTime.Seconds(40) HarkonnenAttackDelay["normal"] = DateTime.Minutes(2) + DateTime.Seconds(40)
HarkonnenAttackDelay["Hard"] = DateTime.Minutes(1) + DateTime.Seconds(20) HarkonnenAttackDelay["hard"] = DateTime.Minutes(1) + DateTime.Seconds(20)
HarkonnenAttackWaves = { } HarkonnenAttackWaves = { }
HarkonnenAttackWaves["Easy"] = 3 HarkonnenAttackWaves["easy"] = 3
HarkonnenAttackWaves["Normal"] = 6 HarkonnenAttackWaves["normal"] = 6
HarkonnenAttackWaves["Hard"] = 9 HarkonnenAttackWaves["hard"] = 9
wave = 0 wave = 0
SendHarkonnen = function() SendHarkonnen = function()
Trigger.AfterDelay(HarkonnenAttackDelay[Map.Difficulty], function() Trigger.AfterDelay(HarkonnenAttackDelay[Map.LobbyOption("difficulty")], function()
wave = wave + 1 wave = wave + 1
if wave > HarkonnenAttackWaves[Map.Difficulty] then if wave > HarkonnenAttackWaves[Map.LobbyOption("difficulty")] then
return return
end end
local path = Utils.Random(HarkonnenAttackPaths) local path = Utils.Random(HarkonnenAttackPaths)
local units = Reinforcements.ReinforceWithTransport(harkonnen, "carryall.reinforce", HarkonnenReinforcements[Map.Difficulty][wave], path, { path[1] })[2] local units = Reinforcements.ReinforceWithTransport(harkonnen, "carryall.reinforce", HarkonnenReinforcements[Map.LobbyOption("difficulty")][wave], path, { path[1] })[2]
Utils.Do(units, IdleHunt) Utils.Do(units, IdleHunt)
SendHarkonnen() SendHarkonnen()

View File

@@ -2,14 +2,14 @@
HarkonnenBase = { HConyard, HOutpost, HBarracks } HarkonnenBase = { HConyard, HOutpost, HBarracks }
HarkonnenReinforcements = { } HarkonnenReinforcements = { }
HarkonnenReinforcements["Easy"] = HarkonnenReinforcements["easy"] =
{ {
{ "light_inf", "trike" }, { "light_inf", "trike" },
{ "light_inf", "trike" }, { "light_inf", "trike" },
{ "light_inf", "light_inf", "light_inf", "trike", "trike" } { "light_inf", "light_inf", "light_inf", "trike", "trike" }
} }
HarkonnenReinforcements["Normal"] = HarkonnenReinforcements["normal"] =
{ {
{ "light_inf", "trike" }, { "light_inf", "trike" },
{ "light_inf", "trike" }, { "light_inf", "trike" },
@@ -19,7 +19,7 @@ HarkonnenReinforcements["Normal"] =
{ "light_inf", "trike" }, { "light_inf", "trike" },
} }
HarkonnenReinforcements["Hard"] = HarkonnenReinforcements["hard"] =
{ {
{ "trike", "trike" }, { "trike", "trike" },
{ "light_inf", "trike" }, { "light_inf", "trike" },
@@ -42,28 +42,28 @@ HarkonnenAttackPaths =
HarkonnenAttackDelay = HarkonnenAttackDelay =
{ {
Easy = DateTime.Minutes(5), easy = DateTime.Minutes(5),
Normal = DateTime.Minutes(2) + DateTime.Seconds(40), normal = DateTime.Minutes(2) + DateTime.Seconds(40),
Hard = DateTime.Minutes(1) + DateTime.Seconds(20) hard = DateTime.Minutes(1) + DateTime.Seconds(20)
} }
HarkonnenAttackWaves = HarkonnenAttackWaves =
{ {
Easy = 3, easy = 3,
Normal = 6, normal = 6,
Hard = 9 hard = 9
} }
wave = 0 wave = 0
SendHarkonnen = function() SendHarkonnen = function()
Trigger.AfterDelay(HarkonnenAttackDelay[Map.Difficulty], function() Trigger.AfterDelay(HarkonnenAttackDelay[Map.LobbyOption("difficulty")], function()
wave = wave + 1 wave = wave + 1
if wave > HarkonnenAttackWaves[Map.Difficulty] then if wave > HarkonnenAttackWaves[Map.LobbyOption("difficulty")] then
return return
end end
local path = Utils.Random(HarkonnenAttackPaths) local path = Utils.Random(HarkonnenAttackPaths)
local units = Reinforcements.ReinforceWithTransport(harkonnen, "carryall.reinforce", HarkonnenReinforcements[Map.Difficulty][wave], path, { path[1] })[2] local units = Reinforcements.ReinforceWithTransport(harkonnen, "carryall.reinforce", HarkonnenReinforcements[Map.LobbyOption("difficulty")][wave], path, { path[1] })[2]
Utils.Do(units, IdleHunt) Utils.Do(units, IdleHunt)
SendHarkonnen() SendHarkonnen()

View File

@@ -2,15 +2,15 @@ IdlingUnits = { }
AttackGroupSize = AttackGroupSize =
{ {
Easy = 6, easy = 6,
Normal = 8, normal = 8,
Hard = 10 hard = 10
} }
AttackDelays = AttackDelays =
{ {
Easy = { DateTime.Seconds(4), DateTime.Seconds(9) }, easy = { DateTime.Seconds(4), DateTime.Seconds(9) },
Normal = { DateTime.Seconds(2), DateTime.Seconds(7) }, normal = { DateTime.Seconds(2), DateTime.Seconds(7) },
Hard = { DateTime.Seconds(1), DateTime.Seconds(5) } hard = { DateTime.Seconds(1), DateTime.Seconds(5) }
} }
OrdosInfantryTypes = { "light_inf", "light_inf", "light_inf", "trooper", "trooper" } OrdosInfantryTypes = { "light_inf", "light_inf", "light_inf", "trooper", "trooper" }
@@ -25,7 +25,7 @@ IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt
SetupAttackGroup = function() SetupAttackGroup = function()
local units = { } local units = { }
for i = 0, AttackGroupSize[Map.Difficulty], 1 do for i = 0, AttackGroupSize[Map.LobbyOption("difficulty")], 1 do
if #IdlingUnits == 0 then if #IdlingUnits == 0 then
return units return units
end end
@@ -115,13 +115,13 @@ ProduceInfantry = function()
return return
end end
local delay = Utils.RandomInteger(AttackDelays[Map.Difficulty][1], AttackDelays[Map.Difficulty][2] + 1) local delay = Utils.RandomInteger(AttackDelays[Map.LobbyOption("difficulty")][1], AttackDelays[Map.LobbyOption("difficulty")][2] + 1)
local toBuild = { Utils.Random(OrdosInfantryTypes) } local toBuild = { Utils.Random(OrdosInfantryTypes) }
ordos.Build(toBuild, function(unit) ordos.Build(toBuild, function(unit)
IdlingUnits[#IdlingUnits + 1] = unit[1] IdlingUnits[#IdlingUnits + 1] = unit[1]
Trigger.AfterDelay(delay, ProduceInfantry) Trigger.AfterDelay(delay, ProduceInfantry)
if #IdlingUnits >= (AttackGroupSize[Map.Difficulty] * 2.5) then if #IdlingUnits >= (AttackGroupSize[Map.LobbyOption("difficulty")] * 2.5) then
SendAttack() SendAttack()
end end
end) end)
@@ -137,13 +137,13 @@ ProduceVehicles = function()
return return
end end
local delay = Utils.RandomInteger(AttackDelays[Map.Difficulty][1], AttackDelays[Map.Difficulty][2] + 1) local delay = Utils.RandomInteger(AttackDelays[Map.LobbyOption("difficulty")][1], AttackDelays[Map.LobbyOption("difficulty")][2] + 1)
local toBuild = { Utils.Random(OrdosVehicleTypes) } local toBuild = { Utils.Random(OrdosVehicleTypes) }
ordos.Build(toBuild, function(unit) ordos.Build(toBuild, function(unit)
IdlingUnits[#IdlingUnits + 1] = unit[1] IdlingUnits[#IdlingUnits + 1] = unit[1]
Trigger.AfterDelay(delay, ProduceVehicles) Trigger.AfterDelay(delay, ProduceVehicles)
if #IdlingUnits >= (AttackGroupSize[Map.Difficulty] * 2.5) then if #IdlingUnits >= (AttackGroupSize[Map.LobbyOption("difficulty")] * 2.5) then
SendAttack() SendAttack()
end end
end) end)

View File

@@ -2,14 +2,14 @@ OrdosBase = { OBarracks, OWindTrap1, OWindTrap2, OWindTrap3, OWindTrap4, OLightF
OrdosReinforcements = OrdosReinforcements =
{ {
Easy = easy =
{ {
{ "light_inf", "raider", "trooper" }, { "light_inf", "raider", "trooper" },
{ "light_inf", "raider", "quad" }, { "light_inf", "raider", "quad" },
{ "light_inf", "light_inf", "trooper", "raider", "raider", "quad" } { "light_inf", "light_inf", "trooper", "raider", "raider", "quad" }
}, },
Normal = normal =
{ {
{ "light_inf", "raider", "trooper" }, { "light_inf", "raider", "trooper" },
{ "light_inf", "raider", "raider" }, { "light_inf", "raider", "raider" },
@@ -19,7 +19,7 @@ OrdosReinforcements =
{ "light_inf", "raider", "quad", "quad" } { "light_inf", "raider", "quad", "quad" }
}, },
Hard = hard =
{ {
{ "raider", "raider", "quad" }, { "raider", "raider", "quad" },
{ "light_inf", "raider", "raider" }, { "light_inf", "raider", "raider" },
@@ -35,23 +35,23 @@ OrdosReinforcements =
OrdosAttackDelay = OrdosAttackDelay =
{ {
Easy = DateTime.Minutes(5), easy = DateTime.Minutes(5),
Normal = DateTime.Minutes(2) + DateTime.Seconds(40), normal = DateTime.Minutes(2) + DateTime.Seconds(40),
Hard = DateTime.Minutes(1) + DateTime.Seconds(20) hard = DateTime.Minutes(1) + DateTime.Seconds(20)
} }
OrdosAttackWaves = OrdosAttackWaves =
{ {
Easy = 3, easy = 3,
Normal = 6, normal = 6,
Hard = 9 hard = 9
} }
ToHarvest = ToHarvest =
{ {
Easy = 5000, easy = 5000,
Normal = 6000, normal = 6000,
Hard = 7000 hard = 7000
} }
InitialOrdosReinforcements = { "light_inf", "light_inf", "quad", "quad", "raider", "raider", "trooper", "trooper" } InitialOrdosReinforcements = { "light_inf", "light_inf", "quad", "quad", "raider", "raider", "trooper", "trooper" }
@@ -70,17 +70,17 @@ AtreidesUpgrades = { "upgrade.barracks", "upgrade.light" }
wave = 0 wave = 0
SendOrdos = function() SendOrdos = function()
Trigger.AfterDelay(OrdosAttackDelay[Map.Difficulty], function() Trigger.AfterDelay(OrdosAttackDelay[Map.LobbyOption("difficulty")], function()
if player.IsObjectiveCompleted(KillOrdos) then if player.IsObjectiveCompleted(KillOrdos) then
return return
end end
wave = wave + 1 wave = wave + 1
if wave > OrdosAttackWaves[Map.Difficulty] then if wave > OrdosAttackWaves[Map.LobbyOption("difficulty")] then
return return
end end
local units = Reinforcements.ReinforceWithTransport(ordos, "carryall.reinforce", OrdosReinforcements[Map.Difficulty][wave], OrdosPaths[1], { OrdosPaths[1][1] })[2] local units = Reinforcements.ReinforceWithTransport(ordos, "carryall.reinforce", OrdosReinforcements[Map.LobbyOption("difficulty")][wave], OrdosPaths[1], { OrdosPaths[1][1] })[2]
Utils.Do(units, IdleHunt) Utils.Do(units, IdleHunt)
SendOrdos() SendOrdos()
@@ -110,7 +110,7 @@ Tick = function()
end end
end end
if player.Resources > ToHarvest[Map.Difficulty] - 1 then if player.Resources > ToHarvest[Map.LobbyOption("difficulty")] - 1 then
player.MarkCompletedObjective(GatherSpice) player.MarkCompletedObjective(GatherSpice)
end end
@@ -118,7 +118,7 @@ Tick = function()
Media.DisplayMessage("Upgrade barracks and light factory to produce more advanced units.", "Mentat") Media.DisplayMessage("Upgrade barracks and light factory to produce more advanced units.", "Mentat")
end end
UserInterface.SetMissionText("Harvested resources: " .. player.Resources .. "/" .. ToHarvest[Map.Difficulty], player.Color) UserInterface.SetMissionText("Harvested resources: " .. player.Resources .. "/" .. ToHarvest[Map.LobbyOption("difficulty")], player.Color)
end end
WorldLoaded = function() WorldLoaded = function()
@@ -147,7 +147,7 @@ InitObjectives = function()
end) end)
KillAtreides = ordos.AddPrimaryObjective("Kill all Atreides units.") KillAtreides = ordos.AddPrimaryObjective("Kill all Atreides units.")
GatherSpice = player.AddPrimaryObjective("Harvest " .. tostring(ToHarvest[Map.Difficulty]) .. " Solaris worth of Spice.") GatherSpice = player.AddPrimaryObjective("Harvest " .. tostring(ToHarvest[Map.LobbyOption("difficulty")]) .. " Solaris worth of Spice.")
KillOrdos = player.AddSecondaryObjective("Eliminate all Ordos units and reinforcements\nin the area.") KillOrdos = player.AddSecondaryObjective("Eliminate all Ordos units and reinforcements\nin the area.")
Trigger.OnObjectiveCompleted(player, function(p, id) Trigger.OnObjectiveCompleted(player, function(p, id)

View File

@@ -11,7 +11,7 @@ PathGuards = { PathGuard1, PathGuard2, PathGuard3, PathGuard4, PathGuard5, PathG
IdlingUnits = { } IdlingUnits = { }
if Map.Difficulty == "Easy" then if Map.LobbyOption("difficulty") == "easy" then
TimerTicks = DateTime.Minutes(10) TimerTicks = DateTime.Minutes(10)
Announcements = Announcements =
{ {
@@ -23,7 +23,7 @@ if Map.Difficulty == "Easy" then
{ speech = "WarningOneMinuteRemaining", delay = DateTime.Minutes(9) } { speech = "WarningOneMinuteRemaining", delay = DateTime.Minutes(9) }
} }
elseif Map.Difficulty == "Normal" then elseif Map.LobbyOption("difficulty") == "normal" then
TimerTicks = DateTime.Minutes(5) TimerTicks = DateTime.Minutes(5)
Announcements = Announcements =
{ {
@@ -38,7 +38,7 @@ elseif Map.Difficulty == "Normal" then
InfantryDelay = DateTime.Seconds(18) InfantryDelay = DateTime.Seconds(18)
AttackGroupSize = 5 AttackGroupSize = 5
elseif Map.Difficulty == "Hard" then elseif Map.LobbyOption("difficulty") == "hard" then
TimerTicks = DateTime.Minutes(3) TimerTicks = DateTime.Minutes(3)
Announcements = Announcements =
{ {
@@ -146,7 +146,7 @@ SendAttack = function()
end end
Utils.Do(units, function(unit) Utils.Do(units, function(unit)
if Map.Difficulty ~= "Real tough guy" then if Map.LobbyOption("difficulty") ~= "tough" then
unit.AttackMove(DeployPoint.Location) unit.AttackMove(DeployPoint.Location)
end end
Trigger.OnIdle(unit, unit.Hunt) Trigger.OnIdle(unit, unit.Hunt)

View File

@@ -22,7 +22,7 @@ World:
easy: Easy easy: Easy
normal: Normal normal: Normal
hard: Hard hard: Hard
realtoughguy: Real tough guy tough: Real tough guy
Default: easy Default: easy
HARV: HARV:

View File

@@ -9,7 +9,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.Difficulty == "Easy" then if Map.LobbyOption("difficulty") == "easy" then
TanyaType = "e7" TanyaType = "e7"
else else
TanyaType = "e7.noautotarget" TanyaType = "e7.noautotarget"

View File

@@ -20,7 +20,7 @@ GuardTanks = { Heavy1, Heavy2, Heavy3 }
CheckpointGuards = { USSRCheckpointGuard1, USSRCheckpointGuard2 } CheckpointGuards = { USSRCheckpointGuard1, USSRCheckpointGuard2 }
CheckpointGuardWaypoints = { CheckpointGuardWaypoint1, CheckpointGuardWaypoint2 } CheckpointGuardWaypoints = { CheckpointGuardWaypoint1, CheckpointGuardWaypoint2 }
if Map.Difficulty == "Easy" then if Map.LobbyOption("difficulty") == "easy" then
TanyaType = "e7" TanyaType = "e7"
else else
TanyaType = "e7.noautotarget" TanyaType = "e7.noautotarget"

View File

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

View File

@@ -1,9 +1,9 @@
if Map.Difficulty == "Easy" then if Map.LobbyOption("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.Difficulty == "Normal" then elseif Map.LobbyOption("difficulty") == "normal" then
TanyaType = "e7.noautotarget" TanyaType = "e7.noautotarget"
ChangeStance = true ChangeStance = true
ReinforceCash = 2250 ReinforceCash = 2250
@@ -83,7 +83,7 @@ Tick = function()
end end
if ussr.HasNoRequiredUnits() then if ussr.HasNoRequiredUnits() then
if not greece.IsObjectiveCompleted(KillAll) and Map.Difficulty == "Real tough guy" then if not greece.IsObjectiveCompleted(KillAll) and Map.LobbyOption("difficulty") == "tough" then
SendWaterExtraction() SendWaterExtraction()
end end
greece.MarkCompletedObjective(KillAll) greece.MarkCompletedObjective(KillAll)
@@ -186,7 +186,7 @@ FreeTanya = function()
Trigger.OnKilled(Tanya, function() ussr.MarkCompletedObjective(ussrObj) end) Trigger.OnKilled(Tanya, function() ussr.MarkCompletedObjective(ussrObj) end)
if Map.Difficulty == "Real tough guy" then if Map.LobbyOption("difficulty") == "tough" then
KillSams = greece.AddPrimaryObjective("Destroy all four SAM Sites that block\nour reinforcements' helicopter.") KillSams = greece.AddPrimaryObjective("Destroy all four SAM Sites that block\nour reinforcements' helicopter.")
greece.MarkCompletedObjective(mainObj) greece.MarkCompletedObjective(mainObj)
@@ -272,7 +272,7 @@ InitTriggers = function()
end end
end) end)
if Map.Difficulty ~= "Real tough guy" then if Map.LobbyOption("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)
@@ -294,7 +294,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.Difficulty == "Real tough guy" then if Map.LobbyOption("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()

View File

@@ -16,7 +16,7 @@ World:
easy: Easy easy: Easy
normal: Normal normal: Normal
hard: Hard hard: Hard
realtoughguy: Real tough guy tough: Real tough guy
Default: easy Default: easy
Camera.Truk: Camera.Truk:

View File

@@ -1,20 +1,20 @@
DeathThreshold = DeathThreshold =
{ {
Easy = 200, easy = 200,
Normal = 100, normal = 100,
} }
TanyaType = "e7" TanyaType = "e7"
TanyaStance = "AttackAnything" TanyaStance = "AttackAnything"
if Map.Difficulty ~= "Easy" then if Map.LobbyOption("difficulty") ~= "easy" then
TanyaType = "e7.noautotarget" TanyaType = "e7.noautotarget"
TanyaStance = "HoldFire" TanyaStance = "HoldFire"
end end
RepairTriggerThreshold = RepairTriggerThreshold =
{ {
Easy = 50, easy = 50,
Normal = 75, normal = 75,
} }
Sams = { Sam1, Sam2, Sam3, Sam4 } Sams = { Sam1, Sam2, Sam3, Sam4 }
@@ -58,8 +58,8 @@ SovietVehicles =
} }
ProductionInterval = ProductionInterval =
{ {
Easy = DateTime.Seconds(10), easy = DateTime.Seconds(10),
Normal = DateTime.Seconds(2), normal = DateTime.Seconds(2),
} }
ReinforcementsDelay = DateTime.Minutes(16) ReinforcementsDelay = DateTime.Minutes(16)
@@ -144,7 +144,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.Difficulty], ProduceInfantry) Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceInfantry)
end) end)
end end
@@ -156,7 +156,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.Difficulty], ProduceVehicles) Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceVehicles)
end) end)
end end
@@ -177,7 +177,7 @@ Tick = function()
allies2.MarkCompletedObjective(objCutSovietPower) allies2.MarkCompletedObjective(objCutSovietPower)
end end
if not allies2.IsObjectiveCompleted(objLimitLosses) and allies2.UnitsLost > DeathThreshold[Map.Difficulty] then if not allies2.IsObjectiveCompleted(objLimitLosses) and allies2.UnitsLost > DeathThreshold[Map.LobbyOption("difficulty")] then
allies2.MarkFailedObjective(objLimitLosses) allies2.MarkFailedObjective(objLimitLosses)
end end
@@ -191,7 +191,7 @@ end
SetupSoviets = function() SetupSoviets = function()
soviets.Cash = 1000 soviets.Cash = 1000
if Map.Difficulty == "Easy" then if Map.LobbyOption("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()
@@ -203,7 +203,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.Difficulty] / 100) then if building.Owner == soviets and building.Health < (building.MaxHealth * RepairTriggerThreshold[Map.LobbyOption("difficulty")] / 100) then
building.StartBuildingRepairs() building.StartBuildingRepairs()
end end
end) end)
@@ -283,7 +283,7 @@ SpawnTanya = function()
Tanya = Actor.Create(TanyaType, true, { Owner = allies1, Location = TanyaLocation.Location }) Tanya = Actor.Create(TanyaType, true, { Owner = allies1, Location = TanyaLocation.Location })
Tanya.Stance = TanyaStance Tanya.Stance = TanyaStance
if Map.Difficulty ~= "Easy" and allies1.IsLocalPlayer then if Map.LobbyOption("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)
@@ -355,7 +355,7 @@ WorldLoaded = function()
objDestroySamSites = allies1.AddPrimaryObjective("Destroy the SAM sites.") objDestroySamSites = allies1.AddPrimaryObjective("Destroy the SAM sites.")
objHoldPosition = allies2.AddPrimaryObjective("Hold your position and protect the base.") objHoldPosition = allies2.AddPrimaryObjective("Hold your position and protect the base.")
objLimitLosses = allies2.AddSecondaryObjective("Do not lose more than " .. DeathThreshold[Map.Difficulty] .. " units.") objLimitLosses = allies2.AddSecondaryObjective("Do not lose more than " .. DeathThreshold[Map.LobbyOption("difficulty")] .. " units.")
objCutSovietPower = allies2.AddSecondaryObjective("Take out the Soviet power grid.") objCutSovietPower = allies2.AddSecondaryObjective("Take out the Soviet power grid.")
SetupTriggers() SetupTriggers()

View File

@@ -13,7 +13,7 @@ Walls =
{ WallBottomRight1, WallBottomRight2, WallBottomRight3, WallBottomRight4, WallBottomRight5, WallBottomRight6, WallBottomRight7, WallBottomRight8, WallBottomRight9 } { WallBottomRight1, WallBottomRight2, WallBottomRight3, WallBottomRight4, WallBottomRight5, WallBottomRight6, WallBottomRight7, WallBottomRight8, WallBottomRight9 }
} }
if Map.Difficulty == "Very Easy (1P)" then if Map.LobbyOption("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" }
@@ -22,7 +22,7 @@ if Map.Difficulty == "Very Easy (1P)" then
LongRange = { "arty" } LongRange = { "arty" }
Boss = { "v2rl" } Boss = { "v2rl" }
Swarm = { "shok", "shok", "shok" } Swarm = { "shok", "shok", "shok" }
elseif Map.Difficulty == "Easy (2P)" then elseif Map.LobbyOption("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" }
@@ -31,7 +31,7 @@ elseif Map.Difficulty == "Easy (2P)" then
LongRange = { "v2rl" } LongRange = { "v2rl" }
Boss = { "4tnk" } Boss = { "4tnk" }
Swarm = { "shok", "shok", "shok", "shok", "ttnk" } Swarm = { "shok", "shok", "shok", "shok", "ttnk" }
elseif Map.Difficulty == "Normal (3P)" then elseif Map.LobbyOption("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" }
@@ -40,7 +40,7 @@ elseif Map.Difficulty == "Normal (3P)" 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.Difficulty == "Hard (4P)" then elseif Map.LobbyOption("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" }
@@ -77,7 +77,7 @@ Waves =
} }
-- Now do some adjustments to the waves -- Now do some adjustments to the waves
if Map.Difficulty == "Real tough guy" or Map.Difficulty == "Endless mode" then if Map.LobbyOption("difficulty") == "tough" or Map.LobbyOption("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 } }
@@ -145,7 +145,7 @@ SendWave = function()
SendWave() SendWave()
end end
else else
if Map.Difficulty == "Endless mode" then if Map.LobbyOption("difficulty") == "endless" then
Wave = 0 Wave = 0
IncreaseDifficulty() IncreaseDifficulty()
SendWave() SendWave()

View File

@@ -44,13 +44,13 @@ World:
ID: difficulty ID: difficulty
Label: Difficulty Label: Difficulty
Values: Values:
hard(4p): Hard (4P) hard: Hard (4P)
normal(3p): Normal (3P) normal: Normal (3P)
easy(2p): Easy (2P) easy: Easy (2P)
veryeasy(1p): Very Easy (1P) veryeasy: Very Easy (1P)
realtoughguy: Real tough guy tough: Real tough guy
endlessmode: Endless mode endless: Endless mode
Default: hard(4p) Default: hard
FORTCRATE: FORTCRATE:
Inherits: ^Crate Inherits: ^Crate

View File

@@ -9,9 +9,9 @@ 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.Difficulty Difficulty = Map.LobbyOption("difficulty")
if Difficulty == "Medium" then if Difficulty == "medium" then
BaseRaidInterval = DateTime.Minutes(3) BaseRaidInterval = DateTime.Minutes(3)
BaseFrontAttackInterval = DateTime.Minutes(3) + DateTime.Seconds(30) BaseFrontAttackInterval = DateTime.Minutes(3) + DateTime.Seconds(30)
BaseRearAttackInterval = DateTime.Minutes(8) BaseRearAttackInterval = DateTime.Minutes(8)

View File

@@ -1,8 +1,8 @@
if Map.Difficulty == "Easy" then if Map.LobbyOption("difficulty") == "easy" then
remainingTime = DateTime.Minutes(7) remainingTime = DateTime.Minutes(7)
elseif Map.Difficulty == "Normal" then elseif Map.LobbyOption("difficulty") == "normal" then
remainingTime = DateTime.Minutes(6) remainingTime = DateTime.Minutes(6)
elseif Map.Difficulty == "Hard" then elseif Map.LobbyOption("difficulty") == "hard" then
remainingTime = DateTime.Minutes(5) remainingTime = DateTime.Minutes(5)
end end
@@ -256,7 +256,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.Difficulty ~= "Hard" then if Map.LobbyOption("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
@@ -363,7 +363,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.Difficulty ~= "Hard" then if remainingTime == DateTime.Minutes(5) and Map.LobbyOption("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")

View File

@@ -18,7 +18,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.Difficulty == "Easy" then if Map.LobbyOption("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" }
@@ -60,7 +60,7 @@ BringPatrol1 = function()
end) end)
Trigger.OnAllKilled(units, function() Trigger.OnAllKilled(units, function()
if Map.Difficulty == "Hard" then if Map.LobbyOption("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)
@@ -79,7 +79,7 @@ BringPatrol2 = function()
end) end)
Trigger.OnAllKilled(units, function() Trigger.OnAllKilled(units, function()
if Map.Difficulty == "Hard" then if Map.LobbyOption("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)

View File

@@ -83,7 +83,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.Difficulty == "Hard" or Map.Difficulty == "Medium" then if Map.LobbyOption("difficulty") == "hard" or Map.LobbyOption("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)
@@ -108,9 +108,9 @@ Tick = function()
if RCheck then if RCheck then
RCheck = false RCheck = false
if Map.Difficulty == "Hard" then if Map.LobbyOption("difficulty") == "hard" then
Trigger.AfterDelay(DateTime.Seconds(150), ReinfArmor) Trigger.AfterDelay(DateTime.Seconds(150), ReinfArmor)
elseif Map.Difficulty == "Medium" then elseif Map.LobbyOption("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)

View File

@@ -17,7 +17,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.Difficulty == "Easy" then if Map.LobbyOption("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" }
@@ -60,7 +60,7 @@ BringPatrol1 = function()
end) end)
Trigger.OnAllKilled(units, function() Trigger.OnAllKilled(units, function()
if Map.Difficulty == "Hard" then if Map.LobbyOption("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)
@@ -79,7 +79,7 @@ BringPatrol2 = function()
end) end)
Trigger.OnAllKilled(units, function() Trigger.OnAllKilled(units, function()
if Map.Difficulty == "Hard" then if Map.LobbyOption("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)

View File

@@ -68,7 +68,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.Difficulty == "Hard" or Map.Difficulty == "Medium" then if Map.LobbyOption("difficulty") == "hard" or Map.LobbyOption("difficulty") == "medium" 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)
@@ -93,9 +93,9 @@ Tick = function()
if RCheck then if RCheck then
RCheck = false RCheck = false
if Map.Difficulty == "Hard" then if Map.LobbyOption("difficulty") == "hard" then
Trigger.AfterDelay(DateTime.Seconds(150), ReinfArmor) Trigger.AfterDelay(DateTime.Seconds(150), ReinfArmor)
elseif Map.Difficulty == "Medium" then elseif Map.LobbyOption("difficulty") == "medium" 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)

View File

@@ -3,7 +3,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.Difficulty == "Easy" then if Map.LobbyOption("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" }
@@ -70,11 +70,11 @@ IslandTroops1 = function()
end) end)
if not CheckForCYard() then if not CheckForCYard() then
return return
elseif Map.Difficulty == "Easy" then elseif Map.LobbyOption("difficulty") == "easy" then
return return
else else
Trigger.OnAllKilled(units, function() Trigger.OnAllKilled(units, function()
if Map.Difficulty == "Hard" then if Map.LobbyOption("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)
@@ -92,11 +92,11 @@ IslandTroops2 = function()
end) end)
if not CheckForCYard() then if not CheckForCYard() then
return return
elseif Map.Difficulty == "Easy" then elseif Map.LobbyOption("difficulty") == "easy" then
return return
else else
Trigger.OnAllKilled(units, function() Trigger.OnAllKilled(units, function()
if Map.Difficulty == "Hard" then if Map.LobbyOption("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)
@@ -114,11 +114,11 @@ IslandTroops3 = function()
end) end)
if not CheckForCYard() then if not CheckForCYard() then
return return
elseif Map.Difficulty == "Easy" then elseif Map.LobbyOption("difficulty") == "easy" then
return return
else else
Trigger.OnAllKilled(units, function() Trigger.OnAllKilled(units, function()
if Map.Difficulty == "Hard" then if Map.LobbyOption("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)
@@ -138,7 +138,7 @@ BringDDPatrol1 = function()
return return
else else
Trigger.OnAllKilled(units, function() Trigger.OnAllKilled(units, function()
if Map.Difficulty == "Hard" then if Map.LobbyOption("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)
@@ -158,7 +158,7 @@ BringDDPatrol2 = function()
return return
else else
Trigger.OnAllKilled(units, function() Trigger.OnAllKilled(units, function()
if Map.Difficulty == "Hard" then if Map.LobbyOption("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)

View File

@@ -19,7 +19,7 @@ CheckForSPen = function()
end end
RunInitialActivities = function() RunInitialActivities = function()
if Map.Difficulty == "Hard" then if Map.LobbyOption("difficulty") == "hard" then
Expand() Expand()
ExpansionCheck = true ExpansionCheck = true
else else
@@ -57,7 +57,7 @@ RunInitialActivities = function()
ProduceInfantry() ProduceInfantry()
Trigger.AfterDelay(DateTime.Minutes(2), ProduceShips) Trigger.AfterDelay(DateTime.Minutes(2), ProduceShips)
if Map.Difficulty == "Hard" or Map.Difficulty == "Medium" then if Map.LobbyOption("difficulty") == "hard" or Map.LobbyOption("difficulty") == "medium" 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)
@@ -170,9 +170,9 @@ Tick = function()
if not RCheck then if not RCheck then
RCheck = true RCheck = true
if Map.Difficulty == "Easy" and ReinfCheck then if Map.LobbyOption("difficulty") == "easy" and ReinfCheck then
Trigger.AfterDelay(DateTime.Minutes(6), ReinfArmor) Trigger.AfterDelay(DateTime.Minutes(6), ReinfArmor)
elseif Map.Difficulty == "Medium" then elseif Map.LobbyOption("difficulty") == "medium" 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)

View File

@@ -1,20 +1,20 @@
EnemyReinforcements = EnemyReinforcements =
{ {
Easy = easy =
{ {
{ "e1", "e1", "e3" }, { "e1", "e1", "e3" },
{ "e1", "e3", "jeep" }, { "e1", "e3", "jeep" },
{ "e1", "jeep", "1tnk" } { "e1", "jeep", "1tnk" }
}, },
Normal = normal =
{ {
{ "e1", "e1", "e3", "e3" }, { "e1", "e1", "e3", "e3" },
{ "e1", "e3", "jeep", "jeep" }, { "e1", "e3", "jeep", "jeep" },
{ "e1", "jeep", "1tnk", "2tnk" } { "e1", "jeep", "1tnk", "2tnk" }
}, },
Hard = hard =
{ {
{ "e1", "e1", "e3", "e3", "e1" }, { "e1", "e1", "e3", "e3", "e1" },
{ "e1", "e3", "jeep", "jeep", "1tnk" }, { "e1", "e3", "jeep", "jeep", "1tnk" },
@@ -24,9 +24,9 @@ EnemyReinforcements =
EnemyAttackDelay = EnemyAttackDelay =
{ {
Easy = DateTime.Minutes(5), easy = DateTime.Minutes(5),
Normal = DateTime.Minutes(2) + DateTime.Seconds(40), normal = DateTime.Minutes(2) + DateTime.Seconds(40),
Hard = DateTime.Minutes(1) + DateTime.Seconds(30) hard = DateTime.Minutes(1) + DateTime.Seconds(30)
} }
EnemyPaths = EnemyPaths =
@@ -37,7 +37,7 @@ EnemyPaths =
wave = 0 wave = 0
SendEnemies = function() SendEnemies = function()
Trigger.AfterDelay(EnemyAttackDelay[Map.Difficulty], function() Trigger.AfterDelay(EnemyAttackDelay[Map.LobbyOption("difficulty")], function()
wave = wave + 1 wave = wave + 1
if wave > 3 then if wave > 3 then
@@ -45,10 +45,10 @@ SendEnemies = function()
end end
if wave == 1 then if wave == 1 then
local units = Reinforcements.ReinforceWithTransport(enemy, "tran", EnemyReinforcements[Map.Difficulty][wave], EnemyPaths[1], { EnemyPaths[1][1] })[2] local units = Reinforcements.ReinforceWithTransport(enemy, "tran", EnemyReinforcements[Map.LobbyOption("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.Difficulty][wave], EnemyPaths[2], { EnemyPaths[2][1] })[2] local units = Reinforcements.ReinforceWithTransport(enemy, "lst", EnemyReinforcements[Map.LobbyOption("difficulty")][wave], EnemyPaths[2], { EnemyPaths[2][1] })[2]
Utils.Do(units, IdleHunt) Utils.Do(units, IdleHunt)
end end

View File

@@ -1,20 +1,20 @@
EnemyReinforcements = EnemyReinforcements =
{ {
Easy = easy =
{ {
{ "e1", "e1", "e3" }, { "e1", "e1", "e3" },
{ "e1", "e3", "jeep" }, { "e1", "e3", "jeep" },
{ "e1", "jeep", "1tnk" } { "e1", "jeep", "1tnk" }
}, },
Normal = normal =
{ {
{ "e1", "e1", "e3", "e3" }, { "e1", "e1", "e3", "e3" },
{ "e1", "e3", "jeep", "jeep" }, { "e1", "e3", "jeep", "jeep" },
{ "e1", "jeep", "1tnk", "2tnk" } { "e1", "jeep", "1tnk", "2tnk" }
}, },
Hard = hard =
{ {
{ "e1", "e1", "e3", "e3", "e1" }, { "e1", "e1", "e3", "e3", "e1" },
{ "e1", "e3", "jeep", "jeep", "1tnk" }, { "e1", "e3", "jeep", "jeep", "1tnk" },
@@ -24,9 +24,9 @@ EnemyReinforcements =
EnemyAttackDelay = EnemyAttackDelay =
{ {
Easy = DateTime.Minutes(5), easy = DateTime.Minutes(5),
Normal = DateTime.Minutes(2) + DateTime.Seconds(40), normal = DateTime.Minutes(2) + DateTime.Seconds(40),
Hard = DateTime.Minutes(1) + DateTime.Seconds(30) hard = DateTime.Minutes(1) + DateTime.Seconds(30)
} }
EnemyPaths = EnemyPaths =
@@ -37,7 +37,7 @@ EnemyPaths =
wave = 0 wave = 0
SendEnemies = function() SendEnemies = function()
Trigger.AfterDelay(EnemyAttackDelay[Map.Difficulty], function() Trigger.AfterDelay(EnemyAttackDelay[Map.LobbyOption("difficulty")], function()
wave = wave + 1 wave = wave + 1
if wave > 3 then if wave > 3 then
@@ -45,10 +45,10 @@ SendEnemies = function()
end end
if wave == 1 then if wave == 1 then
local units = Reinforcements.ReinforceWithTransport(enemy, "tran", EnemyReinforcements[Map.Difficulty][wave], EnemyPaths[1], { EnemyPaths[1][1] })[2] local units = Reinforcements.ReinforceWithTransport(enemy, "tran", EnemyReinforcements[Map.LobbyOption("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.Difficulty][wave], EnemyPaths[2], { EnemyPaths[2][1] })[2] local units = Reinforcements.ReinforceWithTransport(enemy, "lst", EnemyReinforcements[Map.LobbyOption("difficulty")][wave], EnemyPaths[2], { EnemyPaths[2][1] })[2]
Utils.Do(units, IdleHunt) Utils.Do(units, IdleHunt)
end end

View File

@@ -1,8 +1,8 @@
if Map.Difficulty == "Easy" then if Map.LobbyOption("difficulty") == "easy" then
remainingTime = DateTime.Minutes(7) remainingTime = DateTime.Minutes(7)
elseif Map.Difficulty == "Normal" then elseif Map.LobbyOption("difficulty") == "normal" then
remainingTime = DateTime.Minutes(6) remainingTime = DateTime.Minutes(6)
elseif Map.Difficulty == "Hard" then elseif Map.LobbyOption("difficulty") == "hard" then
remainingTime = DateTime.Minutes(5) remainingTime = DateTime.Minutes(5)
end end
@@ -299,7 +299,7 @@ Tick = function()
enemy.MarkCompletedObjective(alliedObjective) enemy.MarkCompletedObjective(alliedObjective)
end end
if remainingTime == DateTime.Minutes(5) and Map.Difficulty ~= "Hard" then if remainingTime == DateTime.Minutes(5) and Map.LobbyOption("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")

View File

@@ -1,6 +1,6 @@
Difficulty = Map.Difficulty Difficulty = Map.LobbyOption("difficulty")
if Difficulty == "Easy" then if Difficulty == "easy" then
AttackAtFrameIncrement = DateTime.Seconds(22) AttackAtFrameIncrement = DateTime.Seconds(22)
AttackAtFrameIncrementInf = DateTime.Seconds(16) AttackAtFrameIncrementInf = DateTime.Seconds(16)
TimerTicks = DateTime.Minutes(15) TimerTicks = DateTime.Minutes(15)
@@ -8,7 +8,7 @@ if Difficulty == "Easy" then
DamageModifier = 0.5 DamageModifier = 0.5
LongBowReinforcements = { "heli", "heli" } LongBowReinforcements = { "heli", "heli" }
ParadropArtillery = true ParadropArtillery = true
elseif Difficulty == "Medium" then elseif Difficulty == "medium" then
AttackAtFrameIncrement = DateTime.Seconds(18) AttackAtFrameIncrement = DateTime.Seconds(18)
AttackAtFrameIncrementInf = DateTime.Seconds(12) AttackAtFrameIncrementInf = DateTime.Seconds(12)
TimerTicks = DateTime.Minutes(20) TimerTicks = DateTime.Minutes(20)
@@ -16,7 +16,7 @@ elseif Difficulty == "Medium" then
MoreParas = true MoreParas = true
DamageModifier = 0.75 DamageModifier = 0.75
LongBowReinforcements = { "heli", "heli" } LongBowReinforcements = { "heli", "heli" }
else --Difficulty == "Hard" else --Difficulty == "hard"
AttackAtFrameIncrement = DateTime.Seconds(14) AttackAtFrameIncrement = DateTime.Seconds(14)
AttackAtFrameIncrementInf = DateTime.Seconds(8) AttackAtFrameIncrementInf = DateTime.Seconds(8)
TimerTicks = DateTime.Minutes(25) TimerTicks = DateTime.Minutes(25)