Add Soviet 09
This commit is contained in:
committed by
Oliver Brakmann
parent
b066005f7e
commit
c028488894
BIN
mods/ra/maps/soviet-09/map.bin
Normal file
BIN
mods/ra/maps/soviet-09/map.bin
Normal file
Binary file not shown.
BIN
mods/ra/maps/soviet-09/map.png
Normal file
BIN
mods/ra/maps/soviet-09/map.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
1498
mods/ra/maps/soviet-09/map.yaml
Normal file
1498
mods/ra/maps/soviet-09/map.yaml
Normal file
File diff suppressed because it is too large
Load Diff
121
mods/ra/maps/soviet-09/rules.yaml
Normal file
121
mods/ra/maps/soviet-09/rules.yaml
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
World:
|
||||||
|
LuaScript:
|
||||||
|
Scripts: campaign-global.lua, soviet09.lua, soviet09-AI.lua
|
||||||
|
MissionData:
|
||||||
|
BriefingVideo: soviet9.vqa
|
||||||
|
WinVideo: v2rocket.vqa
|
||||||
|
LossVideo: sfrozen.vqa
|
||||||
|
StartVideo: movingin.vqa
|
||||||
|
Briefing: The Allied forces have intercepted and destroyed a convoy that carried parts for our secret weapon. One truck remains, but they have captured that last truck and its cargo.\n\nThis is not acceptable! You are to destroy that truck before the Allies leave the area with it.
|
||||||
|
ScriptLobbyDropdown@difficulty:
|
||||||
|
ID: difficulty
|
||||||
|
Label: Difficulty
|
||||||
|
Values:
|
||||||
|
easy: Easy
|
||||||
|
normal: Normal
|
||||||
|
hard: Hard
|
||||||
|
Default: easy
|
||||||
|
SmudgeLayer@SCORCH:
|
||||||
|
InitialSmudges:
|
||||||
|
98,87: sc3,0
|
||||||
|
100,87: sc2,0
|
||||||
|
108,87: sc1,0
|
||||||
|
88,93: sc6,0
|
||||||
|
104,101: sc3,0
|
||||||
|
SmudgeLayer@CRATER:
|
||||||
|
InitialSmudges:
|
||||||
|
99,87: cr1,2
|
||||||
|
86,93: cr1,0
|
||||||
|
87,93: cr1,1
|
||||||
|
|
||||||
|
Player:
|
||||||
|
PlayerResources:
|
||||||
|
DefaultCash: 8000
|
||||||
|
|
||||||
|
AFLD:
|
||||||
|
AirstrikePower@parabombs:
|
||||||
|
Prerequisites: ~disabled
|
||||||
|
|
||||||
|
ATEK:
|
||||||
|
Buildable:
|
||||||
|
Prerequisites: ~disabled
|
||||||
|
|
||||||
|
HPAD:
|
||||||
|
Buildable:
|
||||||
|
Prerequisites: ~structures.allies
|
||||||
|
|
||||||
|
IRON:
|
||||||
|
Buildable:
|
||||||
|
Prerequisites: ~disabled
|
||||||
|
|
||||||
|
MSLO:
|
||||||
|
Buildable:
|
||||||
|
Prerequisites: ~disabled
|
||||||
|
|
||||||
|
TRUK:
|
||||||
|
Buildable:
|
||||||
|
Prerequisites: ~disabled
|
||||||
|
-SpawnActorOnDeath:
|
||||||
|
|
||||||
|
FTRK:
|
||||||
|
Buildable:
|
||||||
|
Prerequisites: ~disabled
|
||||||
|
|
||||||
|
QTNK:
|
||||||
|
Buildable:
|
||||||
|
Prerequisites: ~disabled
|
||||||
|
|
||||||
|
MRJ:
|
||||||
|
Buildable:
|
||||||
|
Prerequisites: ~disabled
|
||||||
|
|
||||||
|
HELI:
|
||||||
|
Buildable:
|
||||||
|
Prerequisites: ~hpad
|
||||||
|
|
||||||
|
HIND:
|
||||||
|
Buildable:
|
||||||
|
Prerequisites: ~disabled
|
||||||
|
|
||||||
|
MIG:
|
||||||
|
Buildable:
|
||||||
|
Prerequisites: ~disabled
|
||||||
|
|
||||||
|
MSUB:
|
||||||
|
Buildable:
|
||||||
|
Prerequisites: ~disabled
|
||||||
|
|
||||||
|
CA:
|
||||||
|
Buildable:
|
||||||
|
Prerequisites: ~disabled
|
||||||
|
|
||||||
|
THF:
|
||||||
|
Buildable:
|
||||||
|
Prerequisites: ~disabled
|
||||||
|
|
||||||
|
GAP:
|
||||||
|
Buildable:
|
||||||
|
Prerequisites: ~disabled
|
||||||
|
|
||||||
|
PDOX:
|
||||||
|
Buildable:
|
||||||
|
Prerequisites: ~disabled
|
||||||
|
|
||||||
|
E7:
|
||||||
|
Buildable:
|
||||||
|
Prerequisites: ~disabled
|
||||||
|
|
||||||
|
MECH:
|
||||||
|
Buildable:
|
||||||
|
Prerequisites: ~disabled
|
||||||
|
|
||||||
|
SPY:
|
||||||
|
Buildable:
|
||||||
|
Prerequisites: ~disabled
|
||||||
|
|
||||||
|
E3:
|
||||||
|
Buildable:
|
||||||
|
Prerequisites: ~tent
|
||||||
|
|
||||||
|
CHAN:
|
||||||
|
-Wanders:
|
||||||
192
mods/ra/maps/soviet-09/soviet09-AI.lua
Normal file
192
mods/ra/maps/soviet-09/soviet09-AI.lua
Normal file
@@ -0,0 +1,192 @@
|
|||||||
|
--[[
|
||||||
|
Copyright 2007-2020 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.
|
||||||
|
]]
|
||||||
|
IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end
|
||||||
|
|
||||||
|
AttackGroup = { }
|
||||||
|
AttackGroupSize = 12
|
||||||
|
AlliedInfantry = { "e1", "e3" }
|
||||||
|
AlliedVehicles = { "jeep", "1tnk", "2tnk", "2tnk" }
|
||||||
|
AlliedAircraftType = { "heli" }
|
||||||
|
Longbows = { }
|
||||||
|
|
||||||
|
ProductionInterval =
|
||||||
|
{
|
||||||
|
easy = DateTime.Seconds(25),
|
||||||
|
normal = DateTime.Seconds(15),
|
||||||
|
hard = DateTime.Seconds(5)
|
||||||
|
}
|
||||||
|
AttackPaths =
|
||||||
|
{
|
||||||
|
{ SouthAttack1.Location, SouthAttack2.Location, DefaultCameraPosition.Location },
|
||||||
|
{ TruckStop2.Location, TruckStop1.Location, DefaultCameraPosition.Location }
|
||||||
|
}
|
||||||
|
|
||||||
|
WTransUnits = { { "2tnk", "1tnk", "1tnk", "e3", "e3" }, { "2tnk", "2tnk", "2tnk" } }
|
||||||
|
WTransDelays =
|
||||||
|
{
|
||||||
|
easy = DateTime.Minutes(5),
|
||||||
|
normal = DateTime.Minutes(3),
|
||||||
|
hard = DateTime.Minutes(1)
|
||||||
|
}
|
||||||
|
WTransWays =
|
||||||
|
{
|
||||||
|
{ SeaEntryEast.Location, SeaEastLZ.Location },
|
||||||
|
{ SeaEntryWest1.Location, SeaWestLZ1.Location },
|
||||||
|
{ SeaEntryWest1.Location, SeaWestPath1.Location, SeaWestLZ2.Location },
|
||||||
|
{ SeaEntryWest2.Location, SeaWestPath2.Location, SeaWestPath3.Location, SeaWestLZ3.Location },
|
||||||
|
{ SeaEntryWest2.Location, SeaWestPath2.Location, SeaWestPath3.Location, SeaWestLZ4.Location }
|
||||||
|
}
|
||||||
|
|
||||||
|
ChinookChalk = { "e1", "e1", "e1", "e1", "e3", "e3", "e3", "e3" }
|
||||||
|
ChinookPaths =
|
||||||
|
{
|
||||||
|
{ SeaEntryEast.Location, LZ1.Location },
|
||||||
|
{ TruckEscapeEast.Location, LZ2.Location },
|
||||||
|
{ ChinookEntrySouth.Location, LZ3.Location },
|
||||||
|
{ SeaEntryWest2.Location, LZ4.Location }
|
||||||
|
}
|
||||||
|
ChinookDelay =
|
||||||
|
{
|
||||||
|
easy = { DateTime.Minutes(1), DateTime.Seconds(90) },
|
||||||
|
normal = { DateTime.Seconds(45), DateTime.Seconds(75) },
|
||||||
|
hard = { DateTime.Seconds(30), DateTime.Minutes(1) }
|
||||||
|
}
|
||||||
|
ChinookWaves =
|
||||||
|
{
|
||||||
|
easy = 4,
|
||||||
|
normal = 8,
|
||||||
|
hard = 12
|
||||||
|
}
|
||||||
|
ChinookAttacks = 0
|
||||||
|
|
||||||
|
ChinookAttack = function()
|
||||||
|
Trigger.AfterDelay(Utils.RandomInteger(ChinookDelay[1], ChinookDelay[2]), function()
|
||||||
|
local way = Utils.Random(ChinookPaths)
|
||||||
|
local units = ChinookChalk
|
||||||
|
local chalk = Reinforcements.ReinforceWithTransport(Greece, "tran", units , way, { way[2], way[1] })[2]
|
||||||
|
Utils.Do(chalk, function(unit)
|
||||||
|
Trigger.OnAddedToWorld(unit, IdleHunt)
|
||||||
|
end)
|
||||||
|
|
||||||
|
ChinookAttacks = ChinookAttacks + 1
|
||||||
|
if ChinookAttacks <= ChinookWaves[Map.LobbyOption("difficulty")] then
|
||||||
|
ChinookAttack()
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
ProduceInfantry = function()
|
||||||
|
if GermanyTent.IsDead or GermanyTent.Owner ~= Germany then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
Germany.Build({ Utils.Random(AlliedInfantry) }, function(units)
|
||||||
|
table.insert(AttackGroup, units[1])
|
||||||
|
SendAttackGroup()
|
||||||
|
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceInfantry)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
ProduceVehicles = function()
|
||||||
|
if GermanyWarFactory.IsDead or GermanyWarFactory.Owner ~= Germany then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
Germany.Build({ Utils.Random(AlliedVehicles) }, function(units)
|
||||||
|
table.insert(AttackGroup, units[1])
|
||||||
|
SendAttackGroup()
|
||||||
|
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceVehicles)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
SendAttackGroup = function()
|
||||||
|
if #AttackGroup < AttackGroupSize then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
Utils.Do(AttackGroup, IdleHunt)
|
||||||
|
|
||||||
|
AttackGroup = { }
|
||||||
|
end
|
||||||
|
|
||||||
|
GreeceAircraft = function()
|
||||||
|
if (GreeceHpad1.IsDead or GreeceHpad1.Owner ~= Greece) and (GreeceHpad2.IsDead or GreeceHpad2.Owner ~= Greece) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
Greece.Build(AlliedAircraftType, function(units)
|
||||||
|
local longbow = units[1]
|
||||||
|
Longbows[#Longbows + 1] = longbow
|
||||||
|
|
||||||
|
Trigger.OnKilled(longbow, GreeceAircraft)
|
||||||
|
|
||||||
|
local alive = Utils.Where(Longbows, function(y) return not y.IsDead end)
|
||||||
|
if #alive < 2 then
|
||||||
|
Trigger.AfterDelay(DateTime.Seconds(90), GreeceAircraft)
|
||||||
|
end
|
||||||
|
|
||||||
|
InitializeAttackAircraft(longbow, USSR)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
GermanAircraft = function()
|
||||||
|
if (GermanyHpad1.IsDead or GermanyHpad1.Owner ~= Germany) and (GermanyHpad2.IsDead or GermanyHpad2.Owner ~= Germany) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
Germany.Build(AlliedAircraftType, function(units)
|
||||||
|
local longbow = units[1]
|
||||||
|
Longbows[#Longbows + 1] = longbow
|
||||||
|
|
||||||
|
Trigger.OnKilled(longbow, GermanAircraft)
|
||||||
|
|
||||||
|
local alive = Utils.Where(Longbows, function(y) return not y.IsDead end)
|
||||||
|
if #alive < 2 then
|
||||||
|
Trigger.AfterDelay(DateTime.Seconds(ProductionInterval[Map.LobbyOption("difficulty")] / 2), GermanAircraft)
|
||||||
|
end
|
||||||
|
|
||||||
|
InitializeAttackAircraft(longbow, USSR)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
WTransWaves = function()
|
||||||
|
local way = Utils.Random(WTransWays)
|
||||||
|
local units = Utils.Random(WTransUnits)
|
||||||
|
local attackUnits = Reinforcements.ReinforceWithTransport(Greece, "lst", units , way, { way[2], way[1] })[2]
|
||||||
|
Utils.Do(attackUnits, function(a)
|
||||||
|
Trigger.OnAddedToWorld(a, function()
|
||||||
|
a.AttackMove(DefaultCameraPosition.Location)
|
||||||
|
IdleHunt(a)
|
||||||
|
end)
|
||||||
|
end)
|
||||||
|
|
||||||
|
Trigger.AfterDelay(WTransDelays, WTransWaves)
|
||||||
|
end
|
||||||
|
|
||||||
|
ActivateAI = function()
|
||||||
|
local difficulty = Map.LobbyOption("difficulty")
|
||||||
|
WTransDelays = WTransDelays[difficulty]
|
||||||
|
ChinookDelay = ChinookDelay[difficulty]
|
||||||
|
|
||||||
|
local buildings = Utils.Where(Map.ActorsInWorld, function(self) return self.Owner ~= USSR and self.HasProperty("StartBuildingRepairs") end)
|
||||||
|
Utils.Do(buildings, function(actor)
|
||||||
|
Trigger.OnDamaged(actor, function(building)
|
||||||
|
if building.Owner ~= USSR and building.Health < building.MaxHealth * 3/4 then
|
||||||
|
building.StartBuildingRepairs()
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
end)
|
||||||
|
|
||||||
|
Trigger.AfterDelay(DateTime.Minutes(3), WTransWaves)
|
||||||
|
ChinookAttack()
|
||||||
|
ProduceInfantry()
|
||||||
|
ProduceVehicles()
|
||||||
|
GreeceAircraft()
|
||||||
|
GermanAircraft()
|
||||||
|
end
|
||||||
109
mods/ra/maps/soviet-09/soviet09.lua
Normal file
109
mods/ra/maps/soviet-09/soviet09.lua
Normal file
@@ -0,0 +1,109 @@
|
|||||||
|
--[[
|
||||||
|
Copyright 2007-2020 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.
|
||||||
|
]]
|
||||||
|
|
||||||
|
TruckStops = { TruckStop1, TruckStop2, TruckStop3, TruckStop4, TruckStop5, TruckStop6, TruckStop7, TruckStop8 }
|
||||||
|
MissionStartAttackUnits = { StartAttack1tnk1, StartAttack1tnk2, StartAttackArty1, StartAttackArty2, StartAttackArty3 }
|
||||||
|
TruckEscape = { TruckEscape1, TruckEscape2, TruckEscape3, TruckEscape4, TruckEscape5, TruckEscapeWest }
|
||||||
|
BackupRoute = { TruckEscape2, TruckEscape1, TruckEscapeEast }
|
||||||
|
|
||||||
|
MissionStart = function()
|
||||||
|
Utils.Do(TruckStops, function(waypoint)
|
||||||
|
StolenTruck.Move(waypoint.Location)
|
||||||
|
end)
|
||||||
|
|
||||||
|
Trigger.AfterDelay(DateTime.Seconds(5), function()
|
||||||
|
Utils.Do(MissionStartAttackUnits, function(actor)
|
||||||
|
actor.AttackMove(DefaultCameraPosition.Location)
|
||||||
|
end)
|
||||||
|
end)
|
||||||
|
|
||||||
|
Trigger.AfterDelay(DateTime.Seconds(45), function()
|
||||||
|
Media.DisplayMessage("Commander, the truck has stopped at a nearby allied base.\nAllied radio intercepts say the truck has orders to flee the battlefield\nif any Soviet units approach the base.")
|
||||||
|
end)
|
||||||
|
|
||||||
|
Trigger.OnKilled(StolenTruck, function()
|
||||||
|
USSR.MarkCompletedObjective(DestroyTruck)
|
||||||
|
USSR.MarkCompletedObjective(DefendCommand)
|
||||||
|
end)
|
||||||
|
|
||||||
|
Trigger.OnKilled(CommandCenter, function()
|
||||||
|
USSR.MarkFailedObjective(DefendCommand)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
|
||||||
|
Trigger.OnEnteredProximityTrigger(TruckAlarm.CenterPosition, WDist.FromCells(11), function(actor, triggerflee)
|
||||||
|
if actor.Owner == USSR and actor.Type ~= "badr" and actor.Type ~= "u2" and actor.Type ~= "camera.spyplane" then
|
||||||
|
Trigger.RemoveProximityTrigger(triggerflee)
|
||||||
|
Media.DisplayMessage("The convoy truck is attempting to escape!")
|
||||||
|
EscapeCamera = Actor.Create("camera", true, { Owner = USSR, Location = TruckAlarm.Location })
|
||||||
|
Media.PlaySoundNotification(USSR, "AlertBleep")
|
||||||
|
Utils.Do(TruckEscape, function(waypoint)
|
||||||
|
StolenTruck.Move(waypoint.Location)
|
||||||
|
end)
|
||||||
|
|
||||||
|
Trigger.AfterDelay(DateTime.Seconds(5), function()
|
||||||
|
EscapeCamera.Destroy()
|
||||||
|
end)
|
||||||
|
|
||||||
|
Trigger.OnIdle(StolenTruck, function()
|
||||||
|
Utils.Do(BackupRoute, function(waypoint)
|
||||||
|
StolenTruck.Move(waypoint.Location)
|
||||||
|
end)
|
||||||
|
end)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
Trigger.OnEnteredFootprint(({ TruckEscapeWest.Location } or { TruckEscapeEast.Location }), function(actor, triggerlose)
|
||||||
|
if actor.Owner == Greece and actor.Type == "truk" then
|
||||||
|
Trigger.RemoveFootprintTrigger(triggerlose)
|
||||||
|
actor.Destroy()
|
||||||
|
USSR.MarkFailedObjective(DestroyTruck)
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
|
Tick = function()
|
||||||
|
Greece.Cash = 50000
|
||||||
|
Germany.Cash = 50000
|
||||||
|
end
|
||||||
|
|
||||||
|
WorldLoaded = function()
|
||||||
|
USSR = Player.GetPlayer("USSR")
|
||||||
|
Germany = Player.GetPlayer("Germany")
|
||||||
|
Greece = Player.GetPlayer("Greece")
|
||||||
|
|
||||||
|
Trigger.OnObjectiveAdded(USSR, function(p, id)
|
||||||
|
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
|
||||||
|
end)
|
||||||
|
|
||||||
|
DestroyTruck = USSR.AddObjective("Destroy the stolen convoy truck.\nDo not let it escape.")
|
||||||
|
DefendCommand = USSR.AddObjective("Defend our forward command center.")
|
||||||
|
|
||||||
|
Trigger.OnObjectiveCompleted(USSR, function(p, id)
|
||||||
|
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed")
|
||||||
|
end)
|
||||||
|
Trigger.OnObjectiveFailed(USSR, function(p, id)
|
||||||
|
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective failed")
|
||||||
|
end)
|
||||||
|
|
||||||
|
Trigger.OnPlayerLost(USSR, function()
|
||||||
|
Trigger.AfterDelay(DateTime.Seconds(1), function()
|
||||||
|
Media.PlaySpeechNotification(USSR, "MissionFailed")
|
||||||
|
end)
|
||||||
|
end)
|
||||||
|
Trigger.OnPlayerWon(USSR, function()
|
||||||
|
Trigger.AfterDelay(DateTime.Seconds(1), function()
|
||||||
|
Media.PlaySpeechNotification(USSR, "MissionAccomplished")
|
||||||
|
end)
|
||||||
|
end)
|
||||||
|
|
||||||
|
Camera.Position = DefaultCameraPosition.CenterPosition
|
||||||
|
|
||||||
|
MissionStart()
|
||||||
|
ActivateAI()
|
||||||
|
end
|
||||||
@@ -23,6 +23,7 @@ Soviet Campaign:
|
|||||||
soviet-07
|
soviet-07
|
||||||
soviet-08a
|
soviet-08a
|
||||||
soviet-08b
|
soviet-08b
|
||||||
|
soviet-09
|
||||||
Counterstrike:
|
Counterstrike:
|
||||||
sarin-gas-1-crackdown
|
sarin-gas-1-crackdown
|
||||||
sarin-gas-2-down-under
|
sarin-gas-2-down-under
|
||||||
|
|||||||
Reference in New Issue
Block a user