share/hedgewars/Data/Maps/Basketball/map.lua
author smxx
Mon, 15 Mar 2010 11:54:47 +0000
changeset 3000 2b9405b6dc5d
parent 2999 30c4d62cd0c3
child 3003 0afdba08a858
permissions -rw-r--r--
General: * Updated Finnish locale * Added missing svn properties to Basketball's map.lua
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3000
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
     1
-- Hedgewars - Basketball for 2 Players
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
     2
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
     3
local caption = {
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
     4
	["en"] = "Hedgewars-Basketball",
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
     5
	["de"] = "Hedgewars-Basketball"
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
     6
	}
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
     7
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
     8
local subcaption = {
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
     9
	["en"] = "Not So Friendly Match",
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    10
	["de"] = "Kein-so-Freundschaftsspiel"
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    11
	}
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    12
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    13
local goal = {
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    14
	["en"] = "Bat your opponents through the|baskets and out of the map!",
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    15
	["de"] = "Schlage deine Widersacher durch|die Körbe und aus der Karte hinaus!"
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    16
	}
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    17
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    18
local scored = {
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    19
	["en"] = " scored a point!",
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    20
	["de"] = " erhält einen Punkt!"
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    21
	}
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    22
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    23
local sscore = {
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    24
	["en"] = "Score",
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    25
	["de"] = "Punktestand"
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    26
	}
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    27
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    28
local team = {
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    29
	["en"] = "Team"
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    30
	}
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    31
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    32
local drowning = {
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    33
	["en"] = "is out and",
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    34
	["de"] = "ist draußen und"
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    35
	}
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    36
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    37
local function loc(text)
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    38
	if text == nil then return "**missing**"
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    39
	elseif text[L] == nil then return text["en"]
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    40
	else return text[L]
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    41
	end
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    42
end
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    43
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    44
---------------------------------------------------------------
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    45
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    46
local score = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0, [5] = 0}
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    47
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    48
function onGameInit()
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    49
	GameFlags = gfSolidLand + gfBorder + gfInvulnerable + gfRandomOrder + gfLowGravity
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    50
	TurnTime = 20000
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    51
	CaseFreq = 0
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    52
	LandAdds = 0
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    53
	Explosives = 0
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    54
	Delay = 0
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    55
end
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    56
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    57
function onGameStart()
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    58
	ShowMission(loc(caption), loc(subcaption), loc(goal), -amBaseballBat, 0);
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    59
end
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    60
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    61
function onGameTick()
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    62
end
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    63
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    64
function onAmmoStoreInit()
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    65
	SetAmmo(amBaseballBat, 9, 0, 0)
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    66
end
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    67
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    68
function onGearAdd(gear)
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    69
end
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    70
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    71
function onGearDelete(gear)
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    72
	if GetGearType(gear) == gtHedgehog then
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    73
		local clan = GetHogClan(gear)
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    74
		score[clan] = score[clan] + 1
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    75
		local s = loc(sscore) .. ": " .. score[0]
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    76
		for i = 1, ClansCount - 1 do s = s .. " - " .. score[i] end
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    77
		ShowMission(loc(caption), loc(subcaption), GetHogName(gear) .. " " .. loc(drowning) .. "|" .. loc(team) .. " " .. (clan + 1) .. " " .. loc(scored) .. "| |" .. s, -amBaseballBat, 0)
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    78
	end
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    79
end