9 |
9 |
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 have a random playing order").."|".. |
14 loc("Each time you play this missions enemy hogs will play in a random order").."|".. |
15 loc("Each enemy hog can use 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 of").."|".. |
16 loc("If you kill a hog with the weapon that he uses your hp will be 100").."|".. |
16 loc("A random hog will inherit the weapons of the deceased hogs").."|".. |
17 loc("If you kill a hog with another weapon you'll get 35% of the damaged dealt").."|".. |
17 loc("If you kill a hog with the weapon your hp will be 100").."|".. |
|
18 loc("If you injure a hog you'll get 35% of the damage dealt").."|".. |
18 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 reseted").."|".. |
19 loc("Rope won't get reseted") |
20 loc("Rope won't get reseted") |
|
21 -- dialogs |
|
22 local dialog01 = {} |
|
23 -- mission objectives |
|
24 local goals = { |
|
25 [dialog01] = {missionName, loc("Challenge Objectives"), challengeObjectives, 1, 4500}, |
|
26 } |
20 -- hogs |
27 -- hogs |
21 local hero = { |
28 local hero = { |
22 name = loc("Hog Solo"), |
29 name = loc("Hog Solo"), |
23 x = 850, |
30 x = 850, |
24 y = 460, |
31 y = 460, |
182 -- TODO SendStat('siCustomAchievement', loc("You have gained some extra life")) --11 |
190 -- TODO SendStat('siCustomAchievement', loc("You have gained some extra life")) --11 |
183 SendStat('siPlayerKills','1',teamA.name) |
191 SendStat('siPlayerKills','1',teamA.name) |
184 EndGame() |
192 EndGame() |
185 end |
193 end |
186 |
194 |
|
195 -------------- ANIMATIONS ------------------ |
|
196 |
|
197 function Skipanim(anim) |
|
198 if goals[anim] ~= nil then |
|
199 ShowMission(unpack(goals[anim])) |
|
200 end |
|
201 startBattle() |
|
202 end |
|
203 |
|
204 function AnimationSetup() |
|
205 -- DIALOG 01 - Start, game instructions |
|
206 AddSkipFunction(dialog01, Skipanim, {dialog01}) |
|
207 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 3000}}) |
|
208 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("...Hog Solo fights for his life"), 3000}}) |
|
210 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("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("A random hog will inherit the weapons of the deceased hogs"), 5000}}) |
|
213 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 injure a hog you'll get 35% of the damage dealt"), 5000}}) |
|
215 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("Rope won't get reseted"), 2000}}) |
|
217 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) |
|
218 table.insert(dialog01, {func = startBattle, args = {hero.gear}}) |
|
219 end |
|
220 |
187 ------------ Other Functions ------------------- |
221 ------------ Other Functions ------------------- |
|
222 |
|
223 function startBattle() |
|
224 AnimSwitchHog(hero.gear) |
|
225 TurnTimeLeft = TurnTime |
|
226 end |
188 |
227 |
189 function shuffleHogs(hogs) |
228 function shuffleHogs(hogs) |
190 local hogsNumber = table.getn(hogs) |
229 local hogsNumber = table.getn(hogs) |
191 for i=1,hogsNumber do |
230 for i=1,hogsNumber do |
192 local randomHog = math.random(hogsNumber) |
231 local randomHog = math.random(hogsNumber) |