share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit01.lua
changeset 11692 68eddcdc9f26
parent 9831 afa4e3e04cc5
child 12049 030464f34d47
equal deleted inserted replaced
11646:42d7f5dbd8dc 11692:68eddcdc9f26
    30 local dialog01 = {}
    30 local dialog01 = {}
    31 local dialog02 = {}
    31 local dialog02 = {}
    32 local dialog03 = {}
    32 local dialog03 = {}
    33 -- mission objectives
    33 -- mission objectives
    34 local goals = {
    34 local goals = {
    35 	[dialog01] = {missionName, loc("Ready for Battle?"), loc("Walk left if you want to join Captain Lime or right if you want to decline his offer"), 1, 4000},
    35 	[dialog01] = {missionName, loc("Ready for Battle?"), loc("Walk left if you want to join Captain Lime or right if you want to decline his offer."), 1, 4000},
    36 	[dialog02] = {missionName, loc("Battle Starts Now!"), loc("You have chosen to fight! Lead the Green Bananas to battle and eliminate all the enemies"), 1, 4000},
    36 	[dialog02] = {missionName, loc("Battle Starts Now!"), loc("You have chosen to fight! Lead the Green Bananas to battle and eliminate all the enemies!"), 1, 4000},
    37 	[dialog03] = {missionName, loc("Time to run!"), loc("You have chosen to flee... Unfortunately the only place where you can launch your saucer is the left-most place on the map"), 1, 4000},
    37 	[dialog03] = {missionName, loc("Time to run!"), loc("You have chosen to flee ... Unfortunately, the only place where you can launch your saucer is the left-most place on the map."), 1, 4000},
    38 }
    38 }
    39 -- crates
    39 -- crates
    40 local crateWMX = 2170
    40 local crateWMX = 2170
    41 local crateWMY = 1950
    41 local crateWMY = 1950
    42 local health1X = 2680
    42 local health1X = 2680
   385 
   385 
   386 function AnimationSetup()
   386 function AnimationSetup()
   387 	-- DIALOG 01 - Start, Captain Lime talks explains to Hog Solo
   387 	-- DIALOG 01 - Start, Captain Lime talks explains to Hog Solo
   388 	AddSkipFunction(dialog01, Skipanim, {dialog01})
   388 	AddSkipFunction(dialog01, Skipanim, {dialog01})
   389 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}})
   389 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}})
   390 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere on the Planet of Fruits a terrible war is about to begin..."), 5000}})
   390 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere on the Planet of Fruits a terrible war is about to begin ..."), 5000}})
   391 	table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("I was told that as the leader of the king's guard, no one knows this world better than you!"), SAY_SAY, 5000}})
   391 	table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("I was told that as the leader of the king's guard, no one knows this world better than you!"), SAY_SAY, 5000}})
   392 	table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("So, I kindly ask for your help"), SAY_SAY, 3000}})
   392 	table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("So, I kindly ask for your help."), SAY_SAY, 3000}})
   393 	table.insert(dialog01, {func = AnimWait, args = {green1.gear, 2000}})
   393 	table.insert(dialog01, {func = AnimWait, args = {green1.gear, 2000}})
   394 	table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("You couldn't have come to a worse time Hog Solo!"), SAY_SAY, 3000}})
   394 	table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("You couldn't have come to a worse time, Hog Solo!"), SAY_SAY, 3000}})
   395 	table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("The clan of the Red Strawberry wants to take over the dominion and overthrone king Pineapple."), SAY_SAY, 5000}})
   395 	table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("The clan of the Red Strawberry wants to take over the dominion and overthrow King Pineapple."), SAY_SAY, 5000}})
   396 	table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("Under normal circumstances we could easily defeat them but we have kindly sent most of our men to the kingdom of Sand to help to the annual dusting of the king's palace."), SAY_SAY, 8000}})
   396 	table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("Under normal circumstances we could easily defeat them but we have kindly sent most of our men to the Kingdom of Sand to help with the annual dusting of the king's palace."), SAY_SAY, 8000}})
   397 	table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("However the army of Yellow Watermelons is about to attack any moment now."), SAY_SAY, 4000}})
   397 	table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("However, the army of Yellow Watermelons is about to attack any moment now."), SAY_SAY, 4000}})
   398 	table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("I would gladly help you if we won this battle but under these circumstances I'll only help you if you fight for our side."), SAY_SAY, 6000}})
   398 	table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("I would gladly help you if we won this battle but under these circumstances I'll only help you if you fight for our side."), SAY_SAY, 6000}})
   399 	table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("What do you say? Will you fight for us?"), SAY_SAY, 3000}})
   399 	table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("What do you say? Will you fight for us?"), SAY_SAY, 3000}})
   400 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}})
   400 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}})
   401 	table.insert(dialog01, {func = ShowMission, args = {missionName, loc("Ready for Battle?"), loc("Walk left if you want to join Captain Lime or right if you want to decline his offer"), 1, 7000}})
   401 	table.insert(dialog01, {func = ShowMission, args = {missionName, loc("Ready for Battle?"), loc("Walk left if you want to join Captain Lime or right if you want to decline his offer."), 1, 7000}})
   402 	table.insert(dialog01, {func = AnimSwitchHog, args = {hero.gear}})
   402 	table.insert(dialog01, {func = AnimSwitchHog, args = {hero.gear}})
   403 	-- DIALOG 02 - Hero selects to fight
   403 	-- DIALOG 02 - Hero selects to fight
   404 	AddSkipFunction(dialog02, Skipanim, {dialog02})
   404 	AddSkipFunction(dialog02, Skipanim, {dialog02})
   405 	table.insert(dialog02, {func = AnimWait, args = {green1.gear, 3000}})
   405 	table.insert(dialog02, {func = AnimWait, args = {green1.gear, 3000}})
   406 	table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("You choose well Hog Solo!"), SAY_SAY, 3000}})
   406 	table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("You choose well, Hog Solo!"), SAY_SAY, 3000}})
   407 	table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("I have only 3 hogs available and they are all cadets"), SAY_SAY, 4000}})
   407 	table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("I have only 3 hogs available and they are all cadets."), SAY_SAY, 4000}})
   408 	table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("As you are more experienced, I want you to lead them to the battle"), SAY_SAY, 4000}})
   408 	table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("As you are more experienced, I want you to lead them to battle."), SAY_SAY, 4000}})
   409 	table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("I of course will observe the battle and intervene if necessary"), SAY_SAY, 5000}})
   409 	table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("Of course, I will observe the battle and intervene if necessary."), SAY_SAY, 5000}})
   410 	table.insert(dialog02, {func = AnimWait, args = {hero.gear, 4500}})
   410 	table.insert(dialog02, {func = AnimWait, args = {hero.gear, 4500}})
   411 	table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("No problem Captain!"), SAY_SAY, 2000}})
   411 	table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("No problem, Captain!"), SAY_SAY, 2000}})
   412 	table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("The enemies aren't many anyway, it is going to be easy!"), SAY_SAY, 1}})
   412 	table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("The enemies aren't many anyway, it is going to be easy!"), SAY_SAY, 1}})
   413 	table.insert(dialog02, {func = AnimWait, args = {green1.gear, 9000}})
   413 	table.insert(dialog02, {func = AnimWait, args = {green1.gear, 9000}})
   414 	table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("Don't be foolish son, there will be more"), SAY_SAY, 2000}})
   414 	table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("Don't be foolish, son, there will be more."), SAY_SAY, 2000}})
   415 	table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("Try to be smart and eliminate them quickly. This way you might scare off the rest!"), SAY_SAY, 5000}})
   415 	table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("Try to be smart and eliminate them quickly. This way you might scare off the rest!"), SAY_SAY, 5000}})
   416 	table.insert(dialog02, {func = AnimWait, args = {hero.gear, 5000}})
   416 	table.insert(dialog02, {func = AnimWait, args = {hero.gear, 5000}})
   417 	table.insert(dialog02, {func = startBattle, args = {hero.gear}})
   417 	table.insert(dialog02, {func = startBattle, args = {hero.gear}})
   418 	-- DIALOG 03 - Hero selects to flee
   418 	-- DIALOG 03 - Hero selects to flee
   419 	AddSkipFunction(dialog03, Skipanim, {dialog03})
   419 	AddSkipFunction(dialog03, Skipanim, {dialog03})
   420 	table.insert(dialog03, {func = AnimWait, args = {green1.gear, 3000}})
   420 	table.insert(dialog03, {func = AnimWait, args = {green1.gear, 3000}})
   421 	table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Too bad... Then you should really leave!"), SAY_SAY, 3000}})
   421 	table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Too bad! Then you should really leave!"), SAY_SAY, 3000}})
   422 	table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Things are going to get messy around here"), SAY_SAY, 3000}})
   422 	table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Things are going to get messy around here."), SAY_SAY, 3000}})
   423 	table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Also, you should know that the only place where you can fly is the left-most part of this area"), SAY_SAY, 5000}})
   423 	table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Also, you should know that the only place where you can fly is the left-most part of this area."), SAY_SAY, 5000}})
   424 	table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("All the other places are protected by our flight-inhibiting weapons"), SAY_SAY, 4000}})
   424 	table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("All the other places are protected by our flight-inhibiting weapons."), SAY_SAY, 4000}})
   425 	table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Now go and don't waste more of my time you coward..."), SAY_SAY, 4000}})
   425 	table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Now go and don't waste more of my time, you coward!"), SAY_SAY, 4000}})
   426 	table.insert(dialog03, {func = AnimWait, args = {hero.gear, 5000}})
   426 	table.insert(dialog03, {func = AnimWait, args = {hero.gear, 5000}})
   427 	table.insert(dialog03, {func = startBattle, args = {hero.gear}})
   427 	table.insert(dialog03, {func = startBattle, args = {hero.gear}})
   428 end
   428 end
   429 
   429 
   430 ------------- OTHER FUNCTIONS ---------------
   430 ------------- OTHER FUNCTIONS ---------------
   445 end
   445 end
   446 
   446 
   447 function gameLost()
   447 function gameLost()
   448 	if chooseToBattle then
   448 	if chooseToBattle then
   449 		SendStat(siGameResult, loc("The Green Bananas lost, try again!"))
   449 		SendStat(siGameResult, loc("The Green Bananas lost, try again!"))
   450 		SendStat(siCustomAchievement, loc("You have to eliminate all the visible enemies"))
   450 		SendStat(siCustomAchievement, loc("You have to eliminate all the visible enemies."))
   451 		SendStat(siCustomAchievement, loc("5 additional enemies will be spawned during the game"))
   451 		SendStat(siCustomAchievement, loc("5 additional enemies will be spawned during the game."))
   452 		SendStat(siCustomAchievement, loc("You are in control of all the active ally units"))
   452 		SendStat(siCustomAchievement, loc("You are in control of all the active ally units."))
   453 		SendStat(siCustomAchievement, loc("The ally units share their ammo"))
   453 		SendStat(siCustomAchievement, loc("The ally units share their ammo."))
   454 		SendStat(siCustomAchievement, loc("Try to keep as many allies alive as possible"))
   454 		SendStat(siCustomAchievement, loc("Try to keep as many allies alive as possible."))
   455 	else
   455 	else
   456 		SendStat(siGameResult, loc("Hog Solo couldn't escape, try again!"))
   456 		SendStat(siGameResult, loc("Hog Solo couldn't escape, try again!"))
   457 		SendStat(siCustomAchievement, loc("You have to get to the left-most land and remove any enemy hog from there"))
   457 		SendStat(siCustomAchievement, loc("You have to get to the left-most land and remove any enemy hog from there."))
   458 		SendStat(siCustomAchievement, loc("You will play every 3 turns"))
   458 		SendStat(siCustomAchievement, loc("You will play every 3 turns."))
   459 		SendStat(siCustomAchievement, loc("Green hogs won't intentionally hurt you"))
   459 		SendStat(siCustomAchievement, loc("Green hogs won't intentionally hurt you."))
   460 	end
   460 	end
   461 	SendStat(siPlayerKills,'1',teamC.name)
   461 	SendStat(siPlayerKills,'1',teamC.name)
   462 	SendStat(siPlayerKills,'0',teamA.name)
   462 	SendStat(siPlayerKills,'0',teamA.name)
   463 	SendStat(siPlayerKills,'0',teamB.name)
   463 	SendStat(siPlayerKills,'0',teamB.name)
   464 	EndGame()
   464 	EndGame()