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