share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/cosmos.lua
branchspacecampaign
changeset 9642 8a691e0f117a
parent 9640 a6a903a6c2b3
child 9758 3b8058b251b8
equal deleted inserted replaced
9641:b08c8bde57e3 9642:8a691e0f117a
   357 function moonLanding(gear)
   357 function moonLanding(gear)
   358 	if checkPointReached == 1 then
   358 	if checkPointReached == 1 then
   359 		-- player climbed the moon with rope
   359 		-- player climbed the moon with rope
   360 		FollowGear(doctor.gear)
   360 		FollowGear(doctor.gear)
   361 		AnimSay(doctor.gear, loc("One cannot simply walk in moon with rope!"), SAY_SHOUT, 4000)
   361 		AnimSay(doctor.gear, loc("One cannot simply walk in moon with rope!"), SAY_SHOUT, 4000)
   362 		SendStat('siGameResult', loc("This is the wrong way!")) --1
   362 		SendStat(siGameResult, loc("This is the wrong way!"))
   363 		SendStat('siCustomAchievement', loc("Collect the crate with the flying saucer")) --11
   363 		SendStat(siCustomAchievement, loc("Collect the crate with the flying saucer"))
   364 		SendStat('siCustomAchievement', loc("Fly to the moon")) --11
   364 		SendStat(siCustomAchievement, loc("Fly to the moon"))
   365 		SendStat('siPlayerKills','0',teamC.name)
   365 		SendStat(siPlayerKills,'0',teamC.name)
   366 		EndGame()
   366 		EndGame()
   367 	else
   367 	else
   368 		if checkPointReached ~= 5 then
   368 		if checkPointReached ~= 5 then
   369 			SaveCampaignVar("CosmosCheckPoint", "4")
   369 			SaveCampaignVar("CosmosCheckPoint", "4")
   370 			SaveCampaignVar("HeroHealth",GetHealth(hero.gear))
   370 			SaveCampaignVar("HeroHealth",GetHealth(hero.gear))
   557 	AnimSwitchHog(hero.gear)
   557 	AnimSwitchHog(hero.gear)
   558 	TurnTimeLeft = 0
   558 	TurnTimeLeft = 0
   559 end
   559 end
   560 
   560 
   561 function sendStats(planet)
   561 function sendStats(planet)
   562 	SendStat('siGameResult', loc("Hog Solo arrived to "..planet)) --1
   562 	SendStat(siGameResult, loc("Hog Solo arrived to "..planet))
   563 	SendStat('siCustomAchievement', loc("Return to the mission menu by pressing the \"Go back\" button")) --11
   563 	SendStat(siCustomAchievement, loc("Return to the mission menu by pressing the \"Go back\" button"))
   564 	SendStat('siCustomAchievement', loc("Choose another planet by replaying the mission")) --11
   564 	SendStat(siCustomAchievement, loc("Choose another planet by replaying the mission"))
   565 	SendStat('siPlayerKills','1',teamC.name)
   565 	SendStat(siPlayerKills,'1',teamC.name)
   566 	EndGame()
   566 	EndGame()
   567 end
   567 end
   568 
   568 
   569 function sendStatsOnRetry()
   569 function sendStatsOnRetry()
   570 	SendStat('siGameResult', loc("You have to travel again")) --1
   570 	SendStat(siGameResult, loc("You have to travel again"))
   571 	SendStat('siCustomAchievement', loc("Your first destination is moon in order to get more fuels")) --11
   571 	SendStat(siCustomAchievement, loc("Your first destination is moon in order to get more fuels"))
   572 	SendStat('siCustomAchievement', loc("You have to complete the moon main mission in order to travel to other planets")) --11
   572 	SendStat(siCustomAchievement, loc("You have to complete the moon main mission in order to travel to other planets"))
   573 	SendStat('siCustomAchievement', loc("You have to be careful and not die!")) --11
   573 	SendStat(siCustomAchievement, loc("You have to be careful and not die!"))
   574 	SendStat('siPlayerKills','0',teamC.name)
   574 	SendStat(siPlayerKills,'0',teamC.name)
   575 	EndGame()
   575 	EndGame()
   576 end
   576 end