share/hedgewars/Data/Maps/Basketball/map.lua
author arrom
Sun, 07 Nov 2010 13:19:55 -0500
changeset 4188 e1bf1b5a301e
parent 4162 923db448ad16
child 4270 d1673536b6e5
permissions -rw-r--r--
pt_BR, the return. also fix line ending screwups
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3004
e9b3613cc3fb Engine:
smxx
parents: 3003
diff changeset
     1
-- Hedgewars - Basketball for 2+ Players
3000
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",
3050
smxx
parents: 3004
diff changeset
     5
	["de"] = "Hedgewars-Basketball",
3223
f0e590790f3b credits updated, adding Palewolf, sheepluva and prg as devs and replaced my previous openal stuff with something more current
koda
parents: 3197
diff changeset
     6
	["es"] = "Hedgewars-Baloncesto",
3264
3cf9d915cdb9 inu adds portugese translation
nemo
parents: 3257
diff changeset
     7
	["pl"] = "Hedgewars-Koszykówka",
3266
aef4b9316060 Slovak translation from jose1711
nemo
parents: 3264
diff changeset
     8
	["pt_PT"] = "Hedgewars-Basketball",
3465
b290993c0810 unbreak stuff
koda
parents: 3346
diff changeset
     9
	["sk"] = "Hedgewars-Basketbal",
4188
e1bf1b5a301e pt_BR, the return. also fix line ending screwups
arrom
parents: 4162
diff changeset
    10
	["sv"] = "Hedgewars-Basket",
e1bf1b5a301e pt_BR, the return. also fix line ending screwups
arrom
parents: 4162
diff changeset
    11
	["pt_BR"] = "Hedgewars-Basketball"
3000
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    12
	}
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    13
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    14
local subcaption = {
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    15
	["en"] = "Not So Friendly Match",
3050
smxx
parents: 3004
diff changeset
    16
	["de"] = "Kein-so-Freundschaftsspiel",
3223
f0e590790f3b credits updated, adding Palewolf, sheepluva and prg as devs and replaced my previous openal stuff with something more current
koda
parents: 3197
diff changeset
    17
	["es"] = "Partido no-tan-amistoso",
3264
3cf9d915cdb9 inu adds portugese translation
nemo
parents: 3257
diff changeset
    18
	["pl"] = "Mecz Nie-Taki-Towarzyski",
3266
aef4b9316060 Slovak translation from jose1711
nemo
parents: 3264
diff changeset
    19
	["pt_PT"] = "Partida não muito amigável",
3465
b290993c0810 unbreak stuff
koda
parents: 3346
diff changeset
    20
	["sk"] = "Nie tak celkom priateľský zápas",
4188
e1bf1b5a301e pt_BR, the return. also fix line ending screwups
arrom
parents: 4162
diff changeset
    21
	["sv"] = "En inte så vänlig match",
e1bf1b5a301e pt_BR, the return. also fix line ending screwups
arrom
parents: 4162
diff changeset
    22
	["pt_BR"] = "Partida não muito amigável"
3000
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    23
	}
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    24
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    25
local goal = {
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    26
	["en"] = "Bat your opponents through the|baskets and out of the map!",
3050
smxx
parents: 3004
diff changeset
    27
	["de"] = "Schlage deine Widersacher durch|die Körbe und aus der Karte hinaus!",
3223
f0e590790f3b credits updated, adding Palewolf, sheepluva and prg as devs and replaced my previous openal stuff with something more current
koda
parents: 3197
diff changeset
    28
	["es"] = "¡Batea a tus oponentes fuera del mapa a través de la canasta!",
3264
3cf9d915cdb9 inu adds portugese translation
nemo
parents: 3257
diff changeset
    29
	["pl"] = "Uderzaj swoich przekiwników|wyrzucając przez kosz, poza mapę!",
3266
aef4b9316060 Slovak translation from jose1711
nemo
parents: 3264
diff changeset
    30
	["pt_PT"] = "Bate os teus adversarios|fora do mapa acertando com eles no cesto!",
3465
b290993c0810 unbreak stuff
koda
parents: 3346
diff changeset
    31
	["sk"] = "Odpálkujte vašich súperov do koša|a von z mapy!",
4188
e1bf1b5a301e pt_BR, the return. also fix line ending screwups
arrom
parents: 4162
diff changeset
    32
	["sv"] = "Slå ner dina motståndare i|korgarna och ut ur kartan!",
e1bf1b5a301e pt_BR, the return. also fix line ending screwups
arrom
parents: 4162
diff changeset
    33
	["pt_BR"] = "Rebata seus oponentes para|fora do mapa através dos cestos!"
3000
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    34
	}
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    35
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    36
local scored = {
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    37
	["en"] = " scored a point!",
3050
smxx
parents: 3004
diff changeset
    38
	["de"] = " erhält einen Punkt!",
3223
f0e590790f3b credits updated, adding Palewolf, sheepluva and prg as devs and replaced my previous openal stuff with something more current
koda
parents: 3197
diff changeset
    39
	["es"] = " anotó un tanto!",
3264
3cf9d915cdb9 inu adds portugese translation
nemo
parents: 3257
diff changeset
    40
	["pl"] = " zdobyła punkt!",
3266
aef4b9316060 Slovak translation from jose1711
nemo
parents: 3264
diff changeset
    41
	["pt_PT"] = " marca um cesto!",
3465
b290993c0810 unbreak stuff
koda
parents: 3346
diff changeset
    42
	["sk"] = " skóruje!",
4188
e1bf1b5a301e pt_BR, the return. also fix line ending screwups
arrom
parents: 4162
diff changeset
    43
	["sv"] = " fick ett poäng",
e1bf1b5a301e pt_BR, the return. also fix line ending screwups
arrom
parents: 4162
diff changeset
    44
	["pt_BR"] = " fez uma cesta"
3000
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    45
	}
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    46
3003
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
    47
local failed = {
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
    48
	["en"] = " scored a penalty!",
3050
smxx
parents: 3004
diff changeset
    49
	["de"] = " erhält eine Strafe!",
3223
f0e590790f3b credits updated, adding Palewolf, sheepluva and prg as devs and replaced my previous openal stuff with something more current
koda
parents: 3197
diff changeset
    50
	["es"] = " anotó una falta!",
3264
3cf9d915cdb9 inu adds portugese translation
nemo
parents: 3257
diff changeset
    51
	["pl"] = " zdobyła punkt karny!",
3266
aef4b9316060 Slovak translation from jose1711
nemo
parents: 3264
diff changeset
    52
	["pt_PT"] = " perde um ponto!",
3465
b290993c0810 unbreak stuff
koda
parents: 3346
diff changeset
    53
	["sk"] = " dostáva trestný bod!",
4188
e1bf1b5a301e pt_BR, the return. also fix line ending screwups
arrom
parents: 4162
diff changeset
    54
	["sv"] = " fick ett straff",
e1bf1b5a301e pt_BR, the return. also fix line ending screwups
arrom
parents: 4162
diff changeset
    55
	["pt_BR"] = " sofre uma penalidade"
3003
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
    56
	}
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
    57
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
    58
	local sscore = {
3000
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    59
	["en"] = "Score",
3050
smxx
parents: 3004
diff changeset
    60
	["de"] = "Punktestand",
3223
f0e590790f3b credits updated, adding Palewolf, sheepluva and prg as devs and replaced my previous openal stuff with something more current
koda
parents: 3197
diff changeset
    61
	["es"] = "Puntuación",
3264
3cf9d915cdb9 inu adds portugese translation
nemo
parents: 3257
diff changeset
    62
	["pl"] = "Punktacja",
3266
aef4b9316060 Slovak translation from jose1711
nemo
parents: 3264
diff changeset
    63
	["pt_PT"] = "Pontuação",
3465
b290993c0810 unbreak stuff
koda
parents: 3346
diff changeset
    64
	["sk"] = "Skóre",
4188
e1bf1b5a301e pt_BR, the return. also fix line ending screwups
arrom
parents: 4162
diff changeset
    65
	["sv"] = "Poängställning",
e1bf1b5a301e pt_BR, the return. also fix line ending screwups
arrom
parents: 4162
diff changeset
    66
	["pt_BR"] = "Pontuação"
3000
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    67
	}
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    68
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    69
local team = {
3050
smxx
parents: 3004
diff changeset
    70
	["en"] = "Team",
3223
f0e590790f3b credits updated, adding Palewolf, sheepluva and prg as devs and replaced my previous openal stuff with something more current
koda
parents: 3197
diff changeset
    71
	["es"] = "Equipo",
3264
3cf9d915cdb9 inu adds portugese translation
nemo
parents: 3257
diff changeset
    72
	["pl"] = "Drużyna",
3266
aef4b9316060 Slovak translation from jose1711
nemo
parents: 3264
diff changeset
    73
	["pt_PT"] = "Equipa",
3465
b290993c0810 unbreak stuff
koda
parents: 3346
diff changeset
    74
	["sk"] = "Tím",
4188
e1bf1b5a301e pt_BR, the return. also fix line ending screwups
arrom
parents: 4162
diff changeset
    75
	["sv"] = "Lag",
e1bf1b5a301e pt_BR, the return. also fix line ending screwups
arrom
parents: 4162
diff changeset
    76
	["pt_BR"] = "Equipe"
3000
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    77
	}
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    78
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    79
local drowning = {
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    80
	["en"] = "is out and",
3050
smxx
parents: 3004
diff changeset
    81
	["de"] = "ist draußen und",
3223
f0e590790f3b credits updated, adding Palewolf, sheepluva and prg as devs and replaced my previous openal stuff with something more current
koda
parents: 3197
diff changeset
    82
	["es"] = "cayó y",
3264
3cf9d915cdb9 inu adds portugese translation
nemo
parents: 3257
diff changeset
    83
	["pl"] = "jest wyautowany i",
3266
aef4b9316060 Slovak translation from jose1711
nemo
parents: 3264
diff changeset
    84
	["pt_PT"] = "está fora e",
3465
b290993c0810 unbreak stuff
koda
parents: 3346
diff changeset
    85
	["sk"] = "je mimo hru a",
4188
e1bf1b5a301e pt_BR, the return. also fix line ending screwups
arrom
parents: 4162
diff changeset
    86
	["sv"] = "är ute och",
e1bf1b5a301e pt_BR, the return. also fix line ending screwups
arrom
parents: 4162
diff changeset
    87
	["pt_BR"] = "está fora e"
3000
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    88
	}
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    89
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    90
local function loc(text)
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    91
	if text == nil then return "**missing**"
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    92
	elseif text[L] == nil then return text["en"]
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    93
	else return text[L]
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    94
	end
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    95
end
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    96
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    97
---------------------------------------------------------------
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    98
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
    99
local score = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0, [5] = 0}
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
   100
3240
smxx
parents: 3235
diff changeset
   101
local started = false
smxx
parents: 3235
diff changeset
   102
3000
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
   103
function onGameInit()
3003
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
   104
	GameFlags = gfSolidLand + gfBorder + gfInvulnerable + gfLowGravity
3000
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
   105
	TurnTime = 20000
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
   106
	CaseFreq = 0
4162
923db448ad16 update and fix some lua stuff
Henek
parents: 3465
diff changeset
   107
	MinesNum = 0
3000
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
   108
	Explosives = 0
3003
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
   109
	Delay = 500
3197
smxx
parents: 3050
diff changeset
   110
	SuddenDeathTurns = 99999 -- "disable" sudden death
3000
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
   111
end
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
   112
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
   113
function onGameStart()
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
   114
	ShowMission(loc(caption), loc(subcaption), loc(goal), -amBaseballBat, 0);
3240
smxx
parents: 3235
diff changeset
   115
	started = true
3000
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
   116
end
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
   117
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
   118
function onGameTick()
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
   119
end
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
   120
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
   121
function onAmmoStoreInit()
3346
967fd96f7373 Engine/Frontend:
smxx
parents: 3266
diff changeset
   122
	SetAmmo(amBaseballBat, 9, 0, 0, 0)
967fd96f7373 Engine/Frontend:
smxx
parents: 3266
diff changeset
   123
	SetAmmo(amSkip, 9, 0, 0, 0)
3000
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
   124
end
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
   125
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
   126
function onGearAdd(gear)
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
   127
end
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
   128
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
   129
function onGearDelete(gear)
3240
smxx
parents: 3235
diff changeset
   130
	if not started then
smxx
parents: 3235
diff changeset
   131
		return
3257
smxx
parents: 3240
diff changeset
   132
	end
3003
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
   133
	if (GetGearType(gear) == gtHedgehog) and CurrentHedgehog ~= nil then
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
   134
		local clan = GetHogClan(CurrentHedgehog)
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
   135
		local s = GetHogName(gear) .. " " .. loc(drowning) .. "|" .. loc(team) .. " " .. (clan + 1) .. " "
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
   136
		if GetHogClan(CurrentHedgehog) ~= GetHogClan(gear) then
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
   137
			score[clan] = score[clan] + 1
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
   138
			s = s .. loc(scored)
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
   139
		else
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
   140
			score[clan] = score[clan] - 1
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
   141
			s = s .. loc(failed)
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
   142
		end
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
   143
		s = s .. "| |" .. loc(sscore) .. ": " .. score[0]
3000
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
   144
		for i = 1, ClansCount - 1 do s = s .. " - " .. score[i] end
3003
0afdba08a858 Engine:
smxx
parents: 3000
diff changeset
   145
		ShowMission(loc(caption), loc(subcaption), s, -amBaseballBat, 0)
3000
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
   146
	end
2b9405b6dc5d General:
smxx
parents: 2999
diff changeset
   147
end