share/hedgewars/Data/Maps/Control/map.lua
changeset 12080 6c734d8defef
parent 12079 8f222872d432
child 13019 880662cf41ee
equal deleted inserted replaced
12079:8f222872d432 12080:6c734d8defef
    59 
    59 
    60 local TimeCounter = 0
    60 local TimeCounter = 0
    61 
    61 
    62 local gameWon = false
    62 local gameWon = false
    63 local pointLimit = 300
    63 local pointLimit = 300
       
    64 
       
    65 local missionName = loc("Control")
       
    66 local missionCaption = loc("Domination game")
       
    67 local missionHelp
    64 
    68 
    65 local vCirc = {}
    69 local vCirc = {}
    66 local vCircCount = 0
    70 local vCircCount = 0
    67 
    71 
    68 --local hGCount = 0
    72 --local hGCount = 0
   353 	RebuildTeamInfo()
   357 	RebuildTeamInfo()
   354 
   358 
   355 	for i = 0, (numTeams-1) do
   359 	for i = 0, (numTeams-1) do
   356 		pointLimit = pointLimit - 25
   360 		pointLimit = pointLimit - 25
   357 	end
   361 	end
       
   362 
       
   363 	missionHelp = loc("Control pillars to score points.") .. "|" ..
       
   364 		string.format(loc("Score goal: %d"), pointLimit)
   358 	
   365 	
   359 	-- reposition hogs if they are on control points until they are not or sanity limit kicks in
   366 	-- reposition hogs if they are on control points until they are not or sanity limit kicks in
   360 	reN = 0
   367 	reN = 0
   361 	--zz = 0
   368 	--zz = 0
   362 	while (reN < 10) do
   369 	while (reN < 10) do
   368 			reN = 15		
   375 			reN = 15		
   369 		end
   376 		end
   370 		--AddCaption(zz) -- number of times it took to work
   377 		--AddCaption(zz) -- number of times it took to work
   371 	end
   378 	end
   372 
   379 
   373 	ShowMission(loc("Control"), 
   380 	ShowMission(missionName, missionCaption, missionHelp, 0, 0)
   374 	loc("Domination game"), 
       
   375 	loc("Control pillars to score points.") .. "|" .. 
       
   376 	loc("Goal") .. ": " .. pointLimit .. " " .. loc("points"), 0, 0)
       
   377 
       
   378 
   381 
   379 end
   382 end
   380 
   383 
   381 
   384 
   382 function onNewTurn()
   385 function onNewTurn()
   409 			TurnTimeLeft = 1
   412 			TurnTimeLeft = 1
   410 		end
   413 		end
   411 
   414 
   412 		totalComment = ""		
   415 		totalComment = ""		
   413 		for i = 0,(TeamsCount-1) do
   416 		for i = 0,(TeamsCount-1) do
   414 				if teamNameArr[i] ~= " " then				-- i
   417 				if teamNameArr[i] ~= " " then
   415 					teamComment[i] = teamNameArr[i] .. ": " .. teamScore[teamClan[i]] .. " " .. loc("points") .. "|"
   418 					-- Team scores (“<team name>: <score>”)
       
   419 					teamComment[i] = string.format(loc("%s: %d"), teamNameArr[i], teamScore[teamClan[i]]) .. "|"
   416 					totalComment = totalComment .. teamComment[i]			
   420 					totalComment = totalComment .. teamComment[i]			
   417 				elseif teamNameArr[i] == " " then
   421 				elseif teamNameArr[i] == " " then
   418 					teamComment[i] = "|"
   422 					teamComment[i] = "|"
   419 				end
   423 				end
   420 			end
   424 			end
   421 			
   425 			
   422 			ShowMission(loc("Control"), 
   426 			ShowMission(missionName, missionCaption,
   423 			loc("Domination game"),
   427 			missionHelp .. "|" ..
   424 			loc("Team Scores") .. ":" .. "|" ..
   428 			loc("Team Scores:") .. "|" ..
   425 			totalComment, 0, 1600)
   429 			totalComment, 0, 1600)
   426 	
   430 	
   427 	end
   431 	end
   428 
   432 
   429 end
   433 end