merge
authorTobias Neumann <mail@tobias-neumann.eu>
Fri, 05 Nov 2010 20:08:15 +0100
changeset 4133 cd0435def5e8
parent 4106 6a52c80a20ba (diff)
parent 4131 e89d11f6361c (current diff)
child 4134 3dc32c1fb97b
merge
project_files/HedgewarsMobile/Resources/SupportViewController.xib
project_files/HedgewarsMobile/Resources/surpise.png
share/hedgewars/Data/Graphics/Hats/Reserved/51e46e89a4f7ee3ea760bb587063b202judo.png
share/hedgewars/Data/Graphics/Hats/Reserved/941fc72a68a50cebf562059816e8cb26RSR.png
share/hedgewars/Data/Graphics/Hats/Reserved/afaff8193505e29230b76f8c8dd78170lambda.png
share/hedgewars/Data/Graphics/Hats/Reserved/e587f6146ebfbdefdc028c591643f220Bob.png
share/hedgewars/Data/Graphics/Hats/Reserved/e587f6146ebfbdefdc028c591643f220Bub.png
share/hedgewars/Data/Graphics/Hats/Reserved/e587f6146ebfbdefdc028c591643f220Cororon.png
share/hedgewars/Data/Graphics/Hats/Reserved/e587f6146ebfbdefdc028c591643f220Kululun.png
--- a/share/hedgewars/Data/Maps/ShoppaKing/map.cfg	Fri Nov 05 14:49:44 2010 -0400
+++ b/share/hedgewars/Data/Maps/ShoppaKing/map.cfg	Fri Nov 05 20:08:15 2010 +0100
@@ -1,2 +1,2 @@
-Castle
+Castle
 48
\ No newline at end of file
Binary file share/hedgewars/Data/Maps/ShoppaKing/map.png has changed
Binary file share/hedgewars/Data/Maps/ShoppaKing/preview.png has changed
--- a/share/hedgewars/Data/Maps/TrophyRace/map.cfg	Fri Nov 05 14:49:44 2010 -0400
+++ b/share/hedgewars/Data/Maps/TrophyRace/map.cfg	Fri Nov 05 20:08:15 2010 +0100
@@ -1,2 +1,2 @@
-Olympics
+Olympics
 48
\ No newline at end of file
--- a/share/hedgewars/Data/Maps/TrophyRace/map.lua	Fri Nov 05 14:49:44 2010 -0400
+++ b/share/hedgewars/Data/Maps/TrophyRace/map.lua	Fri Nov 05 20:08:15 2010 +0100
@@ -1,229 +1,199 @@
--- Hedgewars - Roperace for 2+ Players
-
-local caption = {
-	["en"] = "ShoppaKing Map Three: TrophyRace",
-	["sv"] = "ShoppaKing bana tre: TrophyRace",
-	["pl"] = "ShoppaKing: TrophyRace",
-	["es"] = "ShoppaKing, tercer mapa: TrophyRace"
-	}
-
-local subcaption = {
-	["en"] = "Made by Wolfmarc and Dragonfly",
-	["sv"] = "Skapad av Wolfmarc och Dragonfly",
-	["pl"] = "Zrobione przez Wolfmarca i Dragonfly",
-	["es"] = "Por Wolfmarc y Dragonfly"
-	}
-
-local goal = {
-	["en"] = "Use your rope to get from start to finish as fast as you can!",
-	["sv"] = "Använd ditt rep för att ta dig från start till mål så fort du kan!",
-	["pl"] = "Użyj liny by jak najszybciej dotrzec od startu do mety",
-	["es"] = "¡Usa tu cuerda para llegar a la salida lo más rápido que puedas!"
-	}
-
-local done = {
-	["en"] = "You've reached the goal!| |Time: ",
-	["sv"] = "Du är i mål!| |Tid: ",
-	["pl"] = "Dotarłeś do celu!| |Czas: ",
-	["es"] = "¡Has llegado a la meta!| |Tiempo: "
-	}
-local eliminated = {
-	["en"] = "Eliminating worst hedgehog this round...| |%s is OUT!",
-	["sv"] = "Eliminerar sämsta igelkotten den här omgången...| |%s är UTE!",
-	["pl"] = "Eliminujemy najgorszego jeża tej rundy...| |%s ODPADŁ!",
-	["es"] = "Eliminando al peor erizo de esta ronda...| |¡%s está FUERA!"
-	}
-
-local newbesttime = {
-	["en"] = "NEW fastest lap: ",
-	["sv"] = "NY snabbaste tid: ",
-	["pl"] = "NOWE najszybsze okrążenie: ",
-	["es"] = "NUEVA vuelta rápida: "
-	}
-
-local oldbesttime = {
-	["en"] = "Fastest lap: ",
-	["sv"] = "Snabbaste tid: ",
-	["pl"] = "Najszybsze okrążenie: ",
-	["es"] = "Vuelta rápida: "
-	}
-local bestclantimes = {
-	["en"] = "Best laps per team: ",
-	["sv"] = "Bästa tider per lag: ",
-	["pl"] = "Najszybsze okrążenie drużyny: ",
-	["es"] = "Mejores tiempos por equipo: "
-	}
-local clantime = {
-	["en"] = "Team %d: ",
-	["sv"] = "Lag %d: ",
-	["pl"] = "Drużyna %d: ",
-	["es"] = "Equipo %d"
-	}
-
-	local function loc(text)
-	if text == nil then return "**missing**"
-	elseif text[L] == nil then return text["en"]
-	else return text[L]
-	end
-end
-
----------------------------------------------------------------
-
--- store number of hedgehogs
-local numhhs = 0
-
--- store hedgehog gears
-local hhs = {}
-
--- store best time per team
-local clantimes = {}
-
--- store best times
-local times = {}
-
--- in milisseconds
-local maxtime = 99000
-
--- define start area (left, top, width, height)
-local start_area = {1606, 498, 356, 80}
-
--- define goal area (left, top, width, height)
-local goal_area = {2030, 300, 56, 280}
-
--- last active hog
-local lasthog = nil
-
--- active hog reached the goal?
-local reached = false
-
--- hog with best time
-local besthog = nil
-
--- hog with worst time (per round)
-local worsthog = nil
-
--- best time
-local besttime = maxtime + 1
-
--- worst time (per round)
-local worsttime = 0
-
-function onGameInit()
-	GameFlags = gfSolidLand + gfInvulnerable
-	TurnTime = maxtime
-	CaseFreq = 0
-	LandAdds = 0
-	Explosives = 0
-	Delay = 500
-	SuddenDeathTurns = 99999 -- "disable" sudden death
-	Theme = 'Olympics'
-end
-
-function onGameStart()
-	ShowMission(loc(caption), loc(subcaption), loc(goal), -amRope, 0)
-	started = true
-	p=1820
-	for i = 0, numhhs - 1 do
-	p = p + 50	
-	SetGearPosition(hhs[i], p, 0)
-	end
-	
-	for i=0, ClansCount-1 do
-		clantimes[i] = 0
-	end
-end
-
-function onAmmoStoreInit()
-	SetAmmo(amRope, 9, 2, 0)
-end
-
-function onGameTick()
-	if TurnTimeLeft == 1 and CurrentHedgehog ~= nil then
-		SetHealth(CurrentHedgehog, 0)
-		x, y = GetGearPosition(CurrentHedgehog)
-		AddGear(x, y, gtAmmo_Grenade, 0, 0, 0, 0)
-		worsttime = 99999
-		worsthog = nil
-	elseif TurnTimeLeft == maxtime - 1 and CurrentHedgehog ~= nil then
-		if lasthog ~= nil then 
-		SetGearPosition(lasthog, p , 0)
-		end
-		reached = false
-		SetGearPosition(CurrentHedgehog, start_area[1] + start_area[3] / 2, start_area[2] + start_area[4] / 2)
-	elseif CurrentHedgehog ~= nil then
-		x, y = GetGearPosition(CurrentHedgehog)
-		if not reached and x > goal_area[1] and x < goal_area[1] + goal_area[3] and y > goal_area[2] and y < goal_area[2] + goal_area[4] then -- hog is within goal rectangle
-			reached = true
-			local ttime = maxtime - TurnTimeLeft
-			--give it a sound;)
-			if ttime < besttime then
-				PlaySound (sndHomerun)
-			else
-				PlaySound (sndHellish)
-			end
-			for i = 0, numhhs - 1 do
-				if hhs[i] == CurrentHedgehog then
-					times[numhhs] = ttime
-				end
-			end
-				
-			local hscore = "| |"
-			local clan = GetHogClan(CurrentHedgehog)
-			if ttime < clantimes[clan] or clantimes[clan] == 0 then
-				clantimes[clan] = ttime
-			end
-			
-			if ttime < besttime then
-				besttime = ttime
-				besthog = CurrentHedgehog
-				hscore = hscore .. loc(newbesttime)
-			else
-				hscore = hscore .. loc(oldbesttime)
-			end
-			if ttime > worsttime then
-				worsttime = ttime
-				worsthog = CurrentHedgehog
-			end
-			hscore = hscore .. GetHogName(besthog) .. " - " .. (besttime / 1000) .. " s | |" .. loc(bestclantimes)
-			
-			if clan == ClansCount -1 then
-				-- Time for elimination - worst hog is out and the worst hog vars are reset.
-				SetHealth(worsthog, 0)
-				--Place a grenade to make inactive slowest hog active
-				x, y = GetGearPosition(worsthog)
-				AddGear(x, y, gtAmmo_Grenade, 0, 0, 0, 0)
-				worsttime = 0
-				worsthog = nil
-				end
-			
-			for i=0, ClansCount -1 do
-				local tt = "" .. (clantimes[i] / 1000) .. " s"
-				if clantimes[i] == 0 then
-					tt = "--"
-				end
-				hscore = hscore .. "|" .. string.format(loc(clantime), i+1) .. tt
-			end
-			
-			ShowMission(loc(caption), loc(subcaption), loc(done) .. (ttime / 1000) .. " s" .. hscore, 0, 0)
-			TurnTimeLeft = 0
-		end
-	end
-end
-
-function onGearAdd(gear)
-	if GetGearType(gear) == gtHedgehog then
-		hhs[numhhs] = gear
-		times[numhhs] = 0
-		numhhs = numhhs + 1
-	elseif GetGearType(gear) == gtRope then -- rope is shot
-		
-	end
-end
-
-function onGearDelete(gear)
-	if GetGearType(gear) == gtRope then -- rope deletion - hog didn't manage to rerope
-		--TurnTimeLeft = 0 -- end turn or not? hm...
-		lasthog = CurrentHedgehog
-		
-	end
-end
+-- Hedgewars - Roperace for 2+ Players
+
+local caption = {
+	["en"] = "TrophyRace",
+	}
+
+local goal = {
+	["en"] = "Use your rope to get from start to finish as fast as you can!",
+	}
+
+local done = {
+	["en"] = "You've reached the goal!| |Time: ",
+	}
+
+local eliminated = {
+	["en"] = "Eliminating worst hedgehog this round...| |%s is OUT!",
+	}
+
+local newbesttime = {
+	["en"] = "NEW fastest lap: ",
+	}
+
+local oldbesttime = {
+	["en"] = "Fastest lap: ",
+	}
+local bestclantimes = {
+	["en"] = "Best laps per team: ",
+	}
+local clantime = {
+	["en"] = "Team %d: ",
+	}
+
+	local function loc(text)
+	if text == nil then return "**missing**"
+	elseif text[L] == nil then return text["en"]
+	else return text[L]
+	end
+end
+
+---------------------------------------------------------------
+
+-- store number of hedgehogs
+local numhhs = 0
+
+-- store hedgehog gears
+local hhs = {}
+
+-- store best time per team
+local clantimes = {}
+
+-- store best times
+local times = {}
+
+-- in milisseconds
+local maxtime = 99000
+
+-- define start area (left, top, width, height)
+local start_area = {1606, 498, 356, 80}
+
+-- define goal area (left, top, width, height)
+local goal_area = {2030, 300, 56, 280}
+
+-- last active hog
+local lasthog = nil
+
+-- active hog reached the goal?
+local reached = false
+
+-- hog with best time
+local besthog = nil
+
+-- hog with worst time (per round)
+local worsthog = nil
+
+-- best time
+local besttime = maxtime + 1
+
+-- worst time (per round)
+local worsttime = 0
+
+function onGameInit()
+	GameFlags = gfSolidLand + gfInvulnerable
+	TurnTime = maxtime
+	CaseFreq = 0
+	LandAdds = 0
+	Explosives = 0
+	Delay = 500
+	SuddenDeathTurns = 99999 -- "disable" sudden death
+	Theme = 'Olympics'
+end
+
+function onGameStart()
+	ShowMission(loc(caption), "", loc(goal), -amRope, 0)
+	started = true
+	p=1820
+	for i = 0, numhhs - 1 do
+	p = p + 50	
+	SetGearPosition(hhs[i], p, 0)
+	end
+	
+	for i=0, ClansCount-1 do
+		clantimes[i] = 0
+	end
+end
+
+function onAmmoStoreInit()
+	SetAmmo(amRope, 9, 2, 0)
+end
+
+function onGameTick()
+	if TurnTimeLeft == 1 and CurrentHedgehog ~= nil then
+		SetHealth(CurrentHedgehog, 0)
+		x, y = GetGearPosition(CurrentHedgehog)
+		AddGear(x, y, gtAmmo_Grenade, 0, 0, 0, 0)
+		worsttime = 99999
+		worsthog = nil
+	elseif TurnTimeLeft == maxtime - 1 and CurrentHedgehog ~= nil then
+		if lasthog ~= nil then 
+		SetGearPosition(lasthog, p , 0)
+		end
+		reached = false
+		SetGearPosition(CurrentHedgehog, start_area[1] + start_area[3] / 2, start_area[2] + start_area[4] / 2)
+	elseif CurrentHedgehog ~= nil then
+		x, y = GetGearPosition(CurrentHedgehog)
+		if not reached and x > goal_area[1] and x < goal_area[1] + goal_area[3] and y > goal_area[2] and y < goal_area[2] + goal_area[4] then -- hog is within goal rectangle
+			reached = true
+			local ttime = maxtime - TurnTimeLeft
+			--give it a sound;)
+			if ttime < besttime then
+				PlaySound (sndHomerun)
+			else
+				PlaySound (sndHellish)
+			end
+			for i = 0, numhhs - 1 do
+				if hhs[i] == CurrentHedgehog then
+					times[numhhs] = ttime
+				end
+			end
+				
+			local hscore = "| |"
+			local clan = GetHogClan(CurrentHedgehog)
+			if ttime < clantimes[clan] or clantimes[clan] == 0 then
+				clantimes[clan] = ttime
+			end
+			
+			if ttime < besttime then
+				besttime = ttime
+				besthog = CurrentHedgehog
+				hscore = hscore .. loc(newbesttime)
+			else
+				hscore = hscore .. loc(oldbesttime)
+			end
+			if ttime > worsttime then
+				worsttime = ttime
+				worsthog = CurrentHedgehog
+			end
+			hscore = hscore .. GetHogName(besthog) .. " - " .. (besttime / 1000) .. " s | |" .. loc(bestclantimes)
+			
+			if clan == ClansCount -1 then
+				-- Time for elimination - worst hog is out and the worst hog vars are reset.
+				SetHealth(worsthog, 0)
+				--Place a grenade to make inactive slowest hog active
+				x, y = GetGearPosition(worsthog)
+				AddGear(x, y, gtAmmo_Grenade, 0, 0, 0, 0)
+				worsttime = 0
+				worsthog = nil
+				end
+			
+			for i=0, ClansCount -1 do
+				local tt = "" .. (clantimes[i] / 1000) .. " s"
+				if clantimes[i] == 0 then
+					tt = "--"
+				end
+				hscore = hscore .. "|" .. string.format(loc(clantime), i+1) .. tt
+			end
+			
+			ShowMission(loc(caption), "", loc(done) .. (ttime / 1000) .. " s" .. hscore, 0, 0)
+			TurnTimeLeft = 0
+		end
+	end
+end
+
+function onGearAdd(gear)
+	if GetGearType(gear) == gtHedgehog then
+		hhs[numhhs] = gear
+		times[numhhs] = 0
+		numhhs = numhhs + 1
+	elseif GetGearType(gear) == gtRope then -- rope is shot
+		
+	end
+end
+
+function onGearDelete(gear)
+	if GetGearType(gear) == gtRope then -- rope deletion - hog didn't manage to rerope
+		--TurnTimeLeft = 0 -- end turn or not? hm...
+		lasthog = CurrentHedgehog
+		
+	end
+end
Binary file share/hedgewars/Data/Maps/TrophyRace/map.png has changed
Binary file share/hedgewars/Data/Maps/TrophyRace/mask.png has changed
Binary file share/hedgewars/Data/Maps/TrophyRace/preview.png has changed