8 HedgewarsScriptLoad("/Scripts/Locale.lua") |
8 HedgewarsScriptLoad("/Scripts/Locale.lua") |
9 HedgewarsScriptLoad("/Scripts/Animate.lua") |
9 HedgewarsScriptLoad("/Scripts/Animate.lua") |
10 |
10 |
11 ----------------- VARIABLES -------------------- |
11 ----------------- VARIABLES -------------------- |
12 -- globals |
12 -- globals |
13 local campaignName = loc("A Space Adventure") |
13 local missionName = loc("The last encounter") |
14 local missionName = loc("Death planet") |
|
15 -- dialogs |
14 -- dialogs |
16 local dialog01 = {} |
15 local dialog01 = {} |
17 -- missions objectives |
16 -- missions objectives |
18 local goals = { |
17 local goals = { |
19 [dialog01] = {missionName, loc("The final part"), loc("Defeat Professor Hogevil!"), 1, 4500}, |
18 [dialog01] = {missionName, loc("The final part"), loc("Defeat Professor Hogevil!"), 1, 4500}, |
120 professor.bot = AddHog(professor.name, 1, 300, "tophats") |
117 professor.bot = AddHog(professor.name, 1, 300, "tophats") |
121 AnimSetGearPosition(professor.bot, paoth1.x - 100, paoth1.y) |
118 AnimSetGearPosition(professor.bot, paoth1.x - 100, paoth1.y) |
122 HogTurnLeft(professor.bot, true) |
119 HogTurnLeft(professor.bot, true) |
123 professor.gear = professor.bot |
120 professor.gear = professor.bot |
124 for i=1,table.getn(thugs) do |
121 for i=1,table.getn(thugs) do |
125 thugs[i].gear = AddHog("thug #"..i, 1, thugs[i].health, "war_desertgrenadier1") |
122 thugs[i].gear = AddHog(loc("thug").." #"..i, 1, thugs[i].health, "war_desertgrenadier1") |
126 AnimSetGearPosition(thugs[i].gear, thugs[i].x, thugs[i].y) |
123 AnimSetGearPosition(thugs[i].gear, thugs[i].x, thugs[i].y) |
127 HogTurnLeft(thugs[i].gear, not thugs[i].turnLeft) |
124 HogTurnLeft(thugs[i].gear, not thugs[i].turnLeft) |
128 end |
125 end |
129 |
126 |
130 AnimInit() |
127 AnimInit() |
243 |
240 |
244 -------------- ACTIONS ------------------ |
241 -------------- ACTIONS ------------------ |
245 |
242 |
246 function heroDeath(gear) |
243 function heroDeath(gear) |
247 SendStat('siGameResult', loc("Hog Solo lost, try again!")) --1 |
244 SendStat('siGameResult', loc("Hog Solo lost, try again!")) --1 |
248 SendStat('siCustomAchievement', loc("To win the game you have to eliminate your enemies")) --11 |
245 SendStat('siCustomAchievement', loc("To win the game you have to eliminate all your enemies")) --11 |
249 SendStat('siPlayerKills','1',teamC.name) |
246 SendStat('siPlayerKills','1',teamC.name) |
250 SendStat('siPlayerKills','0',teamA.name) |
247 SendStat('siPlayerKills','0',teamA.name) |
251 EndGame() |
248 EndGame() |
252 end |
249 end |
253 |
250 |
254 function enemiesDeath(gear) |
251 function enemiesDeath(gear) |
255 SendStat('siGameResult', loc("Congratulations, you won!")) --1 |
252 SendStat('siGameResult', loc("Congratulations, you won!")) --1 |
256 SendStat('siCustomAchievement', loc("You have successfuly eliminated Professor Hogevil")) --11 |
253 SendStat('siCustomAchievement', loc("You have successfuly eliminated Professor Hogevil")) --11 |
257 SendStat('siCustomAchievement', loc("You have rescued H and Dr. Cornelius")) --11 |
254 SendStat('siCustomAchievement', loc("You have rescued H and Dr.Cornelius")) --11 |
258 SendStat('siCustomAchievement', loc("You have acquired the device")) --11 |
255 SendStat('siCustomAchievement', loc("You have acquired the last part")) --11 |
259 SendStat('siPlayerKills','1',teamA.name) |
256 SendStat('siPlayerKills','1',teamA.name) |
260 SendStat('siPlayerKills','0',teamC.name) |
257 SendStat('siPlayerKills','0',teamC.name) |
261 EndGame() |
258 EndGame() |
262 end |
259 end |
263 |
260 |
272 |
269 |
273 function AnimationSetup() |
270 function AnimationSetup() |
274 -- DIALOG01, GAME START, INTRODUCTION |
271 -- DIALOG01, GAME START, INTRODUCTION |
275 AddSkipFunction(dialog01, Skipanim, {dialog01}) |
272 AddSkipFunction(dialog01, Skipanim, {dialog01}) |
276 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) |
273 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) |
277 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere in the Death Planet, where no other hog lives..."), 5000}}) |
274 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere in the uninhabitable Death Planet..."), 5000}}) |
278 table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("Welcome HogSolo, surpised to see me?"), SAY_SAY, 4000}}) |
275 table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("Welcome Hog Solo, surpised to see me?"), SAY_SAY, 4000}}) |
279 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}}) |
276 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}}) |
280 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}}) |
277 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}}) |
281 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}}) |
278 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}}) |
282 table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("So, will you give me the other parts?"), SAY_SAY, 4000}}) |
279 table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("Will you give me the other parts?"), SAY_SAY, 4000}}) |
283 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) |
280 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) |
284 table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("I will never hand you the parts!"), SAY_SAY, 4000}}) |
281 table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("I will never hand you the parts!"), SAY_SAY, 4000}}) |
285 table.insert(dialog01, {func = AnimWait, args = {professor.human, 3000}}) |
282 table.insert(dialog01, {func = AnimWait, args = {professor.human, 3000}}) |
286 table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("Then prepare for battle!"), SAY_SAY, 4000}}) |
283 table.insert(dialog01, {func = AnimSay, args = {professor.human, loc("Then prepare for battle!"), SAY_SAY, 4000}}) |
287 table.insert(dialog01, {func = startBattle, args = {}}) |
284 table.insert(dialog01, {func = startBattle, args = {}}) |