share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert03.lua
changeset 11692 68eddcdc9f26
parent 9758 3b8058b251b8
child 11952 63988f36debf
equal deleted inserted replaced
11646:42d7f5dbd8dc 11692:68eddcdc9f26
    16 local currentTarget = 1
    16 local currentTarget = 1
    17 -- dialogs
    17 -- dialogs
    18 local dialog01 = {}
    18 local dialog01 = {}
    19 -- mission objectives
    19 -- mission objectives
    20 local goals = {
    20 local goals = {
    21 	[dialog01] = {missionName, loc("Challenge Objectives"), challengeObjectives, 1, 4500},
    21 	[dialog01] = {missionName, loc("Challenge objectives"), challengeObjectives, 1, 4500},
    22 }
    22 }
    23 -- hogs
    23 -- hogs
    24 local hero = {
    24 local hero = {
    25 	name = loc("Hog Solo"),
    25 	name = loc("Hog Solo"),
    26 	x = 100,
    26 	x = 100,
    79 end
    79 end
    80 
    80 
    81 function onGameStart()
    81 function onGameStart()
    82 	AnimWait(hero.gear, 3000)
    82 	AnimWait(hero.gear, 3000)
    83 	FollowGear(hero.gear)
    83 	FollowGear(hero.gear)
    84 	ShowMission(missionName, loc("Challenge Objectives"), challengeObjectives, -amSkip, 0)
    84 	ShowMission(missionName, loc("Challenge objectives"), challengeObjectives, -amSkip, 0)
    85 
    85 
    86 	AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0)
    86 	AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0)
    87 	AddEvent(onLose, {hero.gear}, lose, {hero.gear}, 0)
    87 	AddEvent(onLose, {hero.gear}, lose, {hero.gear}, 0)
    88 
    88 
    89 	-- original crates and targets
    89 	-- original crates and targets
   157 
   157 
   158 function AnimationSetup()
   158 function AnimationSetup()
   159 	-- DIALOG 01 - Start, game instructions
   159 	-- DIALOG 01 - Start, game instructions
   160 	AddSkipFunction(dialog01, Skipanim, {dialog01})
   160 	AddSkipFunction(dialog01, Skipanim, {dialog01})
   161 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}})
   161 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}})
   162 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("On the Desert Planet, Hog Solo found some time to play with his RC plane..."), 3000}})
   162 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("On the Desert Planet, Hog Solo found some time to play with his RC plane"), 3000}})
   163 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Each time you destroy all the targets on your current level you'll get teleported to the next level"), 5000}})
   163 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Each time you destroy all the targets on your current level you'll get teleported to the next level"), 5000}})
   164 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("You'll have only one RC plane at the start of the mission"), 5000}})
   164 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("You'll have only one RC plane at the start of the mission"), 5000}})
   165 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("During the game you can get new RC planes by collecting the weapon crates"), 5000}})
   165 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("During the game you can get new RC planes by collecting the weapon crates"), 5000}})
   166 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}})
   166 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}})
   167 end
   167 end
   207 end
   207 end
   208 
   208 
   209 function win()
   209 function win()
   210 	saveBonus(1, 1)
   210 	saveBonus(1, 1)
   211 	SendStat(siGameResult, loc("Congratulations, you are the best!"))
   211 	SendStat(siGameResult, loc("Congratulations, you are the best!"))
   212 	SendStat(siCustomAchievement, loc("You have destroyed all the targets"))
   212 	SendStat(siCustomAchievement, loc("You have destroyed all the targets."))
   213 	SendStat(siCustomAchievement, loc("You are indeed the best PAotH pilot"))
   213 	SendStat(siCustomAchievement, loc("You are indeed the best PAotH pilot."))
   214 	SendStat(siCustomAchievement, loc("Next time you play \"Searching in the dust\" you'll have an RC plane available"))
   214 	SendStat(siCustomAchievement, loc("Next time you play \"Searching in the dust\" you'll have an RC plane available."))
   215 	SendStat(siPlayerKills,'1',teamA.name)
   215 	SendStat(siPlayerKills,'1',teamA.name)
   216 	EndGame()
   216 	EndGame()
   217 end
   217 end
   218 
   218 
   219 function gameOver()
   219 function gameOver()
   220 	SendStat(siGameResult, loc("Hog Solo lost, try again!"))
   220 	SendStat(siGameResult, loc("Hog Solo lost, try again!"))
   221 	SendStat(siCustomAchievement, loc("You have to destroy all the targets"))
   221 	SendStat(siCustomAchievement, loc("You have to destroy all the targets."))
   222 	SendStat(siCustomAchievement, loc("You will fail if you run out of ammo and there are still targets available"))
   222 	SendStat(siCustomAchievement, loc("You will fail if you run out of ammo and there are still targets available."))
   223 	SendStat(siCustomAchievement, loc("Read the Challenge Objectives from within the mission for more details"))
   223 	SendStat(siCustomAchievement, loc("Read the challenge objectives from within the mission for more details."))
   224 	SendStat(siPlayerKills,'0',teamA.name)
   224 	SendStat(siPlayerKills,'0',teamA.name)
   225 	EndGame()
   225 	EndGame()
   226 end
   226 end