share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice01.lua
branchspacecampaign
changeset 9402 8e9d062f9a48
parent 9400 b0c1b1972947
child 9404 4ae9b399fa73
equal deleted inserted replaced
9400:b0c1b1972947 9402:8e9d062f9a48
   221 		AddAmmo(hero.gear, amIceGun, 8)
   221 		AddAmmo(hero.gear, amIceGun, 8)
   222 		AnimCaption(hero.gear, loc("Go to Thanta and get the device part!"), 5000)
   222 		AnimCaption(hero.gear, loc("Go to Thanta and get the device part!"), 5000)
   223 	elseif checkPointReached == 3 then
   223 	elseif checkPointReached == 3 then
   224 		AddAmmo(hero.gear, amIceGun, 6)
   224 		AddAmmo(hero.gear, amIceGun, 6)
   225 		AnimCaption(hero.gear, loc("Go to Thanta and get the device part!"), 5000)
   225 		AnimCaption(hero.gear, loc("Go to Thanta and get the device part!"), 5000)
   226 	end	
   226 	end
       
   227 	
       
   228 	SendHealthStatsOff()
   227 end
   229 end
   228 
   230 
   229 function onNewTurn()		
   231 function onNewTurn()		
   230 	-- round has to start if hero goes near the column
   232 	-- round has to start if hero goes near the column
   231 	if not heroVisitedAntiFlyArea and CurrentHedgehog ~= hero.gear then
   233 	if not heroVisitedAntiFlyArea and CurrentHedgehog ~= hero.gear then
   410 	AddAmmo(hero.gear, amJetpack, 99)
   412 	AddAmmo(hero.gear, amJetpack, 99)
   411 end
   413 end
   412 
   414 
   413 function heroDeath(gear)
   415 function heroDeath(gear)
   414 	SendStat('siGameResult', loc("Hog Solo lost, try again!")) --1
   416 	SendStat('siGameResult', loc("Hog Solo lost, try again!")) --1
   415 	-- more custom stats
   417 	SendStat('siCustomAchievement', loc("To win the game you have to go next to Thanta")) --11
       
   418 	SendStat('siCustomAchievement', loc("Most of the time you'll be able to use only the icegun")) --11
       
   419 	SendStat('siCustomAchievement', loc("Use the bazooka and the flying saucer to get the icegun")) --11
       
   420 	SendStat('siPlayerKills','1',teamB.name)
       
   421 	SendStat('siPlayerKills','0',teamC.name)
   416 	EndGame()
   422 	EndGame()
   417 end
   423 end
   418 
   424 
   419 function heroFinalStep(gear)
   425 function heroFinalStep(gear)
   420 	heroAtFinalStep = true
   426 	heroAtFinalStep = true
   433 	iceGunTaken=true
   439 	iceGunTaken=true
   434 end
   440 end
   435 
   441 
   436 function thantaDeath(gear)
   442 function thantaDeath(gear)
   437 	SendStat('siGameResult', loc("Hog Solo lost, try again!")) --1
   443 	SendStat('siGameResult', loc("Hog Solo lost, try again!")) --1
   438 	-- more custom stats
   444 	SendStat('siCustomAchievement', loc("Noooo, Thanta has to stay alive!")) --11
       
   445 	SendStat('siCustomAchievement', loc("To win the game you have to go next to Thanta")) --11
       
   446 	SendStat('siCustomAchievement', loc("Most of the time you'll be able to use only the icegun")) --11
       
   447 	SendStat('siCustomAchievement', loc("Use the bazooka and the flying saucer to get the icegun")) --11
       
   448 	SendStat('siPlayerKills','1',teamB.name)
       
   449 	SendStat('siPlayerKills','0',teamC.name)
   439 	EndGame()
   450 	EndGame()
   440 end
   451 end
   441 
   452 
   442 function heroWin(gear)
   453 function heroWin(gear)
   443 	TurnTimeLeft=0
   454 	TurnTimeLeft=0
   480 	table.insert(dialog01, {func = AnimSwitchHog, args = {hero.gear}})
   491 	table.insert(dialog01, {func = AnimSwitchHog, args = {hero.gear}})
   481 	-- DIALOG 02 - Hero got to Thant2
   492 	-- DIALOG 02 - Hero got to Thant2
   482 	AddSkipFunction(dialog02, Skipanim, {dialog01})
   493 	AddSkipFunction(dialog02, Skipanim, {dialog01})
   483 	table.insert(dialog02, {func = AnimWait, args = {hero.gear, 3000}})
   494 	table.insert(dialog02, {func = AnimWait, args = {hero.gear, 3000}})
   484 	table.insert(dialog02, {func = AnimCaption, args = {hero.gear, loc("Congratulations, now you can take Thanta's part..."), 5000}})
   495 	table.insert(dialog02, {func = AnimCaption, args = {hero.gear, loc("Congratulations, now you can take Thanta's part..."), 5000}})
   485 	table.insert(dialog02, {func = AnimSay, args = {bandit1.gear, loc("Oh! Please pare me. You can take all my treasures!"), SAY_SAY, 3000}})
   496 	table.insert(dialog02, {func = AnimSay, args = {bandit1.gear, loc("Oh! Please spare me. You can take all my treasures!"), SAY_SAY, 3000}})
   486 	table.insert(dialog02, {func = AnimWait, args = {hero.gear, 5000}})
   497 	table.insert(dialog02, {func = AnimWait, args = {hero.gear, 5000}})
   487 	table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("I just want the strange device you found!"), SAY_SAY, 3000}})
   498 	table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("I just want the strange device you found!"), SAY_SAY, 3000}})
   488 	table.insert(dialog02, {func = AnimWait, args = {bandit1.gear, 4000}})
   499 	table.insert(dialog02, {func = AnimWait, args = {bandit1.gear, 4000}})
   489 	table.insert(dialog02, {func = AnimSay, args = {bandit1.gear, loc("Here! Take it..."), SAY_SAY, 3000}})
   500 	table.insert(dialog02, {func = AnimSay, args = {bandit1.gear, loc("Here! Take it..."), SAY_SAY, 3000}})
   490 	table.insert(dialog02, {func = actionsOnWin, args = {}})	
   501 	table.insert(dialog02, {func = actionsOnWin, args = {}})	
   491 end
   502 end
   492 
   503 
   493 -------------- Other Functions -------------------
   504 -------------- Other Functions -------------------
   494 
   505 
   495 function actionsOnWin()
   506 function actionsOnWin()
   496 	SendStat('siGameResult', loc("Congratulations, you got the part!"))
   507 	SaveCampaignVar("IcePlanetPartAcquired", "true")	
   497 	SaveCampaignVar("IcePlanetPartAcquired", "true")
   508 	SendStat('siGameResult', loc("Congratulations, you got the part!")) --1
   498 	-- more custom stats
   509 	SendStat('siCustomAchievement', loc("At the end of the game your health was ")..GetHealth(hero.gear)) --11
       
   510 	-- maybe add number of tries for each part?
       
   511 	SendStat('siPlayerKills','1',teamC.name)
       
   512 	SendStat('siPlayerKills','0',teamB.name)
   499 	EndGame()
   513 	EndGame()
   500 end
   514 end