share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/backstab.lua
changeset 7259 b630df7ac843
parent 7255 93cf6b3b89be
child 7417 2520705b857f
equal deleted inserted replaced
7257:566bdf2f023b 7259:b630df7ac843
   138     if nativeDead[i] ~= true and nativeHidden[i] ~= true then
   138     if nativeDead[i] ~= true and nativeHidden[i] ~= true then
   139       gearr = natives[i]
   139       gearr = natives[i]
   140     end
   140     end
   141     i = i + 1
   141     i = i + 1
   142   end
   142   end
   143   AnimInsertStepNext({func = AnimSay, args = {natives[wiseNum], "We are indeed.", SAY_SAY, 2500}})
   143   AnimInsertStepNext({func = AnimSay, args = {natives[wiseNum], loc("We are indeed."), SAY_SAY, 2500}})
   144   AnimInsertStepNext({func = AnimSay, args = {gearr, "I think we are safe here.", SAY_SAY, 4000}})
   144   AnimInsertStepNext({func = AnimSay, args = {gearr, loc("I think we are safe here."), SAY_SAY, 4000}})
   145 end
   145 end
   146 
   146 
   147 function ReviveNatives()
   147 function ReviveNatives()
   148   for i = 1, 7 do
   148   for i = 1, 7 do
   149     if nativeHidden[i] == true and nativeDead[i] ~= true then
   149     if nativeHidden[i] == true and nativeDead[i] ~= true then
   155   end
   155   end
   156 end
   156 end
   157 
   157 
   158 function WonderAlive()
   158 function WonderAlive()
   159   if nativeRevived[waterNum] == true then
   159   if nativeRevived[waterNum] == true then
   160     AnimInsertStepNext({func = AnimSay, args = {natives[waterNum], "I'm...alive? How? Why?", SAY_THINK, 3500}})
   160     AnimInsertStepNext({func = AnimSay, args = {natives[waterNum], loc("I'm...alive? How? Why?"), SAY_THINK, 3500}})
   161     AnimInsertStepNext({func = AnimWait, args = {natives[waterNum], 800}})
   161     AnimInsertStepNext({func = AnimWait, args = {natives[waterNum], 800}})
   162     AnimInsertStepNext({func = AnimTurn, args = {natives[waterNum], "Left"}})
   162     AnimInsertStepNext({func = AnimTurn, args = {natives[waterNum], "Left"}})
   163     AnimInsertStepNext({func = AnimWait, args = {natives[waterNum], 800}})
   163     AnimInsertStepNext({func = AnimWait, args = {natives[waterNum], 800}})
   164     AnimInsertStepNext({func = AnimTurn, args = {natives[waterNum], "Right"}})
   164     AnimInsertStepNext({func = AnimTurn, args = {natives[waterNum], "Right"}})
   165   end
   165   end
   166   if nativeRevived[leaksNum] == true and nativeRevived[denseNum] == true then
   166   if nativeRevived[leaksNum] == true and nativeRevived[denseNum] == true then
   167     AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], "But why would they help us?", SAY_SAY, 4000}})
   167     AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], loc("But why would they help us?"), SAY_SAY, 4000}})
   168     AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], "It must be the aliens!", SAY_SAY, 3500}})
   168     AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], loc("It must be the aliens!"), SAY_SAY, 3500}})
   169     AnimInsertStepNext({func = AnimSay, args = {natives[princessNum], "You just appeared out of thin air!", SAY_SAY, 5000}})
   169     AnimInsertStepNext({func = AnimSay, args = {natives[princessNum], loc("You just appeared out of thin air!"), SAY_SAY, 5000}})
   170     AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], "But...we died!", SAY_SAY, 2500}})
   170     AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], loc("But...we died!"), SAY_SAY, 2500}})
   171     AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], "This must be the caves!", SAY_SAY, 3500}})
   171     AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], loc("This must be the caves!"), SAY_SAY, 3500}})
   172     AnimInsertStepNext({func = AnimSay, args = {natives[denseNum], "Dude, where are we?", SAY_SAY, 3000}})
   172     AnimInsertStepNext({func = AnimSay, args = {natives[denseNum], loc("Dude, where are we?"), SAY_SAY, 3000}})
   173     AnimInsertStepNext({func = AnimWait, args = {natives[leaksNum], 800}})
   173     AnimInsertStepNext({func = AnimWait, args = {natives[leaksNum], 800}})
   174     AnimInsertStepNext({func = AnimTurn, args = {natives[leaksNum], "Right"}})
   174     AnimInsertStepNext({func = AnimTurn, args = {natives[leaksNum], "Right"}})
   175     AnimInsertStepNext({func = AnimTurn, args = {natives[denseNum], "Left"}})
   175     AnimInsertStepNext({func = AnimTurn, args = {natives[denseNum], "Left"}})
   176     AnimInsertStepNext({func = AnimWait, args = {natives[leaksNum], 800}})
   176     AnimInsertStepNext({func = AnimWait, args = {natives[leaksNum], 800}})
   177     AnimInsertStepNext({func = AnimTurn, args = {natives[leaksNum], "Left"}})
   177     AnimInsertStepNext({func = AnimTurn, args = {natives[leaksNum], "Left"}})
   185     AnimInsertStepNext({func = AnimCustomFunction, swh = false, args = {natives[leaksNum], CondNeedToTurn, {natives[leaksNum], natives[princessNum]}}})
   185     AnimInsertStepNext({func = AnimCustomFunction, swh = false, args = {natives[leaksNum], CondNeedToTurn, {natives[leaksNum], natives[princessNum]}}})
   186     if nativeDead[chiefNum] ~= true then
   186     if nativeDead[chiefNum] ~= true then
   187       AnimInsertStepNext({func = AnimTurn, args = {natives[chiefNum], "Right"}})
   187       AnimInsertStepNext({func = AnimTurn, args = {natives[chiefNum], "Right"}})
   188     end
   188     end
   189   elseif nativeRevived[leaksNum] == true then
   189   elseif nativeRevived[leaksNum] == true then
   190     AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], "Why would they do this?", SAY_SAY, 6000}})
   190     AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], loc("Why would they do this?"), SAY_SAY, 6000}})
   191     AnimInsertStepNext({func = AnimSay, args = {natives[wiseNum], "It must be the aliens' deed.", SAY_SAY, 5000}})
   191     AnimInsertStepNext({func = AnimSay, args = {natives[wiseNum], loc("It must be the aliens' deed."), SAY_SAY, 5000}})
   192     AnimInsertStepNext({func = AnimSay, args = {natives[wiseNum], "Do not laugh, inexperienced one, for he speaks the truth!", SAY_SAY, 10000}})
   192     AnimInsertStepNext({func = AnimSay, args = {natives[wiseNum], loc("Do not laugh, inexperienced one, for he speaks the truth!"), SAY_SAY, 10000}})
   193     AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], "Yeah, sure! I died. Hillarious!", SAY_SAY, 6000}})
   193     AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], loc("Yeah, sure! I died. Hillarious!"), SAY_SAY, 6000}})
   194     AnimInsertStepNext({func = AnimSay, args = {gearr, "You're...alive!? But we saw you die!", SAY_SAY, 6000}})
   194     AnimInsertStepNext({func = AnimSay, args = {gearr, loc("You're...alive!? But we saw you die!"), SAY_SAY, 6000}})
   195     AnimInsertStepNext({func = AnimSay, args = {gearr, "???", SAY_SAY, 2000}})
   195     AnimInsertStepNext({func = AnimSay, args = {gearr, loc("???"), SAY_SAY, 2000}})
   196     AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], "Wow, what a dream!", SAY_SAY, 3000}})
   196     AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], loc("Wow, what a dream!"), SAY_SAY, 3000}})
   197     if nativeDead[chiefNum] ~= true then
   197     if nativeDead[chiefNum] ~= true then
   198       AnimInsertStepNext({func = AnimTurn, args = {natives[chiefNum], "Right"}})
   198       AnimInsertStepNext({func = AnimTurn, args = {natives[chiefNum], "Right"}})
   199     end
   199     end
   200     AnimInsertStepNext({func = AnimCustomFunction, swh = false, args = {natives[leaksNum], CondNeedToTurn, {natives[leaksNum], natives[wiseNum]}}})
   200     AnimInsertStepNext({func = AnimCustomFunction, swh = false, args = {natives[leaksNum], CondNeedToTurn, {natives[leaksNum], natives[wiseNum]}}})
   201     AnimInsertStepNext({func = AnimCustomFunction, swh = false, args = {natives[leaksNum], CondNeedToTurn, {natives[leaksNum], gearr}}})
   201     AnimInsertStepNext({func = AnimCustomFunction, swh = false, args = {natives[leaksNum], CondNeedToTurn, {natives[leaksNum], gearr}}})
   202   elseif nativeRevived[denseNum] == true then
   202   elseif nativeRevived[denseNum] == true then
   203     AnimInsertStepNext({func = AnimSay, args = {natives[denseNum], "Dude, that's so cool!", SAY_SAY, 3000}})
   203     AnimInsertStepNext({func = AnimSay, args = {natives[denseNum], loc("Dude, that's so cool!"), SAY_SAY, 3000}})
   204     AnimInsertStepNext({func = AnimSay, args = {natives[wiseNum], "It must be the aliens' deed.", SAY_SAY, 5000}})
   204     AnimInsertStepNext({func = AnimSay, args = {natives[wiseNum], loc("It must be the aliens' deed."), SAY_SAY, 5000}})
   205     AnimInsertStepNext({func = AnimSay, args = {natives[denseNum], "But that's impossible!", SAY_SAY, 3000}})
   205     AnimInsertStepNext({func = AnimSay, args = {natives[denseNum], loc("But that's impossible!"), SAY_SAY, 3000}})
   206     AnimInsertStepNext({func = AnimSay, args = {natives[wiseNum], "It was not a dream, unwise one!", SAY_SAY, 5000}})
   206     AnimInsertStepNext({func = AnimSay, args = {natives[wiseNum], loc("It was not a dream, unwise one!"), SAY_SAY, 5000}})
   207     AnimInsertStepNext({func = AnimSay, args = {natives[denseNum], "Exactly, man! That was my dream.", SAY_SAY, 5000}})
   207     AnimInsertStepNext({func = AnimSay, args = {natives[denseNum], loc("Exactly, man! That was my dream."), SAY_SAY, 5000}})
   208     AnimInsertStepNext({func = AnimSay, args = {gearr, "You're...alive!? But we saw you die!", SAY_SAY,  6000}})
   208     AnimInsertStepNext({func = AnimSay, args = {gearr, loc("You're...alive!? But we saw you die!"), SAY_SAY,  6000}})
   209     AnimInsertStepNext({func = AnimSay, args = {gearr, "???", SAY_SAY, 2000}})
   209     AnimInsertStepNext({func = AnimSay, args = {gearr, loc("???"), SAY_SAY, 2000}})
   210     AnimInsertStepNext({func = AnimSay, args = {natives[denseNum], "Dude, wow! I just had the weirdest high!", SAY_SAY, 6000}})
   210     AnimInsertStepNext({func = AnimSay, args = {natives[denseNum], loc("Dude, wow! I just had the weirdest high!"), SAY_SAY, 6000}})
   211     if nativeDead[chiefNum] ~= true then
   211     if nativeDead[chiefNum] ~= true then
   212       AnimInsertStepNext({func = AnimTurn, args = {natives[chiefNum], "Right"}})
   212       AnimInsertStepNext({func = AnimTurn, args = {natives[chiefNum], "Right"}})
   213     end
   213     end
   214     AnimInsertStepNext({func = AnimCustomFunction, swh = false, args = {natives[denseNum], CondNeedToTurn, {natives[denseNum], natives[wiseNum]}}})
   214     AnimInsertStepNext({func = AnimCustomFunction, swh = false, args = {natives[denseNum], CondNeedToTurn, {natives[denseNum], natives[wiseNum]}}})
   215     AnimInsertStepNext({func = AnimCustomFunction, swh = false, args = {natives[denseNum], CondNeedToTurn, {natives[denseNum], gearr}}})
   215     AnimInsertStepNext({func = AnimCustomFunction, swh = false, args = {natives[denseNum], CondNeedToTurn, {natives[denseNum], gearr}}})
   220   if needRevival == true and m4WaterDead == 1 then
   220   if needRevival == true and m4WaterDead == 1 then
   221     RestoreCyborg()
   221     RestoreCyborg()
   222     SetGearPosition(cyborg, unpack(cyborgPos))
   222     SetGearPosition(cyborg, unpack(cyborgPos))
   223     AnimInsertStepNext({func = AnimCustomFunction, args = {water, HideCyborg, {}}})
   223     AnimInsertStepNext({func = AnimCustomFunction, args = {water, HideCyborg, {}}})
   224     AnimInsertStepNext({func = AnimSwitchHog, args = {water}})
   224     AnimInsertStepNext({func = AnimSwitchHog, args = {water}})
   225     AnimInsertStepNext({func = AnimSay, args = {cyborg, "The answer is...entertaintment. You'll see what I mean.", SAY_SAY, 8000}})
   225     AnimInsertStepNext({func = AnimSay, args = {cyborg, loc("The answer is...entertaintment. You'll see what I mean."), SAY_SAY, 8000}})
   226     AnimInsertStepNext({func = AnimSay, args = {cyborg, "You're probably wondering why I bought you back...", SAY_SAY, 8000}})
   226     AnimInsertStepNext({func = AnimSay, args = {cyborg, loc("You're probably wondering why I bought you back..."), SAY_SAY, 8000}})
   227   end
   227   end
   228 end
   228 end
   229 
   229 
   230 function SpyDebate()
   230 function SpyDebate()
   231   if m2Choice == choiceAccepted then
   231   if m2Choice == choiceAccepted then
   232     spyHog = natives[denseNum]
   232     spyHog = natives[denseNum]
   233     AnimInsertStepNext({func = AnimSay, args = {natives[wiseNum], "What shall we do with the traitor?", SAY_SAY, 6000}})
   233     AnimInsertStepNext({func = AnimSay, args = {natives[wiseNum], loc("What shall we do with the traitor?"), SAY_SAY, 6000}})
   234     AnimInsertStepNext({func = SetHealth, swh = false, args = {natives[denseNum], 26}})
   234     AnimInsertStepNext({func = SetHealth, swh = false, args = {natives[denseNum], 26}})
   235     AnimInsertStepNext({func = AnimVisualGear, args = {GetGearPosition(natives[denseNum]), vgtExplosion, 0, true}})
   235     AnimInsertStepNext({func = AnimVisualGear, args = {GetGearPosition(natives[denseNum]), vgtExplosion, 0, true}})
   236     AnimInsertStepNext({func = AnimSay, args = {natives[wiseNum], "Here, let me help you!", SAY_SAY, 3000}})
   236     AnimInsertStepNext({func = AnimSay, args = {natives[wiseNum], loc("Here, let me help you!"), SAY_SAY, 3000}})
   237     if nativeDead[chiefNum] == true then
   237     if nativeDead[chiefNum] == true then
   238       AnimInsertStepNext({func = AnimSay, args = {natives[princessNum], "You killed my father, you monster!", SAY_SAY, 5000}})
   238       AnimInsertStepNext({func = AnimSay, args = {natives[princessNum], loc("You killed my father, you monster!"), SAY_SAY, 5000}})
   239     end
   239     end
   240     AnimInsertStepNext({func = AnimSay, args = {natives[denseNum], "Look, I had no choice!", SAY_SAY, 3000}})
   240     AnimInsertStepNext({func = AnimSay, args = {natives[denseNum], loc("Look, I had no choice!"), SAY_SAY, 3000}})
   241     AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], "You have been giving us out to the enemy, haven't you!", SAY_SAY, 7000}})
   241     AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], loc("You have been giving us out to the enemy, haven't you!"), SAY_SAY, 7000}})
   242     AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], "You're a pathetic liar!", SAY_SAY, 3000}})
   242     AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], loc("You're a pathetic liar!"), SAY_SAY, 3000}})
   243     AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], "Interesting! Last time you said you killed a cannibal!", SAY_SAY, 7000}})
   243     AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], loc("Interesting! Last time you said you killed a cannibal!"), SAY_SAY, 7000}})
   244     AnimInsertStepNext({func = AnimSay, args = {natives[denseNum], "I told you, I just found them.", SAY_SAY, 4500}})
   244     AnimInsertStepNext({func = AnimSay, args = {natives[denseNum], loc("I told you, I just found them."), SAY_SAY, 4500}})
   245     AnimInsertStepNext({func = AnimCustomFunction, args = {natives[denseNum], EmitDenseClouds, {"Left"}}})
   245     AnimInsertStepNext({func = AnimCustomFunction, args = {natives[denseNum], EmitDenseClouds, {"Left"}}})
   246     AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], "Where did you get the weapons in the forest, Dense Cloud?", SAY_SAY, 8000}})
   246     AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], loc("Where did you get the weapons in the forest, Dense Cloud?"), SAY_SAY, 8000}})
   247     AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], "Not now, Fiery Water!", SAY_SAY, 3000}})
   247     AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], loc("Not now, Fiery Water!"), SAY_SAY, 3000}})
   248   else
   248   else
   249     spyHog = natives[waterNum]
   249     spyHog = natives[waterNum]
   250     AnimInsertStepNext({func = AnimSay, args = {natives[wiseNum], "What shall we do with the traitor?", SAY_SAY, 5000}})
   250     AnimInsertStepNext({func = AnimSay, args = {natives[wiseNum], loc("What shall we do with the traitor?"), SAY_SAY, 5000}})
   251     AnimInsertStepNext({func = SetHealth, swh = false, args = {natives[waterNum], 26}})
   251     AnimInsertStepNext({func = SetHealth, swh = false, args = {natives[waterNum], 26}})
   252     AnimInsertStepNext({func = AnimVisualGear, args = {nativePos[denseNum][1] + 50, nativePos[denseNum][2], vgtExplosion, 0, true}})
   252     AnimInsertStepNext({func = AnimVisualGear, args = {nativePos[denseNum][1] + 50, nativePos[denseNum][2], vgtExplosion, 0, true}})
   253     AnimInsertStepNext({func = AnimSay, args = {natives[princessNum], "I can't believe what I'm hearing!", SAY_SAY, 5500}})
   253     AnimInsertStepNext({func = AnimSay, args = {natives[princessNum], loc("I can't believe what I'm hearing!"), SAY_SAY, 5500}})
   254     AnimInsertStepNext({func = AnimSay, args = {natives[waterNum], "You know what? I don't even regret anything!", SAY_SAY, 7000}})
   254     AnimInsertStepNext({func = AnimSay, args = {natives[waterNum], loc("You know what? I don't even regret anything!"), SAY_SAY, 7000}})
   255     AnimInsertStepNext({func = AnimSay, args = {natives[princessNum], "In fact, you are the only one that's been acting strangely.", SAY_SAY, 8000}})
   255     AnimInsertStepNext({func = AnimSay, args = {natives[princessNum], loc("In fact, you are the only one that's been acting strangely."), SAY_SAY, 8000}})
   256     AnimInsertStepNext({func = AnimSay, args = {natives[waterNum], "Are you accusing me of something?", SAY_SAY, 3500}})
   256     AnimInsertStepNext({func = AnimSay, args = {natives[waterNum], loc("Are you accusing me of something?"), SAY_SAY, 3500}})
   257     AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], "Seems like every time you take a \"walk\", the enemy find us!", SAY_SAY, 8000}})
   257     AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], loc("Seems like every time you take a \"walk\", the enemy find us!"), SAY_SAY, 8000}})
   258     AnimInsertStepNext({func = AnimSay, args = {natives[waterNum], "You know...taking a stroll.", SAY_SAY, 3500}})
   258     AnimInsertStepNext({func = AnimSay, args = {natives[waterNum], loc("You know...taking a stroll."), SAY_SAY, 3500}})
   259     AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], "Where have you been?!", SAY_SAY, 3000}})
   259     AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], loc("Where have you been?!"), SAY_SAY, 3000}})
   260   end
   260   end
   261   if nativeRevived[waterNum] == true then
   261   if nativeRevived[waterNum] == true then
   262     AnimInsertStepNext({func = AnimSay, args = {natives[waterNum], "You won't believe what happened to me!", SAY_SAY, 5500}})
   262     AnimInsertStepNext({func = AnimSay, args = {natives[waterNum], loc("You won't believe what happened to me!"), SAY_SAY, 5500}})
   263   end
   263   end
   264   AnimInsertStepNext({func = AnimSay, args = {natives[waterNum], "Hey, guys!", SAY_SAY, 2000}})
   264   AnimInsertStepNext({func = AnimSay, args = {natives[waterNum], loc("Hey, guys!"), SAY_SAY, 2000}})
   265   AnimInsertStepNext({func = AnimMove, args = {natives[waterNum], "Left", nativePos[denseNum][1] + 50, nativePos[denseNum][2]}})
   265   AnimInsertStepNext({func = AnimMove, args = {natives[waterNum], "Left", nativePos[denseNum][1] + 50, nativePos[denseNum][2]}})
   266   AnimInsertStepNext({func = AnimJump, args = {natives[waterNum], "back"}})
   266   AnimInsertStepNext({func = AnimJump, args = {natives[waterNum], "back"}})
   267   AnimInsertStepNext({func = AnimTurn, args = {natives[waterNum], "Right"}})
   267   AnimInsertStepNext({func = AnimTurn, args = {natives[waterNum], "Right"}})
   268   AnimInsertStepNext({func = AnimMove, args = {natives[waterNum], "Left", 1228, 412}})
   268   AnimInsertStepNext({func = AnimMove, args = {natives[waterNum], "Left", 1228, 412}})
   269   AnimInsertStepNext({func = AnimJump, args = {natives[waterNum], "long"}})
   269   AnimInsertStepNext({func = AnimJump, args = {natives[waterNum], "long"}})
   270   AnimInsertStepNext({func = AnimJump, args = {natives[waterNum], "long"}})
   270   AnimInsertStepNext({func = AnimJump, args = {natives[waterNum], "long"}})
   271   AnimInsertStepNext({func = AnimJump, args = {natives[waterNum], "long"}})
   271   AnimInsertStepNext({func = AnimJump, args = {natives[waterNum], "long"}})
   272   AnimInsertStepNext({func = AnimTurn, args = {natives[waterNum], "Left"}})
   272   AnimInsertStepNext({func = AnimTurn, args = {natives[waterNum], "Left"}})
   273   AnimInsertStepNext({func = AnimSay, args = {natives[wiseNum], "There must be a spy among us!", SAY_SAY, 4000}})
   273   AnimInsertStepNext({func = AnimSay, args = {natives[wiseNum], loc("There must be a spy among us!"), SAY_SAY, 4000}})
   274   AnimInsertStepNext({func = AnimSay, args = {natives[princessNum], "We made sure noone followed us!", SAY_SAY, 4000}})
   274   AnimInsertStepNext({func = AnimSay, args = {natives[princessNum], loc("We made sure noone followed us!"), SAY_SAY, 4000}})
   275   AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], "What? Here? How did they find us?!", SAY_SAY, 5000}})
   275   AnimInsertStepNext({func = AnimSay, args = {natives[leaksNum], loc("What? Here? How did they find us?!"), SAY_SAY, 5000}})
   276 end
   276 end
   277 
   277 
   278 function AnimationSetup()
   278 function AnimationSetup()
   279   table.insert(startAnim, {func = AnimWait, args = {natives[leaksNum], 3000}})
   279   table.insert(startAnim, {func = AnimWait, args = {natives[leaksNum], 3000}})
   280   table.insert(startAnim, {func = AnimCustomFunction, swh = false, args = {natives[leaksNum], SaySafe, {}}})
   280   table.insert(startAnim, {func = AnimCustomFunction, swh = false, args = {natives[leaksNum], SaySafe, {}}})
   299     end
   299     end
   300   end
   300   end
   301   table.insert(wave2Anim, {func = AnimOutOfNowhere, args = {cannibals[4], unpack(cannibalPos[4])}})
   301   table.insert(wave2Anim, {func = AnimOutOfNowhere, args = {cannibals[4], unpack(cannibalPos[4])}})
   302   table.insert(wave2Anim, {func = AnimOutOfNowhere, args = {cannibals[5], unpack(cannibalPos[5])}})
   302   table.insert(wave2Anim, {func = AnimOutOfNowhere, args = {cannibals[5], unpack(cannibalPos[5])}})
   303   table.insert(wave2Anim, {func = AnimOutOfNowhere, args = {cannibals[6], unpack(cannibalPos[6])}})
   303   table.insert(wave2Anim, {func = AnimOutOfNowhere, args = {cannibals[6], unpack(cannibalPos[6])}})
   304   table.insert(wave2Anim, {func = AnimSay, args = {speakerHog, "Look out! There's more of them!", SAY_SHOUT, 5000}})
   304   table.insert(wave2Anim, {func = AnimSay, args = {speakerHog, loc("Look out! There's more of them!"), SAY_SHOUT, 5000}})
   305   AddSkipFunction(wave2Anim, SkipWave2Anim, {})
   305   AddSkipFunction(wave2Anim, SkipWave2Anim, {})
   306 end
   306 end
   307 
   307 
   308 function SetupWave2DeadAnim()
   308 function SetupWave2DeadAnim()
   309   for i = 7, 1, -1 do
   309   for i = 7, 1, -1 do
   312     end
   312     end
   313   end
   313   end
   314   if nativeDead[wiseNum] ~= true and band(GetState(natives[wiseNum]), gstDrowning) == 0 then
   314   if nativeDead[wiseNum] ~= true and band(GetState(natives[wiseNum]), gstDrowning) == 0 then
   315     if nativesNum > 1 then
   315     if nativesNum > 1 then
   316       table.insert(wave2DeadAnim, {func = AnimWait, args = {natives[wiseNum], 1500}})
   316       table.insert(wave2DeadAnim, {func = AnimWait, args = {natives[wiseNum], 1500}})
   317       table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], "What a strange feeling!", SAY_THINK, 3000}})
   317       table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("What a strange feeling!"), SAY_THINK, 3000}})
   318       table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], "I need to warn the others.", SAY_THINK, 3000}})
   318       table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("I need to warn the others."), SAY_THINK, 3000}})
   319       table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], "If only I had a way...", SAY_THINK, 3000}})
   319       table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("If only I had a way..."), SAY_THINK, 3000}})
   320       table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], "Oh, silly me! I forgot that I'm the shaman.", SAY_THINK, 6000}})
   320       table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("Oh, silly me! I forgot that I'm the shaman."), SAY_THINK, 6000}})
   321       table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], TeleportNatives, {}}})
   321       table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], TeleportNatives, {}}})
   322       table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], TurnNatives, {natives[wiseNum]}}})
   322       table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], TurnNatives, {natives[wiseNum]}}})
   323       table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], CondNeedToTurn, {natives[wiseNum], deployedHog}}})
   323       table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], CondNeedToTurn, {natives[wiseNum], deployedHog}}})
   324       table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], "I sense another wave of cannibals heading our way!", SAY_SAY, 6500}})
   324       table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("I sense another wave of cannibals heading our way!"), SAY_SAY, 6500}})
   325       table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], "We need to prevent their arrival!", SAY_SAY, 4500}})
   325       table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("We need to prevent their arrival!"), SAY_SAY, 4500}})
   326       table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], "Go, quick!", SAY_SAY, 2500}})
   326       table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("Go, quick!"), SAY_SAY, 2500}})
   327       table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], DeployHog, {}}})
   327       table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], DeployHog, {}}})
   328       table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], RestoreCyborg, {}}})
   328       table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], RestoreCyborg, {}}})
   329       table.insert(wave2DeadAnim, {func = AnimOutOfNowhere, swh = false, args = {cyborg, cyborgPos2[1], cyborgPos2[2]}})
   329       table.insert(wave2DeadAnim, {func = AnimOutOfNowhere, swh = false, args = {cyborg, cyborgPos2[1], cyborgPos2[2]}})
   330       table.insert(wave2DeadAnim, {func = AnimTurn, args = {cyborg, "Left"}})
   330       table.insert(wave2DeadAnim, {func = AnimTurn, args = {cyborg, "Left"}})
   331       table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {cyborg, IsolateNatives, {}}})
   331       table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {cyborg, IsolateNatives, {}}})
   332       table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {cyborg, PutCGI, {}}})
   332       table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {cyborg, PutCGI, {}}})
   333       table.insert(wave2DeadAnim, {func = AnimSay, args = {cyborg, "I want to see how it handles this!", SAY_SAY, 6000}})
   333       table.insert(wave2DeadAnim, {func = AnimSay, args = {cyborg, loc("I want to see how it handles this!"), SAY_SAY, 6000}})
   334       table.insert(wave2DeadAnim, {func = AnimSwitchHog, args = {deployedHog}})
   334       table.insert(wave2DeadAnim, {func = AnimSwitchHog, args = {deployedHog}})
   335       table.insert(wave2DeadAnim, {func = AnimDisappear, args = {cyborg, 0, 0}})
   335       table.insert(wave2DeadAnim, {func = AnimDisappear, args = {cyborg, 0, 0}})
   336       table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {cyborg, DeployHog, {}}})
   336       table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {cyborg, DeployHog, {}}})
   337       table.insert(wave2DeadAnim, {func = AnimCustomFunction, swh = false, args = {cyborg, HideCyborg, {}}})
   337       table.insert(wave2DeadAnim, {func = AnimCustomFunction, swh = false, args = {cyborg, HideCyborg, {}}})
   338     else
   338     else
   339       table.insert(wave2DeadAnim, {func = AnimWait, args = {natives[wiseNum], 1500}})
   339       table.insert(wave2DeadAnim, {func = AnimWait, args = {natives[wiseNum], 1500}})
   340       table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], "What a strange feeling!", SAY_THINK, 3000}})
   340       table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("What a strange feeling!"), SAY_THINK, 3000}})
   341       table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], "I sense another wave of cannibals heading my way!", SAY_THINK, 6500}})
   341       table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("I sense another wave of cannibals heading my way!"), SAY_THINK, 6500}})
   342       table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], "I need to prevent their arrival!", SAY_THINK, 4500}})
   342       table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("I need to prevent their arrival!"), SAY_THINK, 4500}})
   343       table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], "If only I had a way...", SAY_THINK, 3000}})
   343       table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("If only I had a way..."), SAY_THINK, 3000}})
   344       table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], "Oh, silly me! I forgot that I'm the shaman.", SAY_THINK, 6000}})
   344       table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("Oh, silly me! I forgot that I'm the shaman."), SAY_THINK, 6000}})
   345     end
   345     end
   346   else
   346   else
   347     table.insert(wave2DeadAnim, {func = AnimWait, args = {cyborg, 1500}})
   347     table.insert(wave2DeadAnim, {func = AnimWait, args = {cyborg, 1500}})
   348     table.insert(wave2DeadAnim, {func = AnimCustomFunction, swh = false, args = {cyborg, RestoreCyborg, {}}})
   348     table.insert(wave2DeadAnim, {func = AnimCustomFunction, swh = false, args = {cyborg, RestoreCyborg, {}}})
   349     table.insert(wave2DeadAnim, {func = AnimOutOfNowhere, args = {cyborg, cyborgPos2[1], cyborgPos2[2]}})
   349     table.insert(wave2DeadAnim, {func = AnimOutOfNowhere, args = {cyborg, cyborgPos2[1], cyborgPos2[2]}})
   350     table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {cyborg, TeleportNatives, {}}})
   350     table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {cyborg, TeleportNatives, {}}})
   351     table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {cyborg, TurnNatives, {cyborg}}})
   351     table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {cyborg, TurnNatives, {cyborg}}})
   352     table.insert(wave2DeadAnim, {func = AnimSay, args = {cyborg, "Oh, my! This is even more entertaining than I've expected!", SAY_SAY, 7500}})
   352     table.insert(wave2DeadAnim, {func = AnimSay, args = {cyborg, loc("Oh, my! This is even more entertaining than I've expected!"), SAY_SAY, 7500}})
   353     table.insert(wave2DeadAnim, {func = AnimSay, args = {cyborg, "You might want to find a way to instantly kill arriving cannibals!", SAY_SAY, 8000}})
   353     table.insert(wave2DeadAnim, {func = AnimSay, args = {cyborg, loc("You might want to find a way to instantly kill arriving cannibals!"), SAY_SAY, 8000}})
   354     table.insert(wave2DeadAnim, {func = AnimSay, args = {cyborg, "I believe there's more of them.", SAY_SAY, 4000}})
   354     table.insert(wave2DeadAnim, {func = AnimSay, args = {cyborg, loc("I believe there's more of them."), SAY_SAY, 4000}})
   355     if nativesNum > 1 then
   355     if nativesNum > 1 then
   356       table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], RestoreCyborg, {}}})
   356       table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], RestoreCyborg, {}}})
   357       table.insert(wave2DeadAnim, {func = AnimOutOfNowhere, swh = false, args = {cyborg, cyborgPos2[1], cyborgPos2[2]}})
   357       table.insert(wave2DeadAnim, {func = AnimOutOfNowhere, swh = false, args = {cyborg, cyborgPos2[1], cyborgPos2[2]}})
   358       table.insert(wave2DeadAnim, {func = AnimTurn, args = {cyborg, "Left"}})
   358       table.insert(wave2DeadAnim, {func = AnimTurn, args = {cyborg, "Left"}})
   359       table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {cyborg, IsolateNatives, {}}})
   359       table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {cyborg, IsolateNatives, {}}})
   360       table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {cyborg, PutCGI, {}}})
   360       table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {cyborg, PutCGI, {}}})
   361       table.insert(wave2DeadAnim, {func = AnimSay, args = {cyborg, "I want to see how it handles this!", SAY_SAY, 6000}})
   361       table.insert(wave2DeadAnim, {func = AnimSay, args = {cyborg, loc("I want to see how it handles this!"), SAY_SAY, 6000}})
   362     end
   362     end
   363     table.insert(wave2DeadAnim, {func = AnimSwitchHog, args = {deployedHog}})
   363     table.insert(wave2DeadAnim, {func = AnimSwitchHog, args = {deployedHog}})
   364     table.insert(wave2DeadAnim, {func = AnimDisappear, swh = false, args = {cyborg, 0, 0}})
   364     table.insert(wave2DeadAnim, {func = AnimDisappear, swh = false, args = {cyborg, 0, 0}})
   365     table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {deployedHog, DeployHog, {}}})
   365     table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {deployedHog, DeployHog, {}}})
   366     table.insert(wave2DeadAnim, {func = AnimCustomFunction, swh = false, args = {cyborg, HideCyborg, {}}})
   366     table.insert(wave2DeadAnim, {func = AnimCustomFunction, swh = false, args = {cyborg, HideCyborg, {}}})
   439 
   439 
   440 function DeployHog()
   440 function DeployHog()
   441   AnimSwitchHog(deployedHog)
   441   AnimSwitchHog(deployedHog)
   442   AnimTeleportGear(deployedHog, unpack(deployedPos))
   442   AnimTeleportGear(deployedHog, unpack(deployedPos))
   443   if deployedHog ~= natives[wiseNum] then
   443   if deployedHog ~= natives[wiseNum] then
   444     AnimSay(deployedHog, "Why me?!", SAY_THINK, 2000)
   444     AnimSay(deployedHog, loc("Why me?!"), SAY_THINK, 2000)
   445   end
   445   end
   446 end
   446 end
   447 
   447 
   448 function SetupAfterChoiceAnim()
   448 function SetupAfterChoiceAnim()
   449   for i = 7, 1, -1 do
   449   for i = 7, 1, -1 do
   453       end
   453       end
   454     end
   454     end
   455   end
   455   end
   456   if choice == choiceEliminate then
   456   if choice == choiceEliminate then
   457     table.insert(afterChoiceAnim, {func = AnimWait, args = {speakerHog, 1500}})
   457     table.insert(afterChoiceAnim, {func = AnimWait, args = {speakerHog, 1500}})
   458     table.insert(afterChoiceAnim, {func = AnimSay, args = {speakerHog, "He won't be selling us out anymore!", SAY_SAY, 6000}})
   458     table.insert(afterChoiceAnim, {func = AnimSay, args = {speakerHog, loc("He won't be selling us out anymore!"), SAY_SAY, 6000}})
   459     if nativeDead[princessNum] ~= true and m4ChiefDead == 1 then
   459     if nativeDead[princessNum] ~= true and m4ChiefDead == 1 then
   460       table.insert(afterChoiceAnim, {func = AnimSay, args = {natives[princessNum], "That's for my father!", SAY_SAY, 3500}})
   460       table.insert(afterChoiceAnim, {func = AnimSay, args = {natives[princessNum], loc("That's for my father!"), SAY_SAY, 3500}})
   461     end
   461     end
   462     table.insert(afterChoiceAnim, {func = AnimSay, args = {speakerHog, "Let's show those cannibals what we're made of!", SAY_SAY, 7000}})
   462     table.insert(afterChoiceAnim, {func = AnimSay, args = {speakerHog, loc("Let's show those cannibals what we're made of!"), SAY_SAY, 7000}})
   463   else
   463   else
   464     table.insert(afterChoiceAnim, {func = AnimCustomFunction, swh = false, args = {natives[leaksNum], CondNeedToTurn, {speakerHog, spyHog}}})
   464     table.insert(afterChoiceAnim, {func = AnimCustomFunction, swh = false, args = {natives[leaksNum], CondNeedToTurn, {speakerHog, spyHog}}})
   465     table.insert(afterChoiceAnim, {func = AnimSay, args = {speakerHog, "We'll spare your life for now!", SAY_SAY, 4500}})
   465     table.insert(afterChoiceAnim, {func = AnimSay, args = {speakerHog, loc("We'll spare your life for now!"), SAY_SAY, 4500}})
   466     table.insert(afterChoiceAnim, {func = AnimSay, args = {spyHog, "May the spirits aid you in all your quests!", SAY_SAY, 7000}})
   466     table.insert(afterChoiceAnim, {func = AnimSay, args = {spyHog, loc("May the spirits aid you in all your quests!"), SAY_SAY, 7000}})
   467     table.insert(afterChoiceAnim, {func = AnimSay, args = {speakerHog, "I just don't want to sink to your level.", SAY_SAY, 6000}})
   467     table.insert(afterChoiceAnim, {func = AnimSay, args = {speakerHog, loc("I just don't want to sink to your level."), SAY_SAY, 6000}})
   468     table.insert(afterChoiceAnim, {func = AnimSay, args = {speakerHog, "Let's show those cannibals what we're made of!", SAY_SAY, 7000}})
   468     table.insert(afterChoiceAnim, {func = AnimSay, args = {speakerHog, loc("Let's show those cannibals what we're made of!"), SAY_SAY, 7000}})
   469   end
   469   end
   470   table.insert(afterChoiceAnim, {func = AnimSay, args = {natives[8], "Let us help, too!", SAY_SAY, 3000}})
   470   table.insert(afterChoiceAnim, {func = AnimSay, args = {natives[8], loc("Let us help, too!"), SAY_SAY, 3000}})
   471   table.insert(afterChoiceAnim, {func = AnimTurn, args = {speakerHog, "Left", SAY_SAY, 7000}})
   471   table.insert(afterChoiceAnim, {func = AnimTurn, args = {speakerHog, "Left", SAY_SAY, 7000}})
   472   table.insert(afterChoiceAnim, {func = AnimSay, args = {speakerHog, "No. You and the rest of the tribe are safer there!", SAY_SAY, 7000}})
   472   table.insert(afterChoiceAnim, {func = AnimSay, args = {speakerHog, loc("No. You and the rest of the tribe are safer there!"), SAY_SAY, 7000}})
   473   AddSkipFunction(afterChoiceAnim, SkipAfterChoiceAnim, {})
   473   AddSkipFunction(afterChoiceAnim, SkipAfterChoiceAnim, {})
   474 end
   474 end
   475 
   475 
   476 function SetupHogDeadAnim(gear)
   476 function SetupHogDeadAnim(gear)
   477   hogDeadAnim = {}
   477   hogDeadAnim = {}
   499   AddEvent(CheckWaveDead, {1}, DoWaveDead, {1}, 0)
   499   AddEvent(CheckWaveDead, {1}, DoWaveDead, {1}, 0)
   500   AddAmmo(speakerHog, amSwitch, 100)
   500   AddAmmo(speakerHog, amSwitch, 100)
   501   SetGearMessage(speakerHog, 0)
   501   SetGearMessage(speakerHog, 0)
   502   SetState(speakerHog, 0)
   502   SetState(speakerHog, 0)
   503   TurnTimeLeft = -1
   503   TurnTimeLeft = -1
   504   ShowMission("Backstab", "The food bites back", "Defeat the cannibals", 1, 4000)
   504   ShowMission(loc("Backstab"), loc("The food bites back"), loc("Defeat the cannibals"), 1, 4000)
   505   SpawnCrates()
   505   SpawnCrates()
   506 end
   506 end
   507 
   507 
   508 function SkipAfterChoiceAnim()
   508 function SkipAfterChoiceAnim()
   509   SetGearMessage(CurrentHedgehog, 0)
   509   SetGearMessage(CurrentHedgehog, 0)
   539   SpawnPlatformCrates()
   539   SpawnPlatformCrates()
   540   AddEvent(CheckTurnsOver, {}, DoTurnsOver, {3}, 0)
   540   AddEvent(CheckTurnsOver, {}, DoTurnsOver, {3}, 0)
   541   AddEvent(CheckWaveDead, {3}, DoWaveDead, {3}, 0)
   541   AddEvent(CheckWaveDead, {3}, DoWaveDead, {3}, 0)
   542   AddEvent(CheckDeployedDead, {}, DoDeployedDead, {}, 0)
   542   AddEvent(CheckDeployedDead, {}, DoDeployedDead, {}, 0)
   543   TurnTimeLeft = 0
   543   TurnTimeLeft = 0
   544   ShowMission("Backstab", "Drills", "You have 12 turns until the next wave arrives.|Make sure the arriving cannibals are greeted appropriately!|If the hog dies, the cause is lost.|Hint: you might want to use some mines...", 1, 12000)
   544   ShowMission(loc("Backstab"), loc("Drills"), loc("You have 12 turns until the next wave arrives.|Make sure the arriving cannibals are greeted appropriately!|If the hog dies, the cause is lost.|Hint: you might want to use some mines..."), 1, 12000)
   545 end
   545 end
   546 
   546 
   547 function DoTurnsOver()
   547 function DoTurnsOver()
   548   stage = wave3Stage
   548   stage = wave3Stage
   549   RestoreWave(3)
   549   RestoreWave(3)
   572   TurnTimeLeft = -1
   572   TurnTimeLeft = -1
   573   stage = spyKillStage
   573   stage = spyKillStage
   574   AddEvent(CheckChoice, {}, DoChoice, {}, 0)
   574   AddEvent(CheckChoice, {}, DoChoice, {}, 0)
   575   AddEvent(CheckKilledOther, {}, DoKilledOther, {}, 0)
   575   AddEvent(CheckKilledOther, {}, DoKilledOther, {}, 0)
   576   AddEvent(CheckChoiceRefuse, {}, DoChoiceRefuse, {}, 0)
   576   AddEvent(CheckChoiceRefuse, {}, DoChoiceRefuse, {}, 0)
   577   ShowMission("Backstab", "Judas", "Kill the traitor...or spare his life!|Kill him or press [Precise]!", 1, 8000)
   577   ShowMission(loc("Backstab"), loc("Judas"), loc("Kill the traitor...or spare his life!|Kill him or press [Precise]!"), 1, 8000)
   578   ----------------------
   578   ----------------------
   579   SetHealth(natives[leaksNum], 1)
   579   SetHealth(natives[leaksNum], 1)
   580 end
   580 end
   581 
   581 
   582 -----------------------------Events------------------------------------
   582 -----------------------------Events------------------------------------
   587 function CheckDeployedDead()
   587 function CheckDeployedDead()
   588   return deployedDead
   588   return deployedDead
   589 end
   589 end
   590 
   590 
   591 function DoDeployedDead()
   591 function DoDeployedDead()
   592   ShowMission("Backstab", "Brutus", "You have failed to save the tribe!", 0, 6000)
   592   ShowMission(loc("Backstab"), loc("Brutus"), loc("You have failed to save the tribe!"), 0, 6000)
   593   ParseCommand("teamgone " .. loc("Natives"))
   593   ParseCommand("teamgone " .. loc("Natives"))
   594   ParseCommand("teamgone " .. loc("Tribe"))
   594   ParseCommand("teamgone " .. loc("Tribe"))
   595   TurnTimeLeft = 0
   595   TurnTimeLeft = 0
   596 end
   596 end
   597 
   597 
   630   return (nativesNum < startNativesNum and choice ~= choiceEliminate) or
   630   return (nativesNum < startNativesNum and choice ~= choiceEliminate) or
   631           (nativesNum < startNativesNum - 1 and choice == choiceEliminate)
   631           (nativesNum < startNativesNum - 1 and choice == choiceEliminate)
   632 end
   632 end
   633 
   633 
   634 function DoKilledOther()
   634 function DoKilledOther()
   635   ShowMission("Backstab", "Brutus", "You have killed an innocent hedgehog!", 0, 6000)
   635   ShowMission(loc("Backstab"), loc("Brutus"), loc("You have killed an innocent hedgehog!"), 0, 6000)
   636   ParseCommand("teamgone " .. loc("Natives"))
   636   ParseCommand("teamgone " .. loc("Natives"))
   637   ParseCommand("teamgone " .. loc("Tribe"))
   637   ParseCommand("teamgone " .. loc("Tribe"))
   638   TurnTimeLeft = 0
   638   TurnTimeLeft = 0
   639 end
   639 end
   640 
   640 
   677   end
   677   end
   678 end
   678 end
   679 
   679 
   680 function SetupWave3DeadAnim()
   680 function SetupWave3DeadAnim()
   681   table.insert(wave3DeadAnim, {func = AnimTurn, args = {deployedHog, "Left"}})
   681   table.insert(wave3DeadAnim, {func = AnimTurn, args = {deployedHog, "Left"}})
   682   table.insert(wave3DeadAnim, {func = AnimSay, args = {deployedHog, "That ought to show them!", SAY_SAY, 4000}})
   682   table.insert(wave3DeadAnim, {func = AnimSay, args = {deployedHog, loc("That ought to show them!"), SAY_SAY, 4000}})
   683   table.insert(wave3DeadAnim, {func = AnimSay, args = {deployedHog, "Guys, do you think there's more of them?", SAY_SHOUT, 7000}})
   683   table.insert(wave3DeadAnim, {func = AnimSay, args = {deployedHog, loc("Guys, do you think there's more of them?"), SAY_SHOUT, 7000}})
   684   table.insert(wave3DeadAnim, {func = AnimVisualGear, args = {deployedHog, unpack(nativePos[wiseNum]), vgtFeather, 0, true, true}})
   684   table.insert(wave3DeadAnim, {func = AnimVisualGear, args = {deployedHog, unpack(nativePos[wiseNum]), vgtFeather, 0, true, true}})
   685   table.insert(wave3DeadAnim, {func = AnimWait, args = {deployedHog, 1000}})
   685   table.insert(wave3DeadAnim, {func = AnimWait, args = {deployedHog, 1000}})
   686   table.insert(wave3DeadAnim, {func = AnimSay, args = {deployedHog, "Where are they?!", SAY_THINK, 3000}})
   686   table.insert(wave3DeadAnim, {func = AnimSay, args = {deployedHog, loc("Where are they?!"), SAY_THINK, 3000}})
   687   table.insert(wave3DeadAnim, {func = AnimCustomFunction, args = {deployedHog, RestoreCyborg, {}}})
   687   table.insert(wave3DeadAnim, {func = AnimCustomFunction, args = {deployedHog, RestoreCyborg, {}}})
   688   table.insert(wave3DeadAnim, {func = AnimOutOfNowhere, args = {cyborg, 4040, 782}})
   688   table.insert(wave3DeadAnim, {func = AnimOutOfNowhere, args = {cyborg, 4040, 782}})
   689   table.insert(wave3DeadAnim, {func = AnimSay, args = {cyborg, "These primitive people are so funny!", SAY_THINK, 6500}})
   689   table.insert(wave3DeadAnim, {func = AnimSay, args = {cyborg, loc("These primitive people are so funny!"), SAY_THINK, 6500}})
   690   table.insert(wave3DeadAnim, {func = AnimMove, args = {cyborg, "Right", 4060, 0}})
   690   table.insert(wave3DeadAnim, {func = AnimMove, args = {cyborg, "Right", 4060, 0}})
   691   table.insert(wave3DeadAnim, {func = AnimCustomFunction, args = {deployedHog, HideCyborg, {}}})
   691   table.insert(wave3DeadAnim, {func = AnimCustomFunction, args = {deployedHog, HideCyborg, {}}})
   692   table.insert(wave3DeadAnim, {func = AnimSay, args = {deployedHog, "I need to find the others!", SAY_THINK, 4500}})
   692   table.insert(wave3DeadAnim, {func = AnimSay, args = {deployedHog, loc("I need to find the others!"), SAY_THINK, 4500}})
   693   table.insert(wave3DeadAnim, {func = AnimSay, args = {deployedHog, "I have to follow that alien.", SAY_THINK, 4500}})
   693   table.insert(wave3DeadAnim, {func = AnimSay, args = {deployedHog, loc("I have to follow that alien."), SAY_THINK, 4500}})
   694 end
   694 end
   695 
   695 
   696 function SkipWave3DeadAnim()
   696 function SkipWave3DeadAnim()
   697   AnimSwitchHog(deployedHog)
   697   AnimSwitchHog(deployedHog)
   698 end
   698 end