10 ----------------- VARIABLES -------------------- |
10 ----------------- VARIABLES -------------------- |
11 -- globals |
11 -- globals |
12 local missionName = loc("Killing the specialists") |
12 local missionName = loc("Killing the specialists") |
13 local challengeObjectives = loc("Use your available weapons in order to eliminate the enemies").."|".. |
13 local challengeObjectives = loc("Use your available weapons in order to eliminate the enemies").."|".. |
14 loc("Each time you play this missions enemy hogs will play in a random order").."|".. |
14 loc("Each time you play this missions enemy hogs will play in a random order").."|".. |
15 loc("At the start of the game each enemy hog has only the weapon that he is named of").."|".. |
15 loc("At the start of the game each enemy hog has only the weapon that he is named after").."|".. |
16 loc("A random hog will inherit the weapons of the deceased hogs").."|".. |
16 loc("A random hedgehog will inherit the weapons of his deceased team-mates").."|".. |
17 loc("If you kill a hog with the weapon your hp will be 100").."|".. |
17 loc("If you kill a hedgehog with the respective weapon your healh points will be set to 100").."|".. |
18 loc("If you injure a hog you'll get 35% of the damage dealt").."|".. |
18 loc("If you injure a hedgehog you'll get 35% of the damage dealt").."|".. |
19 loc("Every time you kill an enemy hog your ammo will get reseted").."|".. |
19 loc("Every time you kill an enemy hog your ammo will get reset").."|".. |
20 loc("Rope won't get reseted") |
20 loc("Rope won't get reset") |
21 -- dialogs |
21 -- dialogs |
22 local dialog01 = {} |
22 local dialog01 = {} |
23 -- mission objectives |
23 -- mission objectives |
24 local goals = { |
24 local goals = { |
25 [dialog01] = {missionName, loc("Challenge Objectives"), challengeObjectives, 1, 4500}, |
25 [dialog01] = {missionName, loc("Challenge Objectives"), challengeObjectives, 1, 4500}, |
73 AddTeam(teamB.name, teamB.color, "Bone", "Island", "HillBilly", "cm_birdy") |
73 AddTeam(teamB.name, teamB.color, "Bone", "Island", "HillBilly", "cm_birdy") |
74 for i=1,table.getn(enemies) do |
74 for i=1,table.getn(enemies) do |
75 enemies[i].gear = AddHog(enemies[i].name, 1, 100, "war_desertgrenadier1") |
75 enemies[i].gear = AddHog(enemies[i].name, 1, 100, "war_desertgrenadier1") |
76 AnimSetGearPosition(enemies[i].gear, enemies[i].x, enemies[i].y) |
76 AnimSetGearPosition(enemies[i].gear, enemies[i].x, enemies[i].y) |
77 end |
77 end |
78 |
78 |
79 initCheckpoint("death02") |
79 initCheckpoint("death02") |
80 |
80 |
81 AnimInit() |
81 AnimInit() |
82 AnimationSetup() |
82 AnimationSetup() |
83 end |
83 end |
84 |
84 |
85 function onGameStart() |
85 function onGameStart() |
86 AnimWait(hero.gear, 3000) |
86 AnimWait(hero.gear, 3000) |
87 FollowGear(hero.gear) |
87 FollowGear(hero.gear) |
88 ShowMission(missionName, loc("Challenge Objectives"), challengeObjectives, -amSkip, 0) |
88 ShowMission(missionName, loc("Challenge Objectives"), challengeObjectives, -amSkip, 0) |
89 |
89 |
90 AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) |
90 AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0) |
91 AddEvent(onHeroWin, {hero.gear}, heroWin, {hero.gear}, 0) |
91 AddEvent(onHeroWin, {hero.gear}, heroWin, {hero.gear}, 0) |
92 |
92 |
93 --hero ammo |
93 --hero ammo |
94 AddAmmo(hero.gear, amSkip, 100) |
94 AddAmmo(hero.gear, amSkip, 100) |
175 |
175 |
176 -------------- ACTIONS ------------------ |
176 -------------- ACTIONS ------------------ |
177 |
177 |
178 function heroDeath(gear) |
178 function heroDeath(gear) |
179 SendStat(siGameResult, loc("Hog Solo lost, try again!")) |
179 SendStat(siGameResult, loc("Hog Solo lost, try again!")) |
180 SendStat(siCustomAchievement, loc("You have to eliminate all the enemies")) |
180 SendStat(siCustomAchievement, loc("You have to eliminate all the enemies")) |
181 SendStat(siCustomAchievement, loc("Read the Challenge Objectives from within the mission for more details")) |
181 SendStat(siCustomAchievement, loc("Read the Challenge Objectives from within the mission for more details")) |
182 SendStat(siPlayerKills,'1',teamB.name) |
182 SendStat(siPlayerKills,'1',teamB.name) |
183 SendStat(siPlayerKills,'0',teamA.name) |
183 SendStat(siPlayerKills,'0',teamA.name) |
184 EndGame() |
184 EndGame() |
185 end |
185 end |
186 |
186 |
187 function heroWin(gear) |
187 function heroWin(gear) |
188 saveBonus(3, 4) |
188 saveBonus(3, 4) |
189 SendStat(siGameResult, loc("Congratulations, you won!")) |
189 SendStat(siGameResult, loc("Congratulations, you won!")) |
190 SendStat(siCustomAchievement, loc("You complete the mission in "..TotalRounds.." rounds")) |
190 SendStat(siCustomAchievement, loc("You complete the mission in "..TotalRounds.." rounds")) |
191 SendStat(siCustomAchievement, loc("The next 4 times you'll play the \"The last encounter\" mission you'll get 20 more hit points and a Laser Sight")) |
191 SendStat(siCustomAchievement, loc("The next 4 times you play the \"The last encounter\" mission you'll get 20 more hit points and a Laser Sight")) |
192 SendStat(siPlayerKills,'1',teamA.name) |
192 SendStat(siPlayerKills,'1',teamA.name) |
193 EndGame() |
193 EndGame() |
194 end |
194 end |
195 |
195 |
196 -------------- ANIMATIONS ------------------ |
196 -------------- ANIMATIONS ------------------ |
207 AddSkipFunction(dialog01, Skipanim, {dialog01}) |
207 AddSkipFunction(dialog01, Skipanim, {dialog01}) |
208 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) |
208 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) |
209 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere in the Planet of Death..."), 3000}}) |
209 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Somewhere in the Planet of Death..."), 3000}}) |
210 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("...Hog Solo fights for his life"), 3000}}) |
210 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("...Hog Solo fights for his life"), 3000}}) |
211 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Each time you play this missions enemy hogs will play in a random order"), 5000}}) |
211 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Each time you play this missions enemy hogs will play in a random order"), 5000}}) |
212 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("At the start of the game each enemy hog has only the weapon that he is named of"), 5000}}) |
212 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("At the start of the game each enemy hog has only the weapon that he is named after"), 5000}}) |
213 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("A random hog will inherit the weapons of the deceased hogs"), 5000}}) |
213 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("A random hedgehog will inherit the weapons of his deceased team-mates"), 5000}}) |
214 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("If you kill a hog with the weapon your hp will be 100"), 5000}}) |
214 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("If you kill a hedgehog with the respective weapon your healh points will be set to 100"), 5000}}) |
215 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("If you injure a hog you'll get 35% of the damage dealt"), 5000}}) |
215 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("If you injure a hedgehog you'll get 35% of the damage dealt"), 5000}}) |
216 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Every time you kill an enemy hog your ammo will get reseted"), 5000}}) |
216 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Every time you kill an enemy hog your ammo will get reset"), 5000}}) |
217 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Rope won't get reseted"), 2000}}) |
217 table.insert(dialog01, {func = AnimCaption, args = {hero.gear, loc("Rope won't get reset"), 2000}}) |
218 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) |
218 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) |
219 table.insert(dialog01, {func = startBattle, args = {hero.gear}}) |
219 table.insert(dialog01, {func = startBattle, args = {hero.gear}}) |
220 end |
220 end |
221 |
221 |
222 ------------ Other Functions ------------------- |
222 ------------ Other Functions ------------------- |
223 |
223 |
224 function startBattle() |
224 function startBattle() |