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