Add Counterstrike mission Siberian Conflict 3: Wasteland

This commit is contained in:
Smittytron
2021-01-02 23:03:22 -06:00
committed by reaperrr
parent 4778dba36d
commit 887a093f46
7 changed files with 1426 additions and 0 deletions

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,114 @@
World:
LuaScript:
Scripts: campaign-global.lua, wasteland.lua, wasteland-AI.lua
MissionData:
WinVideo: masasslt.vqa
LossVideo: frozen.vqa
Briefing: The last of the Soviet's Siberian forces have wandered out onto the ice wastes, where they've established a base. Finish off their fortifications so our Allied forces will have no trouble moving through this area on their way to Moscow.\n\nThe mission is complete when all Soviet forces and structures are destroyed.
ScriptLobbyDropdown@difficulty:
ID: difficulty
Label: Difficulty
Values:
easy: Easy
normal: Normal
hard: Hard
Default: normal
Player:
PlayerResources:
DefaultCash: 5200
MONEYCRATE:
GiveCashCrateAction:
Amount: 2000
SelectionShares: 1
UseCashTick: true
PARATROOPERS:
ParatroopersPower:
DropItems: E1,E1,E1,E2,E2
AlwaysVisible:
MCV:
Buildable:
Prerequisites: ~disabled
TRUK:
Buildable:
Prerequisites: ~disabled
MRJ:
Buildable:
Prerequisites: ~disabled
3TNK:
Buildable:
Prerequisites: ~vehicles.soviet
V2RL:
Buildable:
Prerequisites: ~vehicles.soviet
4TNK:
Buildable:
Prerequisites: ~vehicles.soviet
QTNK:
Buildable:
Prerequisites: ~disabled
ATEK:
Buildable:
Prerequisites: ~disabled
STEK:
Buildable:
Prerequisites: ~disabled
PDOX:
Buildable:
Prerequisites: ~disabled
IRON:
Buildable:
Prerequisites: ~disabled
MSLO:
Buildable:
Prerequisites: ~disabled
GAP:
Buildable:
Prerequisites: ~disabled
MECH:
Buildable:
Prerequisites: ~disabled
THF:
Buildable:
Prerequisites: ~disabled
E7:
Buildable:
Prerequisites: ~disabled
E7.noautotarget:
Buildable:
Prerequisites: ~disabled
SYRD:
Buildable:
Prerequisites: ~disabled
SPEN:
Buildable:
Prerequisites: ~disabled
MH60:
Buildable:
Prerequisites: ~disabled
HELI:
Buildable:
Prerequisites: ~hpad

View File

@@ -0,0 +1,211 @@
--[[
Copyright 2007-2021 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.
]]
AttackGroup = { }
AttackGroupSize = 10
BGAttackGroup = { }
BGAttackGroupSize = 10
SovietInfantry = { "e1", "e2", "e4" }
SovietVehicles = { "3tnk", "3tnk", "v2rl" }
Mammoths = { "4tnk", "4tnk" }
SovietAircraftType = { "yak" }
Planes = { }
ProductionInterval =
{
easy = DateTime.Seconds(33),
normal = DateTime.Seconds(22),
hard = DateTime.Seconds(11)
}
IdleHunt = function(unit) if not unit.IsDead then Trigger.OnIdle(unit, unit.Hunt) end end
ParadropDelays =
{
easy = { DateTime.Minutes(3), DateTime.Minutes(4) },
normal = { DateTime.Minutes(2), DateTime.Minutes(3) },
hard = { DateTime.Minutes(1), DateTime.Minutes(2) }
}
ParadropLZs = { DropZone1.CenterPosition, DropZone2.CenterPosition, DropZone3.CenterPosition, DropZone4.CenterPosition, DropZone5.CenterPosition, DropZone6.CenterPosition, DropZone7.CenterPosition, DropZone8.CenterPosition }
Paradrop = function()
Trigger.AfterDelay(Utils.RandomInteger(ParadropDelays[1], ParadropDelays[2]), function()
local aircraft = PowerProxy.TargetParatroopers(Utils.Random(ParadropLZs), Angle.North)
Utils.Do(aircraft, function(a)
Trigger.OnPassengerExited(a, function(t, p)
IdleHunt(p)
end)
end)
if not (Airfield1.IsDead or Airfield1.Owner ~= BadGuy) and not (Airfield2.IsDead or Airfield2.Owner ~= BadGuy) then
Paradrop()
end
end)
end
SendBGAttackGroup = function()
if #BGAttackGroup < BGAttackGroupSize then
return
end
Utils.Do(BGAttackGroup, function(unit)
if not unit.IsDead then
IdleHunt(unit)
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
ProduceBadGuyVehicles = function()
if BadGuyWarFactory.IsDead or BadGuyWarFactory.Owner ~= BadGuy then
return
end
BadGuy.Build({ Utils.Random(SovietVehicles) }, function(units)
table.insert(BGAttackGroup, units[1])
SendBGAttackGroup()
Trigger.AfterDelay(ProductionInterval[Map.LobbyOption("difficulty")], ProduceBadGuyVehicles)
end)
end
SendAttackGroup = function()
if #AttackGroup < AttackGroupSize then
return
end
Utils.Do(AttackGroup, function(unit)
if not unit.IsDead then
IdleHunt(unit)
end
end)
AttackGroup = { }
end
ProduceUSSRInfantry = function()
if USSRBarracks.IsDead or USSRBarracks.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
ProduceUSSRVehicles = 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")], ProduceUSSRVehicles)
end)
end
ProduceAircraft = function()
if (Airfield1.IsDead or Airfield1.Owner ~= BadGuy) and (Airfield2.IsDead or Airfield2.Owner ~= BadGuy) then
return
end
BadGuy.Build(SovietAircraftType, function(units)
local plane = units[1]
Planes[#Planes + 1] = plane
Trigger.OnKilled(plane, ProduceAircraft)
local alive = Utils.Where(Planes, function(y) return not y.IsDead end)
if #alive < 2 then
Trigger.AfterDelay(DateTime.Seconds(ProductionInterval[Map.LobbyOption("difficulty")] / 2), ProduceAircraft)
end
InitializeAttackAircraft(plane, Allies)
end)
end
StartBGMammoths =
{
easy = 18,
normal = 15,
hard = 12
}
StartUSSRMammoths =
{
easy = 12,
normal = 10,
hard = 9
}
MammothDelays =
{
easy = 5,
normal = 4,
hard = 3
}
BGMammoths = function()
if not ForwardCommandBG.IsDead or ForwardCommandBG.Owner ~= BadGuy then
local tanks = Reinforcements.Reinforce(BadGuy, Mammoths, { BGMammothEntry.Location }, 5)
Utils.Do(tanks, IdleHunt)
Trigger.AfterDelay(DateTime.Minutes(MammothDelays), BGMammoths)
end
end
USSRMammoths = function()
if not ForwardCommandUSSR.IsDead or ForwardCommandUSSR.Owner ~= USSR then
local tanks = Reinforcements.Reinforce(USSR, Mammoths, { USSRMammothEntry.Location }, 5)
Utils.Do(tanks, IdleHunt)
Trigger.AfterDelay(DateTime.Minutes(MammothDelays), USSRMammoths)
end
end
ActivateAI = function()
local difficulty = Map.LobbyOption("difficulty")
ParadropDelays = ParadropDelays[difficulty]
MammothDelays = MammothDelays[difficulty]
StartBGMammoths = StartBGMammoths[difficulty]
StartUSSRMammoths = StartUSSRMammoths[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)
Paradrop()
ProduceBadGuyInfantry()
Trigger.AfterDelay(DateTime.Minutes(2), ProduceUSSRInfantry)
Trigger.AfterDelay(DateTime.Minutes(4), ProduceUSSRVehicles)
Trigger.AfterDelay(DateTime.Minutes(8), ProduceBadGuyVehicles)
Trigger.AfterDelay(DateTime.Minutes(10), ProduceAircraft)
Trigger.AfterDelay(DateTime.Minutes(StartBGMammoths), BGMammoths)
Trigger.AfterDelay(DateTime.Minutes(StartUSSRMammoths), USSRMammoths)
end

View File

@@ -0,0 +1,82 @@
--[[
Copyright 2007-2021 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.
]]
OpeningAttack = { StartV2, StartTeam1, StartTeam2, StartTeam3 }
Setup = function()
Utils.Do(USSR.GetGroundAttackers(), function(unit)
Trigger.OnDamaged(unit, function() IdleHunt(unit) end)
end)
Trigger.AfterDelay(DateTime.Seconds(5), function()
Media.PlaySpeechNotification(Allies, "ReinforcementsArrived")
Reinforcements.Reinforce(Allies, { "jeep", "jeep" }, { AlliedReinforcementPoint.Location, DefaultCameraPosition.Location })
Utils.Do(OpeningAttack, function(a)
if not a.IsDead then
a.AttackMove(DefaultCameraPosition.Location)
end
end)
end)
Trigger.AfterDelay(DateTime.Seconds(10), function()
Reinforcements.Reinforce(Allies, { "spy", "e1", "e1", "e1", "e3", "e3", "e3" }, { AlliedReinforcementPoint.Location, DefaultCameraPosition.Location })
end)
Trigger.AfterDelay(DateTime.Seconds(15), function()
Reinforcements.Reinforce(Allies, { "mcv", "2tnk", "2tnk" }, { AlliedReinforcementPoint.Location, DefaultCameraPosition.Location })
end)
Trigger.OnKilled(MoneyBarrel, function()
Actor.Create("moneycrate", true, { Owner = Allies, Location = MoneyBarrel.Location })
end)
end
Tick = function()
USSR.Cash = 50000
BadGuy.Cash = 50000
if Allies.HasNoRequiredUnits() then
USSR.MarkCompletedObjective(SovietObj)
end
if USSR.HasNoRequiredUnits() then
Allies.MarkCompletedObjective(DestroyAll)
end
end
WorldLoaded = function()
Allies = Player.GetPlayer("Allies")
USSR = Player.GetPlayer("USSR")
BadGuy = Player.GetPlayer("BadGuy")
Trigger.OnObjectiveAdded(Allies, function(p, id)
Media.DisplayMessage(p.GetObjectiveDescription(id), "New " .. string.lower(p.GetObjectiveType(id)) .. " objective")
end)
SovietObj = USSR.AddObjective("Stop the Allies")
DestroyAll = Allies.AddObjective("Destroy all Soviet units and structures.")
Trigger.OnObjectiveCompleted(Allies, function(p, id)
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective completed")
end)
Trigger.OnObjectiveFailed(Allies, function(p, id)
Media.DisplayMessage(p.GetObjectiveDescription(id), "Objective failed")
end)
Trigger.OnPlayerLost(Allies, function()
Media.PlaySpeechNotification(Allies, "Lose")
end)
Trigger.OnPlayerWon(Allies, function()
Media.PlaySpeechNotification(Allies, "Win")
end)
Camera.Position = DefaultCameraPosition.CenterPosition
PowerProxy = Actor.Create("paratroopers", false, { Owner = BadGuy })
Setup()
ActivateAI()
end