284 |
284 |
285 function AfterStartAnim() |
285 function AfterStartAnim() |
286 ShowMission(loc("The Enemy Of My Enemy"), loc("The Union"), loc("Defeat the cyborgs!"), 1, 0) |
286 ShowMission(loc("The Enemy Of My Enemy"), loc("The Union"), loc("Defeat the cyborgs!"), 1, 0) |
287 PutWeaponCrates() |
287 PutWeaponCrates() |
288 PutHealthCrates() |
288 PutHealthCrates() |
289 TurnTimeLeft = 0 |
289 EndTurn(true) |
290 end |
290 end |
291 |
291 |
292 function PutHealthCrates() |
292 function PutHealthCrates() |
293 for i = 1, 10 do |
293 for i = 1, 10 do |
294 SpawnHealthCrate(0, 0) |
294 SpawnHealthCrate(0, 0) |
329 return (cyborgsLeft == 0 and (leader == nil or gearDead[leader] == true)) |
329 return (cyborgsLeft == 0 and (leader == nil or gearDead[leader] == true)) |
330 end |
330 end |
331 |
331 |
332 function DoNativesDead() |
332 function DoNativesDead() |
333 nativesDeadFresh = true |
333 nativesDeadFresh = true |
334 TurnTimeLeft = 0 |
334 EndTurn(true) |
335 end |
335 end |
336 |
336 |
337 function DoCannibalsDead() |
337 function DoCannibalsDead() |
338 cannibalsDeadFresh = true |
338 cannibalsDeadFresh = true |
339 TurnTimeLeft = 0 |
339 EndTurn(true) |
340 end |
340 end |
341 |
341 |
342 function DoPlayersDead() |
342 function DoPlayersDead() |
343 RemoveEventFunc(CheckNativesDead) |
343 RemoveEventFunc(CheckNativesDead) |
344 RemoveEventFunc(CheckCannibalsDead) |
344 RemoveEventFunc(CheckCannibalsDead) |
345 RemoveEventFunc(CheckCyborgsDead) |
345 RemoveEventFunc(CheckCyborgsDead) |
346 playersDeadFresh = true |
346 playersDeadFresh = true |
347 TurnTimeLeft = 0 |
347 EndTurn(true) |
348 end |
348 end |
349 |
349 |
350 function DoCyborgsDead() |
350 function DoCyborgsDead() |
351 -- RemoveEventFunc(CheckNativesDead) |
351 -- RemoveEventFunc(CheckNativesDead) |
352 -- RemoveEventFunc(CheckCannibalsDead) |
352 -- RemoveEventFunc(CheckCannibalsDead) |
353 cyborgsDeadFresh= true |
353 cyborgsDeadFresh= true |
354 TurnTimeLeft = 0 |
354 EndTurn(true) |
355 end |
355 end |
356 |
356 |
357 function CheckGearsDead(gearList) |
357 function CheckGearsDead(gearList) |
358 for i = 1, # gearList do |
358 for i = 1, # gearList do |
359 if gearDead[gearList[i]] ~= true then |
359 if gearDead[gearList[i]] ~= true then |
386 |
386 |
387 function LoseMission() |
387 function LoseMission() |
388 DismissTeam(loc("Natives")) |
388 DismissTeam(loc("Natives")) |
389 DismissTeam(loc("Cannibals")) |
389 DismissTeam(loc("Cannibals")) |
390 DismissTeam(loc("011101001")) |
390 DismissTeam(loc("011101001")) |
391 TurnTimeLeft = 0 |
391 EndTurn(true) |
392 end |
392 end |
393 |
393 |
394 function WonMission() |
394 function WonMission() |
395 RestoreHedge(cyborg) |
395 RestoreHedge(cyborg) |
396 CondNeedToTurn2(cyborg, players[1]) |
396 CondNeedToTurn2(cyborg, players[1]) |
402 function WinMission() |
402 function WinMission() |
403 if progress and progress<9 then |
403 if progress and progress<9 then |
404 SaveCampaignVar("Progress", "9") |
404 SaveCampaignVar("Progress", "9") |
405 end |
405 end |
406 DismissTeam(loc("011101001")) |
406 DismissTeam(loc("011101001")) |
407 TurnTimeLeft = 0 |
407 EndTurn(true) |
408 end |
408 end |
409 -----------------------------Misc-------------------------------------- |
409 -----------------------------Misc-------------------------------------- |
410 function HideHedge(hedge) |
410 function HideHedge(hedge) |
411 if hedgeHidden[hedge] ~= true then |
411 if hedgeHidden[hedge] ~= true then |
412 HideHog(hedge) |
412 HideHog(hedge) |