share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/backstab.lua
changeset 12750 6cec6b881a1c
parent 12611 fb0734d5dd87
child 12779 1f8a62d1609d
equal deleted inserted replaced
12749:1df909b46c05 12750:6cec6b881a1c
   472   end
   472   end
   473 end
   473 end
   474 
   474 
   475 function DeployHog()
   475 function DeployHog()
   476   if not hogDeployed then
   476   if not hogDeployed then
       
   477      -- Steal switch to force the deployed hog to be on its own
       
   478      AddAmmo(deployedHog, amSwitch, 0)
   477      AnimSwitchHog(deployedHog)
   479      AnimSwitchHog(deployedHog)
   478      AnimTeleportGear(deployedHog, unpack(deployedPos))
   480      AnimTeleportGear(deployedHog, unpack(deployedPos))
   479      if deployedHog ~= natives[wiseNum] then
   481      if deployedHog ~= natives[wiseNum] then
   480         AnimSay(deployedHog, loc("Why me?!"), SAY_THINK, 2000)
   482         AnimSay(deployedHog, loc("Why me?!"), SAY_THINK, 2000)
   481      end
   483      end
  1068   TurnsLeft = TurnsLeft - 1
  1070   TurnsLeft = TurnsLeft - 1
  1069   
  1071   
  1070   if stage == platformStage then
  1072   if stage == platformStage then
  1071     AddCaption(string.format(loc("Turns until arrival: %d"), TurnsLeft))
  1073     AddCaption(string.format(loc("Turns until arrival: %d"), TurnsLeft))
  1072   end
  1074   end
       
  1075   if deployedHog then
       
  1076     if GetHogTeamName(CurrentHedgehog) == loc("Natives") then
       
  1077       AnimSwitchHog(deployedHog)
       
  1078     end
       
  1079   end
  1073 
  1080 
  1074   if stage == spyKillStage then
  1081   if stage == spyKillStage then
  1075     if CurrentHedgehog == spyHog or GetHogTeamName(CurrentHedgehog) ~= loc("Natives") then
  1082     if CurrentHedgehog == spyHog or GetHogTeamName(CurrentHedgehog) ~= loc("Natives") then
  1076       EndTurn(true)
  1083       EndTurn(true)
  1077     else
  1084     else