author | koda |
Thu, 01 Apr 2010 00:21:00 +0000 | |
changeset 3223 | f0e590790f3b |
parent 3197 | e1fa864fd6ca |
child 3235 | c7ceda2f5d4a |
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", |
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
|
7 |
["pl"] = "Hedgewars-Koszykówka" |
3000 | 8 |
} |
9 |
||
10 |
local subcaption = { |
|
11 |
["en"] = "Not So Friendly Match", |
|
3050 | 12 |
["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
|
13 |
["es"] = "Partido no-tan-amistoso", |
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 |
["pl"] = "Mecz Nie-Taki-Towarzyski" |
3000 | 15 |
} |
16 |
||
17 |
local goal = { |
|
18 |
["en"] = "Bat your opponents through the|baskets and out of the map!", |
|
3050 | 19 |
["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
|
20 |
["es"] = "¡Batea a tus oponentes fuera del mapa a través de la canasta!", |
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
|
21 |
["pl"] = "Spałuj swoich przekiwników|wyrzucając ich przez kosz, za mapę!" |
3000 | 22 |
} |
23 |
||
24 |
local scored = { |
|
25 |
["en"] = " scored a point!", |
|
3050 | 26 |
["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
|
27 |
["es"] = " anotó un tanto!", |
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 |
["pl"] = " zdobył punkt!" |
3000 | 29 |
} |
30 |
||
3003 | 31 |
local failed = { |
32 |
["en"] = " scored a penalty!", |
|
3050 | 33 |
["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
|
34 |
["es"] = " anotó una falta!", |
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
|
35 |
["pl"] = " zdobył punkt karny!" |
3003 | 36 |
} |
37 |
||
38 |
local sscore = { |
|
3000 | 39 |
["en"] = "Score", |
3050 | 40 |
["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
|
41 |
["es"] = "Puntuación", |
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 |
["pl"] = "Punktacja" |
3000 | 43 |
} |
44 |
||
45 |
local team = { |
|
3050 | 46 |
["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
|
47 |
["es"] = "Equipo", |
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
|
48 |
["pl"] = "Drużyna" |
3000 | 49 |
} |
50 |
||
51 |
local drowning = { |
|
52 |
["en"] = "is out and", |
|
3050 | 53 |
["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
|
54 |
["es"] = "cayó y", |
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
|
55 |
["en"] = "jest wyautowany i", |
3000 | 56 |
} |
57 |
||
58 |
local function loc(text) |
|
59 |
if text == nil then return "**missing**" |
|
60 |
elseif text[L] == nil then return text["en"] |
|
61 |
else return text[L] |
|
62 |
end |
|
63 |
end |
|
64 |
||
65 |
--------------------------------------------------------------- |
|
66 |
||
67 |
local score = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0, [5] = 0} |
|
68 |
||
69 |
function onGameInit() |
|
3003 | 70 |
GameFlags = gfSolidLand + gfBorder + gfInvulnerable + gfLowGravity |
3000 | 71 |
TurnTime = 20000 |
72 |
CaseFreq = 0 |
|
73 |
LandAdds = 0 |
|
74 |
Explosives = 0 |
|
3003 | 75 |
Delay = 500 |
3197 | 76 |
SuddenDeathTurns = 99999 -- "disable" sudden death |
3000 | 77 |
end |
78 |
||
79 |
function onGameStart() |
|
80 |
ShowMission(loc(caption), loc(subcaption), loc(goal), -amBaseballBat, 0); |
|
81 |
end |
|
82 |
||
83 |
function onGameTick() |
|
84 |
end |
|
85 |
||
86 |
function onAmmoStoreInit() |
|
87 |
SetAmmo(amBaseballBat, 9, 0, 0) |
|
3003 | 88 |
SetAmmo(amSkip, 9, 0, 0) |
3000 | 89 |
end |
90 |
||
91 |
function onGearAdd(gear) |
|
92 |
end |
|
93 |
||
94 |
function onGearDelete(gear) |
|
3003 | 95 |
if (GetGearType(gear) == gtHedgehog) and CurrentHedgehog ~= nil then |
96 |
local clan = GetHogClan(CurrentHedgehog) |
|
97 |
local s = GetHogName(gear) .. " " .. loc(drowning) .. "|" .. loc(team) .. " " .. (clan + 1) .. " " |
|
98 |
if GetHogClan(CurrentHedgehog) ~= GetHogClan(gear) then |
|
99 |
score[clan] = score[clan] + 1 |
|
100 |
s = s .. loc(scored) |
|
101 |
else |
|
102 |
score[clan] = score[clan] - 1 |
|
103 |
s = s .. loc(failed) |
|
104 |
end |
|
105 |
s = s .. "| |" .. loc(sscore) .. ": " .. score[0] |
|
3000 | 106 |
for i = 1, ClansCount - 1 do s = s .. " - " .. score[i] end |
3003 | 107 |
ShowMission(loc(caption), loc(subcaption), s, -amBaseballBat, 0) |
3000 | 108 |
end |
109 |
end |