share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit02.lua
branchspacecampaign
changeset 9574 da3d39667881
parent 9554 054eede3b718
child 9578 16139270448f
equal deleted inserted replaced
9572:278cff2a965f 9574:da3d39667881
     6 HedgewarsScriptLoad("/Scripts/Locale.lua")
     6 HedgewarsScriptLoad("/Scripts/Locale.lua")
     7 HedgewarsScriptLoad("/Scripts/Animate.lua")
     7 HedgewarsScriptLoad("/Scripts/Animate.lua")
     8 
     8 
     9 ----------------- VARIABLES --------------------
     9 ----------------- VARIABLES --------------------
    10 -- globals
    10 -- globals
    11 local campaignName = loc("A Space Adventure")
    11 local missionName = loc("Getting to the device")
    12 local missionName = loc("Fruit planet, Searching the Device!")
       
    13 local inBattle = false
    12 local inBattle = false
    14 local tookPartInBattle = false
    13 local tookPartInBattle = false
    15 local previousHog = -1
    14 local previousHog = -1
    16 local checkPointReached = 1 -- 1 is normal spawn
    15 local checkPointReached = 1 -- 1 is normal spawn
    17 -- dialogs
    16 -- dialogs
    19 local dialog02 = {}
    18 local dialog02 = {}
    20 local dialog03 = {}
    19 local dialog03 = {}
    21 local dialog04 = {}
    20 local dialog04 = {}
    22 -- mission objectives
    21 -- mission objectives
    23 local goals = {
    22 local goals = {
    24 	[dialog01] = {missionName, loc("Getting the Device"), loc("With the help of the other hogs search for the device").."|"..loc("Hog Solo has to reach the last crates"), 1, 4000},
    23 	[dialog01] = {missionName, loc("Exploring the tunnel"), loc("With the help of the other hogs search for the device").."|"..loc("Hog Solo has to reach the last crates"), 1, 4000},
    25 	[dialog02] = {missionName, loc("Getting the Device"), loc("Explore the tunnel with the other hogs and search for the device").."|"..loc("Hog Solo has to reach the last crates"), 1, 4000},
    24 	[dialog02] = {missionName, loc("Exploring the tunnel"), loc("Explore the tunnel with the other hogs and search for the device").."|"..loc("Hog Solo has to reach the last crates"), 1, 4000},
    26 	[dialog03] = {missionName, loc("Return to the Surface"), loc("Go to the surface!").."|"..loc("Attack Captain Lime before he attacks back"), 1, 4000},
    25 	[dialog03] = {missionName, loc("Return to the Surface"), loc("Go to the surface!").."|"..loc("Attack Captain Lime before he attacks back"), 1, 4000},
    27 	[dialog04] = {missionName, loc("Return to the Surface"), loc("Go to the surface!").."|"..loc("Attack the assasins before they attack back"), 1, 4000},
    26 	[dialog04] = {missionName, loc("Return to the Surface"), loc("Go to the surface!").."|"..loc("Attack the assasins before they attack back"), 1, 4000},
    28 }
    27 }
    29 -- crates
    28 -- crates
    30 local eagleCrate = {name = amDEagle, x = 1680, y = 1650}
    29 local eagleCrate = {name = amDEagle, x = 1680, y = 1650}
    39 -- teams
    38 -- teams
    40 local teamA = {}
    39 local teamA = {}
    41 local teamB = {}
    40 local teamB = {}
    42 local teamC = {}
    41 local teamC = {}
    43 -- hedgehogs values
    42 -- hedgehogs values
    44 hero.name = "Hog Solo"
    43 hero.name = loc("Hog Solo")
    45 hero.x = 1200
    44 hero.x = 1200
    46 hero.y = 820
    45 hero.y = 820
    47 hero.dead = false
    46 hero.dead = false
    48 green1.name = "Captain Lime"
    47 green1.name = loc("Captain Lime")
    49 green1.x = 1050
    48 green1.x = 1050
    50 green1.y = 820
    49 green1.y = 820
    51 green1.dead = false
    50 green1.dead = false
    52 green2.name = "Mister Pear"
    51 green2.name = loc("Mister Pear")
    53 green2.x = 1350
    52 green2.x = 1350
    54 green2.y = 820
    53 green2.y = 820
    55 green3.name = "Lady Mango"
    54 green3.name = loc("Lady Mango")
    56 green3.x = 1450
    55 green3.x = 1450
    57 green3.y = 820
    56 green3.y = 820
    58 local redHedgehogs = {
    57 local redHedgehogs = {
    59 	{ name = "Poisonous Apple" },
    58 	{ name = loc("Poisonous Apple") },
    60 	{ name = "Dark Strawberry" },
    59 	{ name = loc("Dark Strawberry") },
    61 	{ name = "Watermelon Heart" },
    60 	{ name = loc("Watermelon Heart") },
    62 	{ name = "Deadly Grape" }
    61 	{ name = loc("Deadly Grape") }
    63 }
    62 }
    64 teamA.name = loc("Hog Solo and GB")
    63 teamA.name = loc("Hog Solo and GB")
    65 teamA.color = tonumber("38D61C",16) -- green
    64 teamA.color = tonumber("38D61C",16) -- green
    66 teamB.name = loc("Captain Lime")
    65 teamB.name = loc("Captain Lime")
    67 teamB.color = tonumber("38D61D",16) -- greenish
    66 teamB.color = tonumber("38D61D",16) -- greenish
   468 	-- DIALOG 01 - Start, Captain Lime helps Hog Solo because he took part in the battle
   467 	-- DIALOG 01 - Start, Captain Lime helps Hog Solo because he took part in the battle
   469 	AddSkipFunction(dialog01, Skipanim, {dialog01})
   468 	AddSkipFunction(dialog01, Skipanim, {dialog01})
   470 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}})
   469 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}})
   471 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere else in the planet of fruits Captain Lime helps Hog Solo..."), 5000}})
   470 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere else in the planet of fruits Captain Lime helps Hog Solo..."), 5000}})
   472 	table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("You fought bravely and you helped us win this battle!"), SAY_SAY, 5000}})
   471 	table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("You fought bravely and you helped us win this battle!"), SAY_SAY, 5000}})
   473 	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 is hidden."), SAY_SAY, 7000}})
   472 	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}})
   474 	table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("I know that your resources are low due to the battle but I'll send with you two of my best hogs to assist you."), SAY_SAY, 7000}})
   473 	table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("I know that your resources are low due to the battle but I'll send with you two of my best hogs to assist you."), SAY_SAY, 7000}})
   475 	table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("Good luck!"), SAY_SAY, 2000}})
   474 	table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("Good luck!"), SAY_SAY, 2000}})
   476 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}})
   475 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}})
   477 	table.insert(dialog01, {func = AnimSwitchHog, args = {hero.gear}})
   476 	table.insert(dialog01, {func = AnimSwitchHog, args = {hero.gear}})
   478 	-- DIALOG02 - Start, Hog Solo escaped from the previous battle
   477 	-- DIALOG02 - Start, Hog Solo escaped from the previous battle
   482 	table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("You are the one who fled! So, you are alive..."), SAY_SAY, 4000}})
   481 	table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("You are the one who fled! So, you are alive..."), SAY_SAY, 4000}})
   483 	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}})
   482 	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}})
   484 	table.insert(dialog02, {func = AnimWait, args = {hero.gear, 8000}})
   483 	table.insert(dialog02, {func = AnimWait, args = {hero.gear, 8000}})
   485 	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}})
   484 	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}})
   486 	table.insert(dialog02, {func = AnimWait, args = {green1.gear, 12500}})
   485 	table.insert(dialog02, {func = AnimWait, args = {green1.gear, 12500}})
   487 	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 search!"), SAY_SAY, 7000}})
   486 	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}})
   488 	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}})
   487 	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}})
   489 	table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("What do you say? Are you in?"), SAY_SAY, 3000}})
   488 	table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("What do you say? Are you in?"), SAY_SAY, 3000}})
   490 	table.insert(dialog02, {func = AnimWait, args = {hero.gear, 1800}})
   489 	table.insert(dialog02, {func = AnimWait, args = {hero.gear, 1800}})
   491 	table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("Ok then!"), SAY_SAY, 2000}})
   490 	table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("Ok then!"), SAY_SAY, 2000}})
   492 	table.insert(dialog02, {func = AnimSwitchHog, args = {hero.gear}})
   491 	table.insert(dialog02, {func = AnimSwitchHog, args = {hero.gear}})