share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/family.lua
changeset 10290 42efccba0711
parent 9306 c9978ada9a3d
child 10423 b9d6463cf2ca
equal deleted inserted replaced
10289:c3a77ff02a23 10290:42efccba0711
   285 function DoPrincessFreed()
   285 function DoPrincessFreed()
   286   AnimSay(princess, loc("Thank you, my hero!"), SAY_SAY, 0)
   286   AnimSay(princess, loc("Thank you, my hero!"), SAY_SAY, 0)
   287   if progress and progress<7 then
   287   if progress and progress<7 then
   288     SaveCampaignVar("Progress", "7")
   288     SaveCampaignVar("Progress", "7")
   289   end
   289   end
   290   ParseCommand("teamgone " .. loc("011101001"))
   290   DismissTeam(loc("011101001"))
   291   TurnTimeLeft = 0
   291   TurnTimeLeft = 0
   292 end
   292 end
   293 
   293 
   294 function CheckCyborgsDead()
   294 function CheckCyborgsDead()
   295   return cyborgsLeft == 0
   295   return cyborgsLeft == 0
   337 end
   337 end
   338 
   338 
   339 function EndMission()
   339 function EndMission()
   340   RemoveEventFunc(CheckPrincessFreed)
   340   RemoveEventFunc(CheckPrincessFreed)
   341   AddCaption("So the princess was never heard of again...")
   341   AddCaption("So the princess was never heard of again...")
   342   ParseCommand("teamgone " .. loc("Natives"))
   342   DismissTeam(loc("Natives"))
   343   ParseCommand("teamgone " .. loc("011101001"))
   343   DismissTeam(loc("011101001"))
   344   TurnTimeLeft = 0
   344   TurnTimeLeft = 0
   345 end
   345 end
   346 
   346 
   347 function CheckOutOfCluster()
   347 function CheckOutOfCluster()
   348   return CheckGearDead(clusterCrate) and GetAmmoCount(natives[1], amClusterBomb) == 0
   348   return CheckGearDead(clusterCrate) and GetAmmoCount(natives[1], amClusterBomb) == 0