1 -- Hedgewars - Knockball for 2+ Players |
1 -- Hedgewars - Knockball for 2+ Players |
2 |
2 |
3 local caption = { |
3 local caption = { |
4 ["en"] = "Hedgewars-Knockball", |
4 ["en"] = "Hedgewars-Knockball", |
5 ["de"] = "Hedgewars-Knockball" |
5 ["de"] = "Hedgewars-Knockball", |
|
6 ["es"] = "Hedgewars-Knockball" |
6 } |
7 } |
7 |
8 |
8 local subcaption = { |
9 local subcaption = { |
9 ["en"] = "Not So Friendly Match", |
10 ["en"] = "Not So Friendly Match", |
10 ["de"] = "Kein-so-Freundschaftsspiel" |
11 ["de"] = "Kein-so-Freundschaftsspiel", |
|
12 ["es"] = "Partido no-tan-amistoso" |
11 } |
13 } |
12 |
14 |
13 local goal = { |
15 local goal = { |
14 ["en"] = "Bat balls at your enemies and|push them into the sea!", |
16 ["en"] = "Bat balls at your enemies and|push them into the sea!", |
15 ["de"] = "Schlage Bälle auf deine Widersacher|und lass sie ins Meer fallen!" |
17 ["de"] = "Schlage Bälle auf deine Widersacher|und lass sie ins Meer fallen!", |
|
18 ["es"] = "¡Batea pelotas hacia tus enemigos|y hazlos caer al agua!" |
16 } |
19 } |
17 |
20 |
18 local scored = { |
21 local scored = { |
19 ["en"] = " scored a point!", |
22 ["en"] = "%s is out and Team %d|scored a point!| |Score:", |
20 ["de"] = " erhält einen Punkt!" |
23 ["de"] = "%s ist draußen und Team %d|erhält einen Punkt!| |Punktestand:", |
|
24 ["es"] = "¡%s cayó y Equipo %d|anotó un tanto!| |Puntuación:" |
21 } |
25 } |
22 |
26 |
23 local failed = { |
27 local failed = { |
24 ["en"] = " scored a penalty!", |
28 ["en"] = "%s is out and Team %d|scored a penalty!| |Score:", |
25 ["de"] = " erhält eine Strafe!" |
29 ["de"] = "%s ist draußen und Team %d|erhält eine Strafe!| |Punktestand:", |
26 } |
30 ["es"] = "¡%s cayó y Equipo %d|anotó una falta!| |Puntuación:" |
27 |
|
28 local sscore = { |
|
29 ["en"] = "Score", |
|
30 ["de"] = "Punktestand" |
|
31 } |
|
32 |
|
33 local team = { |
|
34 ["en"] = "Team" |
|
35 } |
|
36 |
|
37 local drowning = { |
|
38 ["en"] = "is out and", |
|
39 ["de"] = "ist draußen und" |
|
40 } |
31 } |
41 |
32 |
42 local function loc(text) |
33 local function loc(text) |
43 if text == nil then return "**missing**" |
34 if text == nil then return "**missing**" |
44 elseif text[L] == nil then return text["en"] |
35 elseif text[L] == nil then return text["en"] |
88 function onGearDelete(gear) |
79 function onGearDelete(gear) |
89 if gear == ball then |
80 if gear == ball then |
90 ball = nil |
81 ball = nil |
91 elseif (GetGearType(gear) == gtHedgehog) and CurrentHedgehog ~= nil then |
82 elseif (GetGearType(gear) == gtHedgehog) and CurrentHedgehog ~= nil then |
92 local clan = GetHogClan(CurrentHedgehog) |
83 local clan = GetHogClan(CurrentHedgehog) |
93 local s = GetHogName(gear) .. " " .. loc(drowning) .. "|" .. loc(team) .. " " .. (clan + 1) .. " " |
84 local s |
94 if GetHogClan(CurrentHedgehog) ~= GetHogClan(gear) then |
85 if GetHogClan(CurrentHedgehog) ~= GetHogClan(gear) then |
95 score[clan] = score[clan] + 1 |
86 score[clan] = score[clan] + 1 |
96 s = s .. loc(scored) |
87 s = string.format(loc(scored), GetHogName(gear), clan + 1) |
97 else |
88 else |
98 score[clan] = score[clan] - 1 |
89 score[clan] = score[clan] - 1 |
99 s = s .. loc(failed) |
90 s = string.format(loc(failed), GetHogName(gear), clan + 1) |
100 end |
91 end |
101 s = s .. "| |" .. loc(sscore) .. ": " .. score[0] |
92 s = s .. " " .. score[0] |
102 for i = 1, ClansCount - 1 do s = s .. " - " .. score[i] end |
93 for i = 1, ClansCount - 1 do s = s .. " - " .. score[i] end |
103 ShowMission(loc(caption), loc(subcaption), s, -amBaseballBat, 0) |
94 ShowMission(loc(caption), loc(subcaption), s, -amBaseballBat, 0) |
104 end |
95 end |
105 end |
96 end |