86 Theme = "Fruit" |
86 Theme = "Fruit" |
87 -- Disable Sudden Death |
87 -- Disable Sudden Death |
88 WaterRise = 0 |
88 WaterRise = 0 |
89 HealthDecrease = 0 |
89 HealthDecrease = 0 |
90 |
90 |
91 -- Hog Solo |
91 -- Hero |
92 AddTeam(teamA.name, teamA.color, "Simple", "Island", "Default", "hedgewars") |
92 teamA.name = AddMissionTeam(teamA.color) |
93 hero.gear = AddHog(hero.name, 0, 100, "war_desertgrenadier1") |
93 hero.gear = AddMissionHog(100) |
|
94 hero.name = GetHogName(hero.gear) |
94 AnimSetGearPosition(hero.gear, hero.x, hero.y) |
95 AnimSetGearPosition(hero.gear, hero.x, hero.y) |
95 -- enemies |
96 -- enemies |
96 local hats = { "Bandit", "fr_apple", "fr_banana", "fr_lemon", "fr_orange", |
97 local hats = { "Bandit", "fr_apple", "fr_banana", "fr_lemon", "fr_orange", |
97 "fr_pumpkin", "Gasmask", "NinjaFull", "NinjaStraight", "NinjaTriangle" } |
98 "fr_pumpkin", "Gasmask", "NinjaFull", "NinjaStraight", "NinjaTriangle" } |
98 AddTeam(teamC.name, teamC.color, "bp2", "Island", "Default", "cm_bars") |
99 teamC.name = AddTeam(teamC.name, teamC.color, "bp2", "Island", "Default", "cm_bars") |
99 for i=1,table.getn(enemiesEven) do |
100 for i=1,table.getn(enemiesEven) do |
100 enemiesEven[i].gear = AddHog(enemiesEven[i].name, 1, 100, hats[GetRandom(table.getn(hats))+1]) |
101 enemiesEven[i].gear = AddHog(enemiesEven[i].name, 1, 100, hats[GetRandom(table.getn(hats))+1]) |
101 AnimSetGearPosition(enemiesEven[i].gear, enemiesEven[i].x, enemiesEven[i].y) |
102 AnimSetGearPosition(enemiesEven[i].gear, enemiesEven[i].x, enemiesEven[i].y) |
102 end |
103 end |
103 AddTeam(teamB.name, teamB.color, "bp2", "Island", "Default", "cm_bars") |
104 teamB.name = AddTeam(teamB.name, teamB.color, "bp2", "Island", "Default", "cm_bars") |
104 for i=1,table.getn(enemiesOdd) do |
105 for i=1,table.getn(enemiesOdd) do |
105 enemiesOdd[i].gear = AddHog(enemiesOdd[i].name, 1, 100, hats[GetRandom(table.getn(hats))+1]) |
106 enemiesOdd[i].gear = AddHog(enemiesOdd[i].name, 1, 100, hats[GetRandom(table.getn(hats))+1]) |
106 AnimSetGearPosition(enemiesOdd[i].gear, enemiesOdd[i].x, enemiesOdd[i].y) |
107 AnimSetGearPosition(enemiesOdd[i].gear, enemiesOdd[i].x, enemiesOdd[i].y) |
107 end |
108 end |
108 |
109 |
258 end |
259 end |
259 |
260 |
260 -------------- ACTIONS ------------------ |
261 -------------- ACTIONS ------------------ |
261 |
262 |
262 function heroDeath(gear) |
263 function heroDeath(gear) |
263 SendStat(siGameResult, loc("Hog Solo lost, try again!")) |
264 SendStat(siGameResult, string.format(loc("%s lost, try again!"), hero.name)) |
264 SendStat(siCustomAchievement, loc("You have to eliminate all the enemies.")) |
265 SendStat(siCustomAchievement, loc("You have to eliminate all the enemies.")) |
265 SendStat(siCustomAchievement, loc("Read the challenge objectives from within the mission for more details.")) |
266 SendStat(siCustomAchievement, loc("Read the challenge objectives from within the mission for more details.")) |
266 sendSimpleTeamRankings({teamB.name, teamC.name, teamA.name}) |
267 sendSimpleTeamRankings({teamB.name, teamC.name, teamA.name}) |
267 EndGame() |
268 EndGame() |
268 end |
269 end |