share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/dragon.lua
changeset 7415 1a6a6db3fa96
parent 7413 dbf6e803d5bc
child 7417 2520705b857f
equal deleted inserted replaced
7413:dbf6e803d5bc 7415:1a6a6db3fa96
   130 nativeHats = {"Rambo", "RobinHood", "pirate_jack", "zoo_Bunny", "IndianChief",
   130 nativeHats = {"Rambo", "RobinHood", "pirate_jack", "zoo_Bunny", "IndianChief",
   131               "tiara", "AkuAku"}
   131               "tiara", "AkuAku"}
   132 
   132 
   133 nativePos = {257, 1950}
   133 nativePos = {257, 1950}
   134 
   134 
   135 cyborgNames = {"Syntax Errol", "Segmentation Paul", "Unexpected Igor", "Jeremiah"}
   135 cyborgNames = {loc("Syntax Errol"), loc("Segmentation Paul"), loc("Unexpected Igor"), loc("Jeremiah")}
   136 cyborgPos = {745, 1847}
   136 cyborgPos = {745, 1847}
   137 cyborgsPos = {{2937, 831}, {2945, 1264}, {2335, 1701}, {448, 484}}
   137 cyborgsPos = {{2937, 831}, {2945, 1264}, {2335, 1701}, {448, 484}}
   138 cyborgsDir = {"Left", "Left", "Left", "Right"}
   138 cyborgsDir = {"Left", "Left", "Left", "Right"}
   139 
   139 
   140 cratePos = {
   140 cratePos = {
   146             {1779, 948, amRope, 2}, {3090, 1066, amRope, 2},
   146             {1779, 948, amRope, 2}, {3090, 1066, amRope, 2},
   147             {947, 480, amBazooka, 3}, {1097, 480, amMortar, 3},
   147             {947, 480, amBazooka, 3}, {1097, 480, amMortar, 3},
   148             {1139, 451, amSnowball, 3}, {1207, 468, amShotgun, 3},
   148             {1139, 451, amSnowball, 3}, {1207, 468, amShotgun, 3},
   149             {1024, 393, amSniperRifle, 2}, {998, 391, amDynamite, 2}
   149             {1024, 393, amSniperRifle, 2}, {998, 391, amDynamite, 2}
   150            }
   150            }
   151 reactions = {"Yeah, take that!", "Bullseye", "Die, die, die!"}
   151 reactions = {loc("Yeah, take that!"), loc("Bullseye"), loc("Die, die, die!")}
   152 
   152 
   153 secondPos = {{1010, 510}, {1067, 510}}
   153 secondPos = {{1010, 510}, {1067, 510}}
   154 -----------------------------Variables---------------------------------
   154 -----------------------------Variables---------------------------------
   155 natives = {}
   155 natives = {}
   156 native = nil
   156 native = nil
   191 
   191 
   192 function AnimationSetup()
   192 function AnimationSetup()
   193   startAnim = {}
   193   startAnim = {}
   194   local m = m5DeployedNum
   194   local m = m5DeployedNum
   195   table.insert(startAnim, {func = AnimWait, args = {native, 3000}})
   195   table.insert(startAnim, {func = AnimWait, args = {native, 3000}})
   196   table.insert(startAnim, {func = AnimCaption, args = {native, "With the rest of the tribe gone, it was up to " .. nativeNames[m5DeployedNum] .. " to save the village.", 5000}})
   196   table.insert(startAnim, {func = AnimCaption, args = {native, loc("With the rest of the tribe gone, it was up to ") .. nativeNames[m5DeployedNum] .. loc(" to save the village."), 5000}})
   197   table.insert(startAnim, {func = AnimCaption, args = {native, "But it proved to be no easy task!", 2000}})
   197   table.insert(startAnim, {func = AnimCaption, args = {native, loc("But it proved to be no easy task!"), 2000}})
   198   for i = 1, 4 do
   198   for i = 1, 4 do
   199     table.insert(startAnim, {func = FollowGear, swh = false, args = {cyborgs[i]}})
   199     table.insert(startAnim, {func = FollowGear, swh = false, args = {cyborgs[i]}})
   200     table.insert(startAnim, {func = AnimWait, args = {native, 1000}})
   200     table.insert(startAnim, {func = AnimWait, args = {native, 1000}})
   201   end
   201   end
   202   table.insert(startAnim, {func = FollowGear, swh = false, args = {native}})
   202   table.insert(startAnim, {func = FollowGear, swh = false, args = {native}})
   203   if m == leaksNum then
   203   if m == leaksNum then
   204     table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 50, 0}})
   204     table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 50, 0}})
   205     table.insert(startAnim, {func = AnimSay, args = {native, "What a strange cave!", SAY_THINK, 0}})
   205     table.insert(startAnim, {func = AnimSay, args = {native, loc("What a strange cave!"), SAY_THINK, 0}})
   206     table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 200, 0}})
   206     table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 200, 0}})
   207     table.insert(startAnim, {func = AnimSay, args = {native, "Now how do I get on the other side?!", SAY_THINK, 5500}})
   207     table.insert(startAnim, {func = AnimSay, args = {native, loc("Now how do I get on the other side?!"), SAY_THINK, 5500}})
   208   elseif m == denseNum then
   208   elseif m == denseNum then
   209     table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 50, 0}})
   209     table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 50, 0}})
   210     table.insert(startAnim, {func = AnimSay, args = {native, "Dude, what's this place?!", SAY_THINK, 0}})
   210     table.insert(startAnim, {func = AnimSay, args = {native, loc("Dude, what's this place?!"), SAY_THINK, 0}})
   211     table.insert(startAnim, {func = AnimCustomFunction, args = {native, EmitDenseClouds, {"Right"}}})
   211     table.insert(startAnim, {func = AnimCustomFunction, args = {native, EmitDenseClouds, {"Right"}}})
   212     table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 200, 0}})
   212     table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 200, 0}})
   213     table.insert(startAnim, {func = AnimSay, args = {native, "And where's all the weed?", SAY_THINK, 4000}})
   213     table.insert(startAnim, {func = AnimSay, args = {native, loc("And where's all the weed?"), SAY_THINK, 4000}})
   214   elseif m == waterNum then
   214   elseif m == waterNum then
   215     table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 50, 0}})
   215     table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 50, 0}})
   216     table.insert(startAnim, {func = AnimSay, args = {native, "Is this place in my head?", SAY_THINK, 0}})
   216     table.insert(startAnim, {func = AnimSay, args = {native, loc("Is this place in my head?"), SAY_THINK, 0}})
   217     table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 200, 0}})
   217     table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 200, 0}})
   218     table.insert(startAnim, {func = AnimSay, args = {native, "I shouldn't have drunk that last pint.", SAY_THINK, 6000}})
   218     table.insert(startAnim, {func = AnimSay, args = {native, loc("I shouldn't have drunk that last pint."), SAY_THINK, 6000}})
   219   elseif m == buffaloNum then
   219   elseif m == buffaloNum then
   220     table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 50, 0}})
   220     table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 50, 0}})
   221     table.insert(startAnim, {func = AnimSay, args = {native, "Where did that alien run?", SAY_THINK, 0}})
   221     table.insert(startAnim, {func = AnimSay, args = {native, loc("Where did that alien run?"), SAY_THINK, 0}})
   222     table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 200, 0}})
   222     table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 200, 0}})
   223     table.insert(startAnim, {func = AnimSay, args = {native, "When I find it...", SAY_THINK, 3000}})
   223     table.insert(startAnim, {func = AnimSay, args = {native, loc("When I find it..."), SAY_THINK, 3000}})
   224   elseif m == princessNum then
   224   elseif m == princessNum then
   225     table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 50, 0}})
   225     table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 50, 0}})
   226     table.insert(startAnim, {func = AnimSay, args = {native, "A woman shouldn't do this kind of thing!", SAY_THINK, 0}})
   226     table.insert(startAnim, {func = AnimSay, args = {native, loc("A woman shouldn't do this kind of thing!"), SAY_THINK, 0}})
   227     table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 200, 0}})
   227     table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 200, 0}})
   228     table.insert(startAnim, {func = AnimSay, args = {native, "I could be eating snails right now.", SAY_THINK, 5500}})
   228     table.insert(startAnim, {func = AnimSay, args = {native, loc("I could be eating snails right now."), SAY_THINK, 5500}})
   229   elseif m == chiefNum then
   229   elseif m == chiefNum then
   230     table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 50, 0}})
   230     table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 50, 0}})
   231     table.insert(startAnim, {func = AnimSay, args = {native, "What is this place?", SAY_THINK, 0}})
   231     table.insert(startAnim, {func = AnimSay, args = {native, loc("What is this place?"), SAY_THINK, 0}})
   232     table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 200, 0}})
   232     table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 200, 0}})
   233     table.insert(startAnim, {func = AnimSay, args = {native, "It doesn't matter. I won't let that alien hurt my daughter!", SAY_THINK, 8500}})
   233     table.insert(startAnim, {func = AnimSay, args = {native, loc("It doesn't matter. I won't let that alien hurt my daughter!"), SAY_THINK, 8500}})
   234   elseif m == wiseNum then
   234   elseif m == wiseNum then
   235     table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 50, 0}})
   235     table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 50, 0}})
   236     table.insert(startAnim, {func = AnimSay, args = {native, "Every single time!", SAY_THINK, 0}})
   236     table.insert(startAnim, {func = AnimSay, args = {native, loc("Every single time!"), SAY_THINK, 0}})
   237     table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 200, 0}})
   237     table.insert(startAnim, {func = AnimMove, args = {native, "Right", nativePos[1] + 200, 0}})
   238     table.insert(startAnim, {func = AnimSay, args = {native, "How come in a village full of warriors, it's up to me to save it?", SAY_THINK, 8500}})
   238     table.insert(startAnim, {func = AnimSay, args = {native, loc("How come in a village full of warriors, it's up to me to save it?"), SAY_THINK, 8500}})
   239   end
   239   end
   240 
   240 
   241   table.insert(startAnim, {func = AnimCustomFunction, args = {native, RestoreHedge, {cyborg, unpack(cyborgPos)}}})
   241   table.insert(startAnim, {func = AnimCustomFunction, args = {native, RestoreHedge, {cyborg, unpack(cyborgPos)}}})
   242   table.insert(startAnim, {func = AnimOutOfNowhere, args = {cyborg, unpack(cyborgPos)}})
   242   table.insert(startAnim, {func = AnimOutOfNowhere, args = {cyborg, unpack(cyborgPos)}})
   243   table.insert(startAnim, {func = AnimTurn, args = {cyborg, "Left"}})
   243   table.insert(startAnim, {func = AnimTurn, args = {cyborg, "Left"}})
   244   table.insert(startAnim, {func = AnimSay, args = {cyborg, "Greetings, " .. nativeUnNames[m] .. "!", SAY_SAY, 2500}})
   244   table.insert(startAnim, {func = AnimSay, args = {cyborg, loc("Greetings, ") .. nativeUnNames[m] .. "!", SAY_SAY, 2500}})
   245   table.insert(startAnim, {func = AnimSay, args = {cyborg, "As you can see, there is no way to get on the other side!", SAY_SAY, 7000}})
   245   table.insert(startAnim, {func = AnimSay, args = {cyborg, loc("As you can see, there is no way to get on the other side!"), SAY_SAY, 7000}})
   246   table.insert(startAnim, {func = AnimSay, args = {cyborg, "I wish to help you, " .. nativeUnNames[m] .. "!", SAY_SAY, 4000}})
   246   table.insert(startAnim, {func = AnimSay, args = {cyborg, loc("I wish to help you, ") .. nativeUnNames[m] .. "!", SAY_SAY, 4000}})
   247   table.insert(startAnim, {func = AnimSay, args = {cyborg, "Beware, though! If you are slow, you die!", SAY_SAY, 7000}})
   247   table.insert(startAnim, {func = AnimSay, args = {cyborg, loc("Beware, though! If you are slow, you die!"), SAY_SAY, 7000}})
   248   table.insert(startAnim, {func = AnimDisappear, args = {cyborg, unpack(cyborgPos)}})
   248   table.insert(startAnim, {func = AnimDisappear, args = {cyborg, unpack(cyborgPos)}})
   249   table.insert(startAnim, {func = AnimSwitchHog, args = {native}})
   249   table.insert(startAnim, {func = AnimSwitchHog, args = {native}})
   250   table.insert(startAnim, {func = AnimCustomFunction, args = {native, HideHedge, {cyborg}}})
   250   table.insert(startAnim, {func = AnimCustomFunction, args = {native, HideHedge, {cyborg}}})
   251   table.insert(startAnim, {func = AnimSay, args = {native, "Talk about mixed signals...", SAY_SAY, 4000}})
   251   table.insert(startAnim, {func = AnimSay, args = {native, loc("Talk about mixed signals..."), SAY_SAY, 4000}})
   252   AddSkipFunction(startAnim, SkipStartAnim, {})
   252   AddSkipFunction(startAnim, SkipStartAnim, {})
   253 end
   253 end
   254 
   254 
   255 function SetupKillAnim()
   255 function SetupKillAnim()
   256   table.insert(killAnim, {func = AnimSay, args = {native, "Well, that was a waste of time.", SAY_THINK, 5000}})
   256   table.insert(killAnim, {func = AnimSay, args = {native, loc("Well, that was a waste of time."), SAY_THINK, 5000}})
   257   table.insert(killAnim, {func = AnimCustomFunction, args = {native, RestoreHedge, {cyborg, unpack(cyborgPos)}}})
   257   table.insert(killAnim, {func = AnimCustomFunction, args = {native, RestoreHedge, {cyborg, unpack(cyborgPos)}}})
   258   table.insert(killAnim, {func = AnimOutOfNowhere, args = {cyborg, unpack(cyborgPos)}})
   258   table.insert(killAnim, {func = AnimOutOfNowhere, args = {cyborg, unpack(cyborgPos)}})
   259   table.insert(killAnim, {func = AnimCustomFunction, args = {cyborg, CondNeedToTurn, {cyborg, native}}})
   259   table.insert(killAnim, {func = AnimCustomFunction, args = {cyborg, CondNeedToTurn, {cyborg, native}}})
   260   table.insert(killAnim, {func = AnimSay, args = {cyborg, "You bear impressive skills, " .. nativeUnNames[m5DeployedNum] .. "!", SAY_SHOUT, 4000}})
   260   table.insert(killAnim, {func = AnimSay, args = {cyborg, loc("You bear impressive skills, ") .. nativeUnNames[m5DeployedNum] .. "!", SAY_SHOUT, 4000}})
   261   table.insert(killAnim, {func = AnimSay, args = {cyborg, "However, my mates don't agree with me on leting you go...", SAY_SHOUT, 7000}})
   261   table.insert(killAnim, {func = AnimSay, args = {cyborg, loc("However, my mates don't agree with me on leting you go..."), SAY_SHOUT, 7000}})
   262   table.insert(killAnim, {func = AnimSay, args = {cyborg, "I guess you'll have to kill them.", SAY_SHOUT, 4000}})
   262   table.insert(killAnim, {func = AnimSay, args = {cyborg, loc("I guess you'll have to kill them."), SAY_SHOUT, 4000}})
   263   table.insert(killAnim, {func = AnimDisappear, args = {cyborg, unpack(cyborgPos)}})
   263   table.insert(killAnim, {func = AnimDisappear, args = {cyborg, unpack(cyborgPos)}})
   264   table.insert(killAnim, {func = AnimSwitchHog, args = {native}})
   264   table.insert(killAnim, {func = AnimSwitchHog, args = {native}})
   265   table.insert(killAnim, {func = AnimWait, args = {native, 1}})
   265   table.insert(killAnim, {func = AnimWait, args = {native, 1}})
   266   table.insert(killAnim, {func = AnimCustomFunction, args = {native, HideHedge, {cyborg}}})
   266   table.insert(killAnim, {func = AnimCustomFunction, args = {native, HideHedge, {cyborg}}})
   267   AddSkipFunction(killAnim, SkipKillAnim, {})
   267   AddSkipFunction(killAnim, SkipKillAnim, {})
   270 function SetupKilledAnim()
   270 function SetupKilledAnim()
   271   table.insert(killedAnim, {func = AnimWait, args = {cyborg, 3000}})
   271   table.insert(killedAnim, {func = AnimWait, args = {cyborg, 3000}})
   272   table.insert(killedAnim, {func = AnimOutOfNowhere, args = {cyborg, unpack(secondPos[2])}})
   272   table.insert(killedAnim, {func = AnimOutOfNowhere, args = {cyborg, unpack(secondPos[2])}})
   273   table.insert(killedAnim, {func = AnimOutOfNowhere, args = {native, unpack(secondPos[1])}})
   273   table.insert(killedAnim, {func = AnimOutOfNowhere, args = {native, unpack(secondPos[1])}})
   274   table.insert(killedAnim, {func = AnimCustomFunction, args = {cyborg, CondNeedToTurn, {cyborg, native}}})
   274   table.insert(killedAnim, {func = AnimCustomFunction, args = {cyborg, CondNeedToTurn, {cyborg, native}}})
   275   table.insert(killedAnim, {func = AnimSay, args = {cyborg, "Nice work, " .. nativeUnNames[m5DeployedNum] .. "!", SAY_SHOUT, 4000}})
   275   table.insert(killedAnim, {func = AnimSay, args = {cyborg, loc("Nice work, ") .. nativeUnNames[m5DeployedNum] .. "!", SAY_SHOUT, 4000}})
   276   table.insert(killedAnim, {func = AnimSay, args = {cyborg, "As a reward for your performance, here's some new technology!", SAY_SHOUT, 8000}})
   276   table.insert(killedAnim, {func = AnimSay, args = {cyborg, loc("As a reward for your performance, here's some new technology!"), SAY_SHOUT, 8000}})
   277   table.insert(killedAnim, {func = AnimSay, args = {cyborg, "Use it wisely!", SAY_SHOUT, 8000}})
   277   table.insert(killedAnim, {func = AnimSay, args = {cyborg, loc("Use it wisely!"), SAY_SHOUT, 8000}})
   278   table.insert(killedAnim, {func = AnimDisappear, args = {cyborg, unpack(secondPos[2])}})
   278   table.insert(killedAnim, {func = AnimDisappear, args = {cyborg, unpack(secondPos[2])}})
   279   table.insert(killedAnim, {func = AnimSwitchHog, args = {native}})
   279   table.insert(killedAnim, {func = AnimSwitchHog, args = {native}})
   280   AddSkipFunction(killedAnim, SkipKilledAnim, {})
   280   AddSkipFunction(killedAnim, SkipKilledAnim, {})
   281 end
   281 end
   282 --------------------------Anim skip functions--------------------------
   282 --------------------------Anim skip functions--------------------------
   294     cratesNum = cratesNum + 1
   294     cratesNum = cratesNum + 1
   295   end
   295   end
   296   FollowGear(native)
   296   FollowGear(native)
   297   AddNewEvent(CheckGearsDead, {{crates[1], crates[2]}}, PutCrates, {2}, 0) 
   297   AddNewEvent(CheckGearsDead, {{crates[1], crates[2]}}, PutCrates, {2}, 0) 
   298   TurnTimeLeft = TurnTime
   298   TurnTimeLeft = TurnTime
   299   ShowMission("Dragon's Lair", "Obstacle course", "In order to get to the other side, you need to collect the crates first.|" ..
   299   ShowMission(loc("Dragon's Lair"), loc("Obstacle course"), loc("In order to get to the other side, you need to collect the crates first.|") ..
   300                                                   "As the ammo is sparse, you might want to reuse ropes while mid-air.|" ..
   300                                                   loc("As the ammo is sparse, you might want to reuse ropes while mid-air.|") ..
   301                                                   "If you wish to restart the course, press [Precise]!|" ..
   301                                                   loc("If you wish to restart the course, press [Precise]!|") ..
   302                                                   "The enemy can't move but it might be a good idea to stay out of sight!|" ..
   302                                                   loc("The enemy can't move but it might be a good idea to stay out of sight!|") ..
   303                                                   "You have " .. SuddenDeathTurns .. " turns until Sudden Death! Better hurry!", 1, 20000)
   303                                                   loc("You have ") .. SuddenDeathTurns .. loc(" turns until Sudden Death! Better hurry!"), 1, 20000)
   304 end
   304 end
   305 
   305 
   306 function SkipKillAnim()
   306 function SkipKillAnim()
   307   AnimSwitchHog(native)
   307   AnimSwitchHog(native)
   308   AnimWait(native, 1)
   308   AnimWait(native, 1)
   311 
   311 
   312 function AfterKillAnim()
   312 function AfterKillAnim()
   313   PutWeaponCrates()
   313   PutWeaponCrates()
   314   TurnTimeLeft = TurnTime
   314   TurnTimeLeft = TurnTime
   315   AddEvent(CheckCyborgsDead, {}, DoCyborgsDead, {}, 0)
   315   AddEvent(CheckCyborgsDead, {}, DoCyborgsDead, {}, 0)
   316   ShowMission("Dragon's Lair", "The Slaughter", "Kill the aliens!", 1, 2000)
   316   ShowMission(loc("Dragon's Lair"), loc("The Slaughter"), loc("Kill the aliens!"), 1, 2000)
   317 end
   317 end
   318 
   318 
   319 function SkipKilledAnim()
   319 function SkipKilledAnim()
   320   AnimSwitchHog(native)
   320   AnimSwitchHog(native)
   321   AnimWait(native, 1)
   321   AnimWait(native, 1)
   326   TurnTimeLeft = TurnTime
   326   TurnTimeLeft = TurnTime
   327   SetGearMessage(native, 0)
   327   SetGearMessage(native, 0)
   328   AddAmmo(native, amPortalGun, 100)
   328   AddAmmo(native, amPortalGun, 100)
   329   SpawnUtilityCrate(2259, 755, amTeleport, 2)
   329   SpawnUtilityCrate(2259, 755, amTeleport, 2)
   330   SpawnHealthCrate(secondPos[1][1] + 30, secondPos[1][2])
   330   SpawnHealthCrate(secondPos[1][1] + 30, secondPos[1][2])
   331   ShowMission("Dragon's Lair", "The what?!", "Use the portal gun to get to the next crate, then use the new gun to get to the final destination!|"..
   331   ShowMission(loc("Dragon's Lair"), loc("The what?!"), loc("Use the portal gun to get to the next crate, then use the new gun to get to the final destination!|")..
   332                                              "Portal hint: one goes to the destination, and one is the entrance.|"..
   332                                              loc("Portal hint: one goes to the destination, and one is the entrance.|")..
   333                                              "Teleport hint: just use the mouse to select the destination!", 1, 0)
   333                                              loc("Teleport hint: just use the mouse to select the destination!"), 1, 0)
   334 end
   334 end
   335 -----------------------------Events------------------------------------
   335 -----------------------------Events------------------------------------
   336 
   336 
   337 function CheckCyborgsDead()
   337 function CheckCyborgsDead()
   338   return cyborgsLeft == 0
   338   return cyborgsLeft == 0
   386     FollowGear(native)
   386     FollowGear(native)
   387   else
   387   else
   388     AddEvent(StoppedGear, {native}, DoCratesTaken, {}, 0)
   388     AddEvent(StoppedGear, {native}, DoCratesTaken, {}, 0)
   389   end
   389   end
   390   if index == 4 then
   390   if index == 4 then
   391     AnimSay(native, "I'm a ninja.", SAY_THINK, 0)
   391     AnimSay(native, loc("I'm a ninja."), SAY_THINK, 0)
   392   end
   392   end
   393 end
   393 end
   394 
   394 
   395 function CheckMissionFinished()
   395 function CheckMissionFinished()
   396   return gearDead[jetCrate] == true
   396   return gearDead[jetCrate] == true
   397 end
   397 end
   398 
   398 
   399 function DoMissionFinished()
   399 function DoMissionFinished()
   400   AddCaption("Salvation was one step closer now...")
   400   AddCaption(loc("Salvation was one step closer now..."))
   401   SaveCampaignVar("Progress", "6")
   401   SaveCampaignVar("Progress", "6")
   402   ParseCommand("teamgone " .. loc("011101001"))
   402   ParseCommand("teamgone " .. loc("011101001"))
   403   TurnTimeLeft = 0
   403   TurnTimeLeft = 0
   404 end
   404 end
   405 
   405 
   578   SetupPlace()
   578   SetupPlace()
   579   AnimationSetup()
   579   AnimationSetup()
   580   SetupEvents()
   580   SetupEvents()
   581   AddAnim(startAnim)
   581   AddAnim(startAnim)
   582   AddFunction({func = AfterStartAnim, args = {}})
   582   AddFunction({func = AfterStartAnim, args = {}})
   583   ShowMission("Dragon's lair", "Y Chwiliad", "Find your tribe!|Cross the lake!", 1, 0)
   583   ShowMission(loc("Dragon's Lair"), loc("Y Chwiliad"), loc("Find your tribe!|Cross the lake!"), 1, 0)
   584 end
   584 end
   585 
   585 
   586 function onGameTick()
   586 function onGameTick()
   587   AnimUnWait()
   587   AnimUnWait()
   588   if ShowAnimation() == false then
   588   if ShowAnimation() == false then
   632     TurnTimeLeft = 30000
   632     TurnTimeLeft = 30000
   633   elseif GetHogTeamName(CurrentHedgehog) == loc("011101001") then
   633   elseif GetHogTeamName(CurrentHedgehog) == loc("011101001") then
   634     TurnTimeLeft = 0
   634     TurnTimeLeft = 0
   635   else
   635   else
   636     SetInputMask(0xFFFFFFFF)
   636     SetInputMask(0xFFFFFFFF)
   637     AddCaption("Turns until Sudden Death: " .. SuddenDeathTurns - TotalRounds)
   637     AddCaption(loc("Turns until Sudden Death: ") .. SuddenDeathTurns - TotalRounds)
   638     if retry == true then
   638     if retry == true then
   639       DoRetry()
   639       DoRetry()
   640     end
   640     end
   641   end
   641   end
   642 end
   642 end