183 function AfterMidAnim() |
185 function AfterMidAnim() |
184 HideHedge(cyborg) |
186 HideHedge(cyborg) |
185 SetupPlace3() |
187 SetupPlace3() |
186 SetGearMessage(natives[1], 0) |
188 SetGearMessage(natives[1], 0) |
187 AddNewEvent(CheckPrincessFreed, {}, DoPrincessFreed, {}, 0) |
189 AddNewEvent(CheckPrincessFreed, {}, DoPrincessFreed, {}, 0) |
188 TurnTimeLeft = 0 |
190 EndTurn(true) |
189 ShowMission(loc("Family Reunion"), loc("Salvation"), loc("Get your teammates out of their natural prison and save the princess!|Hint: Drilling holes should solve everything.|Hint: It might be a good idea to place a girder before starting to drill. Just saying.|Hint: All your hedgehogs need to be above the marked height!|Hint: Leaks A Lot needs to get really close to the princess!"), 1, 7000) |
191 ShowMission(loc("Family Reunion"), loc("Salvation"), loc("Get your teammates out of their natural prison and save the princess!|Hint: Drilling holes should solve everything.|Hint: It might be a good idea to place a girder before starting to drill. Just saying.|Hint: All your hedgehogs need to be above the marked height!|Hint: Leaks A Lot needs to get really close to the princess!"), 1, 7000) |
190 vCirc = AddVisualGear(0,0,vgtCircle,0,true) |
192 vCirc = AddVisualGear(0,0,vgtCircle,0,true) |
191 SetVisualGearValues(vCirc, 2625, 1500, 100, 255, 1, 10, 0, 120, 3, 0xff00ffff) |
193 SetVisualGearValues(vCirc, 2625, 1500, 100, 255, 1, 10, 0, 120, 3, 0xff00ffff) |
192 end |
194 end |
193 |
195 |
285 function DoPrincessFreed() |
287 function DoPrincessFreed() |
286 AnimSay(princess, loc("Thank you, my hero!"), SAY_SAY, 0) |
288 AnimSay(princess, loc("Thank you, my hero!"), SAY_SAY, 0) |
287 if progress and progress<7 then |
289 if progress and progress<7 then |
288 SaveCampaignVar("Progress", "7") |
290 SaveCampaignVar("Progress", "7") |
289 end |
291 end |
|
292 princessFreed = true |
290 DismissTeam(loc("011101001")) |
293 DismissTeam(loc("011101001")) |
291 TurnTimeLeft = 0 |
294 EndTurn(true) |
292 end |
295 end |
293 |
296 |
294 function CheckCyborgsDead() |
297 function CheckCyborgsDead() |
295 return cyborgsLeft == 0 |
298 return cyborgsLeft == 0 |
296 end |
299 end |
335 function CheckGearDead(gear) |
338 function CheckGearDead(gear) |
336 return gearDead[gear] |
339 return gearDead[gear] |
337 end |
340 end |
338 |
341 |
339 function EndMission() |
342 function EndMission() |
340 RemoveEventFunc(CheckPrincessFreed) |
343 if not princessFreed then |
341 AddCaption(loc("So the princess was never heard of again ...")) |
344 RemoveEventFunc(CheckPrincessFreed) |
342 DismissTeam(loc("Natives")) |
345 AddCaption(loc("So the princess was never heard of again ...")) |
343 DismissTeam(loc("011101001")) |
346 DismissTeam(loc("Natives")) |
344 TurnTimeLeft = 0 |
347 DismissTeam(loc("011101001")) |
|
348 EndTurn(true) |
|
349 end |
345 end |
350 end |
346 |
351 |
347 function CheckOutOfCluster() |
352 function CheckOutOfCluster() |
348 return CheckGearDead(clusterCrate) and GetAmmoCount(natives[1], amClusterBomb) == 0 |
353 return CheckGearDead(clusterCrate) and GetAmmoCount(natives[1], amClusterBomb) == 0 |
349 end |
354 end |