share/hedgewars/Data/Maps/TrophyRace/map.lua
changeset 4106 6a52c80a20ba
parent 4080 5809a2360d45
child 4162 923db448ad16
equal deleted inserted replaced
4105:705ac4981b98 4106:6a52c80a20ba
     1 -- Hedgewars - Roperace for 2+ Players
     1 -- Hedgewars - Roperace for 2+ Players
     2 
     2 
     3 local caption = {
     3 local caption = {
     4 	["en"] = "ShoppaKing Map Three: TrophyRace",
     4 	["en"] = "TrophyRace",
     5 	["sv"] = "ShoppaKing bana tre: TrophyRace",
       
     6 	["pl"] = "ShoppaKing: TrophyRace",
       
     7 	["es"] = "ShoppaKing, tercer mapa: TrophyRace"
       
     8 	}
       
     9 
       
    10 local subcaption = {
       
    11 	["en"] = "Made by Wolfmarc and Dragonfly",
       
    12 	["sv"] = "Skapad av Wolfmarc och Dragonfly",
       
    13 	["pl"] = "Zrobione przez Wolfmarca i Dragonfly",
       
    14 	["es"] = "Por Wolfmarc y Dragonfly"
       
    15 	}
     5 	}
    16 
     6 
    17 local goal = {
     7 local goal = {
    18 	["en"] = "Use your rope to get from start to finish as fast as you can!",
     8 	["en"] = "Use your rope to get from start to finish as fast as you can!",
    19 	["sv"] = "Använd ditt rep för att ta dig från start till mål så fort du kan!",
       
    20 	["pl"] = "Użyj liny by jak najszybciej dotrzec od startu do mety",
       
    21 	["es"] = "¡Usa tu cuerda para llegar a la salida lo más rápido que puedas!"
       
    22 	}
     9 	}
    23 
    10 
    24 local done = {
    11 local done = {
    25 	["en"] = "You've reached the goal!| |Time: ",
    12 	["en"] = "You've reached the goal!| |Time: ",
    26 	["sv"] = "Du är i mål!| |Tid: ",
       
    27 	["pl"] = "Dotarłeś do celu!| |Czas: ",
       
    28 	["es"] = "¡Has llegado a la meta!| |Tiempo: "
       
    29 	}
    13 	}
       
    14 
    30 local eliminated = {
    15 local eliminated = {
    31 	["en"] = "Eliminating worst hedgehog this round...| |%s is OUT!",
    16 	["en"] = "Eliminating worst hedgehog this round...| |%s is OUT!",
    32 	["sv"] = "Eliminerar sämsta igelkotten den här omgången...| |%s är UTE!",
       
    33 	["pl"] = "Eliminujemy najgorszego jeża tej rundy...| |%s ODPADŁ!",
       
    34 	["es"] = "Eliminando al peor erizo de esta ronda...| |¡%s está FUERA!"
       
    35 	}
    17 	}
    36 
    18 
    37 local newbesttime = {
    19 local newbesttime = {
    38 	["en"] = "NEW fastest lap: ",
    20 	["en"] = "NEW fastest lap: ",
    39 	["sv"] = "NY snabbaste tid: ",
       
    40 	["pl"] = "NOWE najszybsze okrążenie: ",
       
    41 	["es"] = "NUEVA vuelta rápida: "
       
    42 	}
    21 	}
    43 
    22 
    44 local oldbesttime = {
    23 local oldbesttime = {
    45 	["en"] = "Fastest lap: ",
    24 	["en"] = "Fastest lap: ",
    46 	["sv"] = "Snabbaste tid: ",
       
    47 	["pl"] = "Najszybsze okrążenie: ",
       
    48 	["es"] = "Vuelta rápida: "
       
    49 	}
    25 	}
    50 local bestclantimes = {
    26 local bestclantimes = {
    51 	["en"] = "Best laps per team: ",
    27 	["en"] = "Best laps per team: ",
    52 	["sv"] = "Bästa tider per lag: ",
       
    53 	["pl"] = "Najszybsze okrążenie drużyny: ",
       
    54 	["es"] = "Mejores tiempos por equipo: "
       
    55 	}
    28 	}
    56 local clantime = {
    29 local clantime = {
    57 	["en"] = "Team %d: ",
    30 	["en"] = "Team %d: ",
    58 	["sv"] = "Lag %d: ",
       
    59 	["pl"] = "Drużyna %d: ",
       
    60 	["es"] = "Equipo %d"
       
    61 	}
    31 	}
    62 
    32 
    63 	local function loc(text)
    33 	local function loc(text)
    64 	if text == nil then return "**missing**"
    34 	if text == nil then return "**missing**"
    65 	elseif text[L] == nil then return text["en"]
    35 	elseif text[L] == nil then return text["en"]
   118 	SuddenDeathTurns = 99999 -- "disable" sudden death
    88 	SuddenDeathTurns = 99999 -- "disable" sudden death
   119 	Theme = 'Olympics'
    89 	Theme = 'Olympics'
   120 end
    90 end
   121 
    91 
   122 function onGameStart()
    92 function onGameStart()
   123 	ShowMission(loc(caption), loc(subcaption), loc(goal), -amRope, 0)
    93 	ShowMission(loc(caption), "", loc(goal), -amRope, 0)
   124 	started = true
    94 	started = true
   125 	p=1820
    95 	p=1820
   126 	for i = 0, numhhs - 1 do
    96 	for i = 0, numhhs - 1 do
   127 	p = p + 50	
    97 	p = p + 50	
   128 	SetGearPosition(hhs[i], p, 0)
    98 	SetGearPosition(hhs[i], p, 0)
   202 					tt = "--"
   172 					tt = "--"
   203 				end
   173 				end
   204 				hscore = hscore .. "|" .. string.format(loc(clantime), i+1) .. tt
   174 				hscore = hscore .. "|" .. string.format(loc(clantime), i+1) .. tt
   205 			end
   175 			end
   206 			
   176 			
   207 			ShowMission(loc(caption), loc(subcaption), loc(done) .. (ttime / 1000) .. " s" .. hscore, 0, 0)
   177 			ShowMission(loc(caption), "", loc(done) .. (ttime / 1000) .. " s" .. hscore, 0, 0)
   208 			TurnTimeLeft = 0
   178 			TurnTimeLeft = 0
   209 		end
   179 		end
   210 	end
   180 	end
   211 end
   181 end
   212 
   182