share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua
changeset 11692 68eddcdc9f26
parent 10712 89eaf51d0e9a
child 11976 d5dabb71d6bf
equal deleted inserted replaced
11646:42d7f5dbd8dc 11692:68eddcdc9f26
   410 	AnimSwitchHog(smuggler1.gear)
   410 	AnimSwitchHog(smuggler1.gear)
   411 	TurnTimeLeft = 0
   411 	TurnTimeLeft = 0
   412 end
   412 end
   413 
   413 
   414 function heroFleeFirstBattle(gear)
   414 function heroFleeFirstBattle(gear)
   415 	AnimSay(smuggler1.gear, loc("Run away you coward!"), SAY_SHOUT, 4000)
   415 	AnimSay(smuggler1.gear, loc("Run away, you coward!"), SAY_SHOUT, 4000)
   416 	TurnTimeLeft = 0
   416 	TurnTimeLeft = 0
   417 	heroIsInBattle = false
   417 	heroIsInBattle = false
   418 	ongoingBattle = 0
   418 	ongoingBattle = 0
   419 end
   419 end
   420 
   420 
   437 end
   437 end
   438 
   438 
   439 function heroAtThirdBattle(gear)
   439 function heroAtThirdBattle(gear)
   440 	heroIsInBattle = true
   440 	heroIsInBattle = true
   441 	ongoingBattle = 3
   441 	ongoingBattle = 3
   442 	AnimSay(smuggler3.gear, loc("Who's there?! I'll get you..."), SAY_SHOUT, 5000)
   442 	AnimSay(smuggler3.gear, loc("Who's there?! I'll get you!"), SAY_SHOUT, 5000)
   443 	AnimSwitchHog(smuggler3.gear)
   443 	AnimSwitchHog(smuggler3.gear)
   444 	TurnTimeLeft = 0
   444 	TurnTimeLeft = 0
   445 end
   445 end
   446 
   446 
   447 function crateDestroyed(gear)
   447 function crateDestroyed(gear)
   477 
   477 
   478 function AnimationSetup()
   478 function AnimationSetup()
   479 	-- DIALOG 01 - Start, getting info about the device
   479 	-- DIALOG 01 - Start, getting info about the device
   480 	AddSkipFunction(dialog01, Skipanim, {dialog01})
   480 	AddSkipFunction(dialog01, Skipanim, {dialog01})
   481 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}})
   481 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}})
   482 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("In the Planet of Sand, you have to double check your moves..."), 5000}})
   482 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("On the Planet of Sand, you have to double check your moves ..."), 5000}})
   483 	table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Finally you are here..."), SAY_SAY, 2000}})
   483 	table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Finally you are here!"), SAY_SAY, 2000}})
   484 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 2000}})
   484 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 2000}})
   485 	table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Thank you for meeting me on such a short notice!"), SAY_SAY, 3000}})
   485 	table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Thank you for meeting me on such a short notice!"), SAY_SAY, 3000}})
   486 	table.insert(dialog01, {func = AnimWait, args = {ally.gear, 4000}})
   486 	table.insert(dialog01, {func = AnimWait, args = {ally.gear, 4000}})
   487 	table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("No problem, I would do anything for H!"), SAY_SAY, 4000}})
   487 	table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("No problem, I would do anything for H!"), SAY_SAY, 4000}})
   488 	table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Now listen carefully! Below us there are tunnels that have been created naturally over the years"), SAY_SAY, 4000}})
   488 	table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Now listen carefully! Below us there are tunnels that have been created naturally over the years"), SAY_SAY, 4000}})
   489 	table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("I have heard that the local tribes say that many years ago some PAotH scientists were dumping their waste here"), SAY_SAY, 5000}})
   489 	table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("I have heard that the local tribes say that many years ago some PAotH scientists were dumping their waste here."), SAY_SAY, 5000}})
   490 	table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("H confirmed that there isn't such a PAotH activity logged"), SAY_SAY, 4000}})
   490 	table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("H confirmed that there isn't such a PAotH activity logged."), SAY_SAY, 4000}})
   491 	table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("So, I believe that it's a good place to start"), SAY_SAY, 3000}})
   491 	table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("So, I believe that it's a good place to start."), SAY_SAY, 3000}})
   492 	table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Beware though! Many smugglers come often to explore these tunnels and scavenge whatever valuable items they can find"), SAY_SAY, 5000}})
   492 	table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Beware, though! Many smugglers come often to explore these tunnels and scavenge whatever valuable items they can find."), SAY_SAY, 5000}})
   493 	table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("They won't hesitate to attack you in order to rob you!"), SAY_SAY, 4000}})
   493 	table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("They won't hesitate to attack you in order to rob you!"), SAY_SAY, 4000}})
   494 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 6000}})
   494 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 6000}})
   495 	table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("OK, I'll be extra careful!"), SAY_SAY, 4000}})
   495 	table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Okay, I'll be extra careful!"), SAY_SAY, 4000}})
   496 	table.insert(dialog01, {func = AnimWait, args = {ally.gear, 2000}})
   496 	table.insert(dialog01, {func = AnimWait, args = {ally.gear, 2000}})
   497 	table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("There is the tunnel entrance"), SAY_SAY, 3000}})
   497 	table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("The tunnel entrance is over there."), SAY_SAY, 3000}})
   498 	table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Good luck!"), SAY_SAY, 3000}})
   498 	table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Good luck!"), SAY_SAY, 3000}})
   499 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}})
   499 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}})
   500 	table.insert(dialog01, {func = startMission, args = {hero.gear}})
   500 	table.insert(dialog01, {func = startMission, args = {hero.gear}})
   501 end
   501 end
   502 
   502 
   508 end
   508 end
   509 
   509 
   510 function secondBattle()
   510 function secondBattle()
   511 	-- second battle
   511 	-- second battle
   512 	if heroIsInBattle and ongoingBattle == 1 then
   512 	if heroIsInBattle and ongoingBattle == 1 then
   513 		AnimSay(smuggler1.gear, loc("Get him Spike!"), SAY_SHOUT, 4000)
   513 		AnimSay(smuggler1.gear, loc("Get him, Spike!"), SAY_SHOUT, 4000)
   514 	end
   514 	end
   515 	heroIsInBattle = true
   515 	heroIsInBattle = true
   516 	ongoingBattle = 2
   516 	ongoingBattle = 2
   517 	AnimSay(smuggler2.gear, loc("This is seems like a wealthy hedgehog, nice..."), SAY_THINK, 5000)
   517 	AnimSay(smuggler2.gear, loc("This is seems like a wealthy hedgehog, nice ..."), SAY_THINK, 5000)
   518 	AnimSwitchHog(smuggler2.gear)
   518 	AnimSwitchHog(smuggler2.gear)
   519 	TurnTimeLeft = 0
   519 	TurnTimeLeft = 0
   520 end
   520 end
   521 
   521 
   522 function saveCheckPointLocal(cpoint)
   522 function saveCheckPointLocal(cpoint)
   549 end
   549 end
   550 
   550 
   551 function checkForWin()
   551 function checkForWin()
   552 	if cratesFound ==  0 then
   552 	if cratesFound ==  0 then
   553 		-- have to look more
   553 		-- have to look more
   554 		AnimSay(hero.gear, loc("Haven't found it yet..."), SAY_THINK, 5000)
   554 		AnimSay(hero.gear, loc("Haven't found it yet ..."), SAY_THINK, 5000)
   555 		cratesFound = cratesFound + 1
   555 		cratesFound = cratesFound + 1
   556 	elseif cratesFound == 1 then
   556 	elseif cratesFound == 1 then
   557 		-- end game
   557 		-- end game
   558 		saveCompletedStatus(5)
   558 		saveCompletedStatus(5)
   559 		AnimSay(hero.gear, loc("Hoorah!!!"), SAY_SHOUT, 5000)
   559 		AnimSay(hero.gear, loc("Hooray!"), SAY_SHOUT, 5000)
   560 		SendStat(siGameResult, loc("Congratulations, you won!"))
   560 		SendStat(siGameResult, loc("Congratulations, you won!"))
   561 		SendStat(siCustomAchievement, loc("To win the game you had to collect the 2 crates with no specific order"))
   561 		SendStat(siCustomAchievement, loc("To win the game you had to collect the 2 crates with no specific order."))
   562 		SendStat(siPlayerKills,'1',teamC.name)
   562 		SendStat(siPlayerKills,'1',teamC.name)
   563 		SendStat(siPlayerKills,'0',teamB.name)
   563 		SendStat(siPlayerKills,'0',teamB.name)
   564 		EndGame()
   564 		EndGame()
   565 	end
   565 	end
   566 end
   566 end
   567 
   567 
   568 function lose()
   568 function lose()
   569 	SendStat(siGameResult, loc("Hog Solo lost, try again!"))
   569 	SendStat(siGameResult, loc("Hog Solo lost, try again!"))
   570 	SendStat(siCustomAchievement, loc("To win the game you have to find the right crate"))
   570 	SendStat(siCustomAchievement, loc("To win the game you have to find the right crate."))
   571 	SendStat(siCustomAchievement, loc("You can avoid some battles"))
   571 	SendStat(siCustomAchievement, loc("You can avoid some battles."))
   572 	SendStat(siCustomAchievement, loc("Use your ammo wisely"))
   572 	SendStat(siCustomAchievement, loc("Use your ammo wisely."))
   573 	SendStat(siCustomAchievement, loc("Don't destroy the device crate!"))
   573 	SendStat(siCustomAchievement, loc("Don't destroy the device crate!"))
   574 	SendStat(siPlayerKills,'1',teamB.name)
   574 	SendStat(siPlayerKills,'1',teamB.name)
   575 	SendStat(siPlayerKills,'0',teamC.name)
   575 	SendStat(siPlayerKills,'0',teamC.name)
   576 	EndGame()
   576 	EndGame()
   577 end
   577 end