share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/death02.lua
changeset 11692 68eddcdc9f26
parent 9831 afa4e3e04cc5
child 11892 0526a26ddd6e
equal deleted inserted replaced
11646:42d7f5dbd8dc 11692:68eddcdc9f26
     8 HedgewarsScriptLoad("/Missions/Campaign/A_Space_Adventure/global_functions.lua")
     8 HedgewarsScriptLoad("/Missions/Campaign/A_Space_Adventure/global_functions.lua")
     9 
     9 
    10 ----------------- VARIABLES --------------------
    10 ----------------- VARIABLES --------------------
    11 -- globals
    11 -- globals
    12 local missionName = loc("Killing the specialists")
    12 local missionName = loc("Killing the specialists")
    13 local challengeObjectives = loc("Use your available weapons in order to eliminate the enemies").."|"..
    13 local challengeObjectives = loc("Use your available weapons in order to eliminate the enemies.").."|"..
    14 	loc("Each time you play this missions enemy hogs will play in a random order").."|"..
    14 	loc("Each time you play this missions enemy hogs will play in a random order.").."|"..
    15 	loc("At the start of the game each enemy hog has only the weapon that he is named after").."|"..
    15 	loc("At the start of the game each enemy hog has only the weapon that he is named after.").."|"..
    16 	loc("A random hedgehog will inherit the weapons of his deceased team-mates").."|"..
    16 	loc("A random hedgehog will inherit the weapons of his deceased team-mates.").."|"..
    17 	loc("If you kill a hedgehog with the respective weapon your health points will be set to 100").."|"..
    17 	loc("If you kill a hedgehog with the respective weapon your health points will be set to 100.").."|"..
    18 	loc("If you injure a hedgehog you'll get 35% of the damage dealt").."|"..
    18 	loc("If you injure a hedgehog you'll get 35% of the damage dealt.").."|"..
    19 	loc("Every time you kill an enemy hog your ammo will get reset").."|"..
    19 	loc("Every time you kill an enemy hog your ammo will get reset.").."|"..
    20 	loc("Rope won't get reset")
    20 	loc("The rope won't get reset.")
    21 -- dialogs
    21 -- dialogs
    22 local dialog01 = {}
    22 local dialog01 = {}
    23 -- mission objectives
    23 -- mission objectives
    24 local goals = {
    24 local goals = {
    25 	[dialog01] = {missionName, loc("Challenge Objectives"), challengeObjectives, 1, 4500},
    25 	[dialog01] = {missionName, loc("Challenge objectives"), challengeObjectives, 1, 4500},
    26 }
    26 }
    27 -- hogs
    27 -- hogs
    28 local hero = {
    28 local hero = {
    29 	name = loc("Hog Solo"),
    29 	name = loc("Hog Solo"),
    30 	x = 850,
    30 	x = 850,
    46 local teamA = {
    46 local teamA = {
    47 	name = loc("Hog Solo"),
    47 	name = loc("Hog Solo"),
    48 	color = tonumber("38D61C",16) -- green
    48 	color = tonumber("38D61C",16) -- green
    49 }
    49 }
    50 local teamB = {
    50 local teamB = {
    51 	name = loc("5 deadly hogs"),
    51 	name = loc("5 Deadly Hogs"),
    52 	color = tonumber("FF0000",16) -- red
    52 	color = tonumber("FF0000",16) -- red
    53 }
    53 }
    54 
    54 
    55 -------------- LuaAPI EVENT HANDLERS ------------------
    55 -------------- LuaAPI EVENT HANDLERS ------------------
    56 
    56 
   175 
   175 
   176 -------------- ACTIONS ------------------
   176 -------------- ACTIONS ------------------
   177 
   177 
   178 function heroDeath(gear)
   178 function heroDeath(gear)
   179 	SendStat(siGameResult, loc("Hog Solo lost, try again!"))
   179 	SendStat(siGameResult, loc("Hog Solo lost, try again!"))
   180 	SendStat(siCustomAchievement, loc("You have to eliminate all the enemies"))
   180 	SendStat(siCustomAchievement, loc("You have to eliminate all the enemies."))
   181 	SendStat(siCustomAchievement, loc("Read the Challenge Objectives from within the mission for more details"))
   181 	SendStat(siCustomAchievement, loc("Read the challenge objectives from within the mission for more details."))
   182 	SendStat(siPlayerKills,'1',teamB.name)
   182 	SendStat(siPlayerKills,'1',teamB.name)
   183 	SendStat(siPlayerKills,'0',teamA.name)
   183 	SendStat(siPlayerKills,'0',teamA.name)
   184 	EndGame()
   184 	EndGame()
   185 end
   185 end
   186 
   186 
   187 function heroWin(gear)
   187 function heroWin(gear)
   188 	saveBonus(3, 4)
   188 	saveBonus(3, 4)
   189 	SendStat(siGameResult, loc("Congratulations, you won!"))
   189 	SendStat(siGameResult, loc("Congratulations, you won!"))
   190 	SendStat(siCustomAchievement, loc("You complete the mission in "..TotalRounds.." rounds"))
   190 	SendStat(siCustomAchievement, string.format(loc("You completed the mission in %d rounds."), TotalRounds))
   191 	SendStat(siCustomAchievement, loc("The next 4 times you play the \"The last encounter\" mission you'll get 20 more hit points and a Laser Sight"))
   191 	SendStat(siCustomAchievement, loc("The next 4 times you play the \"The last encounter\" mission you'll get 20 more hit points and a laser sight."))
   192 	SendStat(siPlayerKills,'1',teamA.name)
   192 	SendStat(siPlayerKills,'1',teamA.name)
   193 	EndGame()
   193 	EndGame()
   194 end
   194 end
   195 
   195 
   196 -------------- ANIMATIONS ------------------
   196 -------------- ANIMATIONS ------------------
   204 
   204 
   205 function AnimationSetup()
   205 function AnimationSetup()
   206 	-- DIALOG 01 - Start, game instructions
   206 	-- DIALOG 01 - Start, game instructions
   207 	AddSkipFunction(dialog01, Skipanim, {dialog01})
   207 	AddSkipFunction(dialog01, Skipanim, {dialog01})
   208 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}})
   208 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}})
   209 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere in the Planet of Death..."), 3000}})
   209 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere on the Planet of Death ..."), 3000}})
   210 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("...Hog Solo fights for his life"), 3000}})
   210 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("... Hog Solo fights for his life"), 3000}})
   211 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Each time you play this missions enemy hogs will play in a random order"), 5000}})
   211 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Each time you play this missions enemy hogs will play in a random order"), 5000}})
   212 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("At the start of the game each enemy hog has only the weapon that he is named after"), 5000}})
   212 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("At the start of the game each enemy hog has only the weapon that he is named after"), 5000}})
   213 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("A random hedgehog will inherit the weapons of his deceased team-mates"), 5000}})
   213 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("A random hedgehog will inherit the weapons of his deceased team-mates"), 5000}})
   214 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("If you kill a hedgehog with the respective weapon your health points will be set to 100"), 5000}})
   214 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("If you kill a hedgehog with the respective weapon your health points will be set to 100"), 5000}})
   215 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("If you injure a hedgehog you'll get 35% of the damage dealt"), 5000}})
   215 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("If you injure a hedgehog you'll get 35% of the damage dealt"), 5000}})