1--[[
2   Copyright 2007-2020 The OpenRA Developers (see AUTHORS)
3   This file is part of OpenRA, which is free software. It is made
4   available to you under the terms of the GNU General Public License
5   as published by the Free Software Foundation, either version 3 of
6   the License, or (at your option) any later version. For more
7   information, see COPYING.
8]]
9Civs = { civ1, civ2, civ3, civ4 }
10Village = { civ1, civ3, civ4, village1, village3 }
11Guards = { Guard1, Guard2, Guard3 }
12SovietMCV = { "mcv" }
13InfantryReinfGreece = { "e1", "e1", "e1", "e1", "e1" }
14Avengers = { "jeep", "1tnk", "2tnk", "2tnk", "1tnk" }
15Patrol1Group = { "jeep", "jeep", "2tnk", "2tnk" }
16Patrol2Group = { "jeep", "1tnk", "1tnk", "1tnk" }
17AlliedInfantryTypes = { "e1", "e3" }
18AlliedArmorTypes = { "jeep", "jeep", "1tnk", "1tnk", "1tnk" }
19InfAttack = { }
20ArmorAttack = { }
21
22InfReinfPath = { NRoadPoint.Location, CrossroadsPoint.Location, ToVillageRoadPoint.Location, VillagePoint.Location }
23Patrol1Path = { ToVillageRoadPoint.Location, ToBridgePoint.Location, InBasePoint.Location }
24Patrol2Path = { EntranceSouthPoint.Location, ToRadarBridgePoint.Location, IslandPoint.Location, ToRadarBridgePoint.Location }
25
26VillageCamArea = { 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) }
27
28if Map.LobbyOption("difficulty") == "easy" then
29	ArmorReinfGreece = { "jeep", "1tnk", "1tnk" }
30else
31	ArmorReinfGreece = { "jeep", "jeep", "1tnk", "1tnk", "1tnk" }
32end
33
34AttackPaths =
35{
36	{ CrossroadsPoint, ToVillageRoadPoint, VillagePoint },
37	{ EntranceSouthPoint, OrefieldSouthPoint },
38	{ CrossroadsPoint, ToBridgePoint }
39}
40
41ReinfInf = function()
42	if RadarDome.IsDead or RadarDome.Owner ~= Greece then
43		return
44	end
45
46	Reinforcements.Reinforce(Greece, InfantryReinfGreece, InfReinfPath, 0, function(soldier)
47		soldier.Hunt()
48	end)
49end
50
51ReinfArmor = function()
52	if not RadarDome.IsDead and RadarDome.Owner == Greece then
53		RCheck = true
54		Reinforcements.Reinforce(Greece, ArmorReinfGreece, InfReinfPath, 0, function(soldier)
55			soldier.Hunt()
56		end)
57	end
58end
59
60BringPatrol1 = function()
61	if RadarDome.IsDead or RadarDome.Owner ~= Greece then
62		return
63	end
64
65	local units = Reinforcements.Reinforce(Greece, Patrol1Group, { NRoadPoint.Location }, 0)
66	Utils.Do(units, function(patrols)
67		patrols.Patrol(Patrol1Path, true, 250)
68	end)
69
70	Trigger.OnAllKilled(units, function()
71		if Map.LobbyOption("difficulty") == "hard" then
72			Trigger.AfterDelay(DateTime.Minutes(4), BringPatrol1)
73		else
74			Trigger.AfterDelay(DateTime.Minutes(7), BringPatrol1)
75		end
76	end)
77end
78
79BringPatrol2 = function()
80	if RadarDome.IsDead or RadarDome.Owner ~= Greece then
81		return
82	end
83
84	local units = Reinforcements.Reinforce(Greece, Patrol2Group, { NRoadPoint.Location }, 0)
85	Utils.Do(units, function(patrols)
86		patrols.Patrol(Patrol2Path, true, 250)
87	end)
88
89	Trigger.OnAllKilled(units, function()
90		if Map.LobbyOption("difficulty") == "hard" then
91			Trigger.AfterDelay(DateTime.Minutes(4), BringPatrol2)
92		else
93			Trigger.AfterDelay(DateTime.Minutes(7), BringPatrol2)
94		end
95	end)
96end
97