share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/backstab.lua
changeset 14774 d0ad9fd923fd
parent 14661 0bba06a05d52
child 14776 1aea457856e2
equal deleted inserted replaced
14773:a9f32ff53389 14774:d0ad9fd923fd
   408       table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("Go, quick!"), SAY_SAY, 2500}})
   408       table.insert(wave2DeadAnim, {func = AnimSay, args = {natives[wiseNum], loc("Go, quick!"), SAY_SAY, 2500}})
   409       table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], DeployHog, {}}})
   409       table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], DeployHog, {}}})
   410       table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], RestoreCyborg, {}}})
   410       table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {natives[wiseNum], RestoreCyborg, {}}})
   411       table.insert(wave2DeadAnim, {func = AnimOutOfNowhere, swh = false, args = {cyborg, cyborgPos2[1], cyborgPos2[2]}})
   411       table.insert(wave2DeadAnim, {func = AnimOutOfNowhere, swh = false, args = {cyborg, cyborgPos2[1], cyborgPos2[2]}})
   412       table.insert(wave2DeadAnim, {func = AnimTurn, args = {cyborg, "Left"}})
   412       table.insert(wave2DeadAnim, {func = AnimTurn, args = {cyborg, "Left"}})
   413       table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {cyborg, IsolateNatives, {}}})
   413       if nativesNum > 1 then
   414       table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {cyborg, PutCGI, {}}})
   414         table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {cyborg, IsolateNatives, {}}})
   415       table.insert(wave2DeadAnim, {func = AnimSay, args = {cyborg, loc("I want to see how it handles this!"), SAY_SAY, 6000}})
   415         table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {cyborg, PutCGI, {}}})
       
   416         table.insert(wave2DeadAnim, {func = AnimSay, args = {cyborg, loc("I want to see how it handles this!"), SAY_SAY, 6000}})
       
   417       end
   416       table.insert(wave2DeadAnim, {func = AnimSwitchHog, args = {deployedHog}})
   418       table.insert(wave2DeadAnim, {func = AnimSwitchHog, args = {deployedHog}})
   417       table.insert(wave2DeadAnim, {func = AnimDisappear, args = {cyborg, 0, 0}})
   419       table.insert(wave2DeadAnim, {func = AnimDisappear, args = {cyborg, 0, 0}})
   418 --      table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {cyborg, DeployHog, {}}})
   420 --      table.insert(wave2DeadAnim, {func = AnimCustomFunction, args = {cyborg, DeployHog, {}}})
   419       table.insert(wave2DeadAnim, {func = AnimCustomFunction, swh = false, args = {cyborg, HideCyborg, {}}})
   421       table.insert(wave2DeadAnim, {func = AnimCustomFunction, swh = false, args = {cyborg, HideCyborg, {}}})
   420     else
   422     else
   621   SetTurnTimeLeft(TurnTime)
   623   SetTurnTimeLeft(TurnTime)
   622 end
   624 end
   623 
   625 
   624 function SkipWave2DeadAnim()
   626 function SkipWave2DeadAnim()
   625   TeleportNatives()
   627   TeleportNatives()
       
   628   TurnNatives()
   626   PutCircles()
   629   PutCircles()
   627   DeployHog()
   630   DeployHog()
   628   IsolateNatives()
   631   if nativesNum > 1 then
   629   HideCyborg()
   632     IsolateNatives()
       
   633   end
   630 end
   634 end
   631 
   635 
   632 function SpawnPlatformCrates()
   636 function SpawnPlatformCrates()
   633   SpawnSupplyCrate(2494, 1262, amMine)
   637   SpawnSupplyCrate(2494, 1262, amMine)
   634   SpawnSupplyCrate(2574, 1279, amSMine)
   638   SpawnSupplyCrate(2574, 1279, amSMine)
   644   SpawnPlatformCrates()
   648   SpawnPlatformCrates()
   645   SetGearMessage(CurrentHedgehog, 0)
   649   SetGearMessage(CurrentHedgehog, 0)
   646   AddEvent(CheckTurnsOver, {}, DoTurnsOver, {3}, 0)
   650   AddEvent(CheckTurnsOver, {}, DoTurnsOver, {3}, 0)
   647   AddEvent(CheckWaveDead, {3}, DoWaveDead, {3}, 0)
   651   AddEvent(CheckWaveDead, {3}, DoWaveDead, {3}, 0)
   648   AddEvent(CheckDeployedDead, {}, DoDeployedDead, {}, 0)
   652   AddEvent(CheckDeployedDead, {}, DoDeployedDead, {}, 0)
       
   653   HideCyborg()
   649   EndTurn(true)
   654   EndTurn(true)
   650   ShowMission(loc("Backstab"), loc("Drills"), loc("You have 7 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)
   655   ShowMission(loc("Backstab"), loc("Drills"), loc("You have 7 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)
   651 end
   656 end
   652 
   657 
   653 function DoTurnsOver()
   658 function DoTurnsOver()