Add Counterstrike mission Sarin Gas 1: Crackdown
This commit is contained in:
118
mods/ra/maps/sarin-gas-1-crackdown/crackdown-AI.lua
Normal file
118
mods/ra/maps/sarin-gas-1-crackdown/crackdown-AI.lua
Normal file
@@ -0,0 +1,118 @@
|
||||
--[[
|
||||
Copyright 2007-2018 The OpenRA Developers (see AUTHORS)
|
||||
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.
|
||||
]]
|
||||
IdlingUnits = { }
|
||||
AttackGroup = { }
|
||||
AttackGroupSize = 10
|
||||
BGAttackGroup = { }
|
||||
BGAttackGroupSize = 8
|
||||
SovietInfantry = { "e1", "e2", "e4" }
|
||||
SovietVehicles = { "ttnk", "3tnk", "3tnk", "v2rl" }
|
||||
ProductionInterval =
|
||||
{
|
||||
easy = DateTime.Seconds(25),
|
||||
normal = DateTime.Seconds(15),
|
||||
hard = DateTime.Seconds(5)
|
||||
}
|
||||
|
||||
GroundAttackUnits = { { "ttnk", "ttnk", "e2", "e2", "e2" }, { "3tnk", "v2rl", "e4", "e4", "e4" } }
|
||||
GroundAttackPaths =
|
||||
{
|
||||
{ EscapeSouth5.Location, Patrol1.Location },
|
||||
{ EscapeNorth10.Location, EscapeNorth7.Location }
|
||||
}
|
||||
GroundWavesDelays =
|
||||
{
|
||||
easy = 4,
|
||||
normal = 3,
|
||||
hard = 2
|
||||
}
|
||||
|
||||
IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end
|
||||
|
||||
SendBGAttackGroup = function()
|
||||
if #BGAttackGroup < BGAttackGroupSize then
|
||||
return
|
||||
end
|
||||
|
||||
Utils.Do(BGAttackGroup, function(unit)
|
||||
if not unit.IsDead then
|
||||
Trigger.OnIdle(unit, unit.Hunt)
|
||||
end
|
||||
end)
|
||||
|
||||
BGAttackGroup = { }
|
||||
end
|
||||
|
||||
ProduceBadGuyInfantry = function()
|
||||
if BadGuyRax.IsDead or BadGuyRax.Owner ~= badguy then
|
||||
return
|
||||
end
|
||||
|
||||
badguy.Build({ Utils.Random(SovietInfantry) }, function(units)
|
||||
table.insert(BGAttackGroup, units[1])
|
||||
SendBGAttackGroup()
|
||||
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceBadGuyInfantry)
|
||||
end)
|
||||
end
|
||||
|
||||
SendAttackGroup = function()
|
||||
if #AttackGroup < AttackGroupSize then
|
||||
return
|
||||
end
|
||||
|
||||
Utils.Do(AttackGroup, function(unit)
|
||||
if not unit.IsDead then
|
||||
Trigger.OnIdle(unit, unit.Hunt)
|
||||
end
|
||||
end)
|
||||
|
||||
AttackGroup = { }
|
||||
end
|
||||
|
||||
ProduceUSSRInfantry = function()
|
||||
if USSRRax.IsDead or USSRRax.Owner ~= ussr then
|
||||
return
|
||||
end
|
||||
|
||||
ussr.Build({ Utils.Random(SovietInfantry) }, function(units)
|
||||
table.insert(AttackGroup, units[1])
|
||||
SendAttackGroup()
|
||||
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceUSSRInfantry)
|
||||
end)
|
||||
end
|
||||
|
||||
ProduceVehicles = function()
|
||||
if USSRWarFactory.IsDead or USSRWarFactory.Owner ~= ussr then
|
||||
return
|
||||
end
|
||||
|
||||
ussr.Build({ Utils.Random(SovietVehicles) }, function(units)
|
||||
table.insert(AttackGroup, units[1])
|
||||
SendAttackGroup()
|
||||
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceVehicles)
|
||||
end)
|
||||
end
|
||||
|
||||
GroundWaves = function()
|
||||
Reinforcements.Reinforce(ussr, Utils.Random(GroundAttackUnits), Utils.Random(GroundAttackPaths), 0, function(unit)
|
||||
unit.Hunt()
|
||||
end)
|
||||
|
||||
Trigger.AfterDelay(DateTime.Minutes(GroundWavesDelays), GroundWaves)
|
||||
end
|
||||
|
||||
ActivateAI = function()
|
||||
local difficulty = Map.LobbyOption("difficulty")
|
||||
GroundWavesDelays = GroundWavesDelays[difficulty]
|
||||
|
||||
ProduceBadGuyInfantry()
|
||||
ProduceUSSRInfantry()
|
||||
Trigger.AfterDelay(DateTime.Minutes(1), ProduceVehicles)
|
||||
Trigger.AfterDelay(DateTime.Minutes(4), GroundWaves)
|
||||
end
|
||||
198
mods/ra/maps/sarin-gas-1-crackdown/crackdown.lua
Normal file
198
mods/ra/maps/sarin-gas-1-crackdown/crackdown.lua
Normal file
@@ -0,0 +1,198 @@
|
||||
--[[
|
||||
Copyright 2007-2018 The OpenRA Developers (see AUTHORS)
|
||||
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.
|
||||
]]
|
||||
MammothPath = { Patrol1.Location, Patrol2.Location, Patrol3.Location, Patrol4.Location }
|
||||
ConvoyTrucks = { Truck1, Truck2, Truck3, Truck4, Truck5, IntroTruck1, IntroTruck2 }
|
||||
IntroTrucks = { IntroTruck1, IntroTruck2 }
|
||||
TruckEscapeNorth = { EscapeNorth1, EscapeNorth2, EscapeNorth3, EscapeNorth4, EscapeNorth5, EscapeNorth6, EscapeNorth7, EscapeNorth8, EscapeNorth9, EscapeNorth10 }
|
||||
TruckEscapeSouth = { EscapeSouth1, EscapeSouth2, EscapeSouth3, EscapeSouth4, EscapeSouth5 }
|
||||
SovAttackStart = { StartTank, StartRifle1, StartRifle2, StartRifle3, StartRifle4 }
|
||||
SovAttackStart2 = { StartRifle5, StartRifle6, StartGren }
|
||||
RunAway = { IntroTruck2, StartRifle3, StartRifle4 }
|
||||
GreeceRifles = { GreeceRifle1, GreeceRifle2, GreeceRifle3, GreeceRifle4, GreeceRifle5 }
|
||||
CombatTeam1 = { "mnly", "spy", "spy", "mcv" }
|
||||
CombatTeam2 =
|
||||
{
|
||||
easy = { "2tnk", "2tnk", "2tnk", "e3", "e3", "e3" },
|
||||
normal = { "e3", "e3", "e3", "2tnk", "1tnk" },
|
||||
hard = { "e3", "e3", "e3", "1tnk" }
|
||||
}
|
||||
|
||||
SetupTriggers = function()
|
||||
Trigger.OnInfiltrated(RadarDome, function()
|
||||
greece.MarkCompletedObjective(objRadarSpy)
|
||||
Actor.Create("camera", true, { Owner = greece, Location = Cam1.Location })
|
||||
Actor.Create("camera", true, { Owner = greece, Location = Cam2.Location })
|
||||
Actor.Create("camera", true, { Owner = greece, Location = Cam3.Location })
|
||||
Actor.Create("camera", true, { Owner = greece, Location = Cam4.Location })
|
||||
end)
|
||||
|
||||
Trigger.OnKilled(RadarDome, function()
|
||||
if not greece.IsObjectiveCompleted(objRadarSpy) then
|
||||
greece.MarkFailedObjective(objRadarSpy)
|
||||
end
|
||||
end)
|
||||
|
||||
Trigger.OnAllKilled(ConvoyTrucks, function()
|
||||
greece.MarkCompletedObjective(objDestroyAllTrucks)
|
||||
end)
|
||||
|
||||
Trigger.OnEnteredFootprint({ TruckEscapeCenter.Location }, function(actor, triggerlose1)
|
||||
if actor.Owner == ussr and actor.Type == "truk" then
|
||||
Trigger.RemoveProximityTrigger(triggerlose1)
|
||||
actor.Destroy()
|
||||
greece.MarkFailedObjective(objDestroyAllTrucks)
|
||||
end
|
||||
end)
|
||||
|
||||
Trigger.OnEnteredFootprint({ EscapeNorth10.Location }, function(actor, triggerlose2)
|
||||
if actor.Owner == ussr and actor.Type == "truk" then
|
||||
Trigger.RemoveProximityTrigger(triggerlose2)
|
||||
actor.Destroy()
|
||||
greece.MarkFailedObjective(objDestroyAllTrucks)
|
||||
end
|
||||
end)
|
||||
|
||||
Trigger.OnEnteredFootprint({ EscapeSouth5.Location }, function(actor, triggerlose3)
|
||||
if actor.Owner == ussr and actor.Type == "truk" then
|
||||
Trigger.RemoveProximityTrigger(triggerlose3)
|
||||
actor.Destroy()
|
||||
greece.MarkFailedObjective(objDestroyAllTrucks)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
MissionStart = function()
|
||||
Trigger.AfterDelay(DateTime.Seconds(1), function()
|
||||
Reinforcements.Reinforce(greece, CombatTeam1, { TruckEscapeCenter.Location, DefaultCameraPosition.Location })
|
||||
local StartCamera = Actor.Create("camera", true, { Owner = greece, Location = DefaultCameraPosition.Location })
|
||||
Trigger.AfterDelay(DateTime.Seconds(10), function()
|
||||
StartCamera.Destroy()
|
||||
end)
|
||||
end)
|
||||
|
||||
Utils.Do(GreeceRifles, function(actor)
|
||||
actor.Move(DefaultCameraPosition.Location)
|
||||
end)
|
||||
|
||||
Utils.Do(SovAttackStart, function(actor)
|
||||
actor.AttackMove(DefaultCameraPosition.Location)
|
||||
end)
|
||||
|
||||
Utils.Do(IntroTrucks, function(truck)
|
||||
truck.Move(TruckEscapeCenter.Location)
|
||||
end)
|
||||
|
||||
Trigger.AfterDelay(DateTime.Seconds(3), function()
|
||||
Utils.Do(RunAway, function(actor)
|
||||
if actor.IsDead then
|
||||
return
|
||||
else
|
||||
actor.Stop()
|
||||
actor.Move(Cam4.Location)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
Trigger.AfterDelay(DateTime.Seconds(10), function()
|
||||
Utils.Do(SovAttackStart2, function(actor)
|
||||
if actor.IsDead then
|
||||
return
|
||||
else
|
||||
actor.AttackMove(DefaultCameraPosition.Location)
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
Trigger.AfterDelay(DateTime.Minutes(1), function()
|
||||
local difficulty = Map.LobbyOption("difficulty")
|
||||
CombatTeam2 = CombatTeam2[difficulty]
|
||||
Reinforcements.Reinforce(greece, CombatTeam2, { TruckEscapeCenter.Location, DefaultCameraPosition.Location })
|
||||
Media.PlaySpeechNotification(greece, "ReinforcementsArrived")
|
||||
end)
|
||||
end
|
||||
|
||||
SendPatrol = function(mammoth)
|
||||
mammoth.Patrol(MammothPath, true, 20)
|
||||
end
|
||||
|
||||
MoveTruckNorth = function(truck)
|
||||
if truck.IsDead then
|
||||
return
|
||||
else
|
||||
Media.DisplayMessage("Convoy truck attempting to escape!")
|
||||
Media.PlaySoundNotification(greece, "AlertBleep")
|
||||
Utils.Do(TruckEscapeNorth, function(waypoint)
|
||||
truck.Move(waypoint.Location)
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
MoveTruckSouth = function(truck)
|
||||
if truck.IsDead then
|
||||
return
|
||||
else
|
||||
Media.DisplayMessage("Convoy truck attempting to escape!")
|
||||
Media.PlaySoundNotification(greece, "AlertBleep")
|
||||
Utils.Do(TruckEscapeSouth, function(waypoint)
|
||||
truck.Move(waypoint.Location)
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
Tick = function()
|
||||
ussr.Cash = 5000
|
||||
badguy.Cash = 5000
|
||||
|
||||
if ussr.HasNoRequiredUnits() and badguy.HasNoRequiredUnits() then
|
||||
greece.MarkCompletedObjective(objKillAll)
|
||||
end
|
||||
end
|
||||
|
||||
WorldLoaded = function()
|
||||
greece = Player.GetPlayer("Greece")
|
||||
ussr = Player.GetPlayer("USSR")
|
||||
badguy = Player.GetPlayer("BadGuy")
|
||||
|
||||
Trigger.OnObjectiveAdded(greece, function(p, id)
|
||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
|
||||
end)
|
||||
|
||||
objDestroyAllTrucks = greece.AddPrimaryObjective("Prevent Soviet convoy trucks from escaping.")
|
||||
objKillAll = greece.AddPrimaryObjective("Clear the sector of all Soviet presence.")
|
||||
objRadarSpy = greece.AddSecondaryObjective("Infiltrate the Soviet Radar Dome to reveal truck \necape routes.")
|
||||
ussrObj = ussr.AddPrimaryObjective("Deny the Allies.")
|
||||
|
||||
Trigger.OnObjectiveCompleted(greece, function(p, id)
|
||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed")
|
||||
end)
|
||||
Trigger.OnObjectiveFailed(greece, function(p, id)
|
||||
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective failed")
|
||||
end)
|
||||
|
||||
Trigger.OnPlayerLost(greece, function()
|
||||
Media.PlaySpeechNotification(player, "Lose")
|
||||
end)
|
||||
Trigger.OnPlayerWon(greece, function()
|
||||
Media.PlaySpeechNotification(player, "Win")
|
||||
end)
|
||||
|
||||
ActivateAI()
|
||||
SetupTriggers()
|
||||
MissionStart()
|
||||
|
||||
Camera.Position = DefaultCameraPosition.CenterPosition
|
||||
|
||||
Trigger.AfterDelay(DateTime.Minutes(5), function() SendPatrol(PatrolMammoth) end)
|
||||
Trigger.AfterDelay(DateTime.Minutes(5), function() MoveTruckNorth(Truck1) end)
|
||||
Trigger.AfterDelay(DateTime.Minutes(9), function() MoveTruckNorth(Truck2) end)
|
||||
Trigger.AfterDelay(DateTime.Minutes(12), function() MoveTruckSouth(Truck3) end)
|
||||
Trigger.AfterDelay(DateTime.Minutes(15), function() MoveTruckNorth(Truck4) end)
|
||||
Trigger.AfterDelay(DateTime.Minutes(17), function() MoveTruckSouth(Truck5) end)
|
||||
Trigger.AfterDelay(DateTime.Minutes(18), function() MoveTruckSouth(IntroTruck2) end)
|
||||
end
|
||||
BIN
mods/ra/maps/sarin-gas-1-crackdown/map.bin
Normal file
BIN
mods/ra/maps/sarin-gas-1-crackdown/map.bin
Normal file
Binary file not shown.
BIN
mods/ra/maps/sarin-gas-1-crackdown/map.png
Normal file
BIN
mods/ra/maps/sarin-gas-1-crackdown/map.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
1008
mods/ra/maps/sarin-gas-1-crackdown/map.yaml
Normal file
1008
mods/ra/maps/sarin-gas-1-crackdown/map.yaml
Normal file
File diff suppressed because it is too large
Load Diff
119
mods/ra/maps/sarin-gas-1-crackdown/rules.yaml
Normal file
119
mods/ra/maps/sarin-gas-1-crackdown/rules.yaml
Normal file
@@ -0,0 +1,119 @@
|
||||
World:
|
||||
LuaScript:
|
||||
Scripts: crackdown.lua, crackdown-AI.lua
|
||||
MissionData:
|
||||
Briefing: A Soviet convoy of Sarin nerve gas has stopped at a riverside outpost for refuelling. This is a perfect opportunity to destroy the Sarin shipment, and remove the Soviet threat in the area.\n\nUse your forces to destroy the convoy trucks and the base. It is imperative that none of the convoy trucks escape.\n\nThe Soviets keep their convoy information in their radar center. If a spy was to infiltrate the facility, it may help us locate the convoy escape routes.
|
||||
WinVideo: allymorf.vqa
|
||||
ScriptLobbyDropdown@difficulty:
|
||||
ID: difficulty
|
||||
Label: Difficulty
|
||||
Values:
|
||||
easy: Easy
|
||||
normal: Normal
|
||||
hard: Hard
|
||||
Default: easy
|
||||
|
||||
Player:
|
||||
PlayerResources:
|
||||
DefaultCash: 5000
|
||||
|
||||
APC:
|
||||
Buildable:
|
||||
Prerequisites: ~vehicles.allies
|
||||
|
||||
E3:
|
||||
Buildable:
|
||||
Prerequisites: ~infantry.allies
|
||||
|
||||
3TNK:
|
||||
Buildable:
|
||||
Prerequisites: ~vehicles.soviet
|
||||
|
||||
V2RL:
|
||||
Buildable:
|
||||
Prerequisites: ~vehicles.soviet
|
||||
|
||||
TTNK:
|
||||
Buildable:
|
||||
Prerequisites: tsla, ~vehicles.soviet
|
||||
|
||||
2TNK:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
ARTY:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
MRJ:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
THF:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
MSUB:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
CA:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
ATEK:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
APWR:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
GAP:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
PDOX:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
MSLO:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
AGUN:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
HPAD:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
TRUK:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
-SpawnActorOnDeath:
|
||||
|
||||
MGG:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
FTRK:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
CTNK:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
STNK:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
E7:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
SS:
|
||||
AutoTarget:
|
||||
InitialStanceAI: AttackAnything
|
||||
@@ -23,6 +23,7 @@ Soviet Campaign:
|
||||
./mods/ra/maps/soviet-07
|
||||
./mods/ra/maps/soviet-08a
|
||||
Counterstrike:
|
||||
./mods/ra/maps/sarin-gas-1-crackdown
|
||||
./mods/ra/maps/soviet-soldier-volkov-n-chitzkoi
|
||||
Aftermath:
|
||||
./mods/ra/maps/monster-tank-madness
|
||||
|
||||
Reference in New Issue
Block a user