Move IdleHunt function to campaign-global.lua
This commit is contained in:
@@ -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.
|
||||||
]]
|
]]
|
||||||
|
IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end
|
||||||
|
|
||||||
AttackAircraftTargets = { }
|
AttackAircraftTargets = { }
|
||||||
InitializeAttackAircraft = function(aircraft, enemyPlayer)
|
InitializeAttackAircraft = function(aircraft, enemyPlayer)
|
||||||
|
|||||||
@@ -23,14 +23,6 @@ else
|
|||||||
TanyaType = "e7.noautotarget"
|
TanyaType = "e7.noautotarget"
|
||||||
end
|
end
|
||||||
|
|
||||||
IdleHunt = function(actor)
|
|
||||||
Trigger.OnIdle(actor, function(a)
|
|
||||||
if a.IsInWorld then
|
|
||||||
a.Hunt()
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
|
|
||||||
ProduceUnits = function(factory, count)
|
ProduceUnits = function(factory, count)
|
||||||
if ussr.IsProducing("e1") then
|
if ussr.IsProducing("e1") then
|
||||||
Trigger.AfterDelay(DateTime.Seconds(5), function() ProduceUnits(factory, count) end)
|
Trigger.AfterDelay(DateTime.Seconds(5), function() ProduceUnits(factory, count) end)
|
||||||
|
|||||||
@@ -34,14 +34,6 @@ else
|
|||||||
TanyaType = "e7.noautotarget"
|
TanyaType = "e7.noautotarget"
|
||||||
end
|
end
|
||||||
|
|
||||||
IdleHunt = function(actor)
|
|
||||||
Trigger.OnIdle(actor, function(a)
|
|
||||||
if a.IsInWorld then
|
|
||||||
a.Hunt()
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
|
|
||||||
Tick = function()
|
Tick = function()
|
||||||
if TeleportJeepCamera and Jeep.IsInWorld then
|
if TeleportJeepCamera and Jeep.IsInWorld then
|
||||||
JeepCamera.Teleport(Jeep.Location)
|
JeepCamera.Teleport(Jeep.Location)
|
||||||
|
|||||||
@@ -93,8 +93,6 @@ BuildBuilding = function(building)
|
|||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end
|
|
||||||
|
|
||||||
SetupAttackGroup = function()
|
SetupAttackGroup = function()
|
||||||
local units = { }
|
local units = { }
|
||||||
|
|
||||||
|
|||||||
@@ -26,8 +26,6 @@ HoldProduction = true
|
|||||||
BuildVehicles = true
|
BuildVehicles = true
|
||||||
TrainInfantry = true
|
TrainInfantry = true
|
||||||
|
|
||||||
IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end
|
|
||||||
|
|
||||||
SetupAttackGroup = function()
|
SetupAttackGroup = function()
|
||||||
local units = { }
|
local units = { }
|
||||||
|
|
||||||
|
|||||||
@@ -15,8 +15,6 @@ SovietAircraftType = { "yak" }
|
|||||||
Planes = { }
|
Planes = { }
|
||||||
SovietProduction = { Conyard, USSRBarracks, USSRWarFactory }
|
SovietProduction = { Conyard, USSRBarracks, USSRWarFactory }
|
||||||
|
|
||||||
IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end
|
|
||||||
|
|
||||||
ProductionInterval =
|
ProductionInterval =
|
||||||
{
|
{
|
||||||
easy = DateTime.Seconds(25),
|
easy = DateTime.Seconds(25),
|
||||||
|
|||||||
@@ -15,8 +15,6 @@ SovietAircraftType = { "yak" }
|
|||||||
Planes = { }
|
Planes = { }
|
||||||
SovietProduction = { Conyard, USSRBarracks, USSRWarFactory }
|
SovietProduction = { Conyard, USSRBarracks, USSRWarFactory }
|
||||||
|
|
||||||
IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end
|
|
||||||
|
|
||||||
ProductionInterval =
|
ProductionInterval =
|
||||||
{
|
{
|
||||||
easy = DateTime.Seconds(25),
|
easy = DateTime.Seconds(25),
|
||||||
|
|||||||
@@ -158,8 +158,6 @@ ProduceAircraft = function()
|
|||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end
|
|
||||||
|
|
||||||
SendAttack = function(units, path)
|
SendAttack = function(units, path)
|
||||||
Utils.Do(units, function(unit)
|
Utils.Do(units, function(unit)
|
||||||
unit.Patrol(path, false)
|
unit.Patrol(path, false)
|
||||||
|
|||||||
@@ -170,8 +170,6 @@ ProduceAircraft = function()
|
|||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end
|
|
||||||
|
|
||||||
SendAttack = function(units, path)
|
SendAttack = function(units, path)
|
||||||
Utils.Do(units, function(unit)
|
Utils.Do(units, function(unit)
|
||||||
unit.Patrol(path, false)
|
unit.Patrol(path, false)
|
||||||
|
|||||||
@@ -28,8 +28,6 @@ ProductionInterval =
|
|||||||
hard = DateTime.Seconds(5)
|
hard = DateTime.Seconds(5)
|
||||||
}
|
}
|
||||||
|
|
||||||
IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end
|
|
||||||
|
|
||||||
ParadropDelay = { DateTime.Seconds(30), DateTime.Minutes(1) }
|
ParadropDelay = { DateTime.Seconds(30), DateTime.Minutes(1) }
|
||||||
ParadropWaves = 6
|
ParadropWaves = 6
|
||||||
ParadropLZs = { ParaLZ1.CenterPosition, ParaLZ2.CenterPosition, ParaLZ3.CenterPosition, ParaLZ4.CenterPosition }
|
ParadropLZs = { ParaLZ1.CenterPosition, ParaLZ2.CenterPosition, ParaLZ3.CenterPosition, ParaLZ4.CenterPosition }
|
||||||
|
|||||||
@@ -13,8 +13,6 @@ SovietVehicles = { "3tnk", "3tnk", "v2rl" }
|
|||||||
SovietAircraftType = { "mig" }
|
SovietAircraftType = { "mig" }
|
||||||
Migs = { }
|
Migs = { }
|
||||||
|
|
||||||
IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end
|
|
||||||
|
|
||||||
GroundWavesUpgradeDelay = DateTime.Minutes(12)
|
GroundWavesUpgradeDelay = DateTime.Minutes(12)
|
||||||
GroundAttackUnitType = "Normal"
|
GroundAttackUnitType = "Normal"
|
||||||
GroundAttackUnits =
|
GroundAttackUnits =
|
||||||
|
|||||||
@@ -13,8 +13,6 @@ SovietVehicles = { "3tnk", "3tnk", "v2rl" }
|
|||||||
SovietAircraftType = { "mig" }
|
SovietAircraftType = { "mig" }
|
||||||
Migs = { }
|
Migs = { }
|
||||||
|
|
||||||
IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end
|
|
||||||
|
|
||||||
GroundWavesUpgradeDelay = DateTime.Minutes(12)
|
GroundWavesUpgradeDelay = DateTime.Minutes(12)
|
||||||
GroundAttackUnitType = "Normal"
|
GroundAttackUnitType = "Normal"
|
||||||
GroundAttackUnits =
|
GroundAttackUnits =
|
||||||
|
|||||||
@@ -58,8 +58,6 @@ SovietAircraftType = { "yak" }
|
|||||||
SovietSSType = { "ss" }
|
SovietSSType = { "ss" }
|
||||||
VehicleUnits = { "3tnk", "3tnk", "3tnk", "v2rl" }
|
VehicleUnits = { "3tnk", "3tnk", "3tnk", "v2rl" }
|
||||||
|
|
||||||
IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end
|
|
||||||
|
|
||||||
SendInfantryAttackGroup = function()
|
SendInfantryAttackGroup = function()
|
||||||
if #InfantryAttackGroup < InfantryAttackGroupSize then
|
if #InfantryAttackGroup < InfantryAttackGroupSize then
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -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.
|
||||||
]]
|
]]
|
||||||
IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end
|
|
||||||
StartAnts = { StartAnt1, StartAnt2 }
|
StartAnts = { StartAnt1, StartAnt2 }
|
||||||
Hive1Killzone = { CPos.New(80,83), CPos.New(81,83), CPos.New(82,83), CPos.New(83,83), CPos.New(84,83), CPos.New(85,83), CPos.New(85,84), CPos.New(85,85), CPos.New(85,86), CPos.New(85,87), CPos.New(84,87), CPos.New(83,87), CPos.New(82,87), CPos.New(81,87), CPos.New(80,87), CPos.New(80,86), CPos.New(80,85), CPos.New(80,84) }
|
Hive1Killzone = { CPos.New(80,83), CPos.New(81,83), CPos.New(82,83), CPos.New(83,83), CPos.New(84,83), CPos.New(85,83), CPos.New(85,84), CPos.New(85,85), CPos.New(85,86), CPos.New(85,87), CPos.New(84,87), CPos.New(83,87), CPos.New(82,87), CPos.New(81,87), CPos.New(80,87), CPos.New(80,86), CPos.New(80,85), CPos.New(80,84) }
|
||||||
Hive2Killzone = { CPos.New(84,50), CPos.New(85,50), CPos.New(86,50), CPos.New(87,50), CPos.New(88,50), CPos.New(89,50), CPos.New(89,51), CPos.New(89,52), CPos.New(89,53), CPos.New(89,54), CPos.New(88,54), CPos.New(87,54), CPos.New(86,54), CPos.New(85,54), CPos.New(84,54), CPos.New(84,53), CPos.New(84,52), CPos.New(84,51) }
|
Hive2Killzone = { CPos.New(84,50), CPos.New(85,50), CPos.New(86,50), CPos.New(87,50), CPos.New(88,50), CPos.New(89,50), CPos.New(89,51), CPos.New(89,52), CPos.New(89,53), CPos.New(89,54), CPos.New(88,54), CPos.New(87,54), CPos.New(86,54), CPos.New(85,54), CPos.New(84,54), CPos.New(84,53), CPos.New(84,52), CPos.New(84,51) }
|
||||||
|
|||||||
@@ -72,14 +72,6 @@ ReinforcementsDelay = DateTime.Minutes(16)
|
|||||||
ReinforcementsUnits = { "2tnk", "2tnk", "2tnk", "2tnk", "2tnk", "2tnk", "1tnk", "1tnk", "jeep", "e1",
|
ReinforcementsUnits = { "2tnk", "2tnk", "2tnk", "2tnk", "2tnk", "2tnk", "1tnk", "1tnk", "jeep", "e1",
|
||||||
"e1", "e1", "e1", "e3", "e3", "mcv", "truk", "truk", "truk", "truk", "truk", "truk" }
|
"e1", "e1", "e1", "e3", "e3", "mcv", "truk", "truk", "truk", "truk", "truk", "truk" }
|
||||||
|
|
||||||
IdleHunt = function(actor)
|
|
||||||
Trigger.OnIdle(actor, function(a)
|
|
||||||
if a.IsInWorld then
|
|
||||||
a.Hunt()
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
|
|
||||||
SpawnAlliedReinforcements = function()
|
SpawnAlliedReinforcements = function()
|
||||||
if allies2.IsLocalPlayer then
|
if allies2.IsLocalPlayer then
|
||||||
UserInterface.SetMissionText("")
|
UserInterface.SetMissionText("")
|
||||||
|
|||||||
@@ -184,13 +184,6 @@ SendSovietParadrop = function()
|
|||||||
Trigger.AfterDelay(sovietParadropTicks, SendSovietParadrop)
|
Trigger.AfterDelay(sovietParadropTicks, SendSovietParadrop)
|
||||||
end
|
end
|
||||||
|
|
||||||
IdleHunt = function(unit)
|
|
||||||
Trigger.OnIdle(unit, unit.Hunt)
|
|
||||||
Trigger.OnCapture(unit, function()
|
|
||||||
Trigger.ClearAll(unit)
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
|
|
||||||
AircraftTargets = function(yak)
|
AircraftTargets = function(yak)
|
||||||
local targets = Utils.Where(Map.ActorsInWorld, function(a)
|
local targets = Utils.Where(Map.ActorsInWorld, function(a)
|
||||||
return (a.Owner == allies1 or a.Owner == allies2) and a.HasProperty("Health") and yak.CanTarget(a)
|
return (a.Owner == allies1 or a.Owner == allies2) and a.HasProperty("Health") and yak.CanTarget(a)
|
||||||
|
|||||||
@@ -52,8 +52,6 @@ lstReinforcements =
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IdleHunt = function(actor) if not actor.IsDead then Trigger.OnIdle(actor, actor.Hunt) end end
|
|
||||||
|
|
||||||
VIPs = { }
|
VIPs = { }
|
||||||
MissionStart = function()
|
MissionStart = function()
|
||||||
FlareBoy.Move(LightFlare.Location)
|
FlareBoy.Move(LightFlare.Location)
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ NWVillage = { NWChurch, NWHouse1, NWHouse2, NWHouse3 }
|
|||||||
SWVillage = { SWChurch, SWHouse1, SWHouse2, SWHouse3, SWHouse4 }
|
SWVillage = { SWChurch, SWHouse1, SWHouse2, SWHouse3, SWHouse4 }
|
||||||
MiddleVillage = { MiddleChurch, MiddleHouse1, MiddleHouse2, MiddleHouse3, MiddleHouse4 }
|
MiddleVillage = { MiddleChurch, MiddleHouse1, MiddleHouse2, MiddleHouse3, MiddleHouse4 }
|
||||||
EastVillage = { EastChurch, EastHouse1, EastHouse2, EastHouse3 }
|
EastVillage = { EastChurch, EastHouse1, EastHouse2, EastHouse3 }
|
||||||
IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end
|
|
||||||
|
|
||||||
MissionStart = function()
|
MissionStart = function()
|
||||||
Reinforcements.Reinforce(Allies, AlliedReinforcementsA, { AlliedSpawn.Location, AlliedBase.Location }, 5)
|
Reinforcements.Reinforce(Allies, AlliedReinforcementsA, { AlliedSpawn.Location, AlliedBase.Location }, 5)
|
||||||
|
|||||||
@@ -37,7 +37,6 @@ NorthWaterTeam = { "1tnk", "1tnk", "1tnk", "2tnk", "2tnk" }
|
|||||||
BoatofMammoths = { "4tnk", "4tnk", "4tnk", "4tnk", "4tnk" }
|
BoatofMammoths = { "4tnk", "4tnk", "4tnk", "4tnk", "4tnk" }
|
||||||
EvacuateFootprint = { CPos.New(93,92), CPos.New(94,92), CPos.New(95,92), CPos.New(96,92), CPos.New(97,92), CPos.New(98,92), CPos.New(99,92) }
|
EvacuateFootprint = { CPos.New(93,92), CPos.New(94,92), CPos.New(95,92), CPos.New(96,92), CPos.New(97,92), CPos.New(98,92), CPos.New(99,92) }
|
||||||
TimerTicks = DateTime.Minutes(54)
|
TimerTicks = DateTime.Minutes(54)
|
||||||
IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end
|
|
||||||
|
|
||||||
AlliedReinforcements = function()
|
AlliedReinforcements = function()
|
||||||
Reinforcements.Reinforce(Greece, StartUnits, { AlliesEntry.Location, AlliesRally.Location }, 6)
|
Reinforcements.Reinforce(Greece, StartUnits, { AlliesEntry.Location, AlliesRally.Location }, 6)
|
||||||
|
|||||||
@@ -216,10 +216,6 @@ InsertSpies = function()
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
IdleHunt = function(unit)
|
|
||||||
Trigger.OnIdle(unit, unit.Hunt)
|
|
||||||
end
|
|
||||||
|
|
||||||
StopHunt = function(unit)
|
StopHunt = function(unit)
|
||||||
if not unit.IsDead then
|
if not unit.IsDead then
|
||||||
unit.Stop()
|
unit.Stop()
|
||||||
|
|||||||
@@ -62,14 +62,6 @@ GroundPatrolUnits =
|
|||||||
{ "3tnk", "3tnk" }
|
{ "3tnk", "3tnk" }
|
||||||
}
|
}
|
||||||
|
|
||||||
IdleHunt = function(actor)
|
|
||||||
Trigger.OnIdle(actor, function(a)
|
|
||||||
if a.IsInWorld then
|
|
||||||
a.Hunt()
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
|
|
||||||
ParadropSovietUnits = function()
|
ParadropSovietUnits = function()
|
||||||
local powerproxy = Actor.Create("powerproxy.paratroopers", false, { Owner = soviets })
|
local powerproxy = Actor.Create("powerproxy.paratroopers", false, { Owner = soviets })
|
||||||
local aircraft = powerproxy.TargetParatroopers(MCVDeployLocation.CenterPosition, Angle.New(812))
|
local aircraft = powerproxy.TargetParatroopers(MCVDeployLocation.CenterPosition, Angle.New(812))
|
||||||
|
|||||||
@@ -20,8 +20,6 @@ SovietSquad = { "e1", "e1", "e1", "e4", "e4" }
|
|||||||
V2Squad = { "v2rl", "v2rl" }
|
V2Squad = { "v2rl", "v2rl" }
|
||||||
SubEscapePath = { SubPath1, SubPath2, SubPath3 }
|
SubEscapePath = { SubPath1, SubPath2, SubPath3 }
|
||||||
|
|
||||||
IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end
|
|
||||||
|
|
||||||
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))
|
||||||
|
|||||||
@@ -33,8 +33,6 @@ GroundWavesDelays =
|
|||||||
hard = 2
|
hard = 2
|
||||||
}
|
}
|
||||||
|
|
||||||
IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end
|
|
||||||
|
|
||||||
SendBGAttackGroup = function()
|
SendBGAttackGroup = function()
|
||||||
if #BGAttackGroup < BGAttackGroupSize then
|
if #BGAttackGroup < BGAttackGroupSize then
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -356,8 +356,6 @@ SpyTruckDrive = function()
|
|||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
IdleHunt = function(actor) if not actor.IsDead then Trigger.OnIdle(actor, actor.Hunt) end end
|
|
||||||
|
|
||||||
PrisonEscape = function()
|
PrisonEscape = function()
|
||||||
local alarmed
|
local alarmed
|
||||||
Trigger.OnEnteredFootprint(PrisonAlarm, function(unit, id)
|
Trigger.OnEnteredFootprint(PrisonAlarm, function(unit, id)
|
||||||
|
|||||||
@@ -20,8 +20,6 @@ MCVReinforcements =
|
|||||||
hard = { "1tnk", "1tnk", "mcv" }
|
hard = { "1tnk", "1tnk", "mcv" }
|
||||||
}
|
}
|
||||||
|
|
||||||
IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end
|
|
||||||
|
|
||||||
SetupTriggers = function()
|
SetupTriggers = function()
|
||||||
Trigger.OnEnteredFootprint(MammothStart, function(actor, mammothcam)
|
Trigger.OnEnteredFootprint(MammothStart, function(actor, mammothcam)
|
||||||
if actor.Owner == Greece then
|
if actor.Owner == Greece then
|
||||||
|
|||||||
@@ -26,7 +26,6 @@ AlliedInfantry = { "e1", "e1", "e1", "e3" }
|
|||||||
AttackGroupSize = 4
|
AttackGroupSize = 4
|
||||||
InfantryDelay = DateTime.Seconds(10)
|
InfantryDelay = DateTime.Seconds(10)
|
||||||
IdlingUnits = { }
|
IdlingUnits = { }
|
||||||
IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end
|
|
||||||
|
|
||||||
MissionStart = function()
|
MissionStart = function()
|
||||||
LZCamera = Actor.Create("camera", true, { Owner = USSR, Location = LZ.Location })
|
LZCamera = Actor.Create("camera", true, { Owner = USSR, Location = LZ.Location })
|
||||||
|
|||||||
@@ -12,8 +12,6 @@ Squad2 = { SecondSquad1, SecondSquad2, SecondSquad3 }
|
|||||||
PatrolMammothPath = { Patrol1.Location, Patrol2.Location, Patrol3.Location, Patrol4.Location, Patrol5.Location, Patrol6.Location, Patrol7.Location }
|
PatrolMammothPath = { Patrol1.Location, Patrol2.Location, Patrol3.Location, Patrol4.Location, Patrol5.Location, Patrol6.Location, Patrol7.Location }
|
||||||
ConvoyEscape = { CPos.New(113, 42), CPos.New(117, 71) }
|
ConvoyEscape = { CPos.New(113, 42), CPos.New(117, 71) }
|
||||||
|
|
||||||
IdleHunt = function(actor) if not actor.IsDead then Trigger.OnIdle(actor, actor.Hunt) end end
|
|
||||||
|
|
||||||
ConvoyUnits =
|
ConvoyUnits =
|
||||||
{
|
{
|
||||||
easy = { { "e2", "e2", "e2", "truk", "truk", "truk" }, { "3tnk", "3tnk", "truk", "truk", "truk" } },
|
easy = { { "e2", "e2", "e2", "truk", "truk", "truk" }, { "3tnk", "3tnk", "truk", "truk", "truk" } },
|
||||||
|
|||||||
@@ -23,8 +23,6 @@ ProductionInterval =
|
|||||||
hard = DateTime.Seconds(11)
|
hard = DateTime.Seconds(11)
|
||||||
}
|
}
|
||||||
|
|
||||||
IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end
|
|
||||||
|
|
||||||
ParadropDelays =
|
ParadropDelays =
|
||||||
{
|
{
|
||||||
easy = { DateTime.Minutes(3), DateTime.Minutes(4) },
|
easy = { DateTime.Minutes(3), DateTime.Minutes(4) },
|
||||||
|
|||||||
@@ -6,8 +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.
|
||||||
]]
|
]]
|
||||||
IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end
|
|
||||||
|
|
||||||
IdlingUnits = function()
|
IdlingUnits = function()
|
||||||
local lazyUnits = Greece.GetGroundAttackers()
|
local lazyUnits = Greece.GetGroundAttackers()
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +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.
|
||||||
]]
|
]]
|
||||||
IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end
|
|
||||||
|
|
||||||
IdlingUnits = function()
|
IdlingUnits = function()
|
||||||
local lazyUnits = Greece.GetGroundAttackers()
|
local lazyUnits = Greece.GetGroundAttackers()
|
||||||
|
|
||||||
|
|||||||
@@ -6,9 +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.
|
||||||
]]
|
]]
|
||||||
|
|
||||||
IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end
|
|
||||||
|
|
||||||
IdlingUnits = function()
|
IdlingUnits = function()
|
||||||
local lazyUnits = Utils.Where(Map.ActorsInWorld, function(actor)
|
local lazyUnits = Utils.Where(Map.ActorsInWorld, function(actor)
|
||||||
return actor.HasProperty("Hunt") and actor.Owner == Greece end)
|
return actor.HasProperty("Hunt") and actor.Owner == Greece end)
|
||||||
|
|||||||
@@ -6,8 +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.
|
||||||
]]
|
]]
|
||||||
IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end
|
|
||||||
|
|
||||||
IdlingUnits = function()
|
IdlingUnits = function()
|
||||||
local lazyUnits = enemy.GetGroundAttackers()
|
local lazyUnits = enemy.GetGroundAttackers()
|
||||||
|
|
||||||
|
|||||||
@@ -6,8 +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.
|
||||||
]]
|
]]
|
||||||
IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end
|
|
||||||
|
|
||||||
IdlingUnits = function()
|
IdlingUnits = function()
|
||||||
local lazyUnits = enemy.GetGroundAttackers()
|
local lazyUnits = enemy.GetGroundAttackers()
|
||||||
|
|
||||||
|
|||||||
@@ -56,8 +56,6 @@ AlliedVehicles =
|
|||||||
Upgraded = { "2tnk", "arty" }
|
Upgraded = { "2tnk", "arty" }
|
||||||
}
|
}
|
||||||
|
|
||||||
IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end
|
|
||||||
|
|
||||||
WTransWaves = function()
|
WTransWaves = function()
|
||||||
local way = Utils.Random(WTransWays)
|
local way = Utils.Random(WTransWays)
|
||||||
local units = Utils.Random(WTransUnits)
|
local units = Utils.Random(WTransUnits)
|
||||||
|
|||||||
@@ -56,8 +56,6 @@ AlliedVehicles =
|
|||||||
Upgraded = { "2tnk", "arty" }
|
Upgraded = { "2tnk", "arty" }
|
||||||
}
|
}
|
||||||
|
|
||||||
IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end
|
|
||||||
|
|
||||||
WTransWaves = function()
|
WTransWaves = function()
|
||||||
local way = Utils.Random(WTransWays)
|
local way = Utils.Random(WTransWays)
|
||||||
local units = Utils.Random(WTransUnits)
|
local units = Utils.Random(WTransUnits)
|
||||||
|
|||||||
@@ -6,8 +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.
|
||||||
]]
|
]]
|
||||||
IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end
|
|
||||||
|
|
||||||
AttackGroup = { }
|
AttackGroup = { }
|
||||||
AttackGroupSize = 12
|
AttackGroupSize = 12
|
||||||
AlliedInfantry = { "e1", "e3" }
|
AlliedInfantry = { "e1", "e3" }
|
||||||
|
|||||||
@@ -73,8 +73,6 @@ ProductionDelays =
|
|||||||
hard = 1
|
hard = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end
|
|
||||||
|
|
||||||
SendCruiser = function()
|
SendCruiser = function()
|
||||||
if NavalYard2.IsDead or NavalYard2.Owner ~= Greece then
|
if NavalYard2.IsDead or NavalYard2.Owner ~= Greece then
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -76,8 +76,6 @@ ProductionDelays =
|
|||||||
hard = 1
|
hard = 1
|
||||||
}
|
}
|
||||||
|
|
||||||
IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end
|
|
||||||
|
|
||||||
SendCruiser = function()
|
SendCruiser = function()
|
||||||
if NavalYard2.IsDead or NavalYard2.Owner ~= Greece then
|
if NavalYard2.IsDead or NavalYard2.Owner ~= Greece then
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -37,14 +37,6 @@ TanyaTrigger = { CPos.New(59, 43), CPos.New(60, 43), CPos.New(61, 43), CPos.New(
|
|||||||
GreeceHarvestersAreDead = false
|
GreeceHarvestersAreDead = false
|
||||||
AlloyFacilityDestroyed = false
|
AlloyFacilityDestroyed = false
|
||||||
|
|
||||||
IdleHunt = function(actor)
|
|
||||||
Trigger.OnIdle(actor, function(a)
|
|
||||||
if a.IsInWorld then
|
|
||||||
a.Hunt()
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
|
|
||||||
WorldLoaded = function()
|
WorldLoaded = function()
|
||||||
|
|
||||||
--Players Setup
|
--Players Setup
|
||||||
|
|||||||
@@ -182,14 +182,6 @@ FinishTimer = function()
|
|||||||
Trigger.AfterDelay(DateTime.Seconds(10), function() UserInterface.SetMissionText("") end)
|
Trigger.AfterDelay(DateTime.Seconds(10), function() UserInterface.SetMissionText("") end)
|
||||||
end
|
end
|
||||||
|
|
||||||
IdleHunt = function(unit)
|
|
||||||
Trigger.OnIdle(unit, function(a)
|
|
||||||
if a.IsInWorld then
|
|
||||||
a.Hunt()
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
|
|
||||||
SendSovietParadrops = function(table)
|
SendSovietParadrops = function(table)
|
||||||
local aircraft = powerproxy.TargetParatroopers(table[2].CenterPosition, table[1])
|
local aircraft = powerproxy.TargetParatroopers(table[2].CenterPosition, table[1])
|
||||||
Utils.Do(aircraft, function(a)
|
Utils.Do(aircraft, function(a)
|
||||||
|
|||||||
@@ -43,14 +43,6 @@ ParaWaves =
|
|||||||
{ delay = AttackTicks * 3, type = "SovietSquad", target = SovietParaDrop1 }
|
{ delay = AttackTicks * 3, type = "SovietSquad", target = SovietParaDrop1 }
|
||||||
}
|
}
|
||||||
|
|
||||||
IdleHunt = function(unit)
|
|
||||||
Trigger.OnIdle(unit, function(a)
|
|
||||||
if a.IsInWorld then
|
|
||||||
a.Hunt()
|
|
||||||
end
|
|
||||||
end)
|
|
||||||
end
|
|
||||||
|
|
||||||
GuardHarvester = function(unit, harvester)
|
GuardHarvester = function(unit, harvester)
|
||||||
if not unit.IsDead then
|
if not unit.IsDead then
|
||||||
unit.Stop()
|
unit.Stop()
|
||||||
|
|||||||
Reference in New Issue
Block a user