share/hedgewars/Data/Missions/Campaign/01#Boot Camp.lua
author szczur
Sun, 31 Oct 2010 20:30:02 +0100
changeset 4051 295cea095302
parent 3762 aef7d95dd159
child 4070 adeaefdcbd64
permissions -rw-r--r--
polish language patch
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",
4051
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
     8
	["de"] = "Blutige Anfänger",
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
     9
	["pl"] = "Żótodzioby"
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    10
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    11
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    12
teamnames[1] = {
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    13
	["en"] = "Instructors",
4051
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
    14
	["de"] = "Ausbilder",
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
    15
	["pl"] = "Instruktor"
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    16
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    17
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    18
hognames[0] = {
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    19
	["en"] = "Joker",
4051
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
    20
	["de"] = "Joker",
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
    21
	["pl"] = "Joker"
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    22
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    23
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    24
hognames[1] = {
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    25
	["en"] = "Harthog",
4051
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
    26
	["de"] = "Harthog",
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
    27
	["pl"] = "Harthog"
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    28
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    29
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    30
local caption = {
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    31
	["en"] = "Boot Camp",
4051
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
    32
	["de"] = "Grundausbildung",
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
    33
	["pl"] = "Poligon"
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    34
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    35
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    36
local subcaption = {
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    37
	["en"] = "Follow the instructions!",
4051
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
    38
	["de"] = "Befolge die Anweisungen!",
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
    39
	["pl"] = "Wykonuj polecenia!"
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    40
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    41
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    42
local goals = {}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    43
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    44
goals[0] = {
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    45
	["en"] = "Listen to your Drill Instructor and follow his lead!",
4051
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
    46
	["de"] = "Höre deinem Ausbilder zu und befolge seine Anweisungen!",
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
    47
	["pl"] = "Słuchaj instruktora i wykonuj jego rozkazy!"
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    48
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    49
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    50
goals[1] = {
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    51
	["en"] = "Destroy the target to finish this mission!",
4051
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
    52
	["de"] = "Zerstöre das Ziel, um diese Mission abzuschließen!",
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
    53
	["pl"] = "Zniszcz cel by ukończyć misję!"
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    54
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    55
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    56
goals[2] = {
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    57
	["en"] = "Excellent! You've passed the Boot Camp!",
4051
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
    58
	["de"] = "Ausgezeichnet! Du hast das Ausbildungslager bestanden!",
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
    59
	["pl"] = "Doskonale! Wyszedłeś cało z poligonu!"
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    60
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    61
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    62
local failed = {
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    63
	["en"] = "You failed! Follow the instructions and shoot the target only!",
4051
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
    64
	["de"] = "Du hast versagt! Befolge die Anweisungen und schieß nur auf das Ziel!",
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
    65
	["pl"] = "Przegrałeś! Wykonuj instrukcje poprawnie i strzelaj tylko w podane cele!"
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    66
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    67
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    68
local drill = {}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    69
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    70
drill[0] = {
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    71
	["en"] = "Allright, maggot!",
4051
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
    72
	["de"] = "Also gut, du Made!",
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
    73
	["pl"] = "Słuchaj mnie gnido!"
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    74
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    75
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    76
drill[1] = {
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    77
	["en"] = "Show that you aren't that useless.",
4051
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
    78
	["de"] = "Zeig, dass du nicht so nutzlos bist.",
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
    79
	["pl"] = "Udowodnij, że nie jesteś bezwartościowy."
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    80
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    81
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    82
drill[2] = {
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    83
	["en"] = "Use [left] to move to the left!",
4051
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
    84
	["de"] = "Benutze [Links], um nach links zu gehen!",
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
    85
	["pl"] = "Użyj [lewo] by poruszyć się w lewą stronę!"
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    86
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    87
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    88
drill[3] = {
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    89
	["en"] = "Good! Now use [right] to come back!",
4051
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
    90
	["de"] = "Gut! Nun komm mit [Rechts] zurück!",
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
    91
	["pl"] = "Dobzre, Teraz użyj [prawo] by wrócić!"
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    92
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    93
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    94
drill[4] = {
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    95
	["en"] = "Excellent!",
4051
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
    96
	["de"] = "Ausgezeichnet!",
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
    97
	["pl"] = "Wspaniale!"
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    98
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
    99
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   100
drill[5] = {
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   101
	["en"] = "Now jump to the left using [return]!",
4051
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
   102
	["de"] = "Jetzt springe mit [Eingabetaste] nach links!",
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
   103
	["pl"] = "Teraz skocz w lewo używając [Enter]"
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   104
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   105
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   106
drill[6] = {
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   107
	["en"] = "Use [up] and [down] to aim.",
4051
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
   108
	["de"] = "Benutze [Hoch] und [Runter], um zu zielen.",
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
   109
	["en"] = "Użyj klawiszy [góra] i [dół] by celować."
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   110
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   111
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   112
drill[7] = {
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   113
	["en"] = "Hold [space] to power up your shot and then release it to shoot.",
4051
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
   114
	["de"] = "Halte [Leertaste], um deinen Schuss aufzuladen, und lasse dann rechtzeitig los.",
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
   115
	["pl"] = "Przytrzymaj spację by zwiększyć siłę strzału."
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   116
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   117
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   118
drill[8] = {
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   119
	["en"] = "Destroy the target to finish your basic training!",
4051
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
   120
	["de"] = "Zerstöre das Ziel, um deine Grundausbildung abzuschließen!",
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
   121
	["pl"] = "Zniszcz cel by by ukończyć trening podstawowy!"
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   122
}
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   123
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   124
local function loc(text)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   125
	if text == nil then return "**missing**"
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   126
	elseif text[L] == nil then return text["en"]
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   127
	else return text[L]
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   128
	end
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   129
end
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   130
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   131
local player = nil
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   132
local instructor = nil
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   133
local target = nil
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   134
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   135
function onGameStart()
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   136
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   137
end
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   138
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   139
local player_start_x = 2300
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   140
local player_start_y = 1250
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   141
local target_x = 1900
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   142
local target_y = 1250
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   143
local player_health = 100
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   144
local instructor_health = 100
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   145
local teamcolor = 14483456
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   146
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   147
local progress = 0
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   148
local time_start = 0
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   149
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   150
function onGameTick()
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   151
	if progress == -1 and (time_start + 2500) == GameTime then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   152
		EndGame()
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   153
	elseif progress == -1 then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   154
		
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   155
	elseif progress > 0 and ((TurnTimeLeft == 0) or (GetHealth(player) ~= player_health) or (GetHealth(instructor) ~= instructor_health)) then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   156
		progress = -1
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   157
		ShowMission(loc(caption), loc(subcaption), loc(failed), -amBazooka, 0);
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   158
		time_start = GameTime
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   159
		PlaySound(sndNooo)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   160
		TurnTimeLeft = 0
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   161
	elseif GameTime == 0 then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   162
		ShowMission(loc(caption), loc(subcaption), loc(goals[0]), -amBazooka, 0);
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   163
		TurnTimeLeft = 60000
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   164
	elseif GameTime == 2500 then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   165
		FollowGear(instructor)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   166
		HogSay(instructor, loc(drill[0]), SAY_SAY)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   167
	elseif GameTime == 5000 then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   168
		FollowGear(instructor)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   169
		HogSay(instructor, loc(drill[1]), SAY_SAY)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   170
	elseif GameTime == 7500 then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   171
		FollowGear(instructor)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   172
		HogSay(instructor, loc(drill[2]), SAY_SHOUT)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   173
		progress = 1
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   174
		TurnTimeLeft = 10000
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   175
	elseif progress == 1 then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   176
		local x, y = GetGearPosition(player);
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   177
		if x < player_start_x - 50 then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   178
			progress = 2
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   179
			FollowGear(instructor)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   180
			HogSay(instructor, loc(drill[3]), SAY_SHOUT)
3762
aef7d95dd159 Campaign:
smaxx
parents: 3761
diff changeset
   181
			TurnTimeLeft = 10000
3761
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   182
		end
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   183
	elseif progress == 2 then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   184
		local x, y = GetGearPosition(player);
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   185
		if x > player_start_x then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   186
			progress = 3
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   187
			FollowGear(instructor)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   188
			HogSay(instructor, loc(drill[4]), SAY_SAY)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   189
			time_start = GameTime
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   190
		end
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   191
	elseif progress == 3 and (time_start + 2500 == GameTime) then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   192
		progress = 4
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   193
		FollowGear(instructor)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   194
		HogSay(instructor, loc(drill[5]), SAY_SHOUT)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   195
		HogTurnLeft(player, true)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   196
		TurnTimeLeft = 10000
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   197
	elseif progress == 4 then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   198
		local x, y = GetGearPosition(player);
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   199
		if y < player_start_y then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   200
			progress = 5
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   201
			FollowGear(instructor)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   202
			HogSay(instructor, "Yeah!", SAY_SAY)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   203
			time_start = GameTime
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   204
			TurnTimeLeft = 30000
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   205
		end
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   206
	elseif progress == 5 and (time_start + 2500 == GameTime) then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   207
		FollowGear(instructor)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   208
		HogSay(instructor, loc(drill[6]), SAY_SAY)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   209
	elseif progress == 5 and (time_start + 5000 == GameTime) then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   210
		FollowGear(instructor)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   211
		HogSay(instructor, loc(drill[7]), SAY_SAY)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   212
	elseif progress == 5 and (time_start + 7500 == GameTime) then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   213
		FollowGear(instructor)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   214
		HogSay(instructor, loc(drill[8]), SAY_SHOUT)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   215
		ShowMission(loc(caption), loc(subcaption), loc(goals[1]), 1, 0);
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   216
		target = AddGear(target_x, target_y, gtTarget, 0, 0, 0, 0)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   217
		TurnTimeLeft = 60000
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   218
	elseif progress == 5 and (time_start + 10000 == GameTime) then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   219
		FollowGear(target)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   220
	elseif progress == 6 then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   221
		progress = 7
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   222
		ShowMission(loc(caption), loc(subcaption), loc(goals[2]), 0, 0);
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   223
		PlaySound(sndVictory);
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   224
		time_start = GameTime
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   225
	elseif progress == 7 and (time_start + 2500 == GameTime) then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   226
		EndGame()
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   227
	end
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   228
end
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   229
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   230
function onGameInit()
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   231
	Seed = 0
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   232
	GameFlags = gfMultiWeapon + gfOneClanMode
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   233
	TurnTime = 25000
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   234
	CaseFreq = 0
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   235
	LandAdds = 0
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   236
	Explosives = 0
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   237
	Delay = 2500
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   238
	Map = "Mushrooms"
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   239
	Theme = "Nature"
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   240
	
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   241
	AddTeam(loc(teamnames[0]), teamcolor, "Simple", "Island", "Default")
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   242
	player = AddHog(loc(hognames[0]), 0, player_health, "NoHat")
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   243
	SetGearPosition(player, player_start_x, player_start_y);
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   244
	
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   245
	AddTeam(loc(teamnames[1]), teamcolor + 1, "Simple", "Island", "Default")
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   246
	instructor = AddHog(loc(hognames[1]), 0, instructor_health, "NoHat")
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   247
	SetGearPosition(instructor, player_start_x + 100, player_start_y)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   248
	HogTurnLeft(instructor, true)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   249
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   250
	FollowGear(player);
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   251
end
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   252
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   253
function onAmmoStoreInit()
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   254
	SetAmmo(amBazooka, 9, 0, 0, 0)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   255
end
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   256
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   257
function onGearDelete(gear)
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   258
	if GetGearType(gear) == gtTarget then
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   259
		progress = 6
f96b99f944e6 Engine:
smaxx
parents:
diff changeset
   260
	end
4051
295cea095302 polish language patch
szczur
parents: 3762
diff changeset
   261
end