Add Marn's Shellmap "Fields of Green" to TS

This commit is contained in:
Taryn Hill
2016-04-10 09:53:32 -05:00
parent 7a13fb189c
commit 1bb2aa3522
5 changed files with 1577 additions and 0 deletions

View File

@@ -106,6 +106,11 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.GameMonitor", "OpenR
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "OpenRA.Test", "OpenRA.Test\OpenRA.Test.csproj", "{6CB8E1B7-6B36-4D93-8633-7C573E194AC4}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tiberian Sun Lua scripts", "Tiberian Sun Lua scripts", "{85159569-F5BD-458E-B5C0-EB16690C432B}"
ProjectSection(SolutionItems) = preProject
mods\ts\maps\fields-of-green\fields-of-green.lua = mods\ts\maps\fields-of-green\fields-of-green.lua
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x86 = Debug|x86

View File

@@ -0,0 +1,106 @@
NForce = { "e1", "e1", "e1", "e3", "cyborg", "cyborg" }
NForcePath = { NodW.Location, GDIBase.Location }
NForceInterval = 5
VNForce = { "bike", "bike", "bggy", "bggy", "e1", "e1", "e3" }
VNForcePath = { South.Location, GDIBase.Location }
VNForceInterval = 15
GForce = { "e1", "e1", "e1", "e1", "e2", "e1", "e2" }
GForcePath = { GDIW.Location, NodBase.Location }
GForceInterval = 5
VGForce = { "e2", "smech", "smech", "e1", "e1", "apc" }
VGForcePath = { North.Location, NodBase.Location }
VGForceInterval = 15
ProducedUnitTypes =
{
{ nodhand1, { "e1", "e3" } },
{ gdibar1, { "e1", "e2" } }
}
ProduceUnits = function(t)
local factory = t[1]
if not factory.IsDead then
local unitType = t[2][Utils.RandomInteger(1, #t[2] + 1)]
factory.Wait(Actor.BuildTime(unitType))
factory.Produce(unitType)
factory.CallFunc(function() ProduceUnits(t) end)
end
end
SetupFactories = function()
Utils.Do(ProducedUnitTypes, function(pair)
Trigger.OnProduction(pair[1], function(_, a) BindActorTriggers(a) end)
end)
end
SetupInvulnerability = function()
Utils.Do(Map.NamedActors, function(actor)
if actor.HasProperty("AcceptsUpgrade") and actor.AcceptsUpgrade("unkillable") then
actor.GrantUpgrade("unkillable")
end
end)
end
SendNodInfantry = function()
local units = Reinforcements.Reinforce(nod, NForce, NForcePath, NForceInterval)
Utils.Do(units, function(unit)
BindActorTriggers(unit)
end)
Trigger.AfterDelay(DateTime.Seconds(60), SendNodInfantry)
end
SendNodVehicles = function()
local units = Reinforcements.Reinforce(nod, VNForce, VNForcePath, VNForceInterval)
Utils.Do(units, function(unit)
BindActorTriggers(unit)
end)
Trigger.AfterDelay(DateTime.Seconds(110), SendNodVehicles)
end
SendGDIInfantry = function()
local units = Reinforcements.Reinforce(gdi, GForce, GForcePath, GForceInterval)
Utils.Do(units, function(unit)
BindActorTriggers(unit)
end)
Trigger.AfterDelay(DateTime.Seconds(60), SendGDIInfantry)
end
SendGDIVehicles = function()
local units = Reinforcements.Reinforce(gdi, VGForce, VGForcePath, VGForceInterval)
Utils.Do(units, function(unit)
BindActorTriggers(unit)
end)
Trigger.AfterDelay(DateTime.Seconds(110), SendGDIVehicles)
end
BindActorTriggers = function(a)
if a.HasProperty("Hunt") then
Trigger.OnIdle(a, a.Hunt)
end
if a.HasProperty("HasPassengers") then
Trigger.OnDamaged(a, function()
if a.HasPassengers then
a.Stop()
a.UnloadPassengers()
end
end)
end
end
WorldLoaded = function()
nod = Player.GetPlayer("Nod")
gdi = Player.GetPlayer("GDI")
SetupFactories()
SetupInvulnerability()
Utils.Do(ProducedUnitTypes, ProduceUnits)
SendNodInfantry()
Trigger.AfterDelay(DateTime.Seconds(50), SendNodVehicles)
SendGDIInfantry()
Trigger.AfterDelay(DateTime.Seconds(70), SendGDIVehicles)
end

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

File diff suppressed because it is too large Load Diff