105 |
104 |
106 -- Hog Solo |
105 -- Hog Solo |
107 AddTeam(teamA.name, teamA.color, "Simple", "Island", "Default", "hedgewars") |
106 AddTeam(teamA.name, teamA.color, "Simple", "Island", "Default", "hedgewars") |
108 hero.gear = AddHog(hero.name, 0, 100, "war_desertgrenadier1") |
107 hero.gear = AddHog(hero.name, 0, 100, "war_desertgrenadier1") |
109 AnimSetGearPosition(hero.gear, hero.x, hero.y) |
108 AnimSetGearPosition(hero.gear, hero.x, hero.y) |
110 -- PAotH |
109 |
111 AddTeam(teamB.name, teamB.color, "Earth", "Island", "Default", "cm_galaxy") |
|
112 paoth1.gear = AddHog(paoth1.name, 0, 100, "hair_yellow") |
|
113 AnimSetGearPosition(paoth1.gear, paoth1.x, paoth1.y) |
|
114 HogTurnLeft(paoth1.gear, true) |
|
115 paoth2.gear = AddHog(paoth2.name, 0, 100, "Glasses") |
|
116 AnimSetGearPosition(paoth2.gear, paoth2.x, paoth2.y) |
|
117 HogTurnLeft(paoth2.gear, true) |
|
118 -- Professor and Thugs |
110 -- Professor and Thugs |
119 AddTeam(teamC.name, teamC.color, "star", "Island", "Default", "cm_sine") |
|
120 professor.human = AddHog(professor.name, 0, 300, "tophats") |
|
121 AnimSetGearPosition(professor.human, hero.x + 70, hero.y) |
|
122 HogTurnLeft(professor.human, true) |
|
123 AddTeam(teamC.name, teamC.color, "eyecross", "Island", "Default", "cm_sine") |
111 AddTeam(teamC.name, teamC.color, "eyecross", "Island", "Default", "cm_sine") |
124 professor.bot = AddHog(professor.name, 1, 300, "tophats") |
112 professor.bot = AddHog(professor.name, 1, 300, "tophats") |
125 AnimSetGearPosition(professor.bot, paoth1.x - 100, paoth1.y) |
113 AnimSetGearPosition(professor.bot, paoth1.x - 100, paoth1.y) |
126 HogTurnLeft(professor.bot, true) |
114 HogTurnLeft(professor.bot, true) |
127 professor.gear = professor.bot |
115 professor.gear = professor.bot |
128 for i=1,table.getn(thugs) do |
116 for i=1,table.getn(thugs) do |
129 thugs[i].gear = AddHog(string.format(loc("Thug #%d"), i), 1, thugs[i].health, "war_desertgrenadier1") |
117 thugs[i].gear = AddHog(string.format(loc("Thug #%d"), i), 1, thugs[i].health, "war_desertgrenadier1") |
130 AnimSetGearPosition(thugs[i].gear, thugs[i].x, thugs[i].y) |
118 AnimSetGearPosition(thugs[i].gear, thugs[i].x, thugs[i].y) |
131 HogTurnLeft(thugs[i].gear, not thugs[i].turnLeft) |
119 HogTurnLeft(thugs[i].gear, not thugs[i].turnLeft) |
132 end |
120 end |
|
121 |
|
122 AddTeam(teamC.name, teamC.color, "star", "Island", "Default", "cm_sine") |
|
123 professor.human = AddHog(professor.name, 0, 300, "tophats") |
|
124 AnimSetGearPosition(professor.human, hero.x + 70, hero.y) |
|
125 HogTurnLeft(professor.human, true) |
|
126 |
|
127 -- PAotH |
|
128 AddTeam(teamB.name, teamB.color, "Earth", "Island", "Default", "cm_galaxy") |
|
129 paoth1.gear = AddHog(paoth1.name, 0, 100, "hair_yellow") |
|
130 AnimSetGearPosition(paoth1.gear, paoth1.x, paoth1.y) |
|
131 HogTurnLeft(paoth1.gear, true) |
|
132 SetGearAIHints(paoth1.gear, aihDoesntMatter) |
|
133 paoth2.gear = AddHog(paoth2.name, 0, 100, "Glasses") |
|
134 AnimSetGearPosition(paoth2.gear, paoth2.x, paoth2.y) |
|
135 HogTurnLeft(paoth2.gear, true) |
|
136 SetGearAIHints(paoth2.gear, aihDoesntMatter) |
133 |
137 |
134 initCheckpoint("death01") |
138 initCheckpoint("death01") |
135 |
139 |
136 AnimInit(true) |
140 AnimInit(true) |
137 AnimationSetup() |
141 AnimationSetup() |
267 -------------- ACTIONS ------------------ |
273 -------------- ACTIONS ------------------ |
268 |
274 |
269 function heroDeath(gear) |
275 function heroDeath(gear) |
270 SendStat(siGameResult, loc("Hog Solo lost, try again!")) |
276 SendStat(siGameResult, loc("Hog Solo lost, try again!")) |
271 SendStat(siCustomAchievement, loc("To win the game you have to eliminate all your enemies.")) |
277 SendStat(siCustomAchievement, loc("To win the game you have to eliminate all your enemies.")) |
272 sendSimpleTeamRankings({teamC.name, teamA.name}) |
278 sendSimpleTeamRankings({teamC.name, teamA.name, teamB.name}) |
273 EndGame() |
279 EndGame() |
274 end |
280 end |
275 |
281 |
276 function enemiesDeath(gear) |
282 function enemiesDeath(gear) |
277 saveCompletedStatus(6) |
283 saveCompletedStatus(6) |
278 SendStat(siGameResult, loc("Congratulations, you won!")) |
284 SendStat(siGameResult, loc("Congratulations, you won!")) |
279 SendStat(siCustomAchievement, loc("You have successfully eliminated Professor Hogevil.")) |
285 SendStat(siCustomAchievement, loc("You have successfully eliminated Professor Hogevil.")) |
280 SendStat(siCustomAchievement, loc("You have rescued H and Dr. Cornelius.")) |
286 SendStat(siCustomAchievement, loc("You have rescued H and Dr. Cornelius.")) |
281 SendStat(siCustomAchievement, loc("You have acquired the last device part.")) |
287 SendStat(siCustomAchievement, loc("You have acquired the last device part.")) |
282 SendStat(siCustomAchievement, loc("Now go and play the menu mission to complete the campaign.")) |
288 SendStat(siCustomAchievement, loc("Now go and play the menu mission to complete the campaign.")) |
283 sendSimpleTeamRankings({teamA.name, teamC.name}) |
289 sendSimpleTeamRankings({teamA.name, teamB.name, teamC.name}) |
284 EndGame() |
290 EndGame() |
285 end |
291 end |
286 |
292 |
287 -------------- ANIMATIONS ------------------ |
293 -------------- ANIMATIONS ------------------ |
288 |
294 |