share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/cosmos.lua
branchspacecampaign
changeset 9636 e1921235fc78
parent 9635 ea454f8a1593
child 9637 b23f9b7d49fa
equal deleted inserted replaced
9635:ea454f8a1593 9636:e1921235fc78
    31 local dialog03 = {}
    31 local dialog03 = {}
    32 local dialog04 = {}
    32 local dialog04 = {}
    33 local dialog05 = {}
    33 local dialog05 = {}
    34 local dialog06 = {}
    34 local dialog06 = {}
    35 local dialog07 = {}
    35 local dialog07 = {}
       
    36 local dialog08 = {}
    36 -- mission objectives
    37 -- mission objectives
    37 local goals = {
    38 local goals = {
    38 	[dialog01] = {missionName, loc("Getting ready"), loc("Go and collect the crate").."|"..loc("Try not to get spotted by the guards!"), 1, 4500},
    39 	[dialog01] = {missionName, loc("Getting ready"), loc("Go and collect the crate").."|"..loc("Try not to get spotted by the guards!"), 1, 4500},
    39 	[dialog02] = {missionName, loc("The adventure begins!"), loc("Use the saucer and fly to the moon").."|"..loc("Travel carefully as your fuels are limited"), 1, 4500},
    40 	[dialog02] = {missionName, loc("The adventure begins!"), loc("Use the saucer and fly to the moon").."|"..loc("Travel carefully as your fuels are limited"), 1, 4500},
    40 	[dialog03] = {missionName, loc("An unexpected event!"), loc("Use the saucer and fly away").."|"..loc("Beware, any damage taken will stay until you complete the moon mission"), 1, 7000},
    41 	[dialog03] = {missionName, loc("An unexpected event!"), loc("Use the saucer and fly away").."|"..loc("Beware, any damage taken will stay until you complete the moon mission"), 1, 7000},
   193 	if GetCampaignVar("Planet") ~= "icePlanet" then
   194 	if GetCampaignVar("Planet") ~= "icePlanet" then
   194 		AddEvent(onIcePlanetLanding, {hero.gear}, icePlanetLanding, {hero.gear}, 0)
   195 		AddEvent(onIcePlanetLanding, {hero.gear}, icePlanetLanding, {hero.gear}, 0)
   195 	end
   196 	end
   196 	if GetCampaignVar("Planet") ~= "deathPlanet" then
   197 	if GetCampaignVar("Planet") ~= "deathPlanet" then
   197 		AddEvent(onDeathPlanetLanding, {hero.gear}, deathPlanetLanding, {hero.gear}, 0)
   198 		AddEvent(onDeathPlanetLanding, {hero.gear}, deathPlanetLanding, {hero.gear}, 0)
       
   199 	end
       
   200 	
       
   201 	if status.death01 and not status.final then
       
   202 		AddAnim(dialog08)
   198 	end
   203 	end
   199 	
   204 	
   200 	SendHealthStatsOff()
   205 	SendHealthStatsOff()
   201 end
   206 end
   202 
   207 
   503 	table.insert(dialog06, {func = sendStatsOnRetry, args = {hero.gear}})
   508 	table.insert(dialog06, {func = sendStatsOnRetry, args = {hero.gear}})
   504 	-- DIALOG 07 - Hero lands on Death Planet but isn't allowed yet to play this map
   509 	-- DIALOG 07 - Hero lands on Death Planet but isn't allowed yet to play this map
   505 	AddSkipFunction(dialog07, Skipanim, {dialog07})
   510 	AddSkipFunction(dialog07, Skipanim, {dialog07})
   506 	table.insert(dialog07, {func = AnimCaption, args = {hero.gear, loc("This planet seems dangerous!"),  5000}})
   511 	table.insert(dialog07, {func = AnimCaption, args = {hero.gear, loc("This planet seems dangerous!"),  5000}})
   507 	table.insert(dialog07, {func = AnimSay, args = {hero.gear, loc("I am not ready for this planet yet. I should visit it when I have found all the other parts"), SAY_THINK, 4000}})
   512 	table.insert(dialog07, {func = AnimSay, args = {hero.gear, loc("I am not ready for this planet yet. I should visit it when I have found all the other parts"), SAY_THINK, 4000}})
       
   513 	-- DIALOG 08 - Hero wins death01
       
   514 	AddSkipFunction(dialog08, Skipanim, {dialog08})
       
   515 	table.insert(dialog08, {func = AnimCaption, args = {hero.gear, loc("Under the meteorite shadow..."),  4000}})
       
   516 	table.insert(dialog08, {func = AnimSay, args = {doctor.gear, loc("You did great Hog Solo! However we aren't out of danger yet!"), SAY_SHOUT, 4500}})
       
   517 	table.insert(dialog08, {func = AnimSay, args = {doctor.gear, loc("The meteorite has come too close and the anti-gravity device isn't powerful enough to get it out of order"), SAY_SHOUT, 5000}})
       
   518 	table.insert(dialog08, {func = AnimSay, args = {doctor.gear, loc("We need it to get split into at least two parts"), SAY_SHOUT, 3000}})
       
   519 	table.insert(dialog08, {func = AnimSay, args = {doctor.gear, loc("PAotH has sent explosives but unfortunately the trigger mechanism seems to be faulty!"), SAY_SHOUT, 5000}})
       
   520 	table.insert(dialog08, {func = AnimSay, args = {doctor.gear, loc("We need you to go there and detonate them yourself! Good luck!"), SAY_SHOUT, 500}})
       
   521 	table.insert(dialog08, {func = AnimWait, args = {doctor.gear, 3000}})
       
   522 	table.insert(dialog08, {func = AnimSwitchHog, args = {hero.gear}})
   508 end
   523 end
   509 
   524 
   510 ------------------- custom "animation" functions --------------------------
   525 ------------------- custom "animation" functions --------------------------
   511 
   526 
   512 function startCombat()
   527 function startCombat()