share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice02.lua
author Periklis Ntanasis <pntanasis@gmail.com>
Sun, 22 Sep 2013 18:34:53 +0300
branchspacecampaign
changeset 9645 da7b4d8c181e
parent 9642 8a691e0f117a
child 9757 9be28be004d4
permissions -rw-r--r--
autoselect weapon in time challenges
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9455
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
     1
------------------- ABOUT ----------------------
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
     2
--
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
     3
-- Hero has to pass as fast as possible inside the
9457
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
     4
-- rings as in the racer mode
9455
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
     5
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
     6
HedgewarsScriptLoad("/Scripts/Locale.lua")
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
     7
HedgewarsScriptLoad("/Scripts/Animate.lua")
9582
bf314b2258b3 less variables used to save the checkpoints - potential breakage xD
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9576
diff changeset
     8
HedgewarsScriptLoad("/Missions/Campaign/A_Space_Adventure/global_functions.lua")
9455
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
     9
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    10
----------------- VARIABLES --------------------
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    11
-- globals
9574
da3d39667881 strings checked, all ok except ice02 that will be probably changed
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9463
diff changeset
    12
local missionName = loc("Hard flying")
9461
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
    13
local challengeStarted = false
9457
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
    14
local currentWaypoint = 1
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
    15
local radius = 75
9463
653af9cec589 stats in case of win
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9461
diff changeset
    16
local totalTime = 15000
653af9cec589 stats in case of win
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9461
diff changeset
    17
local totalSaucers = 3
653af9cec589 stats in case of win
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9461
diff changeset
    18
local gameEnded = false
9576
8d8bad7d78de more chanllenge details in ice02
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9574
diff changeset
    19
local RED = 0xff0000ff
8d8bad7d78de more chanllenge details in ice02
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9574
diff changeset
    20
local GREEN = 0x38d61cff
8d8bad7d78de more chanllenge details in ice02
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9574
diff changeset
    21
local challengeObjectives = loc("To win the game you have to pass into the rings in time")..
8d8bad7d78de more chanllenge details in ice02
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9574
diff changeset
    22
	"|"..loc("You'll get extra time in case you need it when you pass a ring").."|"..
8d8bad7d78de more chanllenge details in ice02
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9574
diff changeset
    23
	loc("Every 2 rings, the ring color will be green and you'll get an extra flying saucer").."|"..
8d8bad7d78de more chanllenge details in ice02
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9574
diff changeset
    24
	loc("Use space button twice to change flying saucer while being on air")
9455
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    25
-- dialogs
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    26
local dialog01 = {}
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    27
-- mission objectives
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    28
local goals = {
9576
8d8bad7d78de more chanllenge details in ice02
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9574
diff changeset
    29
	[dialog01] = {missionName, loc("Getting ready"), challengeObjectives, 1, 4500},
9455
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    30
}
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    31
-- hogs
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    32
local hero = {}
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    33
local ally = {}
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    34
-- teams
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    35
local teamA = {}
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    36
local teamB = {}
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    37
-- hedgehogs values
9574
da3d39667881 strings checked, all ok except ice02 that will be probably changed
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9463
diff changeset
    38
hero.name = loc("Hog Solo")
9457
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
    39
hero.x = 750
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
    40
hero.y = 130
9455
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    41
hero.dead = false
9574
da3d39667881 strings checked, all ok except ice02 that will be probably changed
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9463
diff changeset
    42
ally.name = loc("Paul McHoggy")
9457
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
    43
ally.x = 860
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
    44
ally.y = 130
9455
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    45
teamA.name = loc("Hog Solo")
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    46
teamA.color = tonumber("38D61C",16) -- green
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    47
teamB.name = loc("Allies")
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    48
teamB.color = tonumber("FF0000",16) -- red
9457
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
    49
-- way points
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
    50
local current waypoint = 1
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
    51
local waypoints = { 
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
    52
	[1] = {x=1450, y=140},
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
    53
	[2] = {x=990, y=580},
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
    54
	[3] = {x=1650, y=950},
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
    55
	[4] = {x=620, y=630},
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
    56
	[5] = {x=1470, y=540},
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
    57
	[6] = {x=1960, y=60},
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
    58
	[7] = {x=1600, y=400},
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
    59
	[8] = {x=240, y=940},
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
    60
	[9] = {x=200, y=530},
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
    61
	[10] = {x=1180, y=120},
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
    62
	[11] = {x=1950, y=660},
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
    63
	[12] = {x=1280, y=980},
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
    64
	[13] = {x=590, y=1100},
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
    65
	[14] = {x=20, y=620},
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
    66
	[15] = {x=hero.x, y=hero.y}
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
    67
}
9455
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    68
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    69
-------------- LuaAPI EVENT HANDLERS ------------------
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    70
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    71
function onGameInit()
9461
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
    72
	GameFlags = gfInvulnerable
9455
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    73
	Seed = 1
9457
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
    74
	TurnTime = 15000
9455
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    75
	CaseFreq = 0
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    76
	MinesNum = 0
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    77
	MinesTime = 1
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    78
	Explosives = 0
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    79
	Map = "ice02_map"
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    80
	Theme = "Snow"
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    81
	
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    82
	-- Hog Solo
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    83
	AddTeam(teamA.name, teamA.color, "Bone", "Island", "HillBilly", "cm_birdy")
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    84
	hero.gear = AddHog(hero.name, 0, 100, "war_desertgrenadier1")
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    85
	AnimSetGearPosition(hero.gear, hero.x, hero.y)
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    86
	-- Ally
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    87
	AddTeam(teamB.name, teamB.color, "Bone", "Island", "HillBilly", "cm_birdy")
9629
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9590
diff changeset
    88
	ally.gear = AddHog(ally.name, 0, 100, "war_airwarden02")
9455
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    89
	AnimSetGearPosition(ally.gear, ally.x, ally.y)
9457
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
    90
	HogTurnLeft(ally.gear, true)
9455
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    91
	
9582
bf314b2258b3 less variables used to save the checkpoints - potential breakage xD
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9576
diff changeset
    92
	initCheckpoint("ice02")
bf314b2258b3 less variables used to save the checkpoints - potential breakage xD
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9576
diff changeset
    93
	
9455
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    94
	AnimInit()
9590
347e799f01de fruit side mission map and some logic
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9582
diff changeset
    95
	AnimationSetup()
9455
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    96
end
9461
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
    97
9455
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    98
function onGameStart()
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
    99
	AnimWait(hero.gear, 3000)
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
   100
	FollowGear(hero.gear)
9576
8d8bad7d78de more chanllenge details in ice02
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9574
diff changeset
   101
	ShowMission(missionName, loc("Challenge Objectives"), challengeObjectives, -amSkip, 0)
9455
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
   102
	
9461
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   103
	AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0)
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   104
	
9463
653af9cec589 stats in case of win
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9461
diff changeset
   105
	AddAmmo(hero.gear, amJetpack, 3)
9457
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   106
	
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   107
	-- place a waypoint
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   108
	placeNextWaypoint()
9455
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
   109
	
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
   110
	SendHealthStatsOff()
9461
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   111
	AddAnim(dialog01)
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   112
end
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   113
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   114
function onNewTurn()
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   115
	if not hero.dead and CurrentHedgehog == ally.gear and challengeStarted then
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   116
		heroLost()
9645
da7b4d8c181e autoselect weapon in time challenges
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9642
diff changeset
   117
	elseif not hero.dead and CurrentHedgehog == hero.gear and challengeStarted then
da7b4d8c181e autoselect weapon in time challenges
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9642
diff changeset
   118
		ParseCommand("setweap " .. string.char(amJetpack))
9461
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   119
	end
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   120
end
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   121
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   122
function onGameTick()
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   123
	AnimUnWait()
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   124
	if ShowAnimation() == false then
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   125
		return
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   126
	end
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   127
	ExecuteAfterAnimations()
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   128
	CheckEvents()
9455
4bf3fac0e49d added iceplanet sidequest map and stub lua
Periklis Ntanasis <pntanasis@gmail.com>
parents:
diff changeset
   129
end
9457
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   130
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   131
function onGameTick20()
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   132
	if checkIfHeroInWaypoint() then
9463
653af9cec589 stats in case of win
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9461
diff changeset
   133
		if not gameEnded and not placeNextWaypoint() then
653af9cec589 stats in case of win
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9461
diff changeset
   134
			gameEnded = true
9457
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   135
			-- GAME OVER, WIN!
9463
653af9cec589 stats in case of win
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9461
diff changeset
   136
			totalTime = totalTime - TurnTimeLeft
653af9cec589 stats in case of win
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9461
diff changeset
   137
			totalTime = totalTime / 1000
653af9cec589 stats in case of win
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9461
diff changeset
   138
			local saucersLeft = GetAmmoCount(hero.gear, amJetpack)
653af9cec589 stats in case of win
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9461
diff changeset
   139
			local saucersUsed = totalSaucers - saucersLeft
9642
8a691e0f117a use consts for TStatInfo enum
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9639
diff changeset
   140
			SendStat(siGameResult, loc("Hoo Ray! You are a champion!"))
8a691e0f117a use consts for TStatInfo enum
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9639
diff changeset
   141
			SendStat(siCustomAchievement, loc("You complete the mission in "..totalTime.." seconds"))			
8a691e0f117a use consts for TStatInfo enum
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9639
diff changeset
   142
			SendStat(siCustomAchievement, loc("You have used "..saucersUsed.." flying saucers"))			
8a691e0f117a use consts for TStatInfo enum
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9639
diff changeset
   143
			SendStat(siCustomAchievement, loc("You had "..saucersLeft.." more flying saucers left"))			
8a691e0f117a use consts for TStatInfo enum
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9639
diff changeset
   144
			SendStat(siPlayerKills,'1',teamA.name)
9457
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   145
			EndGame()
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   146
		end
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   147
	end
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   148
end
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   149
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   150
function onGearDelete(gear)
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   151
	if gear == hero.gear then
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   152
		hero.dead = true
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   153
	end
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   154
end
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   155
9461
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   156
function onPrecise()
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   157
	if GameTime > 3000 then
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   158
		SetAnimSkip(true)   
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   159
	end
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   160
end
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   161
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   162
-------------- EVENTS ------------------
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   163
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   164
function onHeroDeath(gear)
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   165
	if hero.dead then
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   166
		return true
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   167
	end
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   168
	return false
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   169
end
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   170
9639
6b2ae2eaf1b2 remove unnecessary comments
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9629
diff changeset
   171
-------------- ACTIONS ------------------
9461
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   172
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   173
function heroDeath(gear)
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   174
	heroLost()
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   175
end
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   176
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   177
-------------- ANIMATIONS ------------------
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   178
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   179
function Skipanim(anim)
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   180
	if goals[anim] ~= nil then
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   181
		ShowMission(unpack(goals[anim]))
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   182
    end
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   183
    startFlying()
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   184
end
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   185
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   186
function AnimationSetup()
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   187
	-- DIALOG 01 - Start, some story telling
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   188
	AddSkipFunction(dialog01, Skipanim, {dialog01})
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   189
	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}})
9576
8d8bad7d78de more chanllenge details in ice02
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9574
diff changeset
   190
	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("In the Ice Planet flying saucer stadium..."), 5000}})
9461
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   191
	table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("This is the olympic stadium of saucer flying..."), SAY_SAY, 4000}})
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   192
	table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("All the saucer pilots dream one day to come here and compete with the best!"), SAY_SAY, 5000}})
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   193
	table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Now you have the chance to try and get the place that you deserve between the best..."), SAY_SAY, 6000}})
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   194
	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Use the saucer and pass from the rings..."), 5000}})
9576
8d8bad7d78de more chanllenge details in ice02
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9574
diff changeset
   195
	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Pause the game by pressing \"P\" for more details"), 5000}})
9461
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   196
	table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("... can you do it?"), SAY_SAY, 2000}})
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   197
	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}})
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   198
	table.insert(dialog01, {func = startFlying, args = {hero.gear}})	
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   199
end
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   200
9457
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   201
------------------ Other Functions -------------------
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   202
9461
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   203
function startFlying()
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   204
	AnimSwitchHog(ally.gear)
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   205
	TurnTimeLeft = 0
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   206
	challengeStarted = true
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   207
end
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   208
9457
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   209
function placeNextWaypoint()
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   210
	if currentWaypoint > 1 then
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   211
		local wp = waypoints[currentWaypoint-1]
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   212
		DeleteVisualGear(wp.gear)
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   213
	end
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   214
	if currentWaypoint < 16 then
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   215
		local wp = waypoints[currentWaypoint]
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   216
		wp.gear = AddVisualGear(1,1,vgtCircle,1,true)
9461
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   217
		-- add bonus time and "fuel"
9457
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   218
		if currentWaypoint % 2 == 0 then
9576
8d8bad7d78de more chanllenge details in ice02
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9574
diff changeset
   219
			PlaySound(sndBump) -- what's the crate sound?
8d8bad7d78de more chanllenge details in ice02
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9574
diff changeset
   220
			SetVisualGearValues(wp.gear, wp.x,wp.y, 20, 200, 0, 0, 100, radius, 3, RED)
9457
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   221
			AddAmmo(hero.gear, amJetpack, GetAmmoCount(hero.gear, amJetpack)+1)
9463
653af9cec589 stats in case of win
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9461
diff changeset
   222
			totalSaucers = totalSaucers + 1
9576
8d8bad7d78de more chanllenge details in ice02
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9574
diff changeset
   223
			local message = loc("Got 1 more saucer")
9463
653af9cec589 stats in case of win
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9461
diff changeset
   224
			if TurnTimeLeft <= 22000 then
9459
8c653c0dd332 making it a little bit more difficult
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9457
diff changeset
   225
				TurnTimeLeft = TurnTimeLeft + 8000
9463
653af9cec589 stats in case of win
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9461
diff changeset
   226
				totalTime = totalTime + 8000
9576
8d8bad7d78de more chanllenge details in ice02
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9574
diff changeset
   227
				message = message..loc(" and 8 more seconds added to the clock")
8d8bad7d78de more chanllenge details in ice02
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9574
diff changeset
   228
			end
8d8bad7d78de more chanllenge details in ice02
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9574
diff changeset
   229
			AnimCaption(hero.gear, message, 4000)
9457
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   230
		else
9576
8d8bad7d78de more chanllenge details in ice02
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9574
diff changeset
   231
			SetVisualGearValues(wp.gear, wp.x,wp.y, 20, 200, 0, 0, 100, radius, 3, GREEN)
9463
653af9cec589 stats in case of win
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9461
diff changeset
   232
			if TurnTimeLeft <= 16000 then
9459
8c653c0dd332 making it a little bit more difficult
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9457
diff changeset
   233
				TurnTimeLeft = TurnTimeLeft + 6000
9463
653af9cec589 stats in case of win
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9461
diff changeset
   234
				totalTime = totalTime + 6000
9576
8d8bad7d78de more chanllenge details in ice02
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9574
diff changeset
   235
				if currentWaypoint ~= 1 then
8d8bad7d78de more chanllenge details in ice02
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9574
diff changeset
   236
					AnimCaption(hero.gear, loc("6 more seconds added to the clock"), 4000)
8d8bad7d78de more chanllenge details in ice02
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9574
diff changeset
   237
				end
9459
8c653c0dd332 making it a little bit more difficult
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9457
diff changeset
   238
			end
9461
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   239
		end	
9457
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   240
		radius = radius - 4
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   241
		currentWaypoint = currentWaypoint + 1
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   242
		return true
9576
8d8bad7d78de more chanllenge details in ice02
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9574
diff changeset
   243
	else
8d8bad7d78de more chanllenge details in ice02
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9574
diff changeset
   244
		AnimCaption(hero.gear, loc("Congratulations, you won!"), 4000)
9457
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   245
	end
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   246
	return false
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   247
end
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   248
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   249
function checkIfHeroInWaypoint()
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   250
	if not hero.dead then
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   251
		local wp = waypoints[currentWaypoint-1]
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   252
		local distance = math.sqrt((GetX(hero.gear)-wp.x)^2 + (GetY(hero.gear)-wp.y)^2)
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   253
		if distance <= radius+4 then
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   254
			SetWind(math.random(-100,100))
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   255
			return true
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   256
		end
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   257
	end
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   258
	return false
934f4d8370f1 finally most of the mission mechanics seems ok
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9455
diff changeset
   259
end
9461
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   260
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   261
function heroLost()
9642
8a691e0f117a use consts for TStatInfo enum
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9639
diff changeset
   262
	SendStat(siGameResult, loc("Oh man! Learn how to fly!"))
8a691e0f117a use consts for TStatInfo enum
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9639
diff changeset
   263
	SendStat(siCustomAchievement, loc("To win the game you have to pass into the rings in time"))
8a691e0f117a use consts for TStatInfo enum
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9639
diff changeset
   264
	SendStat(siCustomAchievement, loc("You'll get extra time in case you need it when you pass a ring"))
8a691e0f117a use consts for TStatInfo enum
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9639
diff changeset
   265
	SendStat(siCustomAchievement, loc("Every 2 rings you'll get extra flying saucers"))
8a691e0f117a use consts for TStatInfo enum
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9639
diff changeset
   266
	SendStat(siCustomAchievement, loc("Use space button twice to change flying saucer while being on air"))
8a691e0f117a use consts for TStatInfo enum
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9639
diff changeset
   267
	SendStat(siPlayerKills,'0',teamA.name)
9461
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   268
	EndGame()
0058a9863724 dialogs and events for hero lose
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9459
diff changeset
   269
end