author | smxx |
Fri, 02 Apr 2010 15:53:58 +0000 | |
changeset 3257 | fff80d469185 |
parent 3240 | e3b52d10b4c2 |
child 3264 | 3cf9d915cdb9 |
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!", |
3235 | 21 |
["pl"] = "Uderzaj swoich przekiwników|wyrzucając przez kosz, poza 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!", |
3235 | 28 |
["pl"] = " zdobyła 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!", |
3235 | 35 |
["pl"] = " zdobyła 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 |
||
3240 | 69 |
local started = false |
70 |
||
3000 | 71 |
function onGameInit() |
3003 | 72 |
GameFlags = gfSolidLand + gfBorder + gfInvulnerable + gfLowGravity |
3000 | 73 |
TurnTime = 20000 |
74 |
CaseFreq = 0 |
|
75 |
LandAdds = 0 |
|
76 |
Explosives = 0 |
|
3003 | 77 |
Delay = 500 |
3197 | 78 |
SuddenDeathTurns = 99999 -- "disable" sudden death |
3000 | 79 |
end |
80 |
||
81 |
function onGameStart() |
|
82 |
ShowMission(loc(caption), loc(subcaption), loc(goal), -amBaseballBat, 0); |
|
3240 | 83 |
started = true |
3000 | 84 |
end |
85 |
||
86 |
function onGameTick() |
|
87 |
end |
|
88 |
||
89 |
function onAmmoStoreInit() |
|
90 |
SetAmmo(amBaseballBat, 9, 0, 0) |
|
3003 | 91 |
SetAmmo(amSkip, 9, 0, 0) |
3000 | 92 |
end |
93 |
||
94 |
function onGearAdd(gear) |
|
95 |
end |
|
96 |
||
97 |
function onGearDelete(gear) |
|
3240 | 98 |
if not started then |
99 |
return |
|
3257 | 100 |
end |
3003 | 101 |
if (GetGearType(gear) == gtHedgehog) and CurrentHedgehog ~= nil then |
102 |
local clan = GetHogClan(CurrentHedgehog) |
|
103 |
local s = GetHogName(gear) .. " " .. loc(drowning) .. "|" .. loc(team) .. " " .. (clan + 1) .. " " |
|
104 |
if GetHogClan(CurrentHedgehog) ~= GetHogClan(gear) then |
|
105 |
score[clan] = score[clan] + 1 |
|
106 |
s = s .. loc(scored) |
|
107 |
else |
|
108 |
score[clan] = score[clan] - 1 |
|
109 |
s = s .. loc(failed) |
|
110 |
end |
|
111 |
s = s .. "| |" .. loc(sscore) .. ": " .. score[0] |
|
3000 | 112 |
for i = 1, ClansCount - 1 do s = s .. " - " .. score[i] end |
3003 | 113 |
ShowMission(loc(caption), loc(subcaption), s, -amBaseballBat, 0) |
3000 | 114 |
end |
115 |
end |