share/hedgewars/Data/Missions/Training/User_Mission_-_That_Sinking_Feeling.lua
branchios-revival
changeset 11262 6e1aa1144a2b
parent 11009 5b37f240edf8
child 11521 dc36fad455f4
equal deleted inserted replaced
11261:ce5f1b547a67 11262:6e1aa1144a2b
   214 			waterPix = waterPix +1
   214 			waterPix = waterPix +1
   215 			--AddCaption(waterPix)
   215 			--AddCaption(waterPix)
   216 
   216 
   217 			if (waterPix >= 1615) and (GameOver == false) then
   217 			if (waterPix >= 1615) and (GameOver == false) then
   218 				GameOver = true
   218 				GameOver = true
   219 				AddCaption("The flood has stopped! Challenge over.")
   219 				AddCaption(loc("The flood has stopped! Challenge over."))
   220 				SendStat(siGameResult, loc("Challenge completed!"))
   220 				SendStat(siGameResult, loc("Challenge completed!"))
   221 				SendStat(siPlayerKills, tostring(hhCount), loc("Nameless Heroes"))
   221 				SendStat(siPlayerKills, tostring(hhCount), loc("Nameless Heroes"))
   222 				SendStat(siPointType, "rescues")
   222 				SendStat(siPointType, loc("rescues"))
   223 
   223 
   224 				-- Do not count drowning hedgehogs
   224 				-- Do not count drowning hedgehogs
   225 				local hhLeft = hhCount
   225 				local hhLeft = hhCount
   226 				for i=1,#hh do
   226 				for i=1,#hh do
   227 					local isDrowning = band(GetState(hh[i]),gstDrowning) ~= 0
   227 					local isDrowning = band(GetState(hh[i]),gstDrowning) ~= 0
   281 			SendStat(siCustomAchievement, loc("You must survive the flood in order to score."))
   281 			SendStat(siCustomAchievement, loc("You must survive the flood in order to score."))
   282 		else
   282 		else
   283 			SendStat(siCustomAchievement, loc("You haven't rescued anyone."))
   283 			SendStat(siCustomAchievement, loc("You haven't rescued anyone."))
   284 		end
   284 		end
   285 		SendStat(siPlayerKills, "0", loc("Nameless Heroes"))
   285 		SendStat(siPlayerKills, "0", loc("Nameless Heroes"))
   286 		SendStat(siPointType, "points")
   286 		SendStat(siPointType, loc("points"))
   287 
   287 
   288 		SendStat(siGameResult, loc("Disqualified!"))
   288 		SendStat(siGameResult, loc("Disqualified!"))
   289 		GameOver = true
   289 		GameOver = true
   290 		EndGame()
   290 		EndGame()
   291 	end
   291 	end