share/hedgewars/Data/Missions/Challenge/User_Mission_-_That_Sinking_Feeling.lua
changeset 14578 50f511588635
parent 14492 6c62f7ebea45
child 14590 c5f18710a184
equal deleted inserted replaced
14577:221380cdee7e 14578:50f511588635
   239 
   239 
   240 			if (waterPix >= 1615) and (GameOver == false) then
   240 			if (waterPix >= 1615) and (GameOver == false) then
   241 				GameOver = true
   241 				GameOver = true
   242 				AddCaption(loc("The flood has stopped! Challenge over."))
   242 				AddCaption(loc("The flood has stopped! Challenge over."))
   243 				SendStat(siGameResult, loc("Challenge completed!"))
   243 				SendStat(siGameResult, loc("Challenge completed!"))
   244 				SendStat(siPointType, loc("rescues"))
   244 				SendStat(siPointType, "!POINTS")
   245 				SendStat(siPlayerKills, tostring(hhCount), playerTeamName)
   245 				SendStat(siPlayerKills, tostring(hhCount), playerTeamName)
   246 
   246 
   247 				-- Do not count drowning hedgehogs
   247 				-- Do not count drowning hedgehogs
   248 				local hhLeft = hhCount
   248 				local hhLeft = hhCount
   249 				for i=1,#hh do
   249 				for i=1,#hh do
   306 			SendStat(siCustomAchievement, loc("Your hedgehog died!"))
   306 			SendStat(siCustomAchievement, loc("Your hedgehog died!"))
   307 			SendStat(siCustomAchievement, loc("You must survive the flood in order to score."))
   307 			SendStat(siCustomAchievement, loc("You must survive the flood in order to score."))
   308 		else
   308 		else
   309 			SendStat(siCustomAchievement, loc("You haven't rescued anyone."))
   309 			SendStat(siCustomAchievement, loc("You haven't rescued anyone."))
   310 		end
   310 		end
   311 		SendStat(siPointType, loc("points"))
   311 		SendStat(siPointType, "!POINTS")
   312 		SendStat(siPlayerKills, "0", playerTeamName)
   312 		SendStat(siPlayerKills, "0", playerTeamName)
   313 		local highscore = tonumber(GetMissionVar("Highscore"))
   313 		local highscore = tonumber(GetMissionVar("Highscore"))
   314 		show = (type(highscore) == "number") and (highscore > 0)
   314 		show = (type(highscore) == "number") and (highscore > 0)
   315 		updateChallengeRecord("Highscore", 0, show)
   315 		updateChallengeRecord("Highscore", 0, show)
   316 
   316