Initial commit: OpenRA game engine
Some checks failed
Continuous Integration / Linux (.NET 8.0) (push) Has been cancelled
Continuous Integration / Windows (.NET 8.0) (push) Has been cancelled

Fork from OpenRA/OpenRA with one-click launch script (start-ra.cmd)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
let5sne.win10
2026-01-10 21:46:54 +08:00
commit 9cf6ebb986
4065 changed files with 635973 additions and 0 deletions

Binary file not shown.

View File

@@ -0,0 +1,9 @@
## rules.yaml
briefing =
The Allied base in this region is proving to be problematic.
Your mission is to take it out, so that we can move forces through this area.
As long as they have communications they will be able to call upon heavy reinforcements.
Destroy their communications, and the Allies should be easy to remove.

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

View File

@@ -0,0 +1,652 @@
MapFormat: 12
RequiresMod: ra
Title: 04b: Behind the Lines
Author: Westwood Studios
Tileset: SNOW
MapSize: 128,128
Bounds: 28,45,91,49
Visibility: MissionSelector
Categories: Campaign
LockPreview: True
Players:
PlayerReference@Neutral:
Name: Neutral
OwnsWorld: True
NonCombatant: True
Faction: england
PlayerReference@Spain:
Name: Spain
Faction: england
Allies: Greece
Enemies: USSR
Bot: campaign
PlayerReference@Greece:
Name: Greece
Faction: allies
Color: E2E6F5
Allies: Spain
Enemies: USSR
Bot: campaign
PlayerReference@USSR:
Name: USSR
Playable: True
AllowBots: False
Required: True
LockFaction: True
Faction: soviet
LockColor: True
Color: FE1100
LockSpawn: True
LockTeam: True
Enemies: Greece, Spain
Actors:
Helper: proc
Owner: Greece
Location: 92,75
FreeActor: False
Actor0: sbag
Location: 85,50
Owner: Neutral
Actor1: sbag
Location: 86,50
Owner: Neutral
Actor2: sbag
Location: 103,50
Owner: Neutral
Actor3: sbag
Location: 104,50
Owner: Neutral
Actor4: sbag
Location: 105,50
Owner: Neutral
Actor5: sbag
Location: 106,50
Owner: Neutral
Actor6: sbag
Location: 109,50
Owner: Neutral
Actor7: sbag
Location: 110,50
Owner: Neutral
Actor8: sbag
Location: 113,50
Owner: Neutral
Actor9: sbag
Location: 114,50
Owner: Neutral
Actor10: sbag
Location: 85,51
Owner: Neutral
Actor11: sbag
Location: 106,51
Owner: Neutral
Actor12: sbag
Location: 109,51
Owner: Neutral
Actor13: sbag
Location: 114,51
Owner: Neutral
Actor14: sbag
Location: 85,52
Owner: Neutral
Actor15: sbag
Location: 106,52
Owner: Neutral
Actor16: sbag
Location: 109,52
Owner: Neutral
Actor17: sbag
Location: 114,52
Owner: Neutral
Actor18: sbag
Location: 85,53
Owner: Neutral
Actor19: sbag
Location: 106,53
Owner: Neutral
Actor20: sbag
Location: 109,53
Owner: Neutral
Actor21: sbag
Location: 110,53
Owner: Neutral
Actor22: sbag
Location: 113,53
Owner: Neutral
Actor23: sbag
Location: 114,53
Owner: Neutral
Actor24: sbag
Location: 85,54
Owner: Neutral
Actor25: sbag
Location: 106,54
Owner: Neutral
Actor26: sbag
Location: 106,55
Owner: Neutral
Actor27: sbag
Location: 106,56
Owner: Neutral
Actor28: sbag
Location: 106,57
Owner: Neutral
Actor29: sbag
Location: 106,58
Owner: Neutral
Actor30: sbag
Location: 85,59
Owner: Neutral
Actor31: sbag
Location: 106,59
Owner: Neutral
Actor32: sbag
Location: 85,60
Owner: Neutral
Actor33: sbag
Location: 106,60
Owner: Neutral
Actor34: sbag
Location: 85,61
Owner: Neutral
Actor35: sbag
Location: 106,61
Owner: Neutral
Actor36: sbag
Location: 85,62
Owner: Neutral
Actor37: sbag
Location: 101,62
Owner: Neutral
Actor38: sbag
Location: 102,62
Owner: Neutral
Actor39: sbag
Location: 103,62
Owner: Neutral
Actor40: sbag
Location: 104,62
Owner: Neutral
Actor41: sbag
Location: 105,62
Owner: Neutral
Actor42: sbag
Location: 106,62
Owner: Neutral
Actor43: sbag
Location: 85,63
Owner: Neutral
Actor44: sbag
Location: 100,63
Owner: Neutral
Actor45: sbag
Location: 101,63
Owner: Neutral
Actor46: sbag
Location: 85,64
Owner: Neutral
Actor47: sbag
Location: 86,64
Owner: Neutral
Actor48: sbag
Location: 87,64
Owner: Neutral
Actor49: sbag
Location: 88,64
Owner: Neutral
Actor50: sbag
Location: 89,64
Owner: Neutral
Actor51: sbag
Location: 90,64
Owner: Neutral
Actor52: sbag
Location: 97,64
Owner: Neutral
Actor53: sbag
Location: 98,64
Owner: Neutral
Actor54: sbag
Location: 99,64
Owner: Neutral
Actor55: sbag
Location: 100,64
Owner: Neutral
Actor56: t01
Location: 112,62
Owner: Neutral
Actor57: tc01
Location: 109,61
Owner: Neutral
Actor58: tc04
Location: 110,45
Owner: Neutral
Actor59: tc03
Location: 114,45
Owner: Neutral
Actor60: tc05
Location: 99,45
Owner: Neutral
Actor61: tc01
Location: 117,79
Owner: Neutral
Actor62: tc02
Location: 109,79
Owner: Neutral
Actor63: tc01
Location: 113,48
Owner: Neutral
Actor64: tc04
Location: 116,51
Owner: Neutral
Actor65: tc05
Location: 113,53
Owner: Neutral
Actor66: tc02
Location: 109,54
Owner: Neutral
Actor67: tc05
Location: 73,60
Owner: Neutral
Actor68: tc04
Location: 82,63
Owner: Neutral
Actor69: tc01
Location: 77,62
Owner: Neutral
Actor70: tc02
Location: 78,60
Owner: Neutral
Actor71: tc05
Location: 95,66
Owner: Neutral
Actor72: tc03
Location: 86,62
Owner: Neutral
Actor73: tc02
Location: 95,69
Owner: Neutral
Actor74: tc01
Location: 102,62
Owner: Neutral
Actor75: t11
Location: 107,61
Owner: Neutral
Actor76: tc04
Location: 82,49
Owner: Neutral
Actor77: tc04
Location: 50,69
Owner: Neutral
Actor78: tc01
Location: 58,70
Owner: Neutral
Actor79: tc01
Location: 84,89
Owner: Neutral
Actor80: tc04
Location: 94,80
Owner: Neutral
Actor81: tc05
Location: 93,85
Owner: Neutral
Actor82: tc05
Location: 29,55
Owner: Neutral
Actor83: tc03
Location: 39,48
Owner: Neutral
Actor84: tc02
Location: 29,51
Owner: Neutral
Actor85: tc01
Location: 36,56
Owner: Neutral
Actor86: tc04
Location: 42,48
Owner: Neutral
Actor87: t15
Location: 36,50
Owner: Neutral
Actor88: tc05
Location: 48,49
Owner: Neutral
Actor89: tc04
Location: 67,49
Owner: Neutral
Actor90: t17
Location: 71,71
Owner: Neutral
Actor91: tc04
Location: 50,78
Owner: Neutral
Actor92: tc04
Location: 34,65
Owner: Neutral
Actor93: tc04
Location: 57,91
Owner: Neutral
Actor94: tc05
Location: 60,91
Owner: Neutral
Actor95: tc02
Location: 72,90
Owner: Neutral
Actor114: pbox
Location: 89,65
Owner: Greece
Actor115: pbox
Location: 97,65
Owner: Greece
Actor116: pbox
Location: 84,60
Owner: Greece
Actor117: pbox
Location: 84,53
Owner: Greece
Actor118: pbox
Location: 51,71
Owner: Greece
Actor119: pbox
Location: 57,71
Owner: Greece
Actor125: gun
Location: 84,61
Owner: Greece
Facing: 768
Actor126: gun
Location: 97,63
Owner: Greece
Facing: 512
Actor129: 1tnk
Location: 56,71
Owner: Greece
Facing: 384
Actor130: 1tnk
Location: 53,71
Owner: Greece
Facing: 384
Actor135: mcv
Location: 33,90
Owner: USSR
Actor136: 1tnk
Location: 117,62
Owner: Greece
Facing: 384
Actor137: 1tnk
Location: 114,62
Owner: Greece
Facing: 384
Actor138: 2tnk
Location: 111,53
Owner: Greece
Facing: 512
Actor139: 2tnk
Location: 112,53
Owner: Greece
Facing: 512
Actor142: jeep
Location: 74,91
Owner: Greece
Actor143: jeep
Location: 48,49
Owner: Greece
Facing: 640
Actor144: 1tnk
Location: 86,90
Owner: Greece
Facing: 128
Actor145: 1tnk
Location: 96,86
Owner: Greece
Facing: 384
Actor146: 2tnk
Location: 96,47
Owner: Greece
Facing: 640
Actor148: e1
Location: 76,57
Owner: Greece
SubCell: 0
Actor149: e1
Location: 77,58
Owner: Greece
SubCell: 2
Actor150: e1
Location: 76,58
Owner: Greece
SubCell: 0
Actor151: e3
Location: 73,58
Owner: Greece
SubCell: 0
Actor152: e3
Location: 72,57
Owner: Greece
SubCell: 4
Actor153: e3
Location: 72,58
Owner: Greece
SubCell: 2
Actor154: e3
Location: 95,80
Owner: Greece
SubCell: 3
Actor155: e3
Location: 96,80
Owner: Greece
SubCell: 0
Actor160: dog
Location: 33,86
Owner: USSR
SubCell: 1
Actor161: dog
Location: 34,86
Owner: USSR
SubCell: 1
Actor162: dog
Location: 33,85
Owner: USSR
SubCell: 1
Actor163: dog
Location: 34,85
Owner: USSR
SubCell: 1
Actor164: e3
Location: 102,53
Owner: Greece
SubCell: 1
Actor165: e3
Location: 95,52
Owner: Greece
SubCell: 0
Actor166: e3
Location: 102,57
Owner: Greece
SubCell: 0
Actor167: mine
Location: 37,55
Owner: Neutral
Actor168: mine
Location: 52,88
Owner: Neutral
Actor169: mine
Location: 91,87
Owner: Neutral
RadarDome: dome
Location: 111,50
Owner: Greece
Pbox1: pbox
Location: 111,80
Owner: Greece
Pbox2: pbox
Location: 116,80
Owner: Greece
NavyYard: syrd
Location: 78,65
Owner: Greece
CYard: fact
Location: 103,51
Owner: Greece
Proc: proc
Location: 99,54
Owner: Greece
FreeActor: False
Silo1: silo
Location: 104,55
Owner: Greece
Silo2: silo
Location: 104,56
Owner: Greece
Silo3: silo
Location: 105,56
Owner: Greece
Silo4: silo
Location: 105,55
Owner: Greece
Powr: powr
Location: 100,50
Owner: Greece
Powr2: powr
Location: 88,61
Owner: Greece
Powr3: powr
Location: 96,50
Owner: Greece
Powr4: powr
Location: 86,52
Owner: Greece
Powr5: powr
Location: 89,51
Owner: Greece
Powr6: powr
Location: 98,50
Owner: Greece
Barr: tent
Location: 96,54
Owner: Greece
Gap1: gap
Location: 86,51
Owner: Greece
Gap2: gap
Location: 90,63
Owner: Greece
Weap: weap
Location: 92,50
Owner: Greece
village1: v01
Location: 37,48
Owner: Spain
village2: v03
Location: 42,47
Owner: Spain
village3: v05
Location: 44,50
Owner: Spain
village4: v06
Location: 40,50
Owner: Spain
village5: v07
Location: 36,52
Owner: Spain
Harvester: harv
Location: 93,78
Owner: Greece
Facing: 512
Tank1: 3tnk
Location: 32,87
Owner: USSR
Tank2: 3tnk
Location: 34,87
Owner: USSR
Tank3: v2rl
Location: 32,88
Owner: USSR
Tank4: v2rl
Location: 34,88
Owner: USSR
civ1: c1
Location: 41,53
Owner: Spain
Facing: 640
SubCell: 0
civ2: c2
Location: 47,49
Owner: Spain
Facing: 896
SubCell: 1
civ3: c3
Location: 39,51
Owner: Spain
SubCell: 2
civ4: c4
Location: 46,52
Owner: Spain
Facing: 384
SubCell: 4
Guard1: 1tnk
Location: 105,59
Owner: Greece
Facing: 256
Guard2: 1tnk
Location: 105,60
Owner: Greece
Facing: 256
Guard3: 2tnk
Location: 105,61
Owner: Greece
Facing: 256
NRoadPoint: waypoint
Location: 75,45
Owner: Neutral
CrossroadsPoint: waypoint
Location: 74,57
Owner: Neutral
VillagePoint: waypoint
Location: 40,58
Owner: Neutral
ToVillageRoadPoint: waypoint
Location: 52,57
Owner: Neutral
InBasePoint: waypoint
Location: 94,57
Owner: Neutral
OrefieldSouthPoint: waypoint
Location: 91,84
Owner: Neutral
ToBridgePoint: waypoint
Location: 66,66
Owner: Neutral
ToRadarBridgePoint: waypoint
Location: 107,88
Owner: Neutral
IslandPoint: waypoint
Location: 113,75
Owner: Neutral
EntranceSouthPoint: waypoint
Location: 93,67
Owner: Neutral
GreeceCYard: waypoint
Location: 104,52
Owner: Neutral
VillageCamPoint: waypoint
Location: 43,52
Owner: Neutral
StartCamPoint: waypoint
Location: 33,88
Owner: Neutral
Rules: ra|rules/campaign-rules.yaml, ra|rules/campaign-tooltips.yaml, ra|rules/campaign-palettes.yaml, rules.yaml
FluentMessages: ra|fluent/lua.ftl, ra|fluent/campaign.ftl, map.ftl

View File

@@ -0,0 +1,84 @@
Player:
PlayerResources:
DefaultCash: 5000
World:
LuaScript:
Scripts: campaign.lua, utils.lua, soviet04b.lua, soviet04b-AI.lua, soviet04b-reinforcements_teams.lua
MissionData:
Briefing: briefing
BriefingVideo: soviet4.vqa
StartVideo: sovmcv.vqa
WinVideo: radrraid.vqa
LossVideo: allymorf.vqa
MapOptions:
TechLevel: medium
ScriptLobbyDropdown@difficulty:
ID: difficulty
Label: dropdown-difficulty.label
Description: dropdown-difficulty.description
Values:
easy: options-difficulty.easy
normal: options-difficulty.normal
hard: options-difficulty.hard
Default: normal
AFLD:
ParatroopersPower@paratroopers:
DropItems: E1,E1,E1,E2,E2
TSLA:
Buildable:
Prerequisites: ~disabled
SAM:
Buildable:
Prerequisites: ~disabled
HPAD:
Buildable:
Prerequisites: ~disabled
APWR:
Buildable:
Prerequisites: ~disabled
BRIK:
Buildable:
Prerequisites: ~disabled
E3:
Buildable:
Prerequisites: ~tent
E4:
Buildable:
Prerequisites: ~disabled
THF:
Buildable:
Prerequisites: ~disabled
SPY:
Buildable:
Prerequisites: ~disabled
MECH:
Buildable:
Prerequisites: ~disabled
MCV:
Buildable:
Prerequisites: ~disabled
FTRK:
Buildable:
Prerequisites: ~disabled
APC:
Buildable:
Prerequisites: ~disabled
AGUN:
Buildable:
Prerequisites: ~disabled

View File

@@ -0,0 +1,116 @@
--[[
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.
]]
IdlingUnits = function()
local lazyUnits = Greece.GetGroundAttackers()
Utils.Do(lazyUnits, function(unit)
Trigger.OnDamaged(unit, function()
Trigger.ClearAll(unit)
Trigger.AfterDelay(0, function() IdleHunt(unit) end)
end)
end)
end
BasePower = { type = "powr", pos = CVec.New(-4, -2), cost = 300, exists = true }
BaseBarracks = { type = "tent", pos = CVec.New(-8, 1), cost = 400, exists = true }
BaseProc = { type = "proc", pos = CVec.New(-5, 1), cost = 1400, exists = true }
BaseWeaponsFactory = { type = "weap", pos = CVec.New(-12, -1), cost = 2000, exists = true }
BaseBuildings = { BasePower, BaseBarracks, BaseProc, BaseWeaponsFactory }
BuildBase = function()
for i,v in ipairs(BaseBuildings) do
if not v.exists then
BuildBuilding(v)
return
end
end
Trigger.AfterDelay(DateTime.Seconds(10), BuildBase)
end
BuildBuilding = function(building)
Trigger.AfterDelay(Actor.BuildTime(building.type), function()
if CYard.IsDead or CYard.Owner ~= Greece then
return
elseif Harvester.IsDead and Greece.Resources <= 299 then
return
end
local actor = Actor.Create(building.type, true, { Owner = Greece, Location = GreeceCYard.Location + building.pos })
Greece.Cash = Greece.Cash - building.cost
building.exists = true
Trigger.OnKilled(actor, function() building.exists = false end)
Trigger.OnDamaged(actor, function(building)
if building.Owner == Greece and building.Health < building.MaxHealth * 3/4 then
building.StartBuildingRepairs()
end
end)
Trigger.AfterDelay(DateTime.Seconds(10), BuildBase)
end)
end
ProduceInfantry = function()
if not BaseBarracks.exists then
return
elseif Harvester.IsDead and Greece.Resources <= 299 then
return
end
local delay = Utils.RandomInteger(DateTime.Seconds(3), DateTime.Seconds(9))
local toBuild = { Utils.Random(AlliedInfantryTypes) }
local Path = Utils.Random(AttackPaths)
Greece.Build(toBuild, function(unit)
InfAttack[#InfAttack + 1] = unit[1]
if #InfAttack >= 10 then
SendUnits(InfAttack, Path)
InfAttack = { }
Trigger.AfterDelay(DateTime.Minutes(2), ProduceInfantry)
else
Trigger.AfterDelay(delay, ProduceInfantry)
end
end)
end
ProduceArmor = function()
if not BaseWeaponsFactory.exists then
return
elseif Harvester.IsDead and Greece.Resources <= 599 then
return
end
local delay = Utils.RandomInteger(DateTime.Seconds(12), DateTime.Seconds(17))
local toBuild = { Utils.Random(AlliedArmorTypes) }
local Path = Utils.Random(AttackPaths)
Greece.Build(toBuild, function(unit)
ArmorAttack[#ArmorAttack + 1] = unit[1]
if #ArmorAttack >= 6 then
SendUnits(ArmorAttack, Path)
ArmorAttack = { }
Trigger.AfterDelay(DateTime.Minutes(3), ProduceArmor)
else
Trigger.AfterDelay(delay, ProduceArmor)
end
end)
end
SendUnits = function(units, waypoints)
Utils.Do(units, function(unit)
if not unit.IsDead then
Utils.Do(waypoints, function(waypoint)
unit.AttackMove(waypoint.Location)
end)
unit.Hunt()
end
end)
end

View File

@@ -0,0 +1,96 @@
--[[
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.
]]
Civs = { civ1, civ2, civ3, civ4 }
Village = { civ1, civ3, civ4, village1, village3 }
Guards = { Guard1, Guard2, Guard3 }
SovietMCV = { "mcv" }
InfantryReinfGreece = { "e1", "e1", "e1", "e1", "e1" }
Avengers = { "jeep", "1tnk", "2tnk", "2tnk", "1tnk" }
Patrol1Group = { "jeep", "jeep", "2tnk", "2tnk" }
Patrol2Group = { "jeep", "1tnk", "1tnk", "1tnk" }
AlliedInfantryTypes = { "e1", "e3" }
AlliedArmorTypes = { "jeep", "jeep", "1tnk", "1tnk", "1tnk" }
InfAttack = { }
ArmorAttack = { }
InfReinfPath = { NRoadPoint.Location, CrossroadsPoint.Location, ToVillageRoadPoint.Location, VillagePoint.Location }
Patrol1Path = { ToVillageRoadPoint.Location, ToBridgePoint.Location, InBasePoint.Location }
Patrol2Path = { EntranceSouthPoint.Location, ToRadarBridgePoint.Location, IslandPoint.Location, ToRadarBridgePoint.Location }
VillageCamArea = { CPos.New(37, 58),CPos.New(37, 59),CPos.New(37, 60),CPos.New(38, 60),CPos.New(39, 60), CPos.New(40, 60), CPos.New(41, 60), CPos.New(35, 57), CPos.New(34, 57), CPos.New(33, 57), CPos.New(32, 57) }
if Difficulty == "easy" then
ArmorReinfGreece = { "jeep", "1tnk", "1tnk" }
else
ArmorReinfGreece = { "jeep", "jeep", "1tnk", "1tnk", "1tnk" }
end
AttackPaths =
{
{ CrossroadsPoint, ToVillageRoadPoint, VillagePoint },
{ EntranceSouthPoint, OrefieldSouthPoint },
{ CrossroadsPoint, ToBridgePoint }
}
ReinfInf = function()
if RadarDome.IsDead or RadarDome.Owner ~= Greece then
return
end
Reinforcements.Reinforce(Greece, InfantryReinfGreece, InfReinfPath, 0, function(soldier)
soldier.Hunt()
end)
end
ReinfArmor = function()
if not RadarDome.IsDead and RadarDome.Owner == Greece then
RCheck = true
Reinforcements.Reinforce(Greece, ArmorReinfGreece, InfReinfPath, 0, function(soldier)
soldier.Hunt()
end)
end
end
BringPatrol1 = function()
if RadarDome.IsDead or RadarDome.Owner ~= Greece then
return
end
local units = Reinforcements.Reinforce(Greece, Patrol1Group, { NRoadPoint.Location }, 0)
Utils.Do(units, function(patrols)
patrols.Patrol(Patrol1Path, true, 250)
end)
Trigger.OnAllKilled(units, function()
if Difficulty == "hard" then
Trigger.AfterDelay(DateTime.Minutes(4), BringPatrol1)
else
Trigger.AfterDelay(DateTime.Minutes(7), BringPatrol1)
end
end)
end
BringPatrol2 = function()
if RadarDome.IsDead or RadarDome.Owner ~= Greece then
return
end
local units = Reinforcements.Reinforce(Greece, Patrol2Group, { NRoadPoint.Location }, 0)
Utils.Do(units, function(patrols)
patrols.Patrol(Patrol2Path, true, 250)
end)
Trigger.OnAllKilled(units, function()
if Difficulty == "hard" then
Trigger.AfterDelay(DateTime.Minutes(4), BringPatrol2)
else
Trigger.AfterDelay(DateTime.Minutes(7), BringPatrol2)
end
end)
end

View File

@@ -0,0 +1,140 @@
--[[
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.
]]
RunInitialActivities = function()
Harvester.FindResources()
Helper.Destroy()
IdlingUnits()
Trigger.AfterDelay(DateTime.Seconds(1), function()
BringPatrol1()
Trigger.AfterDelay(DateTime.Seconds(5), function()
BringPatrol2()
end)
BuildBase()
end)
Utils.Do(Map.NamedActors, function(actor)
if actor.Owner == Greece and actor.HasProperty("StartBuildingRepairs") then
Trigger.OnDamaged(actor, function(building)
if building.Owner == Greece and building.Health < 3/4 * building.MaxHealth then
building.StartBuildingRepairs()
end
end)
end
end)
Trigger.OnKilled(Powr, function()
BasePower.exists = false
end)
Trigger.OnKilled(Barr, function()
BaseBarracks.exists = false
end)
Trigger.OnKilled(Proc, function()
BaseProc.exists = false
end)
Trigger.OnKilled(Weap, function()
BaseWeaponsFactory.exists = false
end)
Trigger.OnEnteredFootprint(VillageCamArea, function(actor, id)
if actor.Owner == USSR then
Trigger.RemoveFootprintTrigger(id)
if not AllVillagersDead then
VillageCamera = Actor.Create("camera", true, { Owner = USSR, Location = VillagePoint.Location })
end
end
end)
Trigger.OnAllKilled(Village, function()
if VillageCamera then
VillageCamera.Destroy()
end
AllVillagersDead = true
end)
Trigger.OnAnyKilled(Civs, function()
Trigger.ClearAll(civ1)
Trigger.ClearAll(civ2)
Trigger.ClearAll(civ3)
Trigger.ClearAll(civ4)
local units = Reinforcements.Reinforce(Greece, Avengers, { NRoadPoint.Location }, 0)
Utils.Do(units, function(unit)
unit.Hunt()
end)
end)
Trigger.AfterDelay(DateTime.Minutes(1), ProduceInfantry)
Trigger.AfterDelay(DateTime.Minutes(2), ProduceArmor)
if Difficulty == "hard" or Difficulty == "normal" then
Trigger.AfterDelay(DateTime.Seconds(5), ReinfInf)
end
Trigger.AfterDelay(DateTime.Minutes(1), ReinfInf)
Trigger.AfterDelay(DateTime.Minutes(3), ReinfInf)
Trigger.AfterDelay(DateTime.Minutes(2), ReinfArmor)
end
Tick = function()
if Greece.HasNoRequiredUnits() then
USSR.MarkCompletedObjective(KillAll)
USSR.MarkCompletedObjective(KillRadar)
end
if USSR.HasNoRequiredUnits() then
Greece.MarkCompletedObjective(BeatUSSR)
end
if Greece.Resources >= Greece.ResourceCapacity * 0.75 then
Greece.Cash = Greece.Cash + Greece.Resources - Greece.ResourceCapacity * 0.25
Greece.Resources = Greece.ResourceCapacity * 0.25
end
if RCheck then
RCheck = false
if Difficulty == "hard" then
Trigger.AfterDelay(DateTime.Seconds(150), ReinfArmor)
elseif Difficulty == "normal" then
Trigger.AfterDelay(DateTime.Minutes(5), ReinfArmor)
else
Trigger.AfterDelay(DateTime.Minutes(8), ReinfArmor)
end
end
end
WorldLoaded = function()
USSR = Player.GetPlayer("USSR")
Greece = Player.GetPlayer("Greece")
RunInitialActivities()
InitObjectives(USSR)
KillAll = AddPrimaryObjective(USSR, "defeat-allied-forces")
BeatUSSR = AddPrimaryObjective(Greece, "")
KillRadar = AddSecondaryObjective(USSR, "destroy-radar-dome-reinforcements")
Trigger.OnKilled(RadarDome, function()
USSR.MarkCompletedObjective(KillRadar)
Media.PlaySpeechNotification(USSR, "ObjectiveMet")
end)
Trigger.OnDamaged(Harvester, function()
Utils.Do(Guards, function(unit)
if not unit.IsDead and not Harvester.IsDead then
unit.AttackMove(Harvester.Location)
end
end)
end)
Camera.Position = StartCamPoint.CenterPosition
end