-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBattlegrounds.lua
288 lines (247 loc) · 10.1 KB
/
Battlegrounds.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
-- Load the different data for each battlegrounds supported, like the strategies
-- available, or the maximum numbers of people in the battleground.
function loadBattlegrounds()
print("Battlegrounds loaded!");
-- Alterac Valley
AV = {
-- Second element, the max number of players
playersNum = 40, -- Anti Magic Numbers
title = "Alterac Valley",
nick = "AV",
-- First element, the possible strategies
strategy = {
{ title = "BackCap",
roles = {
{4, "Assaulters",
"Must capture the Alliance Graveyards up to Aid Station and kill Vann"},
{2, "Backcappers",
"Must destroy the 2 Stoneheart towers, once destroyed must help Defense"},
{2, "Defenders",
"Must prevent the destruction of Tower Point and Iceblood Tower, then defend the base"}
},
group = true,
bg = "Alterac Valley"
},
{ title = "Galv",
roles = {
{3, "War on Galv",
"Must defend Galv, if Galv dies then help offense up to Vann"},
{3, "Assaulters",
"Must capture the Alliance Graveyards up to Aid Station and kill Vann"},
{2, "Grave Robbers",
"Must capture as much graveyard as possible, with those closest to the base in priority"}
},
group = true,
bg = "Alterac Valley"
},
{ title = "ZERG!!!",
roles = {
{5, "Assaulters",
"Must mindlessly get to Aid Station, bypassing towers and capturing Stormpike and Aid Station GY"},
{2, "Defenders",
"Must regroup and defend Frostwolf base, with the graveyard in priority, most important role of the strategy"},
{1, "Stormpike GY Defenders",
"Must assault Stormpike Graveyard and defend it until captured"}
},
group = true,
bg = "Alterac Valley"
}
}
};
-- Isle Of Conquest
IoC = {
playersNum = 40,
title = "Isle of Conquest",
nick = "IoC",
strategy = {
{ title = "Air Rush",
roles = {
{1, "Hangar Guard",
"Must prevent the enemy from recapping the Hangar"},
{3, "Paratrooper",
"Must get to the hangar ASAP and use the airship to jump inside the enemy base"},
{2, "Capper",
"Must capture any node close to the enemy base"},
{2, "Mid Sentry",
"Must prevent the enemy from having the Docks and help assault West Gate with vehicules"}
},
group = true,
bg = "Isle of Conquest"
},
{ title = "Peon Rush",
roles = {
{2, "Defenders",
"Must defend our gates and our fortress, beware enemy paratroopers"},
{4, "Sappers",
"Must capture the Workshop and use the seaforium bombs to breach Front Gate"},
{1, "Heavy Armor",
"Must capture the Docks and use vehicules to breach West Gate"},
{1, "Door Guards",
"Must defend the enemy West Gate to protect the bombs and vehicules"}
},
group = true,
bg = "Isle of Conquest"
},
{ title = "Vehicule Rush",
roles = {
{3, "Drivers",
"Must capture the Docks and use vehicules to breach West Gate, IMPORTANT: use the Catapults" ..
" to get inside enemy fort"},
{2, "Engineers",
"Must capture the Workshop and use its vehicules to breach West Gate"},
{2, "Door Guards",
"Must defend the enemy West Gate to protect the bombs and vehicules"},
{1, "Robbers",
"Must capture the Quarry and Refinery nodes to ensure vehicule buff, then pester the Hangar node"}
},
group = true,
bg = "Isle of Conquest"
}
}
};
-- Arathi Basin
AB = {
playersNum = 15,
title = "Arathi Basin",
nick = "AB",
strategy = {
{ title = "Lock",
roles = {
{1, "Farm Assault",
"Must capture and defend the Farm node"},
{1, "Blacksmith Assault",
"Must capture and defend the Blacksmith node"},
{1, "Lumber Mill Assault",
"Must capture and defend the Lumber Mill node"}
},
group = true,
bg = "Arathi Basin"
},
{ title = "ZERG!!!",
roles = {
{2, "Assaulters",
"Must regroup at the closest node, and as ONE BIG GROUP (7+), attack the closest enemy node"},
{1, "Guards",
"Must protect the last node captured until another is captured, MOST IMPORTANT ROLE"}
},
group = true,
bg = "Arathi Basin"
}
}
};
-- Warsong Gulch
WSG = {
playersNum = 10,
title = "Warsong Gulch",
nick = "WSG",
strategy = {
{ title = "D&O",
roles = {
{1, "Defense",
"must guard the flag and pursue and take down enemy flag carrier if failing"},
{1, "Offense",
"Must go after the flag and escort the flag carrier staying together as a GROUP"}
},
group = true,
bg = "Warsong Gulch"
}
}
};
-- Eye of the Storm
EotS = {
playersNum = 15,
title = "Eye of the Storm",
nick = "EotS",
strategy = {
{ title = "Don't Stand In Mid",
roles = {
{1, "Fel Reaver Defender",
"Must defend the Fel Reaver node"},
{1, "Blood Elf Tower Defender",
"Must go after the flag and escort the flag carrier staying together as a GROUP"},
{1, "Swingers",
"Must get to the center of the bg and defend it, ONE person should get the flag and cap it, " ..
"if a node is lost, must help recapture it"}
},
group = true,
bg = "Eye of the Storm"
}
}
};
WG = {
playersNum = 40,
title = "Wintergrasp",
nick = "WG",
strategy = {
{ title = "",
roles = {
{2, "South Defense",
"Must defend the southern towers, DO NOT MAKE ANY VEHICULES AT THE SOUTH WORKSHOPS"},
{4, "West Assaulters",
"Must assault the west walls and get the allys busy! The priority is the wall, only make Siege Engine"},
{2, "East Assaulters",
"Must assault the east walls, maintain control of Sunken Ring WS, and get to the freaking door, MOST IMPORTANT ROLE IN THE STRAT!"}
},
group = true,
bg = "Wintergrasp"
}
},
advice = "Do NOT make vehicules in the southern workshops. Focus on one wall, do not disperse. If you have a demolisher, your target is the " ..
"walls."
}
-- Twin Peaks
TP = {
}
-- Tol Barad
TB = {
}
-- Battle of Gilneas
BoG = {
}
-- We create a nice little table to get the Bg fast, this is the official of what
-- battlegrounds are supported
battlegrounds = { ["AV"] = AV, ["WSG"] = WSG, ["AB"] = AB, ["IoC"] = IoC, ["WG"] = WG,
["BoG"] = BoG, ["TP"] = TP, ["EotS"] = EotS, ["TB"] = TB};
end
-- Get a Battleground object table from a battleground name
function getBattlegroundFromString(bg_name)
local bg = nil;
-- Bunch of if statements, yeaaaahhh
if (bg_name == "Alterac Valley" or bg_name == "AV") then
bg = battlegrounds["AV"];
end
if (bg_name == "Arathi Basin" or bg_name == "AB") then
bg = battlegrounds["AB"];
end
if (bg_name == "Warsong Gulch" or bg_name == "WSG") then
bg = battlegrounds["WSG"];
end
if (bg_name == "Isle of Conquest" or bg_name == "IoC") then
bg = battlegrounds["IoC"];
end
if (bg_name == "Wintergrasp" or bg_name == "WG") then
bg = battlegrounds["WG"];
end
if (bg_name == "Twin Peaks" or bg_name == "TP") then
bg = battlegrounds["TP"];
end
if (bg_name == "Battle of Gilneas" or bg_name == "BoG") then
bg = battlegrounds["BoG"];
end
if (bg_name == "Tol Barad" or bg_name == "TB") then
bg = battlegrounds["TB"];
end
print(bg);
return bg;
end
-- Check if the location is a BG
function isBG(location)
local result = false;
for k, v in pairs(battlegrounds) do
if location == v.title then
result = true;
end
end
return result;
end