share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon01.lua
changeset 11692 68eddcdc9f26
parent 10290 42efccba0711
child 11975 c52d35c859e8
equal deleted inserted replaced
11646:42d7f5dbd8dc 11692:68eddcdc9f26
   328 	end
   328 	end
   329 end
   329 end
   330 
   330 
   331 function heroDeath(gear)
   331 function heroDeath(gear)
   332 	SendStat(siGameResult, loc("Hog Solo lost, try again!"))
   332 	SendStat(siGameResult, loc("Hog Solo lost, try again!"))
   333 	SendStat(siCustomAchievement, loc("You have to get the weapons and rescue the PAotH researchers"))
   333 	SendStat(siCustomAchievement, loc("You have to get the weapons and rescue the PAotH researchers."))
   334 	SendStat(siPlayerKills,'1',teamC.name)
   334 	SendStat(siPlayerKills,'1',teamC.name)
   335 	SendStat(siPlayerKills,'0',teamD.name)
   335 	SendStat(siPlayerKills,'0',teamD.name)
   336 	EndGame()
   336 	EndGame()
   337 end
   337 end
   338 
   338 
   346 	end
   346 	end
   347 end
   347 end
   348 
   348 
   349 function professorHit(gear)
   349 function professorHit(gear)
   350 	if currentHedgehog ~= hero.gear then
   350 	if currentHedgehog ~= hero.gear then
   351 		AnimSay(professor.gear,loc("Don't hit me you fools!"), SAY_SHOUT, 2000)
   351 		AnimSay(professor.gear,loc("Don't hit me, you fools!"), SAY_SHOUT, 2000)
   352 	end
   352 	end
   353 end
   353 end
   354 
   354 
   355 function professorDeath(gear)
   355 function professorDeath(gear)
   356 	if GetHealth(minion1.gear) then
   356 	if GetHealth(minion1.gear) then
   364 	AnimCaption(hero.gear, loc("Congrats! You made them run away!"), 6000)
   364 	AnimCaption(hero.gear, loc("Congrats! You made them run away!"), 6000)
   365 	AnimWait(hero.gear,5000)
   365 	AnimWait(hero.gear,5000)
   366 
   366 
   367 	saveCompletedStatus(1)
   367 	saveCompletedStatus(1)
   368 	SendStat(siGameResult, loc("Hog Solo wins, congratulations!"))
   368 	SendStat(siGameResult, loc("Hog Solo wins, congratulations!"))
   369 	SendStat(siCustomAchievement, loc("Eliminated the Professor Hogevil"))
   369 	SendStat(siCustomAchievement, loc("You have eliminated Professor Hogevil."))
   370 	SendStat(siCustomAchievement, loc("Drove the minions away"))
   370 	SendStat(siCustomAchievement, loc("You drove the minions away."))
   371 	SendStat(siPlayerKills,'1',teamD.name)
   371 	SendStat(siPlayerKills,'1',teamD.name)
   372 	SendStat(siPlayerKills,'0',teamC.name)
   372 	SendStat(siPlayerKills,'0',teamC.name)
   373 	SaveCampaignVar("CosmosCheckPoint", "5") -- hero got fuels
   373 	SaveCampaignVar("CosmosCheckPoint", "5") -- hero got fuels
   374 	EndGame()
   374 	EndGame()
   375 end
   375 end
   381 	AnimCaption(hero.gear, loc("Congrats! You won!"), 6000)
   381 	AnimCaption(hero.gear, loc("Congrats! You won!"), 6000)
   382 	AnimWait(hero.gear,5000)
   382 	AnimWait(hero.gear,5000)
   383 
   383 
   384 	saveCompletedStatus(1)
   384 	saveCompletedStatus(1)
   385 	SendStat(siGameResult, loc("Congratulations, you won!"))
   385 	SendStat(siGameResult, loc("Congratulations, you won!"))
   386 	SendStat(siCustomAchievement, loc("Eliminated the evil minions"))
   386 	SendStat(siCustomAchievement, loc("You have eliminated the evil minions."))
   387 	SendStat(siCustomAchievement, loc("Drove the Professor away"))
   387 	SendStat(siCustomAchievement, loc("You drove Professor Hogevil away."))
   388 	SendStat(siPlayerKills,'1',teamD.name)
   388 	SendStat(siPlayerKills,'1',teamD.name)
   389 	SendStat(siPlayerKills,'0',teamC.name)
   389 	SendStat(siPlayerKills,'0',teamC.name)
   390 	SaveCampaignVar("CosmosCheckPoint", "5") -- hero got fuels
   390 	SaveCampaignVar("CosmosCheckPoint", "5") -- hero got fuels
   391 	EndGame()
   391 	EndGame()
   392 end
   392 end
   408 
   408 
   409 function AnimationSetup()
   409 function AnimationSetup()
   410 	-- DIALOG 01 - Start, welcome to moon
   410 	-- DIALOG 01 - Start, welcome to moon
   411 	AddSkipFunction(dialog01, Skipanim, {dialog01})
   411 	AddSkipFunction(dialog01, Skipanim, {dialog01})
   412 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}})
   412 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}})
   413 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Near PAotH base at moon..."),  4000}})
   413 	table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Near a PAotH base on the moon ..."),  4000}})
   414 	table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("Hey Hog Solo! Finally you have come..."), SAY_SAY, 2000}})
   414 	table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("Hey, Hog Solo! Finally you have come!"), SAY_SAY, 2000}})
   415 	table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("It seems that Professor Hogevil has prepared for your arrival!"), SAY_SAY, 4000}})
   415 	table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("It seems that Professor Hogevil has prepared for your arrival!"), SAY_SAY, 4000}})
   416 	table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("He has captured the rest of the PAotH team and awaits to capture you!"), SAY_SAY, 5000}})
   416 	table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("He has captured the rest of the PAotH team and awaits to capture you!"), SAY_SAY, 5000}})
   417 	table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("We have to hurry! Are you armed?"), SAY_SAY, 4300}})
   417 	table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("We have to hurry! Are you armed?"), SAY_SAY, 4300}})
   418 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 450}})
   418 	table.insert(dialog01, {func = AnimWait, args = {hero.gear, 450}})
   419 	table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("No, I am afraid I had to travel light"), SAY_SAY, 2500}})
   419 	table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("No, I am afraid I had to travel light."), SAY_SAY, 2500}})
   420 	table.insert(dialog01, {func = AnimWait, args = {paoth1.gear, 3200}})
   420 	table.insert(dialog01, {func = AnimWait, args = {paoth1.gear, 3200}})
   421 	table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("Ok, then you have to go and take some of the weapons we have hidden in case of an emergency!"), SAY_SAY, 7000}})
   421 	table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("Okay, then you have to go and take some of the weapons we have hidden in case of an emergency!"), SAY_SAY, 7000}})
   422 	table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("They are up there! Take this rope and hurry!"), SAY_SAY, 7000}})
   422 	table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("They are up there! Take this rope and hurry!"), SAY_SAY, 7000}})
   423 	table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Ehm... ok..."), SAY_SAY, 2500}})
   423 	table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Ehm, okay ..."), SAY_SAY, 2500}})
   424 	table.insert(dialog01, {func = AnimSwitchHog, args = {hero.gear}})
   424 	table.insert(dialog01, {func = AnimSwitchHog, args = {hero.gear}})
   425 	-- DIALOG 02 - To the weapons platform
   425 	-- DIALOG 02 - To the weapons platform
   426 	AddSkipFunction(dialog02, Skipanim, {dialog02})
   426 	AddSkipFunction(dialog02, Skipanim, {dialog02})
   427 	table.insert(dialog02, {func = AnimCaption, args = {hero.gear, loc("Checkpoint reached!"),  4000}})
   427 	table.insert(dialog02, {func = AnimCaption, args = {hero.gear, loc("Checkpoint reached!"),  4000}})
   428 	table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("I've made it! YEAAAAAH!"), SAY_SHOUT, 4000}})
   428 	table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("I've made it! Yeah!"), SAY_SHOUT, 4000}})
   429 	table.insert(dialog02, {func = AnimSay, args = {paoth1.gear, loc("Nice! Now hurry and get down! You have to rescue my friends!"), SAY_SHOUT, 7000}})
   429 	table.insert(dialog02, {func = AnimSay, args = {paoth1.gear, loc("Nice! Now hurry and get down! You have to rescue my friends!"), SAY_SHOUT, 7000}})
   430 	table.insert(dialog02, {func = setAfterDialog02, args = {}})
   430 	table.insert(dialog02, {func = setAfterDialog02, args = {}})
   431 	table.insert(dialog02, {func = AnimSwitchHog, args = {hero.gear}})
   431 	table.insert(dialog02, {func = AnimSwitchHog, args = {hero.gear}})
   432 	-- DIALOG 03 - Hero spotted and has no weapons
   432 	-- DIALOG 03 - Hero spotted and has no weapons
   433 	AddSkipFunction(dialog03, Skipanim, {dialog03})
   433 	AddSkipFunction(dialog03, Skipanim, {dialog03})
   434 	table.insert(dialog03, {func = AnimCaption, args = {hero.gear, loc("Get ready to fight!"), 4000}})
   434 	table.insert(dialog03, {func = AnimCaption, args = {hero.gear, loc("Get ready to fight!"), 4000}})
   435 	table.insert(dialog03, {func = AnimSay, args = {minion1.gear, loc("Look boss! There is the target!"), SAY_SHOUT, 4000}})
   435 	table.insert(dialog03, {func = AnimSay, args = {minion1.gear, loc("Look, boss! There is the target!"), SAY_SHOUT, 4000}})
   436 	table.insert(dialog03, {func = AnimSay, args = {professor.gear, loc("Prepare for battle!"), SAY_SHOUT, 4000}})
   436 	table.insert(dialog03, {func = AnimSay, args = {professor.gear, loc("Prepare for battle!"), SAY_SHOUT, 4000}})
   437 	table.insert(dialog03, {func = AnimSay, args = {hero.gear, loc("Oops, I've been spotted and I have no weapons! I am doomed!"), SAY_THINK, 4000}})
   437 	table.insert(dialog03, {func = AnimSay, args = {hero.gear, loc("Oops, I've been spotted and I have no weapons! I am doomed!"), SAY_THINK, 4000}})
   438 	table.insert(dialog03, {func = startCombat, args = {hero.gear}})
   438 	table.insert(dialog03, {func = startCombat, args = {hero.gear}})
   439 	-- DIALOG 04 - Hero spotted and *HAS* weapons
   439 	-- DIALOG 04 - Hero spotted and *HAS* weapons
   440 	AddSkipFunction(dialog04, Skipanim, {dialog04})
   440 	AddSkipFunction(dialog04, Skipanim, {dialog04})
   441 	table.insert(dialog04, {func = AnimCaption, args = {hero.gear, loc("Get ready to fight!"), 4000}})
   441 	table.insert(dialog04, {func = AnimCaption, args = {hero.gear, loc("Get ready to fight!"), 4000}})
   442 	table.insert(dialog04, {func = AnimSay, args = {minion1.gear, loc("Look boss! There is the target!"), SAY_SHOUT, 4000}})
   442 	table.insert(dialog04, {func = AnimSay, args = {minion1.gear, loc("Look, boss! There is the target!"), SAY_SHOUT, 4000}})
   443 	table.insert(dialog04, {func = AnimSay, args = {professor.gear, loc("Prepare for battle!"), SAY_SHOUT, 4000}})
   443 	table.insert(dialog04, {func = AnimSay, args = {professor.gear, loc("Prepare for battle!"), SAY_SHOUT, 4000}})
   444 	table.insert(dialog04, {func = AnimSay, args = {hero.gear, loc("Here we go!"), SAY_THINK, 4000}})
   444 	table.insert(dialog04, {func = AnimSay, args = {hero.gear, loc("Here we go!"), SAY_THINK, 4000}})
   445 	table.insert(dialog04, {func = startCombat, args = {hero.gear}})
   445 	table.insert(dialog04, {func = startCombat, args = {hero.gear}})
   446 end
   446 end
   447 
   447