Files
OpenRA/mods/cnc/maps/gdi02/gdi02.lua
let5sne.win10 9cf6ebb986
Some checks failed
Continuous Integration / Linux (.NET 8.0) (push) Has been cancelled
Continuous Integration / Windows (.NET 8.0) (push) Has been cancelled
Initial commit: OpenRA game engine
Fork from OpenRA/OpenRA with one-click launch script (start-ra.cmd)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 21:46:54 +08:00

66 lines
2.1 KiB
Lua

--[[
Copyright (c) The OpenRA Developers and Contributors
This file is part of OpenRA, which is free software. It is made
available to you under the terms of the GNU General Public License
as published by the Free Software Foundation, either version 3 of
the License, or (at your option) any later version. For more
information, see COPYING.
]]
NodInBaseTeam = { RushBuggy, RushRifle1, RushRifle2, RushRifle3 }
MobileConstructionVehicle = { "mcv" }
EngineerReinforcements = { "e6", "e6", "e6" }
VehicleReinforcements = { "jeep" }
AttackerSquadSize = 3
Reinforce = function(units)
Media.PlaySpeechNotification(GDI, "Reinforce")
ReinforceWithLandingCraft(GDI, units, lstStart.Location, lstEnd.Location)
end
BridgeheadSecured = function()
Reinforce(MobileConstructionVehicle)
Trigger.AfterDelay(DateTime.Seconds(15), NodAttack)
Trigger.AfterDelay(DateTime.Seconds(30), function() Reinforce(EngineerReinforcements) end)
Trigger.AfterDelay(DateTime.Seconds(120), function() Reinforce(VehicleReinforcements) end)
end
NodAttack = function()
local nodUnits = Nod.GetGroundAttackers()
if #nodUnits > AttackerSquadSize * 2 then
local attackers = Utils.Skip(nodUnits, #nodUnits - AttackerSquadSize)
Utils.Do(attackers, function(unit)
unit.AttackMove(NodAttackWaypoint.Location)
IdleHunt(unit)
end)
Trigger.OnAllKilled(attackers, function() Trigger.AfterDelay(DateTime.Seconds(15), NodAttack) end)
end
end
WorldLoaded = function()
GDI = Player.GetPlayer("GDI")
Nod = Player.GetPlayer("Nod")
InitObjectives(GDI)
NodObjective = AddPrimaryObjective(Nod, "")
GDIObjective1 = AddPrimaryObjective(GDI, "eliminate-nod")
GDIObjective2 = AddSecondaryObjective(GDI, "capture-refinery")
Trigger.OnCapture(NodRefinery, function() GDI.MarkCompletedObjective(GDIObjective2) end)
Trigger.OnKilled(NodRefinery, function() GDI.MarkFailedObjective(GDIObjective2) end)
Trigger.OnAllKilled(NodInBaseTeam, BridgeheadSecured)
end
Tick = function()
if GDI.HasNoRequiredUnits() then
Nod.MarkCompletedObjective(NodObjective)
end
if Nod.HasNoRequiredUnits() then
GDI.MarkCompletedObjective(GDIObjective1)
end
end