share/hedgewars/Data/Missions/Campaign/01#Boot Camp.lua
author inu
Sun, 07 Nov 2010 11:23:30 -0500
changeset 4170 7fb7386423d8
parent 4162 923db448ad16
child 4188 e1bf1b5a301e
permissions -rw-r--r--
portuguese update for map lua
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
     1
-- IMPORTANT -- THIS IS WORK IN PROGRESS AND VERY LIKELY TO BE CHANGED AGAIN
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
     2
-- IMPORTANT -- SAVE YOURSELF THE WORK AND DON'T TRANSLATE THE TEXTS IF YOU FEAR STARTING OVER LATER!
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
     3
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
     4
local teamnames = {}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
     5
local hognames = {}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
     6
teamnames[0] = {
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
     7
	["en"] = "Bloody Rookies",
4070
adeaefdcbd64 polish update, fix encoding
szczur
parents: 4051
diff changeset
     8
	["de"] = "Blutige Anfänger",
4073
582350d49e98 again w/ the swedish
henek
parents: 4071
diff changeset
     9
	["pl"] = "Żótodzioby",
4080
5809a2360d45 Updated mission translations
Palewolf
parents: 4073
diff changeset
    10
	["sv"] = "Blodiga nybörjare",
4170
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
    11
	["es"] = "Reclutas",
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
    12
	["pt_PT"] = "Recrutas"
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    13
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    14
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    15
teamnames[1] = {
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    16
	["en"] = "Instructors",
4051
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
    17
	["de"] = "Ausbilder",
4073
582350d49e98 again w/ the swedish
henek
parents: 4071
diff changeset
    18
	["pl"] = "Instruktor",
4080
5809a2360d45 Updated mission translations
Palewolf
parents: 4073
diff changeset
    19
	["sv"] = "Instruktör",
4170
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
    20
	["es"] = "Instructores",
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
    21
	["pt_PT"] = "Instrutores"
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    22
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    23
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    24
hognames[0] = {
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    25
	["en"] = "Joker",
4051
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
    26
	["de"] = "Joker",
4073
582350d49e98 again w/ the swedish
henek
parents: 4071
diff changeset
    27
	["pl"] = "Joker",
4080
5809a2360d45 Updated mission translations
Palewolf
parents: 4073
diff changeset
    28
	["sv"] = "Joker",
4170
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
    29
	["es"] = "Joker",
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
    30
	["pt_PT"] = "Joker"
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    31
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    32
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    33
hognames[1] = {
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    34
	["en"] = "Harthog",
4051
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
    35
	["de"] = "Harthog",
4073
582350d49e98 again w/ the swedish
henek
parents: 4071
diff changeset
    36
	["pl"] = "Harthog",
4080
5809a2360d45 Updated mission translations
Palewolf
parents: 4073
diff changeset
    37
	["sv"] = "Harthog",
4170
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
    38
	["es"] = "Harthog",
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
    39
	["pt_PT"] = "Harthog"
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    40
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    41
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    42
local caption = {
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    43
	["en"] = "Boot Camp",
4051
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
    44
	["de"] = "Grundausbildung",
4073
582350d49e98 again w/ the swedish
henek
parents: 4071
diff changeset
    45
	["pl"] = "Poligon",
4080
5809a2360d45 Updated mission translations
Palewolf
parents: 4073
diff changeset
    46
	["sv"] = "Grundutbildning",
4170
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
    47
	["es"] = "Campamento militar",
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
    48
	["pt_PT"] = "Acampamento militar"
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    49
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    50
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    51
local subcaption = {
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    52
	["en"] = "Follow the instructions!",
4051
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
    53
	["de"] = "Befolge die Anweisungen!",
4073
582350d49e98 again w/ the swedish
henek
parents: 4071
diff changeset
    54
	["pl"] = "Wykonuj polecenia!",
4080
5809a2360d45 Updated mission translations
Palewolf
parents: 4073
diff changeset
    55
	["sv"] = "Följ instruktioner!",
4170
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
    56
	["es"] = "¡Sigue las órdenes!",
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
    57
	["pt_PT"] = "Segue as instruções!"
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    58
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    59
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    60
local goals = {}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    61
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    62
goals[0] = {
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    63
	["en"] = "Listen to your Drill Instructor and follow his lead!",
4070
adeaefdcbd64 polish update, fix encoding
szczur
parents: 4051
diff changeset
    64
	["de"] = "Höre deinem Ausbilder zu und befolge seine Anweisungen!",
4073
582350d49e98 again w/ the swedish
henek
parents: 4071
diff changeset
    65
	["pl"] = "Słuchaj instruktora i wykonuj jego rozkazy!",
4080
5809a2360d45 Updated mission translations
Palewolf
parents: 4073
diff changeset
    66
	["sv"] = "Lyssna på din instruktör och gör som han säger!",
4170
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
    67
	["es"] = "¡Escucha atentamente a tu instructor de maniobras y sigue sus órdenes!",
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
    68
	["pt_PT"] = "Ouve atentamente o teu Instrutor e segue as suas ordens!"
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    69
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    70
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    71
goals[1] = {
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    72
	["en"] = "Destroy the target to finish this mission!",
4070
adeaefdcbd64 polish update, fix encoding
szczur
parents: 4051
diff changeset
    73
	["de"] = "Zerstöre das Ziel, um diese Mission abzuschließen!",
4073
582350d49e98 again w/ the swedish
henek
parents: 4071
diff changeset
    74
	["pl"] = "Zniszcz cel by ukończyć misję!",
4080
5809a2360d45 Updated mission translations
Palewolf
parents: 4073
diff changeset
    75
	["sv"] = "Förstör målet för att avklara uppdraget!",
4170
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
    76
	["es"] = "¡Destruye el objetivo para completar esta misión!",
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
    77
	["pt_PT"] = "Destrói o alvo para completar esta missão!"
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    78
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    79
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    80
goals[2] = {
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    81
	["en"] = "Excellent! You've passed the Boot Camp!",
4051
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
    82
	["de"] = "Ausgezeichnet! Du hast das Ausbildungslager bestanden!",
4073
582350d49e98 again w/ the swedish
henek
parents: 4071
diff changeset
    83
	["pl"] = "Doskonale! Wyszedłeś cało z poligonu!",
4080
5809a2360d45 Updated mission translations
Palewolf
parents: 4073
diff changeset
    84
	["sv"] = "Brilliant! Du har klarat av grundutbildningen!",
4170
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
    85
	["es"] = "¡Excelente! ¡Has completado la maniobra de hoy!",
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
    86
	["pt_PT"] = "Excelente! Completaste o treino para recrutas!"
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    87
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    88
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    89
local failed = {
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    90
	["en"] = "You failed! Follow the instructions and shoot the target only!",
4070
adeaefdcbd64 polish update, fix encoding
szczur
parents: 4051
diff changeset
    91
	["de"] = "Du hast versagt! Befolge die Anweisungen und schieß nur auf das Ziel!",
4073
582350d49e98 again w/ the swedish
henek
parents: 4071
diff changeset
    92
	["pl"] = "Przegrałeś! Wykonuj instrukcje poprawnie i strzelaj tylko w podane cele!",
4080
5809a2360d45 Updated mission translations
Palewolf
parents: 4073
diff changeset
    93
	["sv"] = "Du har misslyckats! Följ instruktionerna och sjut endast på målen!",
4170
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
    94
	["es"] = "¡Has fallado! ¡Sigue las instrucciones y destruye únicamente el objetivo!",
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
    95
	["pt_PT"] = "Falhaste! Segue as instruções e destrói apenas o alvo!"
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    96
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    97
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    98
local drill = {}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    99
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   100
drill[0] = {
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   101
	["en"] = "Allright, maggot!",
4051
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
   102
	["de"] = "Also gut, du Made!",
4073
582350d49e98 again w/ the swedish
henek
parents: 4071
diff changeset
   103
	["pl"] = "Słuchaj mnie gnido!",
4080
5809a2360d45 Updated mission translations
Palewolf
parents: 4073
diff changeset
   104
	["sv"] = "Dåså, din mask!",
4170
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
   105
	["es"] = "¡Muy bien, escoria!",
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
   106
	["pt_PT"] = "Bom trabalho verme!"
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   107
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   108
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   109
drill[1] = {
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   110
	["en"] = "Show that you aren't that useless.",
4051
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
   111
	["de"] = "Zeig, dass du nicht so nutzlos bist.",
4073
582350d49e98 again w/ the swedish
henek
parents: 4071
diff changeset
   112
	["pl"] = "Udowodnij, że nie jesteś bezwartościowy.",
4080
5809a2360d45 Updated mission translations
Palewolf
parents: 4073
diff changeset
   113
	["sv"] = "Visa att du inte är så värdelös!",
4170
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
   114
	["es"] = "Demuéstrame que no eres tan inútil como pareces.",
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
   115
	["pt_PT"] = "Prova-me que não és tão inútil como pareces."
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   116
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   117
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   118
drill[2] = {
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   119
	["en"] = "Use [left] to move to the left!",
4051
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
   120
	["de"] = "Benutze [Links], um nach links zu gehen!",
4073
582350d49e98 again w/ the swedish
henek
parents: 4071
diff changeset
   121
	["pl"] = "Użyj [lewo] by poruszyć się w lewą stronę!",
4080
5809a2360d45 Updated mission translations
Palewolf
parents: 4073
diff changeset
   122
	["sv"] = "Använd [vänster] för att gå åt vänster!",
4170
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
   123
	["es"] = "¡Aprieta [izquierda] para desplazarte a la izquierda!",
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
   124
	["pt_PT"] = "Carrega [esquerda] para te moveres para a esquerda!"
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   125
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   126
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   127
drill[3] = {
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   128
	["en"] = "Good! Now use [right] to come back!",
4070
adeaefdcbd64 polish update, fix encoding
szczur
parents: 4051
diff changeset
   129
	["de"] = "Gut! Nun komm mit [Rechts] zurück!",
4073
582350d49e98 again w/ the swedish
henek
parents: 4071
diff changeset
   130
	["pl"] = "Dobzre, Teraz użyj [prawo] by wrócić!",
4080
5809a2360d45 Updated mission translations
Palewolf
parents: 4073
diff changeset
   131
	["sv"] = "Bra! Använd nu [höger] för att gå tillbaka!",
4170
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
   132
	["es"] = "¡Muy bien! ¡Ahora presiona [derecha] para volver!",
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
   133
	["pt_PT"] = "Muito bem! Agora pressiona [direita] para voltar!"
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   134
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   135
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   136
drill[4] = {
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   137
	["en"] = "Excellent!",
4051
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
   138
	["de"] = "Ausgezeichnet!",
4073
582350d49e98 again w/ the swedish
henek
parents: 4071
diff changeset
   139
	["pl"] = "Wspaniale!",
4080
5809a2360d45 Updated mission translations
Palewolf
parents: 4073
diff changeset
   140
	["sv"] = "Utmärkt!",
4170
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
   141
	["es"] = "¡Excelente!",
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
   142
	["pt_PT"] = "Excelente!"
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   143
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   144
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   145
drill[5] = {
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   146
	["en"] = "Now jump to the left using [return]!",
4051
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
   147
	["de"] = "Jetzt springe mit [Eingabetaste] nach links!",
4073
582350d49e98 again w/ the swedish
henek
parents: 4071
diff changeset
   148
	["pl"] = "Teraz skocz w lewo używając [Enter]",
4080
5809a2360d45 Updated mission translations
Palewolf
parents: 4073
diff changeset
   149
	["sv"] = "Hoppa nu åt vänster med hjälp av [enter]!",
4170
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
   150
	["es"] = "¡Ahora salta hacia la izquierda usando [intro]!",
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
   151
	["pt_PT"] = "Agora salta para a esquerda pressionando [retrocesso]!"
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   152
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   153
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   154
drill[6] = {
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   155
	["en"] = "Use [up] and [down] to aim.",
4051
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
   156
	["de"] = "Benutze [Hoch] und [Runter], um zu zielen.",
4073
582350d49e98 again w/ the swedish
henek
parents: 4071
diff changeset
   157
	["pl"] = "Użyj klawiszy [góra] i [dół] by celować.",
4080
5809a2360d45 Updated mission translations
Palewolf
parents: 4073
diff changeset
   158
	["sv"] = "Använd [upp] och [ner] för att sikta!",
4170
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
   159
	["es"] = "Presiora [arriba] y [abajo] para apuntar.",
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
   160
	["pt_PT"] = "Pressiona [cima] e [baixo] para apontar."
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   161
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   162
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   163
drill[7] = {
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   164
	["en"] = "Hold [space] to power up your shot and then release it to shoot.",
4051
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
   165
	["de"] = "Halte [Leertaste], um deinen Schuss aufzuladen, und lasse dann rechtzeitig los.",
4073
582350d49e98 again w/ the swedish
henek
parents: 4071
diff changeset
   166
	["pl"] = "Przytrzymaj spację by zwiększyć siłę strzału.",
4080
5809a2360d45 Updated mission translations
Palewolf
parents: 4073
diff changeset
   167
	["sv"] = "Håll ner [mellanslag] för att få kraft och släpp för att skjuta!",
4170
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
   168
	["es"] = "Mantén presionada la [barra espaciadora] para controlar la fuerza del disparo y suéltala para disparar.",
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
   169
	["pt_PT"] = "Mantem a [barra de espaços] pressionada para controlar a força do tiro e larga-a para disparar."
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   170
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   171
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   172
drill[8] = {
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   173
	["en"] = "Destroy the target to finish your basic training!",
4070
adeaefdcbd64 polish update, fix encoding
szczur
parents: 4051
diff changeset
   174
	["de"] = "Zerstöre das Ziel, um deine Grundausbildung abzuschließen!",
4073
582350d49e98 again w/ the swedish
henek
parents: 4071
diff changeset
   175
	["pl"] = "Zniszcz cel by by ukończyć trening podstawowy!",
4080
5809a2360d45 Updated mission translations
Palewolf
parents: 4073
diff changeset
   176
	["sv"] = "Förstör målet för att avsluta din grundutbildning!",
4170
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
   177
	["es"] = "¡Destruye el objetivo para completar el entrenamiento básico!",
7fb7386423d8 portuguese update for map lua
inu
parents: 4162
diff changeset
   178
	["pt_PT"] = "Destrói o alvo para completar o treino básico!"
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   179
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   180
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   181
local function loc(text)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   182
	if text == nil then return "**missing**"
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   183
	elseif text[L] == nil then return text["en"]
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   184
	else return text[L]
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   185
	end
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   186
end
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   187
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   188
local player = nil
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   189
local instructor = nil
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   190
local target = nil
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   191
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   192
function onGameStart()
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   193
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   194
end
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   195
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   196
local player_start_x = 2300
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   197
local player_start_y = 1250
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   198
local target_x = 1900
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   199
local target_y = 1250
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   200
local player_health = 100
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   201
local instructor_health = 100
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   202
local teamcolor = 14483456
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   203
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   204
local progress = 0
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   205
local time_start = 0
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   206
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   207
function onGameTick()
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   208
	if progress == -1 and (time_start + 2500) == GameTime then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   209
		EndGame()
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   210
	elseif progress == -1 then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   211
		
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   212
	elseif progress > 0 and ((TurnTimeLeft == 0) or (GetHealth(player) ~= player_health) or (GetHealth(instructor) ~= instructor_health)) then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   213
		progress = -1
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   214
		ShowMission(loc(caption), loc(subcaption), loc(failed), -amBazooka, 0);
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   215
		time_start = GameTime
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   216
		PlaySound(sndNooo)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   217
		TurnTimeLeft = 0
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   218
	elseif GameTime == 0 then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   219
		ShowMission(loc(caption), loc(subcaption), loc(goals[0]), -amBazooka, 0);
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   220
		TurnTimeLeft = 60000
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   221
	elseif GameTime == 2500 then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   222
		FollowGear(instructor)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   223
		HogSay(instructor, loc(drill[0]), SAY_SAY)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   224
	elseif GameTime == 5000 then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   225
		FollowGear(instructor)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   226
		HogSay(instructor, loc(drill[1]), SAY_SAY)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   227
	elseif GameTime == 7500 then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   228
		FollowGear(instructor)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   229
		HogSay(instructor, loc(drill[2]), SAY_SHOUT)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   230
		progress = 1
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   231
		TurnTimeLeft = 10000
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   232
	elseif progress == 1 then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   233
		local x, y = GetGearPosition(player);
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   234
		if x < player_start_x - 50 then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   235
			progress = 2
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   236
			FollowGear(instructor)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   237
			HogSay(instructor, loc(drill[3]), SAY_SHOUT)
3762
aef7d95dd159 Campaign:
smaxx
parents: 3761
diff changeset
   238
			TurnTimeLeft = 10000
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   239
		end
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   240
	elseif progress == 2 then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   241
		local x, y = GetGearPosition(player);
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   242
		if x > player_start_x then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   243
			progress = 3
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   244
			FollowGear(instructor)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   245
			HogSay(instructor, loc(drill[4]), SAY_SAY)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   246
			time_start = GameTime
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   247
		end
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   248
	elseif progress == 3 and (time_start + 2500 == GameTime) then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   249
		progress = 4
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   250
		FollowGear(instructor)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   251
		HogSay(instructor, loc(drill[5]), SAY_SHOUT)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   252
		HogTurnLeft(player, true)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   253
		TurnTimeLeft = 10000
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   254
	elseif progress == 4 then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   255
		local x, y = GetGearPosition(player);
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   256
		if y < player_start_y then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   257
			progress = 5
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   258
			FollowGear(instructor)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   259
			HogSay(instructor, "Yeah!", SAY_SAY)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   260
			time_start = GameTime
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   261
			TurnTimeLeft = 30000
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   262
		end
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   263
	elseif progress == 5 and (time_start + 2500 == GameTime) then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   264
		FollowGear(instructor)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   265
		HogSay(instructor, loc(drill[6]), SAY_SAY)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   266
	elseif progress == 5 and (time_start + 5000 == GameTime) then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   267
		FollowGear(instructor)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   268
		HogSay(instructor, loc(drill[7]), SAY_SAY)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   269
	elseif progress == 5 and (time_start + 7500 == GameTime) then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   270
		FollowGear(instructor)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   271
		HogSay(instructor, loc(drill[8]), SAY_SHOUT)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   272
		ShowMission(loc(caption), loc(subcaption), loc(goals[1]), 1, 0);
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   273
		target = AddGear(target_x, target_y, gtTarget, 0, 0, 0, 0)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   274
		TurnTimeLeft = 60000
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   275
	elseif progress == 5 and (time_start + 10000 == GameTime) then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   276
		FollowGear(target)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   277
	elseif progress == 6 then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   278
		progress = 7
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   279
		ShowMission(loc(caption), loc(subcaption), loc(goals[2]), 0, 0);
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   280
		PlaySound(sndVictory);
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   281
		time_start = GameTime
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   282
	elseif progress == 7 and (time_start + 2500 == GameTime) then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   283
		EndGame()
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   284
	end
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   285
end
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   286
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   287
function onGameInit()
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   288
	Seed = 0
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   289
	GameFlags = gfMultiWeapon + gfOneClanMode
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   290
	TurnTime = 25000
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   291
	CaseFreq = 0
4162
923db448ad16 update and fix some lua stuff
Henek
parents: 4080
diff changeset
   292
	MinesNum = 0
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   293
	Explosives = 0
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   294
	Delay = 2500
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   295
	Map = "Mushrooms"
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   296
	Theme = "Nature"
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   297
	
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   298
	AddTeam(loc(teamnames[0]), teamcolor, "Simple", "Island", "Default")
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   299
	player = AddHog(loc(hognames[0]), 0, player_health, "NoHat")
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   300
	SetGearPosition(player, player_start_x, player_start_y);
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   301
	
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   302
	AddTeam(loc(teamnames[1]), teamcolor + 1, "Simple", "Island", "Default")
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   303
	instructor = AddHog(loc(hognames[1]), 0, instructor_health, "NoHat")
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   304
	SetGearPosition(instructor, player_start_x + 100, player_start_y)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   305
	HogTurnLeft(instructor, true)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   306
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   307
	FollowGear(player);
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   308
end
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   309
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   310
function onAmmoStoreInit()
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   311
	SetAmmo(amBazooka, 9, 0, 0, 0)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   312
end
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   313
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   314
function onGearDelete(gear)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   315
	if GetGearType(gear) == gtTarget then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   316
		progress = 6
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   317
	end
4051
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
   318
end