share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice01.lua
changeset 11692 68eddcdc9f26
parent 9810 54c0fdec4600
child 12049 030464f34d47
equal deleted inserted replaced
11646:42d7f5dbd8dc 11692:68eddcdc9f26
   426 	AddAmmo(hero.gear, amJetpack, 99)
   426 	AddAmmo(hero.gear, amJetpack, 99)
   427 end
   427 end
   428 
   428 
   429 function heroDeath(gear)
   429 function heroDeath(gear)
   430 	SendStat(siGameResult, loc("Hog Solo lost, try again!"))
   430 	SendStat(siGameResult, loc("Hog Solo lost, try again!"))
   431 	SendStat(siCustomAchievement, loc("To win the game you have to go next to Thanta"))
   431 	SendStat(siCustomAchievement, loc("To win the game you have to stand next to Thanta."))
   432 	SendStat(siCustomAchievement, loc("Most of the time you'll be able to use only the icegun"))
   432 	SendStat(siCustomAchievement, loc("Most of the time you'll be able to use the icegun only."))
   433 	SendStat(siCustomAchievement, loc("Use the bazooka and the flying saucer to get the icegun"))
   433 	SendStat(siCustomAchievement, loc("Use the bazooka and the flying saucer to get the icegun."))
   434 	SendStat(siPlayerKills,'1',teamB.name)
   434 	SendStat(siPlayerKills,'1',teamB.name)
   435 	SendStat(siPlayerKills,'0',teamC.name)
   435 	SendStat(siPlayerKills,'0',teamC.name)
   436 	EndGame()
   436 	EndGame()
   437 end
   437 end
   438 
   438 
   452 	iceGunTaken=true
   452 	iceGunTaken=true
   453 end
   453 end
   454 
   454 
   455 function thantaDeath(gear)
   455 function thantaDeath(gear)
   456 	SendStat(siGameResult, loc("Hog Solo lost, try again!"))
   456 	SendStat(siGameResult, loc("Hog Solo lost, try again!"))
   457 	SendStat(siCustomAchievement, loc("Noooo, Thanta has to stay alive!"))
   457 	SendStat(siCustomAchievement, loc("Noo, Thanta has to stay alive!"))
   458 	SendStat(siCustomAchievement, loc("To win the game you have to go next to Thanta"))
   458 	SendStat(siCustomAchievement, loc("To win the game you have to go next to Thanta."))
   459 	SendStat(siCustomAchievement, loc("Most of the time you'll be able to use only the icegun"))
   459 	SendStat(siCustomAchievement, loc("Most of the time you'll be able to use the icegun only."))
   460 	SendStat(siCustomAchievement, loc("Use the bazooka and the flying saucer to get the icegun"))
   460 	SendStat(siCustomAchievement, loc("Use the bazooka and the flying saucer to get the icegun."))
   461 	SendStat(siPlayerKills,'1',teamB.name)
   461 	SendStat(siPlayerKills,'1',teamB.name)
   462 	SendStat(siPlayerKills,'0',teamC.name)
   462 	SendStat(siPlayerKills,'0',teamC.name)
   463 	EndGame()
   463 	EndGame()
   464 end
   464 end
   465 
   465 
   488 
   488 
   489 function AnimationSetup()
   489 function AnimationSetup()
   490 	-- DIALOG 01 - Start, welcome to moon
   490 	-- DIALOG 01 - Start, welcome to moon
   491 	AddSkipFunction(dialog01, Skipanim, {dialog01})
   491 	AddSkipFunction(dialog01, Skipanim, {dialog01})
   492 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}})
   492 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}})
   493 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("On the Ice Planet, where ice rules..."), 5000}})
   493 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("On the Ice Planet, where ice rules ..."), 5000}})
   494 	table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Finally you are here..."), SAY_SAY, 2000}})
   494 	table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Finally you are here!"), SAY_SAY, 2000}})
   495 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 2000}})
   495 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 2000}})
   496 	table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Hi! Nice to meet you"), SAY_SAY, 3000}})
   496 	table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Hi! Nice to meet you."), SAY_SAY, 3000}})
   497 	table.insert(dialog01, {func = AnimWait, args = {ally.gear, 2000}})
   497 	table.insert(dialog01, {func = AnimWait, args = {ally.gear, 2000}})
   498 	table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Listen carefully! The bandit leader, Thanta, has recently found a very strange device"), SAY_SAY, 4000}})
   498 	table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Listen carefully! The bandit leader, Thanta, has recently found a very strange device."), SAY_SAY, 4000}})
   499 	table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("He doesn't know it but this device is a part of the anti-gravity device"), SAY_SAY, 2500}})
   499 	table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("He doesn't know it but this device is a part of the anti-gravity device."), SAY_SAY, 2500}})
   500 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 8000}})
   500 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 8000}})
   501 	table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Nice, then I should get the part as soon as possible!"), SAY_SAY, 4000}})
   501 	table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Nice, then I should get the part as soon as possible!"), SAY_SAY, 4000}})
   502 	table.insert(dialog01, {func = AnimWait, args = {ally.gear, 4000}})
   502 	table.insert(dialog01, {func = AnimWait, args = {ally.gear, 4000}})
   503 	table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Be careful, your gadgets won't work in the bandit area. You should get an ice gun"), SAY_SAY, 7000}})
   503 	table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("Be careful, your gadgets won't work in the bandit area. You should get an ice gun."), SAY_SAY, 7000}})
   504 	table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("There is one below us!"), SAY_SAY, 4000}})
   504 	table.insert(dialog01, {func = AnimSay, args = {ally.gear, loc("There is one below us!"), SAY_SAY, 4000}})
   505 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}})
   505 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}})
   506 	table.insert(dialog01, {func = AnimSwitchHog, args = {hero.gear}})
   506 	table.insert(dialog01, {func = AnimSwitchHog, args = {hero.gear}})
   507 	-- DIALOG 02 - Hero got to Thant2
   507 	-- DIALOG 02 - Hero got to Thant2
   508 	AddSkipFunction(dialog02, Skipanim, {dialog02})
   508 	AddSkipFunction(dialog02, Skipanim, {dialog02})
   509 	table.insert(dialog02, {func = AnimWait, args = {hero.gear, 3000}})
   509 	table.insert(dialog02, {func = AnimWait, args = {hero.gear, 3000}})
   510 	table.insert(dialog02, {func = AnimCaption, args = {hero.gear, loc("Congratulations, now you can take Thanta's device part..."), 5000}})
   510 	table.insert(dialog02, {func = AnimCaption, args = {hero.gear, loc("Congratulations, now you can take Thanta's device part!"), 5000}})
   511 	table.insert(dialog02, {func = AnimSay, args = {bandit1.gear, loc("Oh! Please spare me. You can take all my treasures!"), SAY_SAY, 3000}})
   511 	table.insert(dialog02, {func = AnimSay, args = {bandit1.gear, loc("Oh! Please spare me. You can take all my treasures!"), SAY_SAY, 3000}})
   512 	table.insert(dialog02, {func = AnimWait, args = {hero.gear, 5000}})
   512 	table.insert(dialog02, {func = AnimWait, args = {hero.gear, 5000}})
   513 	table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("I just want the strange device you found!"), SAY_SAY, 3000}})
   513 	table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("I just want the strange device you found!"), SAY_SAY, 3000}})
   514 	table.insert(dialog02, {func = AnimWait, args = {bandit1.gear, 4000}})
   514 	table.insert(dialog02, {func = AnimWait, args = {bandit1.gear, 4000}})
   515 	table.insert(dialog02, {func = AnimSay, args = {bandit1.gear, loc("Here! Take it..."), SAY_SAY, 3000}})
   515 	table.insert(dialog02, {func = AnimSay, args = {bandit1.gear, loc("Here! Take it!"), SAY_SAY, 3000}})
   516 	table.insert(dialog02, {func = actionsOnWin, args = {}})
   516 	table.insert(dialog02, {func = actionsOnWin, args = {}})
   517 end
   517 end
   518 
   518 
   519 -------------- Other Functions -------------------
   519 -------------- Other Functions -------------------
   520 
   520 
   521 function actionsOnWin()
   521 function actionsOnWin()
   522 	saveCompletedStatus(4)
   522 	saveCompletedStatus(4)
   523 	SendStat(siGameResult, loc("Congratulations, you acquired the device part!"))
   523 	SendStat(siGameResult, loc("Congratulations, you acquired the device part!"))
   524 	SendStat(siCustomAchievement, loc("At the end of the game your health was ")..GetHealth(hero.gear))
   524 	SendStat(siCustomAchievement, string.format(loc("At the end of the game your health was %d."), GetHealth(hero.gear)))
   525 	-- maybe add number of tries for each part?
   525 	-- maybe add number of tries for each part?
   526 	SendStat(siPlayerKills,'1',teamC.name)
   526 	SendStat(siPlayerKills,'1',teamC.name)
   527 	SendStat(siPlayerKills,'0',teamB.name)
   527 	SendStat(siPlayerKills,'0',teamB.name)
   528 	EndGame()
   528 	EndGame()
   529 end
   529 end