share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit01.lua
branchspacecampaign
changeset 9574 da3d39667881
parent 9525 8bcfb3a9f92b
child 9578 16139270448f
equal deleted inserted replaced
9572:278cff2a965f 9574:da3d39667881
    22 HedgewarsScriptLoad("/Scripts/Locale.lua")
    22 HedgewarsScriptLoad("/Scripts/Locale.lua")
    23 HedgewarsScriptLoad("/Scripts/Animate.lua")
    23 HedgewarsScriptLoad("/Scripts/Animate.lua")
    24 
    24 
    25 ----------------- VARIABLES --------------------
    25 ----------------- VARIABLES --------------------
    26 -- globals
    26 -- globals
    27 local campaignName = loc("A Space Adventure")
    27 local missionName = loc("Bad timing")
    28 local missionName = loc("Fruit planet, The War!")
       
    29 local chooseToBattle = false
    28 local chooseToBattle = false
    30 local previousHog = 0
    29 local previousHog = 0
    31 -- dialogs
    30 -- dialogs
    32 local dialog01 = {}
    31 local dialog01 = {}
    33 local dialog02 = {}
    32 local dialog02 = {}
    34 local dialog03 = {}
    33 local dialog03 = {}
    35 -- mission objectives
    34 -- mission objectives
    36 local goals = {
    35 local goals = {
    37 	[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 	[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},
    38 	[dialog02] = {missionName, loc("Battle Starts Now!"), loc("You have choose to fight! Lead the Green Bananas to battle and try not to let them be killed"), 1, 4000},
    37 	[dialog02] = {missionName, loc("Battle Starts Now!"), loc("You have choose to fight! Lead the Green Bananas to battle and eliminate all the enemies"), 1, 4000},
    39 	[dialog03] = {missionName, loc("Ready for Battle?"), loc("You have choose to flee... Unfortunately the only place where you can launch your saucer is in the most left side of the map"), 1, 4000},
    38 	[dialog03] = {missionName, loc("Time to run!"), loc("You have choose to flee... Unfortunately the only place where you can launch your saucer is in the most left side of the map"), 1, 4000},
    40 }
    39 }
    41 -- crates
    40 -- crates
    42 local crateWMX = 2170
    41 local crateWMX = 2170
    43 local crateWMY = 1950
    42 local crateWMY = 1950
    44 local health1X = 2680
    43 local health1X = 2680
    55 local teamA = {}
    54 local teamA = {}
    56 local teamB = {}
    55 local teamB = {}
    57 local teamC = {}
    56 local teamC = {}
    58 local teamD = {}
    57 local teamD = {}
    59 -- hedgehogs values
    58 -- hedgehogs values
    60 hero.name = "Hog Solo"
    59 hero.name = loc("Hog Solo")
    61 hero.x = 3350
    60 hero.x = 3350
    62 hero.y = 365
    61 hero.y = 365
    63 hero.dead = false
    62 hero.dead = false
    64 green1.name = "Captain Lime"
    63 green1.name = loc("Captain Lime")
    65 green1.x = 3300
    64 green1.x = 3300
    66 green1.y = 395
    65 green1.y = 395
    67 green1.dead = false
    66 green1.dead = false
    68 green2.name = "Mister Pear"
    67 green2.name = loc("Mister Pear")
    69 green2.x = 3600
    68 green2.x = 3600
    70 green2.y = 1570
    69 green2.y = 1570
    71 green3.name = "Lady Mango"
    70 green3.name = loc("Lady Mango")
    72 green3.x = 2170
    71 green3.x = 2170
    73 green3.y = 980
    72 green3.y = 980
    74 green4.name = "Green Hog Grape"
    73 green4.name = loc("Green Hog Grape")
    75 green4.x = 2900
    74 green4.x = 2900
    76 green4.y = 1650
    75 green4.y = 1650
    77 green5.name = "Mr Mango"
    76 green5.name = loc("Mr Mango")
    78 green5.x = 1350
    77 green5.x = 1350
    79 green5.y = 850
    78 green5.y = 850
    80 yellow1.name = "General Lemon"
    79 yellow1.name = loc("General Lemon")
    81 yellow1.x = 140
    80 yellow1.x = 140
    82 yellow1.y = 1980
    81 yellow1.y = 1980
    83 local yellowArmy = {
    82 local yellowArmy = {
    84 	{name = "Robert Yellow Apple", x = 710, y = 1780, health = 100},
    83 	{name = loc("Robert Yellow Apple"), x = 710, y = 1780, health = 100},
    85 	{name = "Summer Squash", x = 315 , y = 1960, health = 100},
    84 	{name = loc("Summer Squash"), x = 315 , y = 1960, health = 100},
    86 	{name = "Tall Potato", x = 830 , y = 1748, health = 80},
    85 	{name = loc("Tall Potato"), x = 830 , y = 1748, health = 80},
    87 	{name = "Yellow Pepper", x = 2160 , y = 820, health = 60},
    86 	{name = loc("Yellow Pepper"), x = 2160 , y = 820, health = 60},
    88 	{name = "Corn", x = 1320 , y = 740, health = 60},
    87 	{name = loc("Corn"), x = 1320 , y = 740, health = 60},
    89 	{name = "Max Citrus", x = 1900 , y = 1700, health = 40},
    88 	{name = loc("Max Citrus"), x = 1900 , y = 1700, health = 40},
    90 	{name = "Naranja Jed", x = 960 , y = 516, health = 40},
    89 	{name = loc("Naranja Jed"), x = 960 , y = 516, health = 40},
    91 }
    90 }
    92 teamA.name = loc("Hog Solo")
    91 teamA.name = loc("Hog Solo")
    93 teamA.color = tonumber("38D61C",16) -- green  
    92 teamA.color = tonumber("38D61C",16) -- green  
    94 teamB.name = loc("Green Bananas")
    93 teamB.name = loc("Green Bananas")
    95 teamB.color = tonumber("38D61C",16) -- green
    94 teamB.color = tonumber("38D61C",16) -- green
   380 
   379 
   381 function AnimationSetup()
   380 function AnimationSetup()
   382 	-- DIALOG 01 - Start, Captain Lime talks explains to Hog Solo
   381 	-- DIALOG 01 - Start, Captain Lime talks explains to Hog Solo
   383 	AddSkipFunction(dialog01, Skipanim, {dialog01})
   382 	AddSkipFunction(dialog01, Skipanim, {dialog01})
   384 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}})
   383 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}})
   385 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere in the planet of fruits a terrible war is about to begin..."), 5000}})
   384 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere in the Planet of Fruits a terrible war is about to begin..."), 5000}})
   386 	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}})
   385 	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}})
   387 	table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("So, I kindly ask for your help."), SAY_SAY, 3000}})
   386 	table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("So, I kindly ask for your help"), SAY_SAY, 3000}})
   388 	table.insert(dialog01, {func = AnimWait, args = {green1.gear, 2000}})
   387 	table.insert(dialog01, {func = AnimWait, args = {green1.gear, 2000}})
   389 	table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("You couldn't have come to a worse time Hog Solo!"), SAY_SAY, 3000}})
   388 	table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("You couldn't have come to a worse time Hog Solo!"), SAY_SAY, 3000}})
   390 	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}})
   389 	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}})
   391 	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}})
   390 	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}})
   392 	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}})
   391 	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}})
   393 	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}})
   392 	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}})
   394 	table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("What do you say? Will you fight for us?"), SAY_SAY, 3000}})
   393 	table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("What do you say? Will you fight for us?"), SAY_SAY, 3000}})
   395 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}})
   394 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}})
   396 	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}})
   395 	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}})
   411 	-- DIALOG 03 - Hero selects to flee
   410 	-- DIALOG 03 - Hero selects to flee
   412 	AddSkipFunction(dialog03, Skipanim, {dialog03})
   411 	AddSkipFunction(dialog03, Skipanim, {dialog03})
   413 	table.insert(dialog03, {func = AnimWait, args = {green1.gear, 3000}})
   412 	table.insert(dialog03, {func = AnimWait, args = {green1.gear, 3000}})
   414 	table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Too bad... Then you should really leave!"), SAY_SAY, 3000}})
   413 	table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Too bad... Then you should really leave!"), SAY_SAY, 3000}})
   415 	table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Things are going to get messy around here"), SAY_SAY, 3000}})
   414 	table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Things are going to get messy around here"), SAY_SAY, 3000}})
   416 	table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Also, you should know that the only place that you can fly would be the most left one"), SAY_SAY, 5000}})
   415 	table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Also, you should know that the only place that you can fly would be the most left part of the map"), SAY_SAY, 5000}})
   417 	table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("All the other places are protected by our anti flying weapons"), SAY_SAY, 4000}})
   416 	table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("All the other places are protected by our anti flying weapons"), SAY_SAY, 4000}})
   418 	table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Now go and don't waste more of my time you coward..."), SAY_SAY, 4000}})
   417 	table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Now go and don't waste more of my time you coward..."), SAY_SAY, 4000}})
   419 	table.insert(dialog03, {func = startBattle, args = {hero.gear}})
   418 	table.insert(dialog03, {func = startBattle, args = {hero.gear}})
   420 end
   419 end
   421 
   420