share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon02.lua
changeset 9757 9be28be004d4
parent 9645 da7b4d8c181e
child 9758 3b8058b251b8
equal deleted inserted replaced
9756:736abcc1915f 9757:9be28be004d4
     8 HedgewarsScriptLoad("/Missions/Campaign/A_Space_Adventure/global_functions.lua")
     8 HedgewarsScriptLoad("/Missions/Campaign/A_Space_Adventure/global_functions.lua")
     9 
     9 
    10 ----------------- VARIABLES --------------------
    10 ----------------- VARIABLES --------------------
    11 -- globals
    11 -- globals
    12 local missionName = loc("Chasing the blue hog")
    12 local missionName = loc("Chasing the blue hog")
    13 local challengeObjectives = loc("Use your available weapons in order to catch the other hog").."|"..
    13 local challengeObjectives = loc("Use the rope in order to catch the blue hedgehog").."|"..
    14 	loc("You have to stand very close to him")
    14 	loc("You have to stand very close to him")
    15 local currentPosition = 1
    15 local currentPosition = 1
    16 local previousTimeLeft = 0
    16 local previousTimeLeft = 0
    17 local startChallenge = false
    17 local startChallenge = falses
    18 -- dialogs
    18 -- dialogs
    19 local dialog01 = {}
    19 local dialog01 = {}
    20 local dialog02 = {}
    20 local dialog02 = {}
    21 -- mission objectives
    21 -- mission objectives
    22 local goals = {
    22 local goals = {
   155 
   155 
   156 function AnimationSetup()
   156 function AnimationSetup()
   157 	-- DIALOG 01 - Start, game instructions
   157 	-- DIALOG 01 - Start, game instructions
   158 	AddSkipFunction(dialog01, Skipanim, {dialog01})
   158 	AddSkipFunction(dialog01, Skipanim, {dialog01})
   159 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3200}})
   159 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3200}})
   160 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("In the other side of the moon..."), 5000}})
   160 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("On the other side of the moon..."), 5000}})
   161 	table.insert(dialog01, {func = AnimSay, args = {runner.gear, loc("So you are interested in Pr. Hogevil"), SAY_SAY, 3000}})
   161 	table.insert(dialog01, {func = AnimSay, args = {runner.gear, loc("So you are interested in Professor Hogevil"), SAY_SAY, 3000}})
   162 	table.insert(dialog01, {func = AnimSay, args = {runner.gear, loc("We'll play a game first"), SAY_SAY, 3000}})
   162 	table.insert(dialog01, {func = AnimSay, args = {runner.gear, loc("We'll play a game first"), SAY_SAY, 3000}})
   163 	table.insert(dialog01, {func = AnimSay, args = {runner.gear, loc("I'll let you know whatever I know about him if you manage to catch me 3 times"), SAY_SAY, 4000}})
   163 	table.insert(dialog01, {func = AnimSay, args = {runner.gear, loc("I'll let you know whatever I know about him if you manage to catch me 3 times"), SAY_SAY, 4000}})
   164 	table.insert(dialog01, {func = AnimSay, args = {runner.gear, loc("Let's go!"), SAY_SAY, 2000}})	
   164 	table.insert(dialog01, {func = AnimSay, args = {runner.gear, loc("Let's go!"), SAY_SAY, 2000}})	
   165 	table.insert(dialog01, {func = moveRunner, args = {}})
   165 	table.insert(dialog01, {func = moveRunner, args = {}})
   166 	-- DIALOG 02 - Hog Solo story    
   166 	-- DIALOG 02 - Hog Solo story    
   167 	AddSkipFunction(dialog02, Skipanim, {dialog02})
   167 	AddSkipFunction(dialog02, Skipanim, {dialog02})
   168 	table.insert(dialog02, {func = AnimWait, args = {hero.gear, 3200}})
   168 	table.insert(dialog02, {func = AnimWait, args = {hero.gear, 3200}})
   169 	table.insert(dialog02, {func = AnimCaption, args = {hero.gear, loc("The truth about Pr. Hogevil"), 5000}})
   169 	table.insert(dialog02, {func = AnimCaption, args = {hero.gear, loc("The truth about Professor Hogevil"), 5000}})
   170 	table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("Amazing! I was never beaten in running before!"), SAY_SAY, 4000}})
   170 	table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("Amazing! I was never beaten in a race before!"), SAY_SAY, 4000}})
   171 	table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("So, let me tell you what I know about Pr. Hogevil..."), SAY_SAY, 4000}})
   171 	table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("So, let me tell you what I know about Professor Hogevil..."), SAY_SAY, 4000}})
   172 	table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("Pr. Hogevil, then known as James Hogus, worked for PAotH back in my time"), SAY_SAY, 4000}})
   172 	table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("Professor Hogevil, then known as James Hogus, worked for PAotH back in my time"), SAY_SAY, 4000}})
   173 	table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("He was the lab assistant of Dr. Goodhogan, the inventor of the anti-gravity device"), SAY_SAY, 5000}})
   173 	table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("He was the lab assistant of Dr. Goodhogan, the inventor of the anti-gravity device"), SAY_SAY, 5000}})
   174 	table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("In one of the last tests during the construction of the device an accident happpened"), SAY_SAY, 5000}})
   174 	table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("During the final testing of the device an accident happened"), SAY_SAY, 5000}})
   175 	table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("In this accident Pr. Hogevil lost all his nails from his head!"), SAY_SAY, 5000}})
   175 	table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("In this accident Professor Hogevil lost all his spines on his head!"), SAY_SAY, 5000}})
   176 	table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("That's why he always wears a hat since then"), SAY_SAY, 4000}})
   176 	table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("That's why he always wears a hat since then"), SAY_SAY, 4000}})
   177 	table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("After that incident he got underground and start working his plan to steal the device"), SAY_SAY, 5000}})
   177 	table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("After that incident he went underground and started working on his plan to steal the device"), SAY_SAY, 5000}})
   178 	table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("He is a very taugh and very determined hedgehog. I would be extremely careful if I were you"), SAY_SAY, 5000}})
   178 	table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("He is a very tough and very determined hedgehog. I would be extremely careful if I were you"), SAY_SAY, 5000}})
   179 	table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("I should go now, goodbye!"), SAY_SAY, 3000}})
   179 	table.insert(dialog02, {func = AnimSay, args = {runner.gear, loc("I should go now, goodbye!"), SAY_SAY, 3000}})
   180 	table.insert(dialog02, {func = win, args = {}})
   180 	table.insert(dialog02, {func = win, args = {}})
   181 end
   181 end
   182 
   182 
   183 ------------- other functions ---------------
   183 ------------- other functions ---------------
   216 	end
   216 	end
   217 end
   217 end
   218 
   218 
   219 function lose()
   219 function lose()
   220 	SendStat(siGameResult, loc("Too slow! Try again..."))
   220 	SendStat(siGameResult, loc("Too slow! Try again..."))
   221 	SendStat(siCustomAchievement, loc("You have to caught the other hog 3 times"))
   221 	SendStat(siCustomAchievement, loc("You have to catch the other hog 3 times"))
   222 	SendStat(siCustomAchievement, loc("The time that you'll have left when you reach the hog will be added to the next turn"))
   222 	SendStat(siCustomAchievement, loc("The time that you have left when you reach the blue hedgehog will be added to the next turn"))
   223 	SendStat(siCustomAchievement, loc("Each turn you'll have only one rope to use"))
   223 	SendStat(siCustomAchievement, loc("Each turn you'll have only one rope to use"))
   224 	SendStat(siCustomAchievement, loc("You'll lose if you die or if your time is up"))
   224 	SendStat(siCustomAchievement, loc("You'll lose if you die or if your time is up"))
   225 	SendStat(siPlayerKills,'0',teamA.name)
   225 	SendStat(siPlayerKills,'0',teamA.name)
   226 	EndGame()
   226 	EndGame()
   227 end
   227 end
   228 
   228 
   229 function win()
   229 function win()
   230 	SendStat(siGameResult, loc("Congratulations, you are the fastest!"))
   230 	SendStat(siGameResult, loc("Congratulations, you are the fastest!"))
   231 	SendStat(siCustomAchievement, loc("You have managed to caught the other hog in time"))
   231 	SendStat(siCustomAchievement, loc("You have managed to catch the blue hedgehog in time"))
   232 	SendStat(siPlayerKills,'1',teamA.name)
   232 	SendStat(siPlayerKills,'1',teamA.name)
   233 	EndGame()
   233 	EndGame()
   234 end
   234 end