Skip to content

Commit 77e795c

Browse files
committed
Merge pull request OpenRA#10244 from abcdefg30/prep-fort-lonestar
Fix and rebalance Fort Lonestar - prep-1512 version
2 parents 94f800d + 808baa6 commit 77e795c

File tree

2 files changed

+213
-246
lines changed

2 files changed

+213
-246
lines changed
Lines changed: 133 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -1,138 +1,157 @@
1-
Patrol = { "e1", "e2", "e1" }
2-
Infantry = { "e4", "e1", "e1", "e2", "e1", "e2" }
3-
Vehicles = { "arty", "ftrk", "ftrk", "apc", "apc" }
4-
Tank = { "3tnk" }
5-
LongRange = { "v2rl" }
6-
Boss = { "4tnk" }
71

82
SovietEntryPoints = { Entry1, Entry2, Entry3, Entry4, Entry5, Entry6, Entry7, Entry8 }
93
PatrolWaypoints = { Entry2, Entry4, Entry6, Entry8 }
104
ParadropWaypoints = { Paradrop1, Paradrop2, Paradrop3, Paradrop4 }
11-
OilDerricks = { OilDerrick1, OilDerrick2, OilDerrick3, OilDerrick4 }
125
SpawnPoints = { Spawn1, Spawn2, Spawn3, Spawn4 }
136
Snipers = { Sniper1, Sniper2, Sniper3, Sniper4, Sniper5, Sniper6, Sniper7, Sniper8, Sniper9, Sniper10, Sniper11, Sniper12 }
147

8+
if Map.Difficulty == "Very Easy (1P)" then
9+
ParaChance = 20
10+
Patrol = { "e1", "e2", "e1" }
11+
Infantry = { "e4", "e1", "e1", "e2", "e2" }
12+
Vehicles = { "apc" }
13+
Tank = { "3tnk" }
14+
LongRange = { "arty" }
15+
Boss = { "v2rl" }
16+
Swarm = { "shok", "shok", "shok" }
17+
elseif Map.Difficulty == "Easy (2P)" then
18+
ParaChance = 25
19+
Patrol = { "e1", "e2", "e1" }
20+
Infantry = { "e4", "e1", "e1", "e2", "e1", "e2", "e1" }
21+
Vehicles = { "ftrk", "apc", "arty" }
22+
Tank = { "3tnk" }
23+
LongRange = { "v2rl" }
24+
Boss = { "4tnk" }
25+
Swarm = { "shok", "shok", "shok", "shok", "ttnk" }
26+
elseif Map.Difficulty == "Normal (3P)" then
27+
ParaChance = 30
28+
Patrol = { "e1", "e2", "e1", "e1" }
29+
Infantry = { "e4", "e1", "e1", "e2", "e1", "e2", "e1" }
30+
Vehicles = { "ftrk", "ftrk", "apc", "arty" }
31+
Tank = { "3tnk" }
32+
LongRange = { "v2rl" }
33+
Boss = { "4tnk" }
34+
Swarm = { "shok", "shok", "shok", "shok", "ttnk", "ttnk", "ttnk" }
35+
elseif Map.Difficulty == "Hard (4P)" then
36+
ParaChance = 35
37+
Patrol = { "e1", "e2", "e1", "e1", "e4" }
38+
Infantry = { "e4", "e1", "e1", "e2", "e1", "e2", "e1" }
39+
Vehicles = { "arty", "ftrk", "ftrk", "apc", "apc" }
40+
Tank = { "3tnk" }
41+
LongRange = { "v2rl" }
42+
Boss = { "4tnk" }
43+
Swarm = { "shok", "shok", "shok", "shok", "shok", "ttnk", "ttnk", "ttnk", "ttnk" }
44+
else
45+
ParaChance = 40
46+
Patrol = { "e1", "e2", "e1", "e1", "e4", "e4" }
47+
Infantry = { "e4", "e1", "e1", "e2", "e1", "e2", "e1", "e1" }
48+
Vehicles = { "arty", "arty", "ftrk", "apc", "apc" }
49+
Tank = { "ftrk", "3tnk" }
50+
LongRange = { "v2rl" }
51+
Boss = { "4tnk" }
52+
Swarm = { "shok", "shok", "shok", "shok", "shok", "shok", "ttnk", "ttnk", "ttnk", "ttnk", "ttnk" }
53+
end
54+
1555
Wave = 0
1656
Waves =
1757
{
18-
{ delay = 500, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
19-
20-
{ delay = 750, entries = PatrolWaypoints, units = Patrol, targets = ParadropWaypoints },
21-
22-
{ delay = 750, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
23-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
24-
{ delay = 1, entries = SovietEntryPoints, units = Vehicles, targets = SpawnPoints },
25-
26-
{ delay = 1500, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
27-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
28-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
29-
30-
{ delay = 1500, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
31-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
32-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
33-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
34-
{ delay = 1, entries = SovietEntryPoints, units = Vehicles, targets = SpawnPoints },
35-
36-
{ delay = 1500, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
37-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
38-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
39-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
40-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
41-
{ delay = 1, entries = SovietEntryPoints, units = Tank, targets = SpawnPoints },
42-
{ delay = 1, entries = SovietEntryPoints, units = Vehicles, targets = SpawnPoints },
43-
44-
{ delay = 1500, entries = SovietEntryPoints, Infantry, targets = SpawnPoints },
45-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
46-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
47-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
48-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
49-
{ delay = 1, entries = SovietEntryPoints, units = Tank, targets = SpawnPoints },
50-
{ delay = 1, entries = SovietEntryPoints, units = Tank, targets = SpawnPoints },
51-
52-
{ delay = 1500, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
53-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
54-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
55-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
56-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
57-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
58-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
59-
{ delay = 1, entries = SovietEntryPoints, units = LongRange, targets = SpawnPoints },
60-
61-
{ delay = 1500, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
62-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
63-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
64-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
65-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
66-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
67-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
68-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
69-
{ delay = 1, entries = SovietEntryPoints, units = LongRange, targets = SpawnPoints },
70-
{ delay = 1, entries = SovietEntryPoints, units = Tank, targets = SpawnPoints },
71-
{ delay = 1, entries = SovietEntryPoints, units = LongRange, targets = SpawnPoints },
72-
73-
{ delay = 1500, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
74-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
75-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
76-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
77-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
78-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
79-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
80-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
81-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
82-
{ delay = 1, entries = SovietEntryPoints, units = LongRange, targets = SpawnPoints },
83-
{ delay = 1, entries = SovietEntryPoints, units = LongRange, targets = SpawnPoints },
84-
{ delay = 1, entries = SovietEntryPoints, units = Tank, targets = SpawnPoints },
85-
{ delay = 1, entries = SovietEntryPoints, units = Tank, targets = SpawnPoints },
86-
{ delay = 1, entries = SovietEntryPoints, units = Vehicles, targets = SpawnPoints },
87-
88-
{ delay = 1500, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
89-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
90-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
91-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
92-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
93-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
94-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
95-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
96-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
97-
{ delay = 1, entries = SovietEntryPoints, units = Infantry, targets = SpawnPoints },
98-
{ delay = 1, entries = SovietEntryPoints, units = Boss, targets = SpawnPoints }
58+
{ delay = 500, units = { Infantry } },
59+
{ delay = 500, units = { Patrol, Patrol } },
60+
{ delay = 700, units = { Infantry, Infantry, Vehicles }, },
61+
{ delay = 1500, units = { Infantry, Infantry, Infantry, Infantry } },
62+
{ delay = 1500, units = { Infantry, Infantry, Patrol, Vehicles } },
63+
{ delay = 1500, units = { Infantry, Infantry, Patrol, Infantry, Tank, Vehicles } },
64+
{ delay = 1500, units = { Infantry, Infantry, Patrol, Infantry, Tank, Tank, Swarm } },
65+
{ delay = 1500, units = { Infantry, Infantry, Patrol, Infantry, Infantry, Infantry, LongRange } },
66+
{ delay = 1500, units = { Infantry, Infantry, Patrol, Infantry, Infantry, Infantry, Infantry, LongRange, Tank, LongRange } },
67+
{ delay = 1500, units = { Infantry, Infantry, Patrol, Infantry, Infantry, Infantry, Infantry, Infantry, LongRange, LongRange, Tank, Tank, Vehicles } },
68+
{ delay = 1500, units = { Infantry, Infantry, Patrol, Infantry, Infantry, Infantry, Infantry, Infantry, Infantry, Boss, Swarm } }
9969
}
10070

101-
SendUnits = function(entryCell, unitTypes, interval, targetCell)
102-
Reinforcements.Reinforce(soviets, unitTypes, { entryCell }, interval, function(a)
71+
-- Now do some adjustments to the waves
72+
if Map.Difficulty == "Real tough guy" or Map.Difficulty == "Endless mode" then
73+
Waves[8] = { delay = 1500, units = { Infantry, Infantry, Patrol, Infantry, Infantry, Infantry }, ironUnits = { LongRange } }
74+
Waves[9] = { delay = 1500, units = { Infantry, Infantry, Patrol, Infantry, Infantry, Infantry, Infantry, Infantry, LongRange, LongRange, Vehicles, Tank }, ironUnits = { Tank } }
75+
Waves[11] = { delay = 1500, units = { Vehicles, Infantry, Patrol, Patrol, Patrol, Infantry, LongRange, Tank, Boss, Infantry, Infantry, Patrol } }
76+
end
77+
78+
SendUnits = function(entryCell, unitTypes, targetCell, extraData)
79+
Reinforcements.Reinforce(soviets, unitTypes, { entryCell }, 40, function(a)
80+
if not a.HasProperty("AttackMove") then
81+
Trigger.OnIdle(a, function(a)
82+
a.Move(targetCell)
83+
end)
84+
return
85+
end
86+
10387
Trigger.OnIdle(a, function(a)
10488
if a.Location ~= targetCell then
10589
a.AttackMove(targetCell)
10690
else
10791
a.Hunt()
10892
end
10993
end)
110-
end)
11194

112-
if (Wave < #Waves) then
113-
SendWave()
114-
else
115-
Trigger.AfterDelay(DateTime.Minutes(2), SovietsRetreating)
116-
Media.DisplayMessage("You survived the onslaught! No more waves incoming.")
117-
end
95+
if extraData == "IronCurtain" then
96+
a.GrantUpgrade("invulnerability")
97+
Trigger.AfterDelay(DateTime.Seconds(25), function()
98+
a.RevokeUpgrade("invulnerability")
99+
end)
100+
end
101+
end)
118102
end
119103

120104
SendWave = function()
121105
Wave = Wave + 1
122106
local wave = Waves[Wave]
123107

124-
local entry = Utils.Random(wave.entries).Location
125-
local target = Utils.Random(wave.targets).Location
126-
127108
Trigger.AfterDelay(wave.delay, function()
128-
SendUnits(entry, wave.units, 40, target)
109+
Utils.Do(wave.units, function(units)
110+
local entry = Utils.Random(SovietEntryPoints).Location
111+
local target = Utils.Random(SpawnPoints).Location
112+
113+
SendUnits(entry, units, target)
114+
end)
115+
116+
if wave.ironUnits then
117+
Utils.Do(wave.ironUnits, function(units)
118+
local entry = Utils.Random(SovietEntryPoints).Location
119+
local target = Utils.Random(SpawnPoints).Location
129120

130-
if not played then
131-
played = true
132-
Utils.Do(players, function(player)
133-
Media.PlaySpeechNotification(player, "EnemyUnitsApproaching")
121+
SendUnits(entry, units, target, "IronCurtain")
134122
end)
135-
Trigger.AfterDelay(DateTime.Seconds(1), function() played = false end)
123+
end
124+
125+
Utils.Do(players, function(player)
126+
Media.PlaySpeechNotification(player, "EnemyUnitsApproaching")
127+
end)
128+
129+
if (Wave < #Waves) then
130+
if Utils.RandomInteger(1, 100) < ParaChance then
131+
local units = ParaProxy.SendParatroopers(Utils.Random(ParadropWaypoints).CenterPosition)
132+
Utils.Do(units, function(unit)
133+
Trigger.OnIdle(unit, function(a)
134+
if a.IsInWorld then
135+
a.Hunt()
136+
end
137+
end)
138+
end)
139+
140+
local delay = Utils.RandomInteger(DateTime.Seconds(20), DateTime.Seconds(45))
141+
Trigger.AfterDelay(delay, SendWave)
142+
else
143+
SendWave()
144+
end
145+
else
146+
if Map.Difficulty == "Endless mode" then
147+
Wave = 0
148+
IncreaseDifficulty()
149+
SendWave()
150+
return
151+
end
152+
153+
Trigger.AfterDelay(DateTime.Minutes(1), SovietsRetreating)
154+
Media.DisplayMessage("You almost survived the onslaught! No more waves incoming.")
136155
end
137156
end)
138157
end
@@ -145,6 +164,13 @@ SovietsRetreating = function()
145164
end)
146165
end
147166

167+
IncreaseDifficulty = function()
168+
local additions = { Infantry, Patrol, Vehicles, Tank, LongRange, Boss, Swarm }
169+
Utils.Do(Waves, function(wave)
170+
wave.units[#wave.units + 1] = Utils.Random(additions)
171+
end)
172+
end
173+
148174
Tick = function()
149175
if (Utils.RandomInteger(1, 200) == 10) then
150176
local delay = Utils.RandomInteger(1, 10)
@@ -166,13 +192,8 @@ WorldLoaded = function()
166192
players[i] = player
167193
end
168194

169-
Utils.Do(Snipers, function(a)
170-
if a.Owner == soviets then
171-
a.GrantUpgrade("unkillable")
172-
end
173-
end)
174-
175195
Media.DisplayMessage("Defend Fort Lonestar at all costs!")
176196

197+
ParaProxy = Actor.Create("powerproxy.paratroopers", false, { Owner = soviets })
177198
SendWave()
178199
end

0 commit comments

Comments
 (0)