author | szczur |
Sat, 13 Nov 2010 08:54:39 -0500 | |
branch | 0.9.14 |
changeset 4270 | d1673536b6e5 |
parent 4188 | e1bf1b5a301e |
child 4493 | 45db8e97d282 |
permissions | -rw-r--r-- |
3004 | 1 |
-- Hedgewars - Basketball for 2+ Players |
3000 | 2 |
|
3 |
local caption = { |
|
4 |
["en"] = "Hedgewars-Basketball", |
|
3050 | 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 | 7 |
["pl"] = "Hedgewars-Koszykówka", |
3266 | 8 |
["pt_PT"] = "Hedgewars-Basketball", |
3465 | 9 |
["sk"] = "Hedgewars-Basketbal", |
4188 | 10 |
["sv"] = "Hedgewars-Basket", |
11 |
["pt_BR"] = "Hedgewars-Basketball" |
|
3000 | 12 |
} |
13 |
||
14 |
local subcaption = { |
|
15 |
["en"] = "Not So Friendly Match", |
|
3050 | 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", |
4270 | 18 |
["pl"] = "Mecz Nie-Do-Końca Towarzyski", |
3266 | 19 |
["pt_PT"] = "Partida não muito amigável", |
3465 | 20 |
["sk"] = "Nie tak celkom priateľský zápas", |
4188 | 21 |
["sv"] = "En inte så vänlig match", |
22 |
["pt_BR"] = "Partida não muito amigável" |
|
3000 | 23 |
} |
24 |
||
25 |
local goal = { |
|
26 |
["en"] = "Bat your opponents through the|baskets and out of the map!", |
|
3050 | 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 | 29 |
["pl"] = "Uderzaj swoich przekiwników|wyrzucając przez kosz, poza mapę!", |
3266 | 30 |
["pt_PT"] = "Bate os teus adversarios|fora do mapa acertando com eles no cesto!", |
3465 | 31 |
["sk"] = "Odpálkujte vašich súperov do koša|a von z mapy!", |
4188 | 32 |
["sv"] = "Slå ner dina motståndare i|korgarna och ut ur kartan!", |
33 |
["pt_BR"] = "Rebata seus oponentes para|fora do mapa através dos cestos!" |
|
3000 | 34 |
} |
35 |
||
36 |
local scored = { |
|
37 |
["en"] = " scored a point!", |
|
3050 | 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 | 40 |
["pl"] = " zdobyła punkt!", |
3266 | 41 |
["pt_PT"] = " marca um cesto!", |
3465 | 42 |
["sk"] = " skóruje!", |
4188 | 43 |
["sv"] = " fick ett poäng", |
44 |
["pt_BR"] = " fez uma cesta" |
|
3000 | 45 |
} |
46 |
||
3003 | 47 |
local failed = { |
48 |
["en"] = " scored a penalty!", |
|
3050 | 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 | 51 |
["pl"] = " zdobyła punkt karny!", |
3266 | 52 |
["pt_PT"] = " perde um ponto!", |
3465 | 53 |
["sk"] = " dostáva trestný bod!", |
4188 | 54 |
["sv"] = " fick ett straff", |
55 |
["pt_BR"] = " sofre uma penalidade" |
|
3003 | 56 |
} |
57 |
||
58 |
local sscore = { |
|
3000 | 59 |
["en"] = "Score", |
3050 | 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 | 62 |
["pl"] = "Punktacja", |
3266 | 63 |
["pt_PT"] = "Pontuação", |
3465 | 64 |
["sk"] = "Skóre", |
4188 | 65 |
["sv"] = "Poängställning", |
66 |
["pt_BR"] = "Pontuação" |
|
3000 | 67 |
} |
68 |
||
69 |
local team = { |
|
3050 | 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 | 72 |
["pl"] = "Drużyna", |
3266 | 73 |
["pt_PT"] = "Equipa", |
3465 | 74 |
["sk"] = "Tím", |
4188 | 75 |
["sv"] = "Lag", |
76 |
["pt_BR"] = "Equipe" |
|
3000 | 77 |
} |
78 |
||
79 |
local drowning = { |
|
80 |
["en"] = "is out and", |
|
3050 | 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 | 83 |
["pl"] = "jest wyautowany i", |
3266 | 84 |
["pt_PT"] = "está fora e", |
3465 | 85 |
["sk"] = "je mimo hru a", |
4188 | 86 |
["sv"] = "är ute och", |
87 |
["pt_BR"] = "está fora e" |
|
3000 | 88 |
} |
89 |
||
90 |
local function loc(text) |
|
91 |
if text == nil then return "**missing**" |
|
92 |
elseif text[L] == nil then return text["en"] |
|
93 |
else return text[L] |
|
94 |
end |
|
95 |
end |
|
96 |
||
97 |
--------------------------------------------------------------- |
|
98 |
||
99 |
local score = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0, [5] = 0} |
|
100 |
||
3240 | 101 |
local started = false |
102 |
||
3000 | 103 |
function onGameInit() |
3003 | 104 |
GameFlags = gfSolidLand + gfBorder + gfInvulnerable + gfLowGravity |
3000 | 105 |
TurnTime = 20000 |
106 |
CaseFreq = 0 |
|
4162 | 107 |
MinesNum = 0 |
3000 | 108 |
Explosives = 0 |
3003 | 109 |
Delay = 500 |
3197 | 110 |
SuddenDeathTurns = 99999 -- "disable" sudden death |
3000 | 111 |
end |
112 |
||
113 |
function onGameStart() |
|
114 |
ShowMission(loc(caption), loc(subcaption), loc(goal), -amBaseballBat, 0); |
|
3240 | 115 |
started = true |
3000 | 116 |
end |
117 |
||
118 |
function onGameTick() |
|
119 |
end |
|
120 |
||
121 |
function onAmmoStoreInit() |
|
3346 | 122 |
SetAmmo(amBaseballBat, 9, 0, 0, 0) |
123 |
SetAmmo(amSkip, 9, 0, 0, 0) |
|
3000 | 124 |
end |
125 |
||
126 |
function onGearAdd(gear) |
|
127 |
end |
|
128 |
||
129 |
function onGearDelete(gear) |
|
3240 | 130 |
if not started then |
131 |
return |
|
3257 | 132 |
end |
3003 | 133 |
if (GetGearType(gear) == gtHedgehog) and CurrentHedgehog ~= nil then |
134 |
local clan = GetHogClan(CurrentHedgehog) |
|
135 |
local s = GetHogName(gear) .. " " .. loc(drowning) .. "|" .. loc(team) .. " " .. (clan + 1) .. " " |
|
136 |
if GetHogClan(CurrentHedgehog) ~= GetHogClan(gear) then |
|
137 |
score[clan] = score[clan] + 1 |
|
138 |
s = s .. loc(scored) |
|
139 |
else |
|
140 |
score[clan] = score[clan] - 1 |
|
141 |
s = s .. loc(failed) |
|
142 |
end |
|
143 |
s = s .. "| |" .. loc(sscore) .. ": " .. score[0] |
|
3000 | 144 |
for i = 1, ClansCount - 1 do s = s .. " - " .. score[i] end |
3003 | 145 |
ShowMission(loc(caption), loc(subcaption), s, -amBaseballBat, 0) |
3000 | 146 |
end |
147 |
end |