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 }
|
||||
PatrolWaypoints = { Entry2, Entry4, Entry6, Entry8 }
|
||||
ParadropWaypoints = { Paradrop1, Paradrop2, Paradrop3, Paradrop4 }
|
||||
OilDerricks = { OilDerrick1, OilDerrick2, OilDerrick3, OilDerrick4 }
|
||||
SpawnPoints = { Spawn1, Spawn2, Spawn3, Spawn4 }
|
||||
Snipers = { Sniper1, Sniper2, Sniper3, Sniper4, Sniper5, Sniper6, Sniper7, Sniper8, Sniper9, Sniper10, Sniper11, Sniper12 }
|
||||
|
||||
Wave = 0
|
||||
Waves =
|
||||
{
|
||||
{ delay = 500, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
|
||||
|
||||
{ delay = 750, entries = PatrolWaypoints, units = Patrol, targets = ParadropWaypoints },
|
||||
|
||||
{ delay = 750, 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 = 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 }
|
||||
{ delay = 500, units = { Infantry } },
|
||||
{ delay = 750, units = { Patrol } },
|
||||
{ delay = 750, units = { Infantry, Infantry, Vehicles }, },
|
||||
{ delay = 1500, units = { Infantry, Infantry, Infantry, Infantry } },
|
||||
{ delay = 1500, units = { Infantry, Infantry, Infantry, Vehicles } },
|
||||
{ delay = 1500, units = { Infantry, Infantry, Infantry, Infantry, Tank, Vehicles } },
|
||||
{ delay = 1500, units = { Infantry, Infantry, Infantry, Infantry, Tank, Tank } },
|
||||
{ delay = 1500, units = { Infantry, Infantry, Infantry, Infantry, Infantry, Infantry, LongRange } },
|
||||
{ delay = 1500, units = { Infantry, Infantry, Infantry, Infantry, Infantry, Infantry, Infantry, LongRange, Tank, LongRange } },
|
||||
{ delay = 1500, units = { Infantry, Infantry, Infantry, Infantry, Infantry, Infantry, Infantry, Infantry, LongRange, LongRange, Tank, Tank, Vehicles } },
|
||||
{ delay = 1500, units = { Infantry, Infantry, Infantry, Infantry, Infantry, Infantry, Infantry, Infantry, Infantry, Boss } }
|
||||
}
|
||||
|
||||
SendUnits = function(entryCell, unitTypes, interval, targetCell)
|
||||
Reinforcements.Reinforce(soviets, unitTypes, { entryCell }, interval, function(a)
|
||||
SendUnits = function(entryCell, unitTypes, targetCell)
|
||||
Reinforcements.Reinforce(soviets, unitTypes, { entryCell }, 40, function(a)
|
||||
Trigger.OnIdle(a, function(a)
|
||||
if a.Location ~= targetCell then
|
||||
a.AttackMove(targetCell)
|
||||
@@ -108,31 +37,29 @@ SendUnits = function(entryCell, unitTypes, interval, targetCell)
|
||||
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
|
||||
|
||||
SendWave = function()
|
||||
Wave = Wave + 1
|
||||
local wave = Waves[Wave]
|
||||
|
||||
local entry = Utils.Random(wave.entries).Location
|
||||
local target = Utils.Random(wave.targets).Location
|
||||
|
||||
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
|
||||
played = true
|
||||
Utils.Do(players, function(player)
|
||||
Media.PlaySpeechNotification(player, "EnemyUnitsApproaching")
|
||||
end)
|
||||
Trigger.AfterDelay(DateTime.Seconds(1), function() played = false end)
|
||||
SendUnits(entry, units, target)
|
||||
end)
|
||||
|
||||
Utils.Do(players, function(player)
|
||||
Media.PlaySpeechNotification(player, "EnemyUnitsApproaching")
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user