Clean fort-lonestar.lua up
This commit is contained in:
@@ -8,98 +8,27 @@ Boss = { "4tnk" }
|
|||||||
SovietEntryPoints = { Entry1, Entry2, Entry3, Entry4, Entry5, Entry6, Entry7, Entry8 }
|
SovietEntryPoints = { Entry1, Entry2, Entry3, Entry4, Entry5, Entry6, Entry7, Entry8 }
|
||||||
PatrolWaypoints = { Entry2, Entry4, Entry6, Entry8 }
|
PatrolWaypoints = { Entry2, Entry4, Entry6, Entry8 }
|
||||||
ParadropWaypoints = { Paradrop1, Paradrop2, Paradrop3, Paradrop4 }
|
ParadropWaypoints = { Paradrop1, Paradrop2, Paradrop3, Paradrop4 }
|
||||||
OilDerricks = { OilDerrick1, OilDerrick2, OilDerrick3, OilDerrick4 }
|
|
||||||
SpawnPoints = { Spawn1, Spawn2, Spawn3, Spawn4 }
|
SpawnPoints = { Spawn1, Spawn2, Spawn3, Spawn4 }
|
||||||
Snipers = { Sniper1, Sniper2, Sniper3, Sniper4, Sniper5, Sniper6, Sniper7, Sniper8, Sniper9, Sniper10, Sniper11, Sniper12 }
|
Snipers = { Sniper1, Sniper2, Sniper3, Sniper4, Sniper5, Sniper6, Sniper7, Sniper8, Sniper9, Sniper10, Sniper11, Sniper12 }
|
||||||
|
|
||||||
Wave = 0
|
Wave = 0
|
||||||
Waves =
|
Waves =
|
||||||
{
|
{
|
||||||
{ delay = 500, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
{ delay = 500, units = { Infantry } },
|
||||||
|
{ delay = 750, units = { Patrol } },
|
||||||
{ delay = 750, entries = PatrolWaypoints, units = Patrol, targets = ParadropWaypoints },
|
{ delay = 750, units = { Infantry, Infantry, Vehicles }, },
|
||||||
|
{ delay = 1500, units = { Infantry, Infantry, Infantry, Infantry } },
|
||||||
{ delay = 750, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
{ delay = 1500, units = { Infantry, Infantry, Infantry, Vehicles } },
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
{ delay = 1500, units = { Infantry, Infantry, Infantry, Infantry, Tank, Vehicles } },
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Vehicles, targets = SpawnPoints },
|
{ delay = 1500, units = { Infantry, Infantry, Infantry, Infantry, Tank, Tank } },
|
||||||
|
{ delay = 1500, units = { Infantry, Infantry, Infantry, Infantry, Infantry, Infantry, LongRange } },
|
||||||
{ delay = 1500, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
{ delay = 1500, units = { Infantry, Infantry, Infantry, Infantry, Infantry, Infantry, Infantry, LongRange, Tank, LongRange } },
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
{ delay = 1500, units = { Infantry, Infantry, Infantry, Infantry, Infantry, Infantry, Infantry, Infantry, LongRange, LongRange, Tank, Tank, Vehicles } },
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
{ delay = 1500, units = { Infantry, Infantry, Infantry, Infantry, Infantry, Infantry, Infantry, Infantry, Infantry, Boss } }
|
||||||
|
|
||||||
{ delay = 1500, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Vehicles, targets = SpawnPoints },
|
|
||||||
|
|
||||||
{ delay = 1500, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Tank, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Vehicles, targets = SpawnPoints },
|
|
||||||
|
|
||||||
{ delay = 1500, entries = SovietEntryPoints, Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Tank, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Tank, targets = SpawnPoints },
|
|
||||||
|
|
||||||
{ delay = 1500, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = LongRange, targets = SpawnPoints },
|
|
||||||
|
|
||||||
{ delay = 1500, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = LongRange, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Tank, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = LongRange, targets = SpawnPoints },
|
|
||||||
|
|
||||||
{ delay = 1500, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = LongRange, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = LongRange, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Tank, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Tank, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Vehicles, targets = SpawnPoints },
|
|
||||||
|
|
||||||
{ delay = 1500, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
|
||||||
{ delay = 1, entries = SovietEntryPoints, units = Boss, targets = SpawnPoints }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
SendUnits = function(entryCell, unitTypes, interval, targetCell)
|
SendUnits = function(entryCell, unitTypes, targetCell)
|
||||||
Reinforcements.Reinforce(soviets, unitTypes, { entryCell }, interval, function(a)
|
Reinforcements.Reinforce(soviets, unitTypes, { entryCell }, 40, function(a)
|
||||||
Trigger.OnIdle(a, function(a)
|
Trigger.OnIdle(a, function(a)
|
||||||
if a.Location ~= targetCell then
|
if a.Location ~= targetCell then
|
||||||
a.AttackMove(targetCell)
|
a.AttackMove(targetCell)
|
||||||
@@ -108,31 +37,29 @@ SendUnits = function(entryCell, unitTypes, interval, targetCell)
|
|||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
if (Wave < #Waves) then
|
|
||||||
SendWave()
|
|
||||||
else
|
|
||||||
Trigger.AfterDelay(DateTime.Minutes(2), SovietsRetreating)
|
|
||||||
Media.DisplayMessage("You survived the onslaught! No more waves incoming.")
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
SendWave = function()
|
SendWave = function()
|
||||||
Wave = Wave + 1
|
Wave = Wave + 1
|
||||||
local wave = Waves[Wave]
|
local wave = Waves[Wave]
|
||||||
|
|
||||||
local entry = Utils.Random(wave.entries).Location
|
|
||||||
local target = Utils.Random(wave.targets).Location
|
|
||||||
|
|
||||||
Trigger.AfterDelay(wave.delay, function()
|
Trigger.AfterDelay(wave.delay, function()
|
||||||
SendUnits(entry, wave.units, 40, target)
|
Utils.Do(wave.units, function(units)
|
||||||
|
local entry = Utils.Random(SovietEntryPoints).Location
|
||||||
|
local target = Utils.Random(SpawnPoints).Location
|
||||||
|
|
||||||
if not played then
|
SendUnits(entry, units, target)
|
||||||
played = true
|
end)
|
||||||
Utils.Do(players, function(player)
|
|
||||||
Media.PlaySpeechNotification(player, "EnemyUnitsApproaching")
|
Utils.Do(players, function(player)
|
||||||
end)
|
Media.PlaySpeechNotification(player, "EnemyUnitsApproaching")
|
||||||
Trigger.AfterDelay(DateTime.Seconds(1), function() played = false end)
|
end)
|
||||||
|
|
||||||
|
if (Wave < #Waves) then
|
||||||
|
SendWave()
|
||||||
|
else
|
||||||
|
Trigger.AfterDelay(DateTime.Minutes(2), SovietsRetreating)
|
||||||
|
Media.DisplayMessage("You almost survived the onslaught! No more waves incoming.")
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user