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