|
1 loadfile(GetDataPath() .. "Scripts/Locale.lua")() |
|
2 |
1 -- Hedgewars - Basketball for 2+ Players |
3 -- Hedgewars - Basketball for 2+ Players |
2 |
|
3 local caption = { |
|
4 ["en"] = "Hedgewars-Basketball", |
|
5 ["de"] = "Hedgewars-Basketball", |
|
6 ["es"] = "Hedgewars-Baloncesto", |
|
7 ["pl"] = "Hedgewars-Koszykówka", |
|
8 ["pt_PT"] = "Hedgewars-Basketball", |
|
9 ["sk"] = "Hedgewars-Basketbal", |
|
10 ["sv"] = "Hedgewars-Basket", |
|
11 ["pt_BR"] = "Hedgewars-Basketball" |
|
12 } |
|
13 |
|
14 local subcaption = { |
|
15 ["en"] = "Not So Friendly Match", |
|
16 ["de"] = "Kein-so-Freundschaftsspiel", |
|
17 ["es"] = "Partido no-tan-amistoso", |
|
18 ["pl"] = "Mecz Nie-Do-Końca Towarzyski", |
|
19 ["pt_PT"] = "Partida não muito amigável", |
|
20 ["sk"] = "Nie tak celkom priateľský zápas", |
|
21 ["sv"] = "En inte så vänlig match", |
|
22 ["pt_BR"] = "Partida não muito amigável" |
|
23 } |
|
24 |
|
25 local goal = { |
|
26 ["en"] = "Bat your opponents through the|baskets and out of the map!", |
|
27 ["de"] = "Schlage deine Widersacher durch|die Körbe und aus der Karte hinaus!", |
|
28 ["es"] = "¡Batea a tus oponentes fuera del mapa a través de la canasta!", |
|
29 ["pl"] = "Uderzaj swoich przekiwników|wyrzucając przez kosz, poza mapę!", |
|
30 ["pt_PT"] = "Bate os teus adversarios|fora do mapa acertando com eles no cesto!", |
|
31 ["sk"] = "Odpálkujte vašich súperov do koša|a von z mapy!", |
|
32 ["sv"] = "Slå ner dina motståndare i|korgarna och ut ur kartan!", |
|
33 ["pt_BR"] = "Rebata seus oponentes para|fora do mapa através dos cestos!" |
|
34 } |
|
35 |
|
36 local scored = { |
|
37 ["en"] = " scored a point!", |
|
38 ["de"] = " erhält einen Punkt!", |
|
39 ["es"] = " anotó un tanto!", |
|
40 ["pl"] = " zdobyła punkt!", |
|
41 ["pt_PT"] = " marca um cesto!", |
|
42 ["sk"] = " skóruje!", |
|
43 ["sv"] = " fick ett poäng", |
|
44 ["pt_BR"] = " fez uma cesta" |
|
45 } |
|
46 |
|
47 local failed = { |
|
48 ["en"] = " scored a penalty!", |
|
49 ["de"] = " erhält eine Strafe!", |
|
50 ["es"] = " anotó una falta!", |
|
51 ["pl"] = " zdobyła punkt karny!", |
|
52 ["pt_PT"] = " perde um ponto!", |
|
53 ["sk"] = " dostáva trestný bod!", |
|
54 ["sv"] = " fick ett straff", |
|
55 ["pt_BR"] = " sofre uma penalidade" |
|
56 } |
|
57 |
|
58 local sscore = { |
|
59 ["en"] = "Score", |
|
60 ["de"] = "Punktestand", |
|
61 ["es"] = "Puntuación", |
|
62 ["pl"] = "Punktacja", |
|
63 ["pt_PT"] = "Pontuação", |
|
64 ["sk"] = "Skóre", |
|
65 ["sv"] = "Poängställning", |
|
66 ["pt_BR"] = "Pontuação" |
|
67 } |
|
68 |
|
69 local team = { |
|
70 ["en"] = "Team", |
|
71 ["es"] = "Equipo", |
|
72 ["pl"] = "Drużyna", |
|
73 ["pt_PT"] = "Equipa", |
|
74 ["sk"] = "Tím", |
|
75 ["sv"] = "Lag", |
|
76 ["pt_BR"] = "Equipe" |
|
77 } |
|
78 |
|
79 local drowning = { |
|
80 ["en"] = "is out and", |
|
81 ["de"] = "ist draußen und", |
|
82 ["es"] = "cayó y", |
|
83 ["pl"] = "jest wyautowany i", |
|
84 ["pt_PT"] = "está fora e", |
|
85 ["sk"] = "je mimo hru a", |
|
86 ["sv"] = "är ute och", |
|
87 ["pt_BR"] = "está fora e" |
|
88 } |
|
89 |
|
90 local function loc(text) |
|
91 if text == nil then return "**missing**" |
|
92 elseif text[L] == nil then return text["en"] |
|
93 else return text[L] |
|
94 end |
|
95 end |
|
96 |
|
97 --------------------------------------------------------------- |
|
98 |
4 |
99 local score = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0, [5] = 0} |
5 local score = {[0] = 0, [1] = 0, [2] = 0, [3] = 0, [4] = 0, [5] = 0} |
100 |
6 |
101 local started = false |
7 local started = false |
102 |
8 |
130 if not started then |
36 if not started then |
131 return |
37 return |
132 end |
38 end |
133 if (GetGearType(gear) == gtHedgehog) and CurrentHedgehog ~= nil then |
39 if (GetGearType(gear) == gtHedgehog) and CurrentHedgehog ~= nil then |
134 local clan = GetHogClan(CurrentHedgehog) |
40 local clan = GetHogClan(CurrentHedgehog) |
135 local s = GetHogName(gear) .. " " .. loc(drowning) .. "|" .. loc(team) .. " " .. (clan + 1) .. " " |
41 local s |
136 if GetHogClan(CurrentHedgehog) ~= GetHogClan(gear) then |
42 if clan ~= nil then |
137 score[clan] = score[clan] + 1 |
43 if GetHogClan(CurrentHedgehog) ~= GetHogClan(gear) then |
138 s = s .. loc(scored) |
44 score[clan] = score[clan] + 1 |
139 else |
45 s = string.format(loc("%s is out and Team %d|scored a point!| |Score:"), GetHogName(gear), clan + 1) |
140 score[clan] = score[clan] - 1 |
46 else |
141 s = s .. loc(failed) |
47 score[clan] = score[clan] - 1 |
|
48 s = string.format(loc("%s is out and Team %d|scored a penalty!| |Score:"), GetHogName(gear), clan + 1) |
|
49 end |
|
50 s = s .. " " .. score[0] |
|
51 for i = 1, ClansCount - 1 do s = s .. " - " .. score[i] end |
|
52 ShowMission(loc("Hedgewars-Basketball"), loc("Not So Friendly Match"), s, -amBaseballBat, 0) |
142 end |
53 end |
143 s = s .. "| |" .. loc(sscore) .. ": " .. score[0] |
|
144 for i = 1, ClansCount - 1 do s = s .. " - " .. score[i] end |
|
145 ShowMission(loc(caption), loc(subcaption), s, -amBaseballBat, 0) |
|
146 end |
54 end |
147 end |
55 end |