share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/death01.lua
changeset 11692 68eddcdc9f26
parent 9758 3b8058b251b8
child 12049 030464f34d47
equal deleted inserted replaced
11646:42d7f5dbd8dc 11692:68eddcdc9f26
    42 -- teams
    42 -- teams
    43 local teamA = {}
    43 local teamA = {}
    44 local teamB = {}
    44 local teamB = {}
    45 local teamC = {}
    45 local teamC = {}
    46 -- hedgehogs values
    46 -- hedgehogs values
    47 hero.name = "Hog Solo"
    47 hero.name = loc("Hog Solo")
    48 hero.x = 520
    48 hero.x = 520
    49 hero.y = 845
    49 hero.y = 845
    50 hero.dead = false
    50 hero.dead = false
    51 paoth1.name = "H"
    51 paoth1.name = loc("H")
    52 paoth1.x = 3730
    52 paoth1.x = 3730
    53 paoth1.y = 1480
    53 paoth1.y = 1480
    54 paoth2.name = "Dr.Cornelius"
    54 paoth2.name = loc("Dr. Cornelius")
    55 paoth2.x = 3800
    55 paoth2.x = 3800
    56 paoth2.y = 1480
    56 paoth2.y = 1480
    57 professor.name = "Prof. Hogevil"
    57 professor.name = loc("Prof. Hogevil")
    58 professor.dead = false
    58 professor.dead = false
    59 thug1.x = 1265
    59 thug1.x = 1265
    60 thug1.y = 1400
    60 thug1.y = 1400
    61 thug1.health = 70
    61 thug1.health = 70
    62 thug2.x = 2035
    62 thug2.x = 2035
   121 	professor.bot = AddHog(professor.name, 1, 300, "tophats")
   121 	professor.bot = AddHog(professor.name, 1, 300, "tophats")
   122 	AnimSetGearPosition(professor.bot, paoth1.x - 100, paoth1.y)
   122 	AnimSetGearPosition(professor.bot, paoth1.x - 100, paoth1.y)
   123 	HogTurnLeft(professor.bot, true)
   123 	HogTurnLeft(professor.bot, true)
   124 	professor.gear = professor.bot
   124 	professor.gear = professor.bot
   125 	for i=1,table.getn(thugs) do
   125 	for i=1,table.getn(thugs) do
   126 		thugs[i].gear = AddHog(loc("thug").." #"..i, 1, thugs[i].health, "war_desertgrenadier1")
   126 		thugs[i].gear = AddHog(string.format(loc("Thug #%d"), i), 1, thugs[i].health, "war_desertgrenadier1")
   127 		AnimSetGearPosition(thugs[i].gear, thugs[i].x, thugs[i].y)
   127 		AnimSetGearPosition(thugs[i].gear, thugs[i].x, thugs[i].y)
   128 		HogTurnLeft(thugs[i].gear, not thugs[i].turnLeft)
   128 		HogTurnLeft(thugs[i].gear, not thugs[i].turnLeft)
   129 	end
   129 	end
   130 
   130 
   131 	initCheckpoint("death01")
   131 	initCheckpoint("death01")
   263 
   263 
   264 -------------- ACTIONS ------------------
   264 -------------- ACTIONS ------------------
   265 
   265 
   266 function heroDeath(gear)
   266 function heroDeath(gear)
   267 	SendStat(siGameResult, loc("Hog Solo lost, try again!"))
   267 	SendStat(siGameResult, loc("Hog Solo lost, try again!"))
   268 	SendStat(siCustomAchievement, loc("To win the game you have to eliminate all your enemies"))
   268 	SendStat(siCustomAchievement, loc("To win the game you have to eliminate all your enemies."))
   269 	SendStat(siPlayerKills,'1',teamC.name)
   269 	SendStat(siPlayerKills,'1',teamC.name)
   270 	SendStat(siPlayerKills,'0',teamA.name)
   270 	SendStat(siPlayerKills,'0',teamA.name)
   271 	EndGame()
   271 	EndGame()
   272 end
   272 end
   273 
   273 
   274 function enemiesDeath(gear)
   274 function enemiesDeath(gear)
   275 	saveCompletedStatus(6)
   275 	saveCompletedStatus(6)
   276 	SendStat(siGameResult, loc("Congratulations, you won!"))
   276 	SendStat(siGameResult, loc("Congratulations, you won!"))
   277 	SendStat(siCustomAchievement, loc("You have successfully eliminated Professor Hogevil"))
   277 	SendStat(siCustomAchievement, loc("You have successfully eliminated Professor Hogevil."))
   278 	SendStat(siCustomAchievement, loc("You have rescued H and Dr.Cornelius"))
   278 	SendStat(siCustomAchievement, loc("You have rescued H and Dr. Cornelius."))
   279 	SendStat(siCustomAchievement, loc("You have acquired the last device part"))
   279 	SendStat(siCustomAchievement, loc("You have acquired the last device part."))
   280 	SendStat(siCustomAchievement, loc("Now go and play the menu mission to complete the campaign"))
   280 	SendStat(siCustomAchievement, loc("Now go and play the menu mission to complete the campaign."))
   281 	SendStat(siPlayerKills,'1',teamA.name)
   281 	SendStat(siPlayerKills,'1',teamA.name)
   282 	SendStat(siPlayerKills,'0',teamC.name)
   282 	SendStat(siPlayerKills,'0',teamC.name)
   283 	EndGame()
   283 	EndGame()
   284 end
   284 end
   285 
   285 
   294 
   294 
   295 function AnimationSetup()
   295 function AnimationSetup()
   296 	-- DIALOG01, GAME START, INTRODUCTION
   296 	-- DIALOG01, GAME START, INTRODUCTION
   297 	AddSkipFunction(dialog01, Skipanim, {dialog01})
   297 	AddSkipFunction(dialog01, Skipanim, {dialog01})
   298 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}})
   298 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}})
   299 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere in the uninhabitable Death Planet..."), 5000}})
   299 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere on the uninhabitable Death Planet ..."), 5000}})
   300 	table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("Welcome Hog Solo, surprised to see me?"), SAY_SAY, 4000}})
   300 	table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("Welcome Hog Solo, surprised to see me?"), SAY_SAY, 4000}})
   301 	table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("As you can see I have survived our last encounter and I had time to plot my master plan!"), SAY_SAY, 4000}})
   301 	table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("As you can see I have survived our last encounter and I had time to plot my master plan!"), SAY_SAY, 4000}})
   302 	table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("I've thought that the best way to get the device is to let you collect most of the parts for me!"), SAY_SAY, 4000}})
   302 	table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("I've thought that the best way to get the device is to let you collect most of the parts for me!"), SAY_SAY, 4000}})
   303 	table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("So, now I got the last part and I have your friends captured..."), SAY_SAY, 4000}})
   303 	table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("So, now I got the last part and I have your friends captured."), SAY_SAY, 4000}})
   304 	table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("Will you give me the other parts?"), SAY_SAY, 4000}})
   304 	table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("Will you give me the other parts?"), SAY_SAY, 4000}})
   305 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}})
   305 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}})
   306 	table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("I will never hand you the parts!"), SAY_SAY, 4000}})
   306 	table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("I will never hand you the parts!"), SAY_SAY, 4000}})
   307 	table.insert(dialog01, {func = AnimWait, args = {professor.human, 3000}})
   307 	table.insert(dialog01, {func = AnimWait, args = {professor.human, 3000}})
   308 	table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("Then prepare for battle!"), SAY_SAY, 4000}})
   308 	table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("Then prepare for battle!"), SAY_SAY, 4000}})