31 local dialog03 = {} |
31 local dialog03 = {} |
32 local dialog04 = {} |
32 local dialog04 = {} |
33 -- mission objectives |
33 -- mission objectives |
34 local goals = { |
34 local goals = { |
35 [dialog01] = {missionName, loc("Getting ready"), loc("Go to the upper platform and get the weapons in the crates!"), 1, 4500}, |
35 [dialog01] = {missionName, loc("Getting ready"), loc("Go to the upper platform and get the weapons in the crates!"), 1, 4500}, |
36 [dialog02] = {missionName, loc("Prepare to fight"), loc("Go down and save these PAoTH hogs!"), 1, 5000}, |
36 [dialog02] = {missionName, loc("Prepare to fight"), loc("Go down and save these PAotH hogs!"), 1, 5000}, |
37 [dialog03] = {missionName, loc("The fight begins!"), loc("Neutralize your enemies and be careful!"), 1, 5000}, |
37 [dialog03] = {missionName, loc("The fight begins!"), loc("Neutralize your enemies and be careful!"), 1, 5000}, |
38 [dialog04] = {missionName, loc("The fight begins!"), loc("Neutralize your enemies and be careful!"), 1, 5000} |
38 [dialog04] = {missionName, loc("The fight begins!"), loc("Neutralize your enemies and be careful!"), 1, 5000} |
39 } |
39 } |
40 -- crates |
40 -- crates |
41 local weaponsY = 100 |
41 local weaponsY = 100 |
58 local teamA = {} |
58 local teamA = {} |
59 local teamB = {} |
59 local teamB = {} |
60 local teamC = {} |
60 local teamC = {} |
61 local teamD = {} |
61 local teamD = {} |
62 -- hedgehogs values |
62 -- hedgehogs values |
63 hero.name = "Hog Solo" |
63 hero.name = loc("Hog Solo") |
64 hero.x = 1380 |
64 hero.x = 1380 |
65 hero.y = 1750 |
65 hero.y = 1750 |
66 hero.dead = false |
66 hero.dead = false |
67 paoth1.name = "Joe" |
67 paoth1.name = loc("Joe") |
68 paoth1.x = 1430 |
68 paoth1.x = 1430 |
69 paoth1.y = 1750 |
69 paoth1.y = 1750 |
70 paoth2.name = "Bruce" |
70 paoth2.name = loc("Bruce") |
71 paoth2.x = 3760 |
71 paoth2.x = 3760 |
72 paoth2.y = 1800 |
72 paoth2.y = 1800 |
73 paoth3.name = "Helena" |
73 paoth3.name = loc("Helena") |
74 paoth3.x = 3800 |
74 paoth3.x = 3800 |
75 paoth3.y = 1800 |
75 paoth3.y = 1800 |
76 paoth4.name = "Boris" |
76 paoth4.name = loc("Boris") |
77 paoth4.x = 3860 |
77 paoth4.x = 3860 |
78 paoth4.y = 1800 |
78 paoth4.y = 1800 |
79 professor.name = "Pr.Hogevil" |
79 professor.name = loc("Prof. Hogevil") |
80 professor.x = 3800 |
80 professor.x = 3800 |
81 professor.y = 1600 |
81 professor.y = 1600 |
82 professor.dead = false |
82 professor.dead = false |
83 professor.health = 100 |
83 professor.health = 100 |
84 minion1.name = "Minion" |
84 minion1.name = loc("Minion") |
85 minion1.x = 2460 |
85 minion1.x = 2460 |
86 minion1.y = 1450 |
86 minion1.y = 1450 |
87 minion2.name = "Minion" |
87 minion2.name = loc("Minion") |
88 minion2.x = 2450 |
88 minion2.x = 2450 |
89 minion2.y = 1900 |
89 minion2.y = 1900 |
90 minion3.name = "Minion" |
90 minion3.name = loc("Minion") |
91 minion3.x = 3500 |
91 minion3.x = 3500 |
92 minion3.y = 1750 |
92 minion3.y = 1750 |
93 teamA.name = loc("PAoTH") |
93 teamA.name = loc("PAoTH") |
94 teamA.color = tonumber("FF0000",16) -- red |
94 teamA.color = tonumber("FF0000",16) -- red |
95 teamB.name = loc("Minions") |
95 teamB.name = loc("Minions") |
170 -- wait for the first turn to start |
170 -- wait for the first turn to start |
171 AnimWait(hero.gear, 3000) |
171 AnimWait(hero.gear, 3000) |
172 FollowGear(hero.gear) |
172 FollowGear(hero.gear) |
173 |
173 |
174 ShowMission(campaignName, missionName, loc("Hog Solo has to refuel his saucer.").. |
174 ShowMission(campaignName, missionName, loc("Hog Solo has to refuel his saucer.").. |
175 "|"..loc("Rescue the imprisoned PAoTH team and get your fuels!"), -amSkip, 0) |
175 "|"..loc("Rescue the imprisoned PAotH team and get your fuels!"), -amSkip, 0) |
176 |
176 |
177 AddAmmo(minion1.gear, amDEagle, 10) |
177 AddAmmo(minion1.gear, amDEagle, 10) |
178 AddAmmo(minion2.gear, amDEagle, 10) |
178 AddAmmo(minion2.gear, amDEagle, 10) |
179 AddAmmo(minion3.gear, amDEagle, 10) |
179 AddAmmo(minion3.gear, amDEagle, 10) |
180 AddAmmo(minion1.gear, amBazooka, 2) |
180 AddAmmo(minion1.gear, amBazooka, 2) |
328 AddAnim(dialog02) |
328 AddAnim(dialog02) |
329 end |
329 end |
330 |
330 |
331 function heroDeath(gear) |
331 function heroDeath(gear) |
332 SendStat('siGameResult', loc("Hog Solo lost, try again!")) --1 |
332 SendStat('siGameResult', loc("Hog Solo lost, try again!")) --1 |
333 SendStat('siCustomAchievement', loc("You have to get the weapons and rescue the PAoTH researchers")) --11 |
333 SendStat('siCustomAchievement', loc("You have to get the weapons and rescue the PAotH researchers")) --11 |
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 |
378 AnimSay(professor.gear, loc("I may lost that battle, but I haven't lost the war yet!"), SAY_SHOUT, 6000) |
378 AnimSay(professor.gear, loc("I may lost that battle, but I haven't lost the war yet!"), SAY_SHOUT, 6000) |
379 ParseCommand("teamgone " .. teamC.name) |
379 ParseCommand("teamgone " .. teamC.name) |
380 AnimCaption(hero.gear, loc("Congrats! You won!"), 6000) |
380 AnimCaption(hero.gear, loc("Congrats! You won!"), 6000) |
381 AnimWait(hero.gear,5000) |
381 AnimWait(hero.gear,5000) |
382 |
382 |
383 SendStat('siGameResult', loc("Hog Solo won, conrgatulations!")) --1 |
383 SendStat('siGameResult', loc("Congratulations, you won!")) --1 |
384 SendStat('siCustomAchievement', loc("Eliminated the evil minions")) --11 |
384 SendStat('siCustomAchievement', loc("Eliminated the evil minions")) --11 |
385 SendStat('siCustomAchievement', loc("Drove the professor away")) --11 |
385 SendStat('siCustomAchievement', loc("Drove the professor away")) --11 |
386 SendStat('siPlayerKills','1',teamD.name) |
386 SendStat('siPlayerKills','1',teamD.name) |
387 SendStat('siPlayerKills','0',teamC.name) |
387 SendStat('siPlayerKills','0',teamC.name) |
388 SaveCampaignVar("CosmosCheckPoint", "5") -- hero got fuels |
388 SaveCampaignVar("CosmosCheckPoint", "5") -- hero got fuels |
404 |
404 |
405 function AnimationSetup() |
405 function AnimationSetup() |
406 -- DIALOG 01 - Start, welcome to moon |
406 -- DIALOG 01 - Start, welcome to moon |
407 AddSkipFunction(dialog01, Skipanim, {dialog01}) |
407 AddSkipFunction(dialog01, Skipanim, {dialog01}) |
408 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) |
408 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) |
409 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Near PAoTH base at moon..."), 4000}}) |
409 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Near PAotH base at moon..."), 4000}}) |
410 table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("Hey Hog Solo! Finaly you have come..."), SAY_SAY, 2000}}) |
410 table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("Hey Hog Solo! Finaly you have come..."), SAY_SAY, 2000}}) |
411 table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("It seems that Professor Hogevil learned for your arrival!"), SAY_SAY, 4000}}) |
411 table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("It seems that Professor Hogevil learned for your arrival!"), SAY_SAY, 4000}}) |
412 table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("Now he have captured the rest of the PAoTH team and awaits to capture you!"), SAY_SAY, 5000}}) |
412 table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("Now he have captured the rest of the PAotH team and awaits to capture you!"), SAY_SAY, 5000}}) |
413 table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("We have to hurry! Are you armed?"), SAY_SAY, 4300}}) |
413 table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("We have to hurry! Are you armed?"), SAY_SAY, 4300}}) |
414 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) |
414 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) |
415 table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("No, I am afraid I had to travel light"), SAY_SAY, 2500}}) |
415 table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("No, I am afraid I had to travel light"), SAY_SAY, 2500}}) |
416 table.insert(dialog01, {func = AnimWait, args = {paoth1.gear, 500}}) |
416 table.insert(dialog01, {func = AnimWait, args = {paoth1.gear, 500}}) |
417 table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("Ok, then you have to go and take some of the waepons we have hidden in case of an emergency!"), SAY_SAY, 7000}}) |
417 table.insert(dialog01, {func = AnimSay, args = {paoth1.gear, loc("Ok, then you have to go and take some of the waepons we have hidden in case of an emergency!"), SAY_SAY, 7000}}) |