share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit02.lua
changeset 11692 68eddcdc9f26
parent 9831 afa4e3e04cc5
child 11976 d5dabb71d6bf
equal deleted inserted replaced
11646:42d7f5dbd8dc 11692:68eddcdc9f26
   396 ended = false
   396 ended = false
   397 
   397 
   398 function heroDeath(gear)
   398 function heroDeath(gear)
   399 	if not ended then
   399 	if not ended then
   400 		SendStat(siGameResult, loc("Hog Solo lost, try again!"))
   400 		SendStat(siGameResult, loc("Hog Solo lost, try again!"))
   401 		SendStat(siCustomAchievement, loc("To win the game, Hog Solo has to get the bottom crates and come back to the surface"))
   401 		SendStat(siCustomAchievement, loc("To win the game, Hog Solo has to get the bottom crates and come back to the surface."))
   402 		SendStat(siCustomAchievement, loc("You can use the other 2 hogs to assist you"))
   402 		SendStat(siCustomAchievement, loc("You can use the other 2 hogs to assist you."))
   403 		SendStat(siCustomAchievement, loc("Do not destroy the crates"))
   403 		SendStat(siCustomAchievement, loc("Do not destroy the crates!"))
   404 		if tookPartInBattle then
   404 		if tookPartInBattle then
   405 			SendStat(siCustomAchievement, loc("You'll have to eliminate the Strawberry Assassins at the end"))
   405 			SendStat(siCustomAchievement, loc("You'll have to eliminate the Strawberry Assassins at the end."))
   406 		else
   406 		else
   407 			SendStat(siCustomAchievement, loc("You'll have to eliminate Captain Lime at the end"))
   407 			SendStat(siCustomAchievement, loc("You'll have to eliminate Captain Lime at the end."))
   408 		SendStat(siCustomAchievement, loc("Don't eliminate Captain Lime before collecting the last crate!"))
   408 		SendStat(siCustomAchievement, loc("Don't eliminate Captain Lime before collecting the last crate!"))
   409 		end
   409 		end
   410 		SendStat(siPlayerKills,'0',teamA.name)
   410 		SendStat(siPlayerKills,'0',teamA.name)
   411 		EndGame()
   411 		EndGame()
   412 		ended = true
   412 		ended = true
   453 
   453 
   454 function captainLimeDeath(gear)
   454 function captainLimeDeath(gear)
   455 	-- hero win in scenario of escape in 1st part
   455 	-- hero win in scenario of escape in 1st part
   456 	saveCompletedStatus(3)
   456 	saveCompletedStatus(3)
   457 	SendStat(siGameResult, loc("Congratulations, you won!"))
   457 	SendStat(siGameResult, loc("Congratulations, you won!"))
   458 	SendStat(siCustomAchievement, loc("You retrieved the lost part"))
   458 	SendStat(siCustomAchievement, loc("You retrieved the lost part."))
   459 	SendStat(siCustomAchievement, loc("You defended yourself against Captain Lime"))
   459 	SendStat(siCustomAchievement, loc("You defended yourself against Captain Lime."))
   460 	SendStat(siPlayerKills,'1',teamA.name)
   460 	SendStat(siPlayerKills,'1',teamA.name)
   461 	SendStat(siPlayerKills,'0',teamB.name)
   461 	SendStat(siPlayerKills,'0',teamB.name)
   462 	EndGame()
   462 	EndGame()
   463 end
   463 end
   464 
   464 
   465 function redTeamDeath(gear)
   465 function redTeamDeath(gear)
   466 	-- hero win in battle scenario
   466 	-- hero win in battle scenario
   467 	saveCompletedStatus(3)
   467 	saveCompletedStatus(3)
   468 	SendStat(siGameResult, loc("Congratulations, you won!"))
   468 	SendStat(siGameResult, loc("Congratulations, you won!"))
   469 	SendStat(siCustomAchievement, loc("You retrieved the lost part"))
   469 	SendStat(siCustomAchievement, loc("You retrieved the lost part."))
   470 	SendStat(siCustomAchievement, loc("You defended yourself against Strawberry Assassins"))
   470 	SendStat(siCustomAchievement, loc("You defended yourself against the Strawberry Assassins."))
   471 	SendStat(siPlayerKills,'1',teamA.name)
   471 	SendStat(siPlayerKills,'1',teamA.name)
   472 	SendStat(siPlayerKills,'0',teamC.name)
   472 	SendStat(siPlayerKills,'0',teamC.name)
   473 	EndGame()
   473 	EndGame()
   474 end
   474 end
   475 
   475 
   500 
   500 
   501 function AnimationSetup()
   501 function AnimationSetup()
   502 	-- DIALOG 01 - Start, Captain Lime helps Hog Solo because he took part in the battle
   502 	-- DIALOG 01 - Start, Captain Lime helps Hog Solo because he took part in the battle
   503 	AddSkipFunction(dialog01, Skipanim, {dialog01})
   503 	AddSkipFunction(dialog01, Skipanim, {dialog01})
   504 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}})
   504 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}})
   505 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere else on the planet of fruits Captain Lime helps Hog Solo..."), 5000}})
   505 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere else on the planet of fruits, Captain Lime helps Hog Solo"), 5000}})
   506 	table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("You fought bravely and you helped us win this battle!"), SAY_SAY, 5000}})
   506 	table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("You fought bravely and you helped us win this battle!"), SAY_SAY, 5000}})
   507 	table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("So, as promised I have brought you where I think that the device you are looking for is hidden."), SAY_SAY, 7000}})
   507 	table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("So, as promised I have brought you where I think that the device you are looking for is hidden."), SAY_SAY, 7000}})
   508 	table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("I know that your resources are low due to the battle but I'll send two of my best hogs to assist you."), SAY_SAY, 7000}})
   508 	table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("I know that your resources are low due to the battle but I'll send two of my best hogs to assist you."), SAY_SAY, 7000}})
   509 	table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("Good luck!"), SAY_SAY, 2000}})
   509 	table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("Good luck!"), SAY_SAY, 2000}})
   510 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}})
   510 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}})
   511 	table.insert(dialog01, {func = AnimSwitchHog, args = {hero.gear}})
   511 	table.insert(dialog01, {func = AnimSwitchHog, args = {hero.gear}})
   512 	-- DIALOG02 - Start, Hog Solo escaped from the previous battle
   512 	-- DIALOG02 - Start, Hog Solo escaped from the previous battle
   513 	AddSkipFunction(dialog02, Skipanim, {dialog02})
   513 	AddSkipFunction(dialog02, Skipanim, {dialog02})
   514 	table.insert(dialog02, {func = AnimWait, args = {hero.gear, 3000}})
   514 	table.insert(dialog02, {func = AnimWait, args = {hero.gear, 3000}})
   515 	table.insert(dialog02, {func = AnimCaption, args = {hero.gear, loc("Somewhere else on the planet of fruits Hog Solo gets closer to the device..."), 5000}})
   515 	table.insert(dialog02, {func = AnimCaption, args = {hero.gear, loc("Somewhere else on the planet of fruits Hog Solo gets closer to the device"), 5000}})
   516 	table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("You are the one who fled! So, you are alive..."), SAY_SAY, 4000}})
   516 	table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("You are the one who fled! So, you are alive."), SAY_SAY, 4000}})
   517 	table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("I'm still low on hogs. If you are not afraid I could use a set of extra hands"), SAY_SAY, 4000}})
   517 	table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("I'm still low on hogs. If you are not afraid I could use a set of extra hands."), SAY_SAY, 4000}})
   518 	table.insert(dialog02, {func = AnimWait, args = {hero.gear, 8000}})
   518 	table.insert(dialog02, {func = AnimWait, args = {hero.gear, 8000}})
   519 	table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("I am sorry but I was looking for a device that may be hidden somewhere around here"), SAY_SAY, 4500}})
   519 	table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("I am sorry but I was looking for a device that may be hidden somewhere around here."), SAY_SAY, 4500}})
   520 	table.insert(dialog02, {func = AnimWait, args = {green1.gear, 12500}})
   520 	table.insert(dialog02, {func = AnimWait, args = {green1.gear, 12500}})
   521 	table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("Many long forgotten things can be found in the same tunnels that we are about to explore!"), SAY_SAY, 7000}})
   521 	table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("Many long forgotten things can be found in the same tunnels that we are about to explore!"), SAY_SAY, 7000}})
   522 	table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("If you help us you can keep the device if you find it but we'll keep everything else"), SAY_SAY, 7000}})
   522 	table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("If you help us you can keep the device if you find it but we'll keep everything else."), SAY_SAY, 7000}})
   523 	table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("What do you say? Are you in?"), SAY_SAY, 3000}})
   523 	table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("What do you say? Are you in?"), SAY_SAY, 3000}})
   524 	table.insert(dialog02, {func = AnimWait, args = {hero.gear, 1800}})
   524 	table.insert(dialog02, {func = AnimWait, args = {hero.gear, 1800}})
   525 	table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("Ok then!"), SAY_SAY, 2000}})
   525 	table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("Okay then!"), SAY_SAY, 2000}})
   526 	table.insert(dialog02, {func = AnimSwitchHog, args = {hero.gear}})
   526 	table.insert(dialog02, {func = AnimSwitchHog, args = {hero.gear}})
   527 	-- DIALOG03 - At crates, hero learns that Captain Lime is bad
   527 	-- DIALOG03 - At crates, hero learns that Captain Lime is bad
   528 	AddSkipFunction(dialog03, Skipanim, {dialog03})
   528 	AddSkipFunction(dialog03, Skipanim, {dialog03})
   529 	table.insert(dialog03, {func = AnimWait, args = {hero.gear, 4000}})
   529 	table.insert(dialog03, {func = AnimWait, args = {hero.gear, 4000}})
   530 	table.insert(dialog03, {func = FollowGear, args = {hero.gear}})
   530 	table.insert(dialog03, {func = FollowGear, args = {hero.gear}})
   531 	table.insert(dialog03, {func = AnimSay, args = {hero.gear, loc("Hoorah! I've found it, now I have to get back to Captain Lime!"), SAY_SAY, 4000}})
   531 	table.insert(dialog03, {func = AnimSay, args = {hero.gear, loc("Hooray! I've found it, now I have to get back to Captain Lime!"), SAY_SAY, 4000}})
   532 	table.insert(dialog03, {func = AnimWait, args = {green1.gear, 4000}})
   532 	table.insert(dialog03, {func = AnimWait, args = {green1.gear, 4000}})
   533 	table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("This Hog Solo is so naive! When he returns I'll shoot him and keep that device for myself!"), SAY_THINK, 4000}})
   533 	table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("This Hog Solo is so naive! When he returns I'll shoot him and keep that device for myself!"), SAY_THINK, 4000}})
   534 	table.insert(dialog03, {func = goToThesurface, args = {hero.gear}})
   534 	table.insert(dialog03, {func = goToThesurface, args = {hero.gear}})
   535 	-- DIALOG04 - At crates, hero learns about the Assassins ambush
   535 	-- DIALOG04 - At crates, hero learns about the Assassins ambush
   536 	AddSkipFunction(dialog04, Skipanim, {dialog04})
   536 	AddSkipFunction(dialog04, Skipanim, {dialog04})
   537 	table.insert(dialog04, {func = AnimWait, args = {hero.gear, 4000}})
   537 	table.insert(dialog04, {func = AnimWait, args = {hero.gear, 4000}})
   538 	table.insert(dialog04, {func = FollowGear, args = {hero.gear}})
   538 	table.insert(dialog04, {func = FollowGear, args = {hero.gear}})
   539 	table.insert(dialog04, {func = AnimSay, args = {hero.gear, loc("Hoorah! I've found it, now I have to get back to Captain Lime!"), SAY_SAY, 4000}})
   539 	table.insert(dialog04, {func = AnimSay, args = {hero.gear, loc("Hooray! I've found it, now I have to get back to Captain Lime!"), SAY_SAY, 4000}})
   540 	table.insert(dialog04, {func = AnimWait, args = {redHedgehogs[1].gear, 4000}})
   540 	table.insert(dialog04, {func = AnimWait, args = {redHedgehogs[1].gear, 4000}})
   541 	table.insert(dialog04, {func = AnimSay, args = {redHedgehogs[1].gear, loc("We have spotted the enemy! We'll attack when the enemies start gathering!"), SAY_THINK, 4000}})
   541 	table.insert(dialog04, {func = AnimSay, args = {redHedgehogs[1].gear, loc("We have spotted the enemy! We'll attack when the enemies start gathering!"), SAY_THINK, 4000}})
   542 	table.insert(dialog04, {func = goToThesurface, args = {hero.gear}})
   542 	table.insert(dialog04, {func = goToThesurface, args = {hero.gear}})
   543 end
   543 end
   544 
   544