1
HedgewarsScriptLoad("/Scripts/Locale.lua")
2
HedgewarsScriptLoad("/Scripts/Animate.lua")
4
--///////////////////////////////CONSTANTS///////////////////////////
13
cannibalNames = {loc("John"), loc("Flesh for Brainz"), loc("Eye Chewer"), loc("Torn Muscle"),
14
loc("Nom-Nom"), loc("Vedgies"), loc("Brain Blower"), loc("Gorkij")}
15
cannibalPos = {{2471, 1174}, {939, 1019}, {1953, 902}, {3055, 1041},
16
{1121, 729}, {1150, 718}, {1149, 680}, {1161, 773}}
18
startLeaksPosDuo = {3572, 1426}
20
startDensePosDuo = {3454, 1471}
21
startCyborgPosDuo = {3202, 1307}
22
midDensePosDuo = {1464, 1410}
23
midCyborgPosDuo = {1264, 1390}
25
--///////////////////////////////VARIABLES///////////////////////////
35
--cyborgHidden = false
36
--princessHidden = false
81
--/////////////////////////Animation Functions///////////////////////
82
function AfterMidFailAnim()
83
ParseCommand("teamgone " .. loc("Natives"))
87
function AfterMidAnimAlone()
90
RestoreHedge(cannibals[i])
91
AnimSetGearPosition(cannibals[i], unpack(cannibalPos[i]))
94
AddAmmo(cannibals[5], amDEagle, 0)
96
AddEvent(CheckGirderTaken, {}, DoGirderTaken, {}, 0)
97
AddEvent(CheckOnFirstGirder, {}, DoOnFirstGirder, {}, 0)
98
AddEvent(CheckTookSniper, {}, DoTookSniper, {}, 0)
99
AddEvent(CheckFailedCourse, {}, DoFailedCourse, {}, 0)
100
SetGearMessage(leaks, 0)
102
TurnTimeLeft = TurnTime
103
ShowMission(loc("The Journey Back"), loc("Collateral Damage"), loc("Save the princess by collecting the crate in under 12 turns!"), 0, 6000)
104
-----------------------///////////////------------
105
--AnimSetGearPosition(leaks, 417, 1800)
108
function SkipEndAnimAlone()
110
RestoreHedge(princess)
111
AnimSetGearPosition(cyborg, 437, 1700)
112
AnimSetGearPosition(princess, 519, 1722)
115
function SkipEndAnimDuo()
117
RestoreHedge(princess)
118
if princessHidden then
120
princessHidden = false
122
AnimSetGearPosition(cyborg, 437, 1700)
123
AnimSetGearPosition(princess, 519, 1722)
124
AnimSetGearPosition(leaks, 763, 1760)
125
AnimSetGearPosition(dense, 835, 1519)
126
HogTurnLeft(leaks, true)
127
HogTurnLeft(dense, true)
130
function AfterEndAnimAlone()
133
SetGearMessage(leaks, 0)
135
ShowMission(loc("The Journey Back"), loc("Collateral Damage II"), loc("Save Fell From Heaven!"), 1, 4000)
136
AddEvent(CheckLost, {}, DoLost, {}, 0)
137
AddEvent(CheckWon, {}, DoWon, {}, 0)
138
RemoveEventFunc(CheckFailedCourse)
141
function AfterEndAnimDuo()
144
SetGearMessage(leaks, 0)
145
SetGearMessage(dense, 0)
147
ShowMission(loc("The Journey Back"), loc("Collateral Damage II"), loc("Save Fell From Heaven!"), 1, 4000)
148
AddEvent(CheckLost, {}, DoLost, {}, 0)
149
AddEvent(CheckWon, {}, DoWon, {}, 0)
152
function SkipMidAnimAlone()
153
AnimSetGearPosition(leaks, 2656, 1842)
155
SetInputMask(0xFFFFFFFF)
157
AddFunction({func = HideHedge, args = {princess}})
158
AddFunction({func = HideHedge, args = {cyborg}})
161
function AfterStartAnim()
162
SetGearMessage(leaks, 0)
163
TurnTimeLeft = TurnTime
164
local goal = loc("Get the crate on the other side of the island!|")
165
local hint = loc("Hint: you might want to stay out of sight and take all the crates...|")
166
local stuck = loc("If you get stuck, use your Desert Eagle or restart the mission!|")
167
local conds = loc("Leaks A Lot must survive!")
168
if m2DenseDead == 0 then
169
conds = loc("Your hogs must survive!")
171
ShowMission(loc("The Journey Back"), loc("Adventurous"), goal .. hint .. stuck .. conds, 0, 7000)
174
function SkipStartAnim()
178
function PlaceCratesDuo()
179
SpawnAmmoCrate(3090, 827, amBaseballBat)
180
girderCrate1 = SpawnUtilityCrate(2466, 1814, amGirder)
181
girderCrate2 = SpawnUtilityCrate(2630, 1278, amGirder)
182
SpawnUtilityCrate(2422, 1810, amParachute)
183
SpawnUtilityCrate(3157, 1009, amLowGravity)
184
sniperCrate = SpawnAmmoCrate(784, 1715, amSniperRifle)
187
function PlaceMinesDuo()
188
SetTimer(AddGear(2920, 1448, gtMine, 0, 0, 0, 0), 5000)
189
SetTimer(AddGear(2985, 1338, gtMine, 0, 0, 0, 0), 5000)
190
SetTimer(AddGear(3005, 1302, gtMine, 0, 0, 0, 0), 5000)
191
SetTimer(AddGear(3030, 1270, gtMine, 0, 0, 0, 0), 5000)
192
SetTimer(AddGear(3046, 1257, gtMine, 0, 0, 0, 0), 5000)
193
SetTimer(AddGear(2954, 1400, gtMine, 0, 0, 0, 0), 5000)
194
SetTimer(AddGear(2967, 1385, gtMine, 0, 0, 0, 0), 5000)
195
SetTimer(AddGear(2849, 1449, gtMine, 0, 0, 0, 0), 5000)
196
SetTimer(AddGear(2811, 1436, gtMine, 0, 0, 0, 0), 5000)
197
SetTimer(AddGear(2773, 1411, gtMine, 0, 0, 0, 0), 5000)
198
SetTimer(AddGear(2732, 1390, gtMine, 0, 0, 0, 0), 5000)
199
SetTimer(AddGear(2700, 1362, gtMine, 0, 0, 0, 0), 5000)
200
SetTimer(AddGear(2642, 1321, gtMine, 0, 0, 0, 0), 5000)
201
SetTimer(AddGear(2172, 1417, gtMine, 0, 0, 0, 0), 5000)
202
SetTimer(AddGear(2190, 1363, gtMine, 0, 0, 0, 0), 5000)
203
SetTimer(AddGear(2219, 1332, gtMine, 0, 0, 0, 0), 5000)
204
SetTimer(AddGear(1201, 1207, gtMine, 0, 0, 0, 0), 5000)
205
SetTimer(AddGear(1247, 1205, gtMine, 0, 0, 0, 0), 5000)
206
SetTimer(AddGear(1295, 1212, gtMine, 0, 0, 0, 0), 5000)
207
SetTimer(AddGear(1356, 1209, gtMine, 0, 0, 0, 0), 5000)
208
SetTimer(AddGear(1416, 1201, gtMine, 0, 0, 0, 0), 5000)
209
SetTimer(AddGear(1466, 1201, gtMine, 0, 0, 0, 0), 5000)
210
SetTimer(AddGear(1678, 1198, gtMine, 0, 0, 0, 0), 5000)
211
SetTimer(AddGear(1738, 1198, gtMine, 0, 0, 0, 0), 5000)
212
SetTimer(AddGear(1796, 1198, gtMine, 0, 0, 0, 0), 5000)
213
SetTimer(AddGear(1637, 1217, gtMine, 0, 0, 0, 0), 5000)
214
SetTimer(AddGear(1519, 1213, gtMine, 0, 0, 0, 0), 5000)
217
function AfterPastFlowerAnim()
219
AddEvent(CheckDensePit, {}, DoDensePit, {}, 0)
220
AddEvent(CheckTookGirder1, {}, DoTookGirder1, {}, 0)
221
AddEvent(CheckTookGirder2, {}, DoTookGirder2, {}, 0)
222
SetGearMessage(leaks, 0)
223
SetGearMessage(dense, 0)
225
ShowMission(loc("The Journey Back"), loc("The Savior"), loc("Get Dense Cloud out of the pit!"), 1, 5000)
228
function SkipPastFlowerAnim()
229
AnimSetGearPosition(dense, 2656, 1842)
232
AddFunction({func = HideHedge, args = {cyborg}})
235
function AfterOutPitAnim()
237
RestoreHedge(cannibals[5])
238
AddAmmo(cannibals[5], amDEagle, 0)
239
HideHedge(cannibals[5])
240
AddEvent(CheckTookFire, {}, DoTookFire, {}, 0)
241
SetGearMessage(leaks, 0)
242
SetGearMessage(dense, 0)
244
ShowMission(loc("The Journey Back"), loc("They never learn"), loc("Free Dense Cloud and continue the mission!"), 1, 5000)
247
function SkipOutPitAnim()
248
AnimSetGearPosition(dense, unpack(midDensePosDuo))
251
AddFunction({func = HideHedge, args = {cyborg}})
254
function RestoreCyborg(x, y, xx, yy)
256
RestoreHedge(princess)
257
AnimOutOfNowhere(cyborg, x, y)
258
AnimOutOfNowhere(princess, xx, yy)
259
HogTurnLeft(princess, false)
263
function RestoreCyborgOnly(x, y)
266
AnimOutOfNowhere(cyborg, x, y)
270
function TargetPrincess()
271
ParseCommand("setweap " .. string.char(amDEagle))
272
SetGearMessage(cyborg, gmUp)
276
function HideCyborg()
281
function HideCyborgOnly()
285
function SetupKillRoom()
286
PlaceGirder(2342, 1814, 2)
287
PlaceGirder(2294, 1783, 0)
288
PlaceGirder(2245, 1814, 2)
291
function SetupCourseDuo()
292
PlaceGirder(1083, 1152, 6)
293
PlaceGirder(1087, 1150, 6)
294
PlaceGirder(1133, 1155, 0)
295
PlaceGirder(1135, 1152, 0)
296
PlaceGirder(1135, 1078, 0)
297
PlaceGirder(1087, 1016, 2)
298
PlaceGirder(1018, 921, 5)
299
PlaceGirder(1016, 921, 5)
300
PlaceGirder(962, 782, 6)
301
PlaceGirder(962, 662, 2)
302
PlaceGirder(962, 661, 2)
303
PlaceGirder(962, 650, 2)
304
PlaceGirder(962, 630, 2)
305
PlaceGirder(1033, 649, 0)
306
PlaceGirder(952, 650, 0)
308
fireCrate = SpawnAmmoCrate(1846, 1100, amFirePunch)
309
SpawnUtilityCrate(1900, 1100, amPickHammer)
310
SpawnAmmoCrate(950, 674, amDynamite)
311
SpawnUtilityCrate(994, 825, amRope)
312
SpawnUtilityCrate(570, 1357, amLowGravity)
316
SetTimer(AddGear(2261, 1835, gtMine, 0, 0, 0, 0), 5000)
317
SetTimer(AddGear(2280, 1831, gtMine, 0, 0, 0, 0), 5000)
318
SetTimer(AddGear(2272, 1809, gtMine, 0, 0, 0, 0), 5000)
319
SetTimer(AddGear(2290, 1815, gtMine, 0, 0, 0, 0), 5000)
320
SetTimer(AddGear(2278, 1815, gtMine, 0, 0, 0, 0), 5000)
321
SetTimer(AddGear(2307, 1811, gtMine, 0, 0, 0, 0), 5000)
322
SetTimer(AddGear(2286, 1820, gtMine, 0, 0, 0, 0), 5000)
323
SetTimer(AddGear(2309, 1813, gtMine, 0, 0, 0, 0), 5000)
324
SetTimer(AddGear(2303, 1822, gtMine, 0, 0, 0, 0), 5000)
325
SetTimer(AddGear(2317, 1827, gtMine, 0, 0, 0, 0), 5000)
326
SetTimer(AddGear(2312, 1816, gtMine, 0, 0, 0, 0), 5000)
327
SetTimer(AddGear(2316, 1812, gtMine, 0, 0, 0, 0), 5000)
328
SetTimer(AddGear(2307, 1802, gtMine, 0, 0, 0, 0), 5000)
329
SetTimer(AddGear(2276, 1818, gtMine, 0, 0, 0, 0), 5000)
330
SetTimer(AddGear(2284, 1816, gtMine, 0, 0, 0, 0), 5000)
331
SetTimer(AddGear(2292, 1811, gtMine, 0, 0, 0, 0), 5000)
332
SetTimer(AddGear(2295, 1814, gtMine, 0, 0, 0, 0), 5000)
333
SetTimer(AddGear(2306, 1811, gtMine, 0, 0, 0, 0), 5000)
334
SetTimer(AddGear(2292, 1815, gtMine, 0, 0, 0, 0), 5000)
335
SetTimer(AddGear(2314, 1815, gtMine, 0, 0, 0, 0), 5000)
336
SetTimer(AddGear(2286, 1813, gtMine, 0, 0, 0, 0), 5000)
337
SetTimer(AddGear(2275, 1813, gtMine, 0, 0, 0, 0), 5000)
338
SetTimer(AddGear(2269, 1814, gtMine, 0, 0, 0, 0), 5000)
339
SetTimer(AddGear(2273, 1812, gtMine, 0, 0, 0, 0), 5000)
340
SetTimer(AddGear(2300, 1808, gtMine, 0, 0, 0, 0), 5000)
341
SetTimer(AddGear(2322, 1812, gtMine, 0, 0, 0, 0), 5000)
342
SetTimer(AddGear(2323, 1813, gtMine, 0, 0, 0, 0), 5000)
343
SetTimer(AddGear(2311, 1811, gtMine, 0, 0, 0, 0), 5000)
344
SetTimer(AddGear(2303, 1809, gtMine, 0, 0, 0, 0), 5000)
345
SetTimer(AddGear(2287, 1808, gtMine, 0, 0, 0, 0), 5000)
346
SetTimer(AddGear(2282, 1808, gtMine, 0, 0, 0, 0), 5000)
347
SetTimer(AddGear(2277, 1809, gtMine, 0, 0, 0, 0), 5000)
348
SetTimer(AddGear(2296, 1809, gtMine, 0, 0, 0, 0), 5000)
349
SetTimer(AddGear(2314, 1818, gtMine, 0, 0, 0, 0), 5000)
352
function SetupAnimRefusedDied()
353
SetupAnimAcceptedDied()
354
table.insert(startAnim, {func = AnimSay, args = {leaks, loc("I just wonder where Ramon and Spiky disappeared..."), SAY_THINK, 6000}})
357
function SetupAnimAttacked()
358
SetupAnimAcceptedDied()
360
table.insert(startAnim, {func = AnimWait, args = {leaks, 3000}})
361
table.insert(startAnim, {func = AnimTurn, args = {leaks, "Left"}})
362
table.insert(startAnim, {func = AnimSay, args = {leaks, loc("I wonder where Dense Cloud is..."), SAY_THINK, 4000}})
363
table.insert(startAnim, {func = AnimSay, args = {leaks, loc("He must be in the village already."), SAY_THINK, 4000}})
364
table.insert(startAnim, {func = AnimSay, args = {leaks, loc("I'd better get going myself."), SAY_THINK, 4000}})
367
table.insert(midAnim, {func = AnimWait, args = {leaks, 500}})
368
table.insert(midAnim, {func = AnimCustomFunction, swh = false, args = {leaks, RestoreCyborg, {1300, 1200, 1390, 1200}}})
369
table.insert(midAnim, {func = AnimSwitchHog, args = {cyborg}})
370
table.insert(midAnim, {func = AnimCustomFunction, args = {cyborg, TargetPrincess, {}}})
371
table.insert(midAnim, {func = AnimSay, args = {cyborg, loc("Welcome, Leaks A Lot!"), SAY_SAY, 3000}})
372
table.insert(midAnim, {func = AnimSay, args = {cyborg, loc("I want to play a game..."), SAY_SAY, 3000}})
373
table.insert(midAnim, {func = AnimSay, args = {princess, loc("Help me, please!!!"), SAY_SHOUT, 3000}})
374
table.insert(midAnim, {func = AnimSay, args = {cyborg, loc("If you can get that crate fast enough, your beloved \"princess\" may go free."), SAY_SAY, 7000}})
375
table.insert(midAnim, {func = AnimSay, args = {cyborg, loc("However, if you fail to do so, she dies a most violent death! Muahahaha!"), SAY_SAY, 8000}})
376
table.insert(midAnim, {func = AnimSay, args = {cyborg, loc("Good luck...or else!"), SAY_SAY, 4000}})
377
table.insert(midAnim, {func = AnimTeleportGear, args = {leaks, 2656, 1842}})
378
table.insert(midAnim, {func = AnimCustomFunction, args = {cyborg, HideCyborg, {}}, swh = false})
379
table.insert(midAnim, {func = AnimSay, args = {leaks, loc("Hey! This is cheating!"), SAY_SHOUT, 4000}})
380
AddSkipFunction(midAnim, SkipMidAnimAlone, {})
383
function SetupAnimAcceptedDied()
384
table.insert(startAnimAD, {func = AnimWait, args = {leaks, 3000}})
385
table.insert(startAnimAD, {func = AnimTurn, args = {leaks, "Left"}})
386
table.insert(startAnimAD, {func = AnimSay, args = {leaks, loc("I need to get to the other side of this island, fast!"), SAY_THINK, 5000}})
387
table.insert(startAnimAD, {func = AnimSay, args = {leaks, loc("With Dense Cloud on the land of shadows, I'm the village's only hope..."), SAY_THINK, 7000}})
389
table.insert(midAnimAD, {func = AnimWait, args = {leaks, 500}})
390
table.insert(midAnimAD, {func = AnimCustomFunction, swh = false, args = {leaks, RestoreCyborg, {1300, 1200, 1390, 1200}}})
391
table.insert(midAnimAD, {func = AnimSwitchHog, args = {cyborg}})
392
table.insert(midAnimAD, {func = AnimCustomFunction, args = {cyborg, TargetPrincess, {}}})
393
table.insert(midAnimAD, {func = AnimSay, args = {cyborg, loc("Welcome, Leaks A Lot!"), SAY_SAY, 3000}})
394
table.insert(midAnimAD, {func = AnimSay, args = {cyborg, loc("I want to play a game..."), SAY_SAY, 3000}})
395
table.insert(midAnimAD, {func = AnimSay, args = {princess, loc("Help me, please!!!"), SAY_SHOUT, 3000}})
396
table.insert(midAnimAD, {func = AnimSay, args = {cyborg, loc("If you can get that crate fast enough, your beloved \"princess\" may go free."), SAY_SAY, 7000}})
397
table.insert(midAnimAD, {func = AnimSay, args = {cyborg, loc("However, if you fail to do so, she dies a most violent death, just like your friend! Muahahaha!"), SAY_SAY, 8000}})
398
table.insert(midAnimAD, {func = AnimSay, args = {cyborg, loc("Good luck...or else!"), SAY_SAY, 4000}})
399
table.insert(midAnimAD, {func = AnimTeleportGear, args = {leaks, 2656, 1842}})
400
table.insert(midAnimAD, {func = AnimCustomFunction, args = {cyborg, HideCyborg, {}}, swh = false})
401
table.insert(midAnimAD, {func = AnimSay, args = {leaks, loc("Hey! This is cheating!"), SAY_SHOUT, 4000}})
402
AddSkipFunction(midAnimAD, SkipMidAnimAlone, {})
404
table.insert(failAnimAD, {func = AnimCustomFunction, swh = false, args = {leaks, RestoreCyborg, {2299, 1687, 2294, 1841}}})
405
table.insert(failAnimAD, {func = AnimTeleportGear, args = {leaks, 2090, 1841}})
406
table.insert(failAnimAD, {func = AnimCustomFunction, swh = false, args = {cyborg, SetupKillRoom, {}}})
407
table.insert(failAnimAD, {func = AnimTurn, swh = false, args = {cyborg, "Left"}})
408
table.insert(failAnimAD, {func = AnimTurn, swh = false, args = {princess, "Left"}})
409
table.insert(failAnimAD, {func = AnimTurn, swh = false, args = {leaks, "Right"}})
410
table.insert(failAnimAD, {func = AnimWait, args = {cyborg, 1000}})
411
table.insert(failAnimAD, {func = AnimSay, args = {cyborg, loc("You have failed to complete your task, young one!"), SAY_SAY, 6000}})
412
table.insert(failAnimAD, {func = AnimSay, args = {cyborg, loc("It's time you learned that your actions have consequences!"), SAY_SAY, 7000}})
413
table.insert(failAnimAD, {func = AnimSay, args = {princess, loc("No! Please, help me!"), SAY_SAY, 4000}})
414
table.insert(failAnimAD, {func = AnimSwitchHog, args = {cyborg}})
415
table.insert(failAnimAD, {func = AnimCustomFunction, args = {cyborg, DumpMines, {}}})
416
table.insert(failAnimAD, {func = AnimCustomFunction, args = {cyborg, KillPrincess, {}}})
417
table.insert(failAnimAD, {func = AnimWait, args = {cyborg, 12000}})
418
table.insert(failAnimAD, {func = AnimSay, args = {leaks, loc("No! What have I done?! What have YOU done?!"), SAY_SHOUT, 6000}})
420
table.insert(endAnimAD, {func = AnimCustomFunction, swh = false, args = {leaks, RestoreCyborg, {437, 1700, 519, 1722}}})
421
table.insert(endAnimAD, {func = AnimTurn, swh = false, args = {cyborg, "Right"}})
422
table.insert(endAnimAD, {func = AnimTurn, swh = false, args = {princess, "Right"}})
423
table.insert(endAnimAD, {func = AnimSay, args = {princess, loc("Help me, Leaks!"), SAY_SHOUT, 3000}})
424
table.insert(endAnimAD, {func = AnimSay, args = {leaks, loc("But you said you'd let her go!"), SAY_SHOUT, 5000}})
425
table.insert(endAnimAD, {func = AnimSay, args = {cyborg, loc("And you believed me? Oh, god, that's cute!"), SAY_SHOUT, 7000}})
426
table.insert(endAnimAD, {func = AnimSay, args = {leaks, loc("I won't let you kill her!"), SAY_SHOUT, 4000}})
427
AddSkipFunction(endAnimAD, SkipEndAnimAlone, {})
429
table.insert(endFailAnim, {func = AnimCaption, args = {leaks, loc("Leaks A Lot, depressed for killing his loved one, failed to save the village..."), 3000}})
431
table.insert(winAnimAD, {func = AnimCustomFunction, args = {princess, CondNeedToTurn, {leaks, princess}}})
432
table.insert(winAnimAD, {func = AnimSay, args = {princess, loc("Thank you, oh, thank you, Leaks A Lot!"), SAY_SAY, 5000}})
433
table.insert(winAnimAD, {func = AnimSay, args = {princess, loc("How can I ever repay you for saving my life?"), SAY_SAY, 6000}})
434
table.insert(winAnimAD, {func = AnimSay, args = {leaks, loc("There's nothing more satisfying for me than seeing you share your beauty with the world every morning, my princess!"), SAY_SAY, 10000}})
435
table.insert(winAnimAD, {func = AnimSay, args = {leaks, loc("Let's go home!"), SAY_SAY, 3000}})
436
table.insert(winAnimAD, {func = AnimCaption, args = {leaks, loc("And so they discovered that cyborgs weren't invulnerable..."), 2000}})
438
startAnim = startAnimAD
440
failAnim = failAnimAD
442
endFailAnim = endFailAnimAD
446
function SetupAnimAcceptedLived()
447
table.insert(startAnimAL, {func = AnimWait, args = {leaks, 3000}})
448
table.insert(startAnimAL, {func = AnimCustomFunction, args = {dense, CondNeedToTurn, {leaks, dense}}})
449
table.insert(startAnimAL, {func = AnimSay, args = {leaks, loc("All right, we just need to get to the other side of the island!"), SAY_SAY, 8000}})
450
table.insert(startAnimAL, {func = AnimSay, args = {dense, loc("We have no time to waste..."), SAY_SAY, 4000}})
451
table.insert(startAnimAL, {func = AnimSwitchHog, args = {leaks}})
452
AddSkipFunction(startAnimAL, SkipStartAnim, {})
454
table.insert(pastFlowerAnimAL, {func = AnimCustomFunction, args = {dense, RestoreCyborgOnly, {unpack(startCyborgPosDuo)}}, swh = false})
455
table.insert(pastFlowerAnimAL, {func = AnimTurn, args = {cyborg, "Right"}})
456
table.insert(pastFlowerAnimAL, {func = AnimSay, args = {cyborg, loc("Well, well! Isn't that the cutest thing you've ever seen?"), SAY_SAY, 7000}})
457
table.insert(pastFlowerAnimAL, {func = AnimSay, args = {cyborg, loc("Two little hogs cooperating, getting past obstacles..."), SAY_SAY, 7000}})
458
table.insert(pastFlowerAnimAL, {func = AnimSay, args = {cyborg, loc("Let me test your skills a little, will you?"), SAY_SAY, 6000}})
459
table.insert(pastFlowerAnimAL, {func = AnimTeleportGear, args = {cyborg, 2456, 1842}})
460
table.insert(pastFlowerAnimAL, {func = AnimTeleportGear, args = {dense, 2656, 1842}})
461
table.insert(pastFlowerAnimAL, {func = AnimCustomFunction, args = {dense, CondNeedToTurn, {cyborg, dense}}})
462
table.insert(pastFlowerAnimAL, {func = AnimSay, args = {dense, loc("Why are you doing this?"), SAY_SAY, 4000}})
463
table.insert(pastFlowerAnimAL, {func = AnimSay, args = {cyborg, loc("To help you, of course!"), SAY_SAY, 4000}})
464
table.insert(pastFlowerAnimAL, {func = AnimSwitchHog, args = {dense}})
465
table.insert(pastFlowerAnimAL, {func = AnimDisappear, swh = false, args = {cyborg, 3781, 1583}})
466
table.insert(pastFlowerAnimAL, {func = AnimCustomFunction, swh = false, args = {cyborg, HideCyborgOnly, {}}})
467
AddSkipFunction(pastFlowerAnimAL, SkipPastFlowerAnim, {})
469
table.insert(outPitAnimAL, {func = AnimCustomFunction, args = {dense, RestoreCyborgOnly, {unpack(midCyborgPosDuo)}}, swh = false})
470
table.insert(outPitAnimAL, {func = AnimTurn, args = {cyborg, "Right"}})
471
table.insert(outPitAnimAL, {func = AnimTeleportGear, args = {dense, unpack(midDensePosDuo)}})
472
table.insert(outPitAnimAL, {func = AnimTurn, args = {dense, "Left"}})
473
table.insert(outPitAnimAL, {func = AnimSay, args = {dense, loc("OH, COME ON!"), SAY_SHOUT, 3000}})
474
table.insert(outPitAnimAL, {func = AnimSay, args = {cyborg, loc("Let's see what your comrade does now!"), SAY_SAY, 5000}})
475
table.insert(outPitAnimAL, {func = AnimSwitchHog, args = {dense}})
476
table.insert(outPitAnimAL, {func = AnimDisappear, swh = false, args = {cyborg, 3781, 1583}})
477
table.insert(outPitAnimAL, {func = AnimCustomFunction, swh = false, args = {cyborg, HideCyborgOnly, {}}})
478
AddSkipFunction(outPitAnimAL, SkipOutPitAnim, {})
480
table.insert(endAnim, {func = AnimCustomFunction, swh = false, args = {leaks, RestoreCyborg, {437, 1700, 519, 1722}}})
481
table.insert(endAnim, {func = AnimTeleportGear, args = {leaks, 763, 1760}})
482
table.insert(endAnim, {func = AnimTeleportGear, args = {dense, 835, 1519}})
483
table.insert(endAnim, {func = AnimTurn, swh = false, args = {leaks, "Left"}})
484
table.insert(endAnim, {func = AnimTurn, swh = false, args = {dense, "Left"}})
485
table.insert(endAnim, {func = AnimTurn, swh = false, args = {cyborg, "Right"}})
486
table.insert(endAnim, {func = AnimTurn, swh = false, args = {princess, "Right"}})
487
table.insert(endAnim, {func = AnimSay, args = {princess, loc("Help me, please!"), SAY_SHOUT, 3000}})
488
table.insert(endAnim, {func = AnimSay, args = {leaks, loc("What are you doing? Let her go!"), SAY_SHOUT, 5000}})
489
table.insert(endAnim, {func = AnimSay, args = {cyborg, loc("Yeah? Watcha gonna do? Cry?"), SAY_SHOUT, 5000}})
490
table.insert(endAnim, {func = AnimSay, args = {leaks, loc("We won't let you hurt her!"), SAY_SHOUT, 4000}})
491
AddSkipFunction(endAnim, SkipEndAnimDuo, {})
493
table.insert(endFailAnim, {func = AnimCaption, args = {leaks, loc("Leaks A Lot, depressed for killing his loved one, failed to save the village..."), 3000}})
495
table.insert(winAnim, {func = AnimCustomFunction, args = {princess, CondNeedToTurn, {leaks, princess}}})
496
table.insert(winAnim, {func = AnimSay, args = {princess, loc("Thank you, oh, thank you, my heroes!"), SAY_SAY, 5000}})
497
table.insert(winAnim, {func = AnimSay, args = {princess, loc("How can I ever repay you for saving my life?"), SAY_SAY, 6000}})
498
table.insert(winAnim, {func = AnimSay, args = {leaks, loc("There's nothing more satisfying to us than seeing you share your beauty..."), SAY_SAY, 7000}})
499
table.insert(winAnim, {func = AnimSay, args = {leaks, loc("... share your beauty with the world every morning, my princess!"), SAY_SAY, 7000}})
500
table.insert(winAnim, {func = AnimSay, args = {leaks, loc("Let's go home!"), SAY_SAY, 3000}})
501
table.insert(winAnim, {func = AnimCaption, args = {leaks, loc("And so they discovered that cyborgs weren't invulnerable..."), 2000}})
503
startAnim = startAnimAL
504
pastFlowerAnim = pastFlowerAnimAL
505
outPitAnim = outPitAnimAL
508
function SetupAnimRefusedLived()
509
table.insert(startAnimRL, {func = AnimWait, args = {leaks, 3000}})
510
table.insert(startAnimRL, {func = AnimCustomFunction, args = {dense, CondNeedToTurn, {leaks, dense}}})
511
table.insert(startAnimRL, {func = AnimSay, args = {leaks, loc("All right, we just need to get to the other side of the island!"), SAY_SAY, 7000}})
512
table.insert(startAnimRL, {func = AnimSay, args = {dense, loc("Dude, can you see Ramon and Spiky?"), SAY_SAY, 5000}})
513
table.insert(startAnimRL, {func = AnimSay, args = {leaks, loc("No...I wonder where they disappeared?!"), SAY_SAY, 5000}})
514
AddSkipFunction(startAnimRL, SkipStartAnim, {})
516
table.insert(pastFlowerAnimRL, {func = AnimCustomFunction, args = {dense, RestoreCyborgOnly, {unpack(startCyborgPosDuo)}}, swh = false})
517
table.insert(pastFlowerAnimRL, {func = AnimTurn, args = {cyborg, "Right"}})
518
table.insert(pastFlowerAnimRL, {func = AnimSay, args = {cyborg, loc("Well, well! Isn't that the cutest thing you've ever seen?"), SAY_SAY, 7000}})
519
table.insert(pastFlowerAnimRL, {func = AnimSay, args = {cyborg, loc("Two little hogs cooperating, getting past obstacles..."), SAY_SAY, 7000}})
520
table.insert(pastFlowerAnimRL, {func = AnimSay, args = {cyborg, loc("Let me test your skills a little, will you?"), SAY_SAY, 6000}})
521
table.insert(pastFlowerAnimRL, {func = AnimTeleportGear, args = {cyborg, 2456, 1842}})
522
table.insert(pastFlowerAnimRL, {func = AnimTeleportGear, args = {dense, 2656, 1842}})
523
table.insert(pastFlowerAnimRL, {func = AnimCustomFunction, args = {dense, CondNeedToTurn, {cyborg, dense}}})
524
table.insert(pastFlowerAnimRL, {func = AnimSay, args = {dense, loc("Why are you doing this?"), SAY_SAY, 4000}})
525
table.insert(pastFlowerAnimRL, {func = AnimSay, args = {cyborg, loc("You couldn't possibly believe that after refusing my offer I'd just let you go!"), SAY_SAY, 9000}})
526
table.insert(pastFlowerAnimRL, {func = AnimSay, args = {cyborg, loc("You're funny!"), SAY_SAY, 4000}})
527
table.insert(pastFlowerAnimRL, {func = AnimSwitchHog, args = {dense}})
528
table.insert(pastFlowerAnimRL, {func = AnimDisappear, swh = false, args = {cyborg, 3781, 1583}})
529
table.insert(pastFlowerAnimRL, {func = AnimCustomFunction, swh = false, args = {cyborg, HideCyborgOnly, {}}})
530
AddSkipFunction(pastFlowerAnimRL, SkipPastFlowerAnim, {})
532
table.insert(outPitAnimRL, {func = AnimCustomFunction, args = {dense, RestoreCyborgOnly, {unpack(midCyborgPosDuo)}}, swh = false})
533
table.insert(outPitAnimRL, {func = AnimTurn, args = {cyborg, "Right"}})
534
table.insert(outPitAnimRL, {func = AnimTeleportGear, args = {dense, unpack(midDensePosDuo)}})
535
table.insert(outPitAnimRL, {func = AnimTurn, args = {dense, "Left"}})
536
table.insert(outPitAnimRL, {func = AnimSay, args = {dense, loc("OH, COME ON!"), SAY_SHOUT, 3000}})
537
table.insert(outPitAnimRL, {func = AnimSay, args = {cyborg, loc("Let's see what your comrade does now!"), SAY_SAY, 5000}})
538
table.insert(outPitAnimRL, {func = AnimSwitchHog, args = {dense}})
539
table.insert(outPitAnimRL, {func = AnimDisappear, swh = false, args = {cyborg, 3781, 1583}})
540
table.insert(outPitAnimRL, {func = AnimCustomFunction, swh = false, args = {cyborg, HideCyborgOnly, {}}})
541
AddSkipFunction(outPitAnimRL, SkipOutPitAnim, {})
543
table.insert(endAnim, {func = AnimCustomFunction, args = {leaks, RestoreCyborg, {437, 1700, 519, 1722}}})
544
table.insert(endAnim, {func = AnimTeleportGear, args = {leaks, 763, 1760}})
545
table.insert(endAnim, {func = AnimTeleportGear, args = {dense, 835, 1519}})
546
table.insert(endAnim, {func = AnimTurn, swh = false, args = {leaks, "Left"}})
547
table.insert(endAnim, {func = AnimTurn, swh = false, args = {dense, "Left"}})
548
table.insert(endAnim, {func = AnimTurn, swh = false, args = {cyborg, "Right"}})
549
table.insert(endAnim, {func = AnimTurn, swh = false, args = {princess, "Right"}})
550
table.insert(endAnim, {func = AnimSay, args = {princess, loc("Help me, please!"), SAY_SHOUT, 3000}})
551
table.insert(endAnim, {func = AnimSay, args = {leaks, loc("What are you doing? Let her go!"), SAY_SHOUT, 5000}})
552
table.insert(endAnim, {func = AnimSay, args = {cyborg, loc("Yeah? Watcha gonna do? Cry?"), SAY_SHOUT, 5000}})
553
table.insert(endAnim, {func = AnimSay, args = {leaks, loc("We won't let you hurt her!"), SAY_SHOUT, 4000}})
554
AddSkipFunction(endAnim, SkipEndAnimDuo, {})
556
table.insert(endFailAnim, {func = AnimCaption, args = {leaks, loc("Leaks A Lot, depressed for killing his loved one, failed to save the village..."), 3000}})
558
table.insert(winAnim, {func = AnimCustomFunction, args = {princess, CondNeedToTurn, {leaks, princess}}})
559
table.insert(winAnim, {func = AnimSay, args = {princess, loc("Thank you, oh, thank you, my heroes!"), SAY_SAY, 5000}})
560
table.insert(winAnim, {func = AnimSay, args = {princess, loc("How can I ever repay you for saving my life?"), SAY_SAY, 6000}})
561
table.insert(winAnim, {func = AnimSay, args = {leaks, loc("There's nothing more satisfying to us than seeing you share your beauty with the world every morning, my princess!"), SAY_SAY, 10000}})
562
table.insert(winAnim, {func = AnimSay, args = {leaks, loc("Let's go home!"), SAY_SAY, 3000}})
563
table.insert(winAnim, {func = AnimCaption, args = {leaks, loc("And so they discovered that cyborgs weren't invulnerable..."), 2000}})
565
startAnim = startAnimRL
566
pastFlowerAnim = pastFlowerAnimRL
567
outPitAnim = outPitAnimRL
570
function KillPrincess()
571
ParseCommand("teamgone " .. loc("Cannibal Sentry"))
574
--/////////////////////////////Misc Functions////////////////////////
576
function HideHedge(hedge)
577
if hedgeHidden[hedge] ~= true then
579
hedgeHidden[hedge] = true
583
function RestoreHedge(hedge)
584
if hedgeHidden[hedge] == true then
586
hedgeHidden[hedge] = false
590
function CondNeedToTurn(hog1, hog2)
591
xl, xd = GetX(hog1), GetX(hog2)
593
AnimInsertStepNext({func = AnimTurn, args = {hog1, "Left"}})
594
AnimInsertStepNext({func = AnimTurn, args = {hog2, "Right"}})
596
AnimInsertStepNext({func = AnimTurn, args = {hog2, "Left"}})
597
AnimInsertStepNext({func = AnimTurn, args = {hog1, "Right"}})
601
function SetupPlaceAlone()
602
------ AMMO CRATE LIST ------
603
--SpawnAmmoCrate(3122, 994, amShotgun)
604
SpawnAmmoCrate(3124, 952, amBaseballBat)
605
SpawnAmmoCrate(2508, 1110, amFirePunch)
606
------ UTILITY CRATE LIST ------
607
blowCrate = SpawnUtilityCrate(3675, 1480, amBlowTorch)
608
gravityCrate = SpawnUtilityCrate(3448, 1349, amLowGravity)
609
SpawnUtilityCrate(3212, 1256, amGirder)
610
SpawnUtilityCrate(3113, 911, amParachute)
611
sniperCrate = SpawnAmmoCrate(784, 1715, amSniperRifle)
612
------ MINE LIST ------
613
SetTimer(AddGear(3328, 1399, gtMine, 0, 0, 0, 0), 3000)
614
SetTimer(AddGear(3028, 1262, gtMine, 0, 0, 0, 0), 3000)
615
SetTimer(AddGear(2994, 1274, gtMine, 0, 0, 0, 0), 3000)
616
SetTimer(AddGear(2956, 1277, gtMine, 0, 0, 0, 0), 3000)
617
SetTimer(AddGear(2925, 1282, gtMine, 0, 0, 0, 0), 3000)
618
SetTimer(AddGear(2838, 1276, gtMine, 0, 0, 0, 0), 3000)
619
SetTimer(AddGear(2822, 1278, gtMine, 0, 0, 0, 0), 3000)
620
SetTimer(AddGear(2786, 1283, gtMine, 0, 0, 0, 0), 3000)
621
SetTimer(AddGear(2766, 1270, gtMine, 0, 0, 0, 0), 3000)
622
SetTimer(AddGear(2749, 1231, gtMine, 0, 0, 0, 0), 3000)
623
SetTimer(AddGear(2717, 1354, gtMine, 0, 0, 0, 0), 3000)
624
SetTimer(AddGear(2167, 1330, gtMine, 0, 0, 0, 0), 3000)
625
SetTimer(AddGear(2201, 1321, gtMine, 0, 0, 0, 0), 3000)
626
SetTimer(AddGear(2239, 1295, gtMine, 0, 0, 0, 0), 3000)
628
AnimSetGearPosition(leaks, 3781, 1583)
629
--AnimSetGearPosition(leaks, 1650, 1583)
630
AddAmmo(cannibals[1], amShotgun, 100)
631
AddAmmo(leaks, amSwitch, 0)
634
function SetupPlaceDuo()
636
AnimSetGearPosition(leaks, unpack(startLeaksPosDuo))
637
AnimSetGearPosition(dense, unpack(startDensePosDuo))
640
function SetupEventsDuo()
641
AddEvent(CheckPastFlower, {}, DoPastFlower, {}, 0)
642
AddEvent(CheckLeaksDead, {}, DoLeaksDead, {}, 0)
643
AddEvent(CheckDenseDead, {}, DoDenseDead, {}, 0)
644
AddEvent(CheckTookSniper2, {}, DoTookSniper2, {}, 0)
647
function SetupEventsAlone()
648
AddEvent(CheckLeaksDead, {}, DoLeaksDead, {}, 0)
649
AddEvent(CheckTookBlowTorch, {}, DoTookBlowTorch, {}, 0)
650
AddEvent(CheckTookLowGravity, {}, DoTookLowGravity, {}, 0)
651
AddEvent(CheckOnBridge, {}, DoOnBridge, {}, 0)
654
function StartMission()
655
if m2DenseDead == 1 then
657
if m2Choice == choiceAccepted then
658
SetupAnimAcceptedDied()
659
elseif m2Choice == choiceRefused then
660
SetupAnimRefusedDied()
667
AddFunction({func = AfterStartAnim, args = {}})
669
if m2Choice == choiceAccepted then
670
SetupAnimAcceptedLived()
672
SetupAnimRefusedLived()
677
AddFunction({func = AfterStartAnim, args = {}})
682
HideHedge(cannibals[i])
687
function SetupCourse()
689
------ GIRDER LIST ------
690
PlaceGirder(1091, 1150, 6)
691
PlaceGirder(1091, 989, 6)
692
PlaceGirder(1091, 829, 6)
693
PlaceGirder(1091, 669, 6)
694
PlaceGirder(1091, 668, 6)
695
PlaceGirder(1091, 669, 6)
696
PlaceGirder(1088, 667, 6)
697
PlaceGirder(1091, 658, 6)
698
PlaceGirder(1091, 646, 6)
699
PlaceGirder(1091, 607, 6)
700
PlaceGirder(1091, 571, 6)
701
PlaceGirder(1376, 821, 6)
702
PlaceGirder(1145, 1192, 1)
703
PlaceGirder(1169, 1076, 3)
704
PlaceGirder(1351, 1082, 4)
705
PlaceGirder(1469, 987, 3)
706
PlaceGirder(1386, 951, 0)
707
PlaceGirder(1465, 852, 3)
708
PlaceGirder(1630, 913, 0)
709
PlaceGirder(1733, 856, 7)
710
PlaceGirder(1688, 713, 5)
711
PlaceGirder(1556, 696, 2)
712
PlaceGirder(1525, 696, 2)
713
PlaceGirder(1457, 697, 2)
714
PlaceGirder(1413, 700, 3)
715
PlaceGirder(1270, 783, 2)
716
PlaceGirder(1207, 825, 2)
717
PlaceGirder(1135, 775, 1)
719
------ UTILITY CRATE LIST ------
720
SpawnUtilityCrate(1590, 628, amParachute)
721
SpawnAmmoCrate(1540, 100, amDynamite)
722
SpawnUtilityCrate(2175, 1815, amLowGravity)
723
SpawnUtilityCrate(2210, 1499, amFirePunch)
724
girderCrate = SpawnUtilityCrate(2300, 1663, amGirder)
725
SpawnUtilityCrate(610, 1394, amPickHammer)
727
------ BARREL LIST ------
728
SetHealth(AddGear(1148, 736, gtExplosives, 0, 0, 0, 0), 20)
732
function PlaceCourseMines()
733
SetTimer(AddGear(1215, 1193, gtMine, 0, 0, 0, 0), 5000)
734
SetTimer(AddGear(1259, 1199, gtMine, 0, 0, 0, 0), 5000)
735
SetTimer(AddGear(1310, 1198, gtMine, 0, 0, 0, 0), 5000)
736
SetTimer(AddGear(1346, 1196, gtMine, 0, 0, 0, 0), 5000)
737
SetTimer(AddGear(1383, 1192, gtMine, 0, 0, 0, 0), 5000)
738
SetTimer(AddGear(1436, 1196, gtMine, 0, 0, 0, 0), 5000)
739
SetTimer(AddGear(1487, 1199, gtMine, 0, 0, 0, 0), 5000)
740
SetTimer(AddGear(1651, 1209, gtMine, 0, 0, 0, 0), 5000)
741
SetTimer(AddGear(1708, 1209, gtMine, 0, 0, 0, 0), 5000)
742
SetTimer(AddGear(1759, 1190, gtMine, 0, 0, 0, 0), 5000)
743
SetTimer(AddGear(1815, 1184, gtMine, 0, 0, 0, 0), 5000)
747
--////////////////////////////Event Functions////////////////////////
748
function CheckTookFire()
752
function DoTookFire()
753
AddAmmo(leaks, amFirePunch, 100)
756
function CheckTookGirder1()
760
function CheckTookGirder2()
764
function DoTookGirder1()
765
AddAmmo(dense, amGirder, 2)
768
function DoTookGirder2()
769
AddAmmo(dense, amGirder, 3)
772
function CheckDensePit()
773
return GetY(dense) < 1250 and StoppedGear(dense)
776
function DoDensePit()
780
AddFunction({func = AddAnim, args = {outPitAnim}})
781
AddFunction({func = AddFunction, args = {{func = AfterOutPitAnim, args = {}}}})
784
function CheckPastFlower()
785
if denseDead == true or leaksDead == true then
788
return (GetX(dense) < startEventXDuo and StoppedGear(dense))
789
or (GetX(leaks) < startEventXDuo and StoppedGear(leaks))
792
function DoPastFlower()
796
AddFunction({func = AddAnim, args = {pastFlowerAnim}})
797
AddFunction({func = AddFunction, args = {{func = AfterPastFlowerAnim, args = {}}}})
801
function CheckLeaksDead()
805
function DoLeaksDead()
806
AddCaption(loc("The village, unprepared, was destroyed by the cyborgs..."))
807
ParseCommand("teamgone " .. loc("Natives"))
810
function CheckDenseDead()
814
function DoDenseDead()
815
AddCaption(loc("The village, unprepared, was destroyed by the cyborgs..."))
816
ParseCommand("teamgone " .. loc("Natives"))
819
function CheckTookBlowTorch()
823
function DoTookBlowTorch()
824
ShowMission(loc("The Journey Back"), loc("The Tunnel Maker"), loc("Hint: Select the BlowTorch, aim and press [Fire]. Press [Fire] again to stop.|Don't blow up the crate."), 0, 6000)
827
function CheckTookLowGravity()
831
function DoTookLowGravity()
832
ShowMission(loc("The Journey Back"), loc("The Moonwalk"), loc("Hint: Select the LowGravity and press [Fire]."), 0, 6000)
835
function CheckOnBridge()
836
return leaksDead == false and GetX(leaks) < 1651 and StoppedGear(leaks)
839
function DoOnBridge()
842
RestoreHedge(princess)
844
AddFunction({func = AddAnim, args = {midAnim}})
845
AddFunction({func = AddFunction, args = {{func = AfterMidAnimAlone, args = {}}}})
848
function CheckGirderTaken()
852
function DoGirderTaken()
853
AddAmmo(leaks, amGirder, 2)
854
-- AddAmmo(leaks, amGirder, 3)
857
function CheckOnFirstGirder()
858
return leaksDead == false and GetX(leaks) < 1160 and StoppedGear(leaks)
861
function DoOnFirstGirder()
863
ShowMission(loc("The Journey Back"), loc("Slippery"), loc("You'd better watch your steps..."), 0, 4000)
866
function CheckTookSniper()
867
return sniperTaken and StoppedGear(leaks)
870
function DoTookSniper()
873
RestoreHedge(princess)
875
AddFunction({func = AddAnim, args = {endAnim}})
876
AddFunction({func = AddFunction, args = {{func = AfterEndAnimAlone, args = {}}}})
879
function CheckTookSniper2()
880
return sniperTaken and StoppedGear(leaks) and StoppedGear(dense)
883
function DoTookSniper2()
886
RestoreHedge(princess)
888
AddFunction({func = AddAnim, args = {endAnim}})
889
AddFunction({func = AddFunction, args = {{func = AfterEndAnimDuo, args = {}}}})
898
AddFunction({func = ParseCommand, args = {'teamgone ' .. loc('Natives')}})
902
return cyborgDead and not princessDead
906
if progress and progress<3 then
907
SaveCampaignVar("Progress", "3")
910
AddFunction({func = FinishWon, args = {}})
915
ParseCommand("teamgone " .. loc("Cannibal Sentry"))
916
ParseCommand("teamgone " .. loc("011101001"))
920
function CheckFailedCourse()
921
return TurnsLeft == 0
924
function DoFailedCourse()
927
RestoreHedge(princess)
929
AddFunction({func = AddAnim, args = {failAnim}})
930
AddFunction({func = AddFunction, args = {{func = AfterMidFailAnim, args = {}}}})
933
--////////////////////////////Main Functions/////////////////////////
935
function onGameInit()
937
GameFlags = gfSolidLand + gfDisableWind
944
Map = "A_Classic_Fairytale_journey"
947
SuddenDeathTurns = 3000
949
AddTeam(loc("Natives"), 29439, "Bone", "Island", "HillBilly", "cm_birdy")
950
leaks = AddHog(loc("Leaks A Lot"), 0, 100, "Rambo")
951
dense = AddHog(loc("Dense Cloud"), 0, 100, "RobinHood")
953
AddTeam(loc("Cannibal Sentry"), 14483456, "Skull", "Island", "Pirate","cm_vampire")
956
cannibals[i] = AddHog(cannibalNames[i], 3, 40, "Zombi")
957
AnimSetGearPosition(cannibals[i], unpack(cannibalPos[i]))
961
cannibals[i] = AddHog(cannibalNames[i], 3, 40, "Zombi")
962
AnimSetGearPosition(cannibals[i], 0, 0)
965
AddTeam(loc("011101001"), 14483456, "ring", "UFO", "Robot", "cm_star")
966
cyborg = AddHog(loc("Y3K1337"), 0, 200, "cyborg1")
967
princess = AddHog(loc("Fell From Heaven"), 0, 200, "tiara")
969
AnimSetGearPosition(dense, 0, 0)
970
AnimSetGearPosition(leaks, 0, 0)
971
AnimSetGearPosition(cyborg, 0, 0)
972
AnimSetGearPosition(princess, 0, 0)
977
function onGameStart()
978
progress = tonumber(GetCampaignVar("Progress"))
979
m2Choice = tonumber(GetCampaignVar("M2Choice"))
980
m2DenseDead = tonumber(GetCampaignVar("M2DenseDead"))
981
m2RamonDead = tonumber(GetCampaignVar("M2RamonDead"))
982
m2SpikyDead = tonumber(GetCampaignVar("M2SpikyDead"))
986
function onGameTick()
988
if ShowAnimation() == false then
991
ExecuteAfterAnimations()
995
function onGearDelete(gear)
996
if gear == blowCrate then
998
elseif gear == fireCrate then
1000
elseif gear == gravityCrate then
1002
elseif gear == leaks then
1004
elseif gear == dense then
1006
elseif gear == cyborg then
1008
elseif gear == princess then
1010
elseif gear == girderCrate then
1012
elseif gear == girderCrate1 then
1014
elseif gear == girderCrate2 then
1016
elseif gear == sniperCrate then
1020
if gear == cannibals[i] then
1021
cannibalDead[i] = true
1027
function onAmmoStoreInit()
1028
SetAmmo(amBlowTorch, 0, 0, 0, 1)
1029
SetAmmo(amParachute, 0, 0, 0, 1)
1030
SetAmmo(amGirder, 0, 0, 0, 3)
1031
SetAmmo(amLowGravity, 0, 0, 0, 1)
1032
SetAmmo(amBaseballBat, 0, 0, 0, 1)
1033
SetAmmo(amFirePunch, 1, 0, 0, 1)
1034
SetAmmo(amSkip, 9, 0, 0, 0)
1035
SetAmmo(amSwitch, 9, 0, 0, 0)
1036
SetAmmo(amDEagle, 9, 0, 0, 0)
1037
SetAmmo(amRope, 0, 0, 0, 1)
1038
SetAmmo(amSniperRifle, 0, 0, 0, 1)
1039
SetAmmo(amDynamite, 0, 0, 0, 1)
1040
SetAmmo(amPickHammer, 0, 0, 0, 1)
1043
function onNewTurn()
1044
if AnimInProgress() then
1046
elseif stage == endStage and CurrentHedgehog ~= leaks then
1047
AnimSwitchHog(leaks)
1048
SetGearMessage(leaks, 0)
1050
elseif GetHogTeamName(CurrentHedgehog) ~= loc("Natives") then
1052
if cannibalDead[i] ~= true then
1053
if GetX(cannibals[i]) < GetX(leaks) then
1054
HogTurnLeft(cannibals[i], false)
1056
HogTurnLeft(cannibals[i], true)
1060
SetInputMask(band(0xFFFFFFFF, bnot(gmLeft + gmRight + gmLJump + gmHJump)))
1061
TurnTimeLeft = 20000
1063
SetInputMask(0xFFFFFFFF)
1064
TurnsLeft = TurnsLeft - 1
1068
function onPrecise()
1069
if GameTime > 2500 and AnimInProgress() then
1073
-- AddAmmo(leaks, amRope, 100)
1074
-- RemoveEventFunc(CheckPastFlower)
1075
-- DeleteGear(sniperCrate)