share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon01.lua
author Periklis Ntanasis <pntanasis@gmail.com>
Sat, 06 Jul 2013 06:53:28 +0300
branchspacecampaign
changeset 9314 b7ee054888f8
parent 9312 f6bec1cfbfbd
child 9316 213b4267db81
permissions -rw-r--r--
more progress on the moon main mission
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
9312
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
     1
------------------- ABOUT ----------------------
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
     2
--
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
     3
-- This is the first stop of hero's journey.
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
     4
-- Here he'll get fuels to continue traveling.
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
     5
-- However, the PAoTH allies of the hero have
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
     6
-- been taken hostages by professor Hogevil.
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
     7
-- So hero has to get whatever available equipement
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
     8
-- there is and rescue them.
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
     9
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    10
-- TODO
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    11
-- Fix some glitches when gaining control on animations
9314
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
    12
-- Round time after check point 2
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
    13
-- Enemys take control
9312
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    14
-- Continue with the rest :P
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    15
9310
1469147c110f moon01 stab and finally moon01 map
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9308
diff changeset
    16
HedgewarsScriptLoad("/Scripts/Locale.lua")
1469147c110f moon01 stab and finally moon01 map
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9308
diff changeset
    17
HedgewarsScriptLoad("/Scripts/Animate.lua")
1469147c110f moon01 stab and finally moon01 map
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9308
diff changeset
    18
1469147c110f moon01 stab and finally moon01 map
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9308
diff changeset
    19
----------------- VARIABLES --------------------
9312
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    20
-- globals
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    21
local campaignName = loc("A Space Adventure")
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    22
local missionName = loc("Moon, stop for fuels!")
9314
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
    23
local weaponsAcquired = false
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
    24
local checkPointReached = 1 -- 1 is start of the game
9312
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    25
-- dialogs
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    26
local dialog01 = {}
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    27
local dialog02 = {}
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    28
-- mission objectives
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    29
local goals = {
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    30
	[dialog01] = {missionName, loc("Getting ready"), loc("Go to the upper platform and get the weapons in the crates!"), 1, 4500},
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    31
	[dialog02] = {missionName, loc("Prepare to fight"), loc("Go down and save these PAoTH hogs!"), 1, 5000}
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    32
}
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    33
-- crates
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    34
local weaponsY = 100
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    35
local bazookaX = 70
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    36
local parachuteX = 110
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    37
local grenadeX = 160
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    38
local deserteagleX = 200
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    39
local torchblowX = 3270
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    40
-- hogs
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    41
local hero = {}
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    42
local paoth1 = {}
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    43
local paoth2 = {}
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    44
local paoth3 = {}
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    45
local paoth4 = {}
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    46
local professor = {}
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    47
local minion1 = {}
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    48
local minion2 = {}
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    49
local minion3 = {}
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    50
local minion4 = {}
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    51
-- teams
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    52
local teamA = {}
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    53
local teamB = {}
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    54
local teamC = {}
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    55
local teamD = {}
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    56
-- hedgehogs values
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    57
hero.name = "Hog Solo"
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    58
hero.x = 1380
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    59
hero.y = 1750
9314
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
    60
hero.dead = false
9312
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    61
paoth1.name = "Joe"
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    62
paoth1.x = 1430
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    63
paoth1.y = 1750
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    64
paoth2.name = "Bruce"
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    65
paoth2.x = 3760
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    66
paoth2.y = 1800
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    67
paoth3.name = "Helena"
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    68
paoth3.x = 3800
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    69
paoth3.y = 1800
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    70
paoth4.name = "Boris"
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    71
paoth4.x = 3860
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    72
paoth4.y = 1800
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    73
professor.name = "Pr.Hogevil"
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    74
professor.x = 3710
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    75
professor.y = 1650
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    76
minion1.name = "Minion"
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    77
minion1.x = 2460
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    78
minion1.y = 1450
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    79
minion2.name = "Minion"
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    80
minion2.x = 2450
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    81
minion2.y = 1900
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    82
minion3.name = "Minion"
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    83
minion3.x = 3500
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    84
minion3.y = 1750
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    85
teamA.name = loc("PAoTH")
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    86
teamA.color = tonumber("FF0000",16) -- red
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    87
teamB.name = loc("Minions")
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    88
teamB.color = tonumber("0033FF",16) -- blue
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    89
teamC.name = loc("Professor")
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    90
teamC.color = tonumber("0033FF",16) -- blue
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    91
teamD.name = loc("Hog Solo")
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    92
teamD.color = tonumber("38D61C",16) -- green
9310
1469147c110f moon01 stab and finally moon01 map
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9308
diff changeset
    93
1469147c110f moon01 stab and finally moon01 map
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9308
diff changeset
    94
-------------- LuaAPI EVENT HANDLERS ------------------
1469147c110f moon01 stab and finally moon01 map
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9308
diff changeset
    95
1469147c110f moon01 stab and finally moon01 map
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9308
diff changeset
    96
function onGameInit()
1469147c110f moon01 stab and finally moon01 map
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9308
diff changeset
    97
	Seed = 1
9314
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
    98
	GameFlags = gfSolidLand + gfDisableWind
9312
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
    99
	TurnTime = 45000
9310
1469147c110f moon01 stab and finally moon01 map
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9308
diff changeset
   100
	CaseFreq = 0
1469147c110f moon01 stab and finally moon01 map
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9308
diff changeset
   101
	MinesNum = 0
1469147c110f moon01 stab and finally moon01 map
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9308
diff changeset
   102
	MinesTime = 3000
1469147c110f moon01 stab and finally moon01 map
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9308
diff changeset
   103
	Explosives = 0
9312
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   104
	Delay = 5 
9310
1469147c110f moon01 stab and finally moon01 map
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9308
diff changeset
   105
	Map = "moon01_map"
9312
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   106
	Theme = "Cheese" -- Because ofc moon is made of cheese :)
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   107
	-- Hog Solo
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   108
	AddTeam(teamD.name, teamD.color, "Bone", "Island", "HillBilly", "cm_birdy")
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   109
	hero.gear = AddHog(hero.name, 0, 100, "war_desertgrenadier1")
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   110
	AnimSetGearPosition(hero.gear, hero.x, hero.y)
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   111
	-- PAoTH
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   112
	AddTeam(teamA.name, teamA.color, "Bone", "Island", "HillBilly", "cm_birdy")
9314
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   113
	paoth1.gear = AddHog(paoth1.name, 0, 100, "scif_2001O")
9312
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   114
	AnimSetGearPosition(paoth1.gear, paoth1.x, paoth1.y)
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   115
	HogTurnLeft(paoth1.gear, true)
9314
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   116
	paoth2.gear = AddHog(paoth2.name, 0, 100, "scif_2001Y")
9312
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   117
	AnimSetGearPosition(paoth2.gear, paoth2.x, paoth2.y)
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   118
	HogTurnLeft(paoth2.gear, true)
9314
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   119
	paoth3.gear = AddHog(paoth3.name, 0, 100, "hair_purple")
9312
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   120
	AnimSetGearPosition(paoth3.gear, paoth3.x, paoth3.y)
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   121
	HogTurnLeft(paoth3.gear, true)
9314
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   122
	paoth4.gear = AddHog(paoth4.name, 0, 100, "scif_2001Y")
9312
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   123
	AnimSetGearPosition(paoth4.gear, paoth4.x, paoth4.y)
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   124
	HogTurnLeft(paoth4.gear, true)
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   125
	-- Professor
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   126
	AddTeam(teamC.name, teamC.color, "Bone", "Island", "HillBilly", "cm_birdy")
9314
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   127
	professor.gear = AddHog(professor.name, 0, 100, "tophats")
9312
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   128
	AnimSetGearPosition(professor.gear, professor.x, professor.y)
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   129
	HogTurnLeft(professor.gear, true)
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   130
	-- Minions
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   131
	AddTeam(teamB.name, teamB.color, "Bone", "Island", "HillBilly", "cm_birdy")
9314
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   132
	minion1.gear = AddHog(minion1.name, 1, 100, "Gasmask")
9312
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   133
	AnimSetGearPosition(minion1.gear, minion1.x, minion1.y)
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   134
	HogTurnLeft(minion1.gear, true)
9314
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   135
	minion2.gear = AddHog(minion2.name, 1, 100, "Gasmask")
9312
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   136
	AnimSetGearPosition(minion2.gear, minion2.x, minion2.y)
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   137
	HogTurnLeft(minion2.gear, true)
9314
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   138
	minion3.gear = AddHog(minion3.name, 1, 100, "Gasmask")
9312
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   139
	AnimSetGearPosition(minion3.gear, minion3.x, minion3.y)
9314
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   140
	HogTurnLeft(minion3.gear, true)
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   141
	
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   142
	-- get the check point
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   143
	if tonumber(GetCampaignVar("Moon01CheckPoint")) then
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   144
		checkPointReached = tonumber(GetCampaignVar("Moon01CheckPoint"))
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   145
	end
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   146
	
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   147
	if checkPointReached == 1 then
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   148
		-- Start of the game
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   149
	elseif checkPointReached == 2 then
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   150
		AnimSetGearPosition(hero.gear, parachuteX, weaponsY)
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   151
	end
9312
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   152
	
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   153
	AnimInit()
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   154
	AnimationSetup()	
9310
1469147c110f moon01 stab and finally moon01 map
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9308
diff changeset
   155
end
1469147c110f moon01 stab and finally moon01 map
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9308
diff changeset
   156
1469147c110f moon01 stab and finally moon01 map
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9308
diff changeset
   157
function onGameStart()
9312
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   158
	-- wait for the first turn to start
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   159
	AnimWait(hero.gear, 3000)
9310
1469147c110f moon01 stab and finally moon01 map
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9308
diff changeset
   160
9312
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   161
	FollowGear(hero.gear)
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   162
	
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   163
	ShowMission(campaignName, missionName, loc("Hog Solo has to refuel his saucer.")..
9314
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   164
	"|"..loc("Rescue the imprisoned PAoTH team and get your fuels!"), -amSkip, 0)	
9312
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   165
	
9314
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   166
	-- check for death has to go first
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   167
	AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0)
9312
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   168
9314
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   169
	if checkPointReached == 1 then
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   170
		AddAmmo(hero.gear, amRope, 2)
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   171
		SpawnAmmoCrate(bazookaX, weaponsY, amBazooka)
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   172
		SpawnAmmoCrate(parachuteX, weaponsY, amParachute)
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   173
		SpawnAmmoCrate(grenadeX, weaponsY, amGrenade)
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   174
		SpawnAmmoCrate(deserteagleX, weaponsY, amDEagle)
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   175
		AddEvent(onWeaponsPlatform, {hero.gear}, weaponsPlatform, {hero.gear}, 0)
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   176
		AddAnim(dialog01)
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   177
	elseif checkPointReached == 2 then	
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   178
		AddAmmo(hero.gear, amBazooka, 2)
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   179
		AddAmmo(hero.gear, amParachute, 2)
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   180
		AddAmmo(hero.gear, amGrenade, 2)
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   181
		AddAmmo(hero.gear, amDEagle, 2)
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   182
		SetWind(80)		
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   183
		GameFlags = bor(GameFlags,gfDisableWind)
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   184
		weaponsAcquired = true
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   185
		AddAnim(dialog02)
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   186
	end
9310
1469147c110f moon01 stab and finally moon01 map
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9308
diff changeset
   187
end
9312
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   188
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   189
function onAmmoStoreInit()
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   190
	SetAmmo(amBazooka, 0, 0, 0, 2)
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   191
	SetAmmo(amParachute, 0, 0, 0, 2)
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   192
	SetAmmo(amGrenade, 0, 0, 0, 2)
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   193
	SetAmmo(amDEagle, 0, 0, 0, 2)
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   194
end
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   195
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   196
function onGameTick()
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   197
	AnimUnWait()
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   198
	if ShowAnimation() == false then
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   199
		return
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   200
	end
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   201
	ExecuteAfterAnimations()
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   202
	CheckEvents()
9314
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   203
	if CurrentHedgehog ~= hero.gear then
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   204
		TurnTimeLeft = 0
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   205
	end
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   206
end
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   207
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   208
function onNewTurn()
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   209
	if not weaponsAcquired and CurrentHedgehog ~= hero.gear then
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   210
		TurnTimeLeft = 0
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   211
	elseif not weaponsAcquired and CurrentHedgehog == hero.gear then
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   212
		TurnTimeLeft = -1
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   213
	elseif CurrentHedgehog == paoth1.gear or CurrentHedgehog == paoth1.gear
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   214
		or CurrentHedgehog == paoth3.gear or CurrentHedgehog == paoth4.gear
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   215
		or CurrentHedgehog == professor.gear then
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   216
		TurnTimeLeft = 0
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   217
	end
9312
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   218
end
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   219
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   220
function onPrecise()
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   221
	if GameTime > 3000 then
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   222
		SetAnimSkip(true)   
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   223
	end
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   224
end
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   225
9314
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   226
function onGearDelete(gear)
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   227
	if gear == hero.gear then
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   228
		hero.dead = true
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   229
	end
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   230
end
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   231
9312
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   232
-------------- EVENTS ------------------
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   233
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   234
function onWeaponsPlatform(gear)
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   235
	if GetX(gear) > bazookaX-200 and GetX(gear) < deserteagleX+400  and GetY(gear) < weaponsY+150 and StoppedGear(gear) then
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   236
		return true
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   237
	end
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   238
	return false
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   239
end
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   240
9314
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   241
function onHeroDeath(gear)
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   242
	if hero.dead then
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   243
		return true
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   244
	end
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   245
	return false
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   246
end
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   247
9312
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   248
-------------- OUTCOMES ------------------
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   249
9314
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   250
function weaponsPlatform(gear)	
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   251
	SaveCampaignVar("Moon01CheckPoint", "2")
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   252
	TurnTimeLeft = 0
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   253
	weaponsAqcuired = true
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   254
	SetWind(80)		
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   255
	GameFlags = bor(GameFlags,gfDisableWind)
9312
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   256
	AddAnim(dialog02)
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   257
end
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   258
9314
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   259
function heroDeath(gear)
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   260
	
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   261
	EndGame()
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   262
end
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   263
9312
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   264
-------------- ANIMATIONS ------------------
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   265
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   266
function Skipanim(anim)
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   267
	if goals[anim] ~= nil then
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   268
		ShowMission(unpack(goals[anim]))
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   269
    end
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   270
end
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   271
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   272
function AnimationSetup()
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   273
	-- DIALOG 01 - Start, welcome to moon
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   274
	AddSkipFunction(dialog01, Skipanim, {dialog01})
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   275
	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}})
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   276
	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Near PAoTH base at moon..."),  4000}})
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   277
	table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("Hey Hog Solo! Finaly you have come..."), SAY_SAY, 2000}})
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   278
	table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("It seems that Professor Hogevil learned for your arrival!"), SAY_SAY, 4000}})
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   279
	table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("Now he have captured the rest of the PAoTH team and awaits to capture you!"), SAY_SAY, 5000}})
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   280
	table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("We have to hurry! Are you armed?"), SAY_SAY, 4300}})
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   281
	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}})
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   282
	table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("No, I am afraid I had to travel light"), SAY_SAY, 2500}})
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   283
	table.insert(dialog01, {func = AnimWait, args = {paoth1.gear, 500}})
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   284
	table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("Ok, then you have to go and take some of the waepons we have hidden in case of an emergency!"), SAY_SAY, 7000}})
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   285
	table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("They are up there! Take that rope and hurry!"), SAY_SAY, 7000}})
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   286
	table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Ehm... ok..."), SAY_SAY, 2500}})
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   287
	table.insert(dialog01, {func = AnimSwitchHog, args = {hero.gear}})
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   288
	-- DIALOG 02 - To the weapons platform
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   289
	AddSkipFunction(dialog02, Skipanim, {dialog02})
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   290
	table.insert(dialog02, {func = AnimCaption, args = {hero.gear, loc("Checkpoint reached!"),  4000}})
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   291
	table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("I've made it! YEAAAAAH!"), SAY_SHOUT, 4000}})
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   292
	table.insert(dialog02, {func = AnimSay, args = {paoth1.gear, loc("Nice! Now hurry up and get down! You have to rescue my friends!"), SAY_SHOUT, 7000}})
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   293
	table.insert(dialog02, {func = AnimSwitchHog, args = {hero.gear}})
f6bec1cfbfbd progress on the main moon mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9310
diff changeset
   294
end
9314
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   295
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   296
------------------- custom "animation" functions --------------------------
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   297
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   298
function startCombat()
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   299
	-- use this so guard2 will gain control
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   300
	AnimSwitchHog(minion3.gear)
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   301
	TurnTimeLeft = 0
b7ee054888f8 more progress on the moon main mission
Periklis Ntanasis <pntanasis@gmail.com>
parents: 9312
diff changeset
   302
end