326 end |
326 end |
327 |
327 |
328 function battleWin(gear) |
328 function battleWin(gear) |
329 -- add stats |
329 -- add stats |
330 saveVariables() |
330 saveVariables() |
331 SendStat('siGameResult', loc("Green Bananas won!")) --1 |
331 SendStat(siGameResult, loc("Green Bananas won!")) |
332 SendStat('siCustomAchievement', loc("You have eliminated all the visible enemy hogs!")) --11 |
332 SendStat(siCustomAchievement, loc("You have eliminated all the visible enemy hogs!")) |
333 SendStat('siPlayerKills','1',teamA.name) |
333 SendStat(siPlayerKills,'1',teamA.name) |
334 SendStat('siPlayerKills','1',teamB.name) |
334 SendStat(siPlayerKills,'1',teamB.name) |
335 SendStat('siPlayerKills','0',teamC.name) |
335 SendStat(siPlayerKills,'0',teamC.name) |
336 EndGame() |
336 EndGame() |
337 end |
337 end |
338 |
338 |
339 function escapeWin(gear) |
339 function escapeWin(gear) |
340 -- add stats |
340 -- add stats |
341 saveVariables() |
341 saveVariables() |
342 SendStat('siGameResult', loc("Hog Solo escaped successfully!")) --1 |
342 SendStat(siGameResult, loc("Hog Solo escaped successfully!")) |
343 SendStat('siCustomAchievement', loc("You have reached the flying area successfully!")) --11 |
343 SendStat(siCustomAchievement, loc("You have reached the flying area successfully!")) |
344 SendStat('siPlayerKills','1',teamA.name) |
344 SendStat(siPlayerKills,'1',teamA.name) |
345 SendStat('siPlayerKills','0',teamB.name) |
345 SendStat(siPlayerKills,'0',teamB.name) |
346 SendStat('siPlayerKills','0',teamC.name) |
346 SendStat(siPlayerKills,'0',teamC.name) |
347 EndGame() |
347 EndGame() |
348 end |
348 end |
349 |
349 |
350 function heroSelect(gear) |
350 function heroSelect(gear) |
351 TurnTimeLeft = 0 |
351 TurnTimeLeft = 0 |
431 TurnTimeLeft = TurnTime |
431 TurnTimeLeft = TurnTime |
432 end |
432 end |
433 |
433 |
434 function gameLost() |
434 function gameLost() |
435 if chooseToBattle then |
435 if chooseToBattle then |
436 SendStat('siGameResult', loc("Green Bananas lost, try again!")) --1 |
436 SendStat(siGameResult, loc("Green Bananas lost, try again!")) |
437 SendStat('siCustomAchievement', loc("You have to eliminate all the visible enemies")) --11 |
437 SendStat(siCustomAchievement, loc("You have to eliminate all the visible enemies")) |
438 SendStat('siCustomAchievement', loc("5 additional enemies will be spawned during the game")) --11 |
438 SendStat(siCustomAchievement, loc("5 additional enemies will be spawned during the game")) |
439 SendStat('siCustomAchievement', loc("You are controlling all the active ally units")) --11 |
439 SendStat(siCustomAchievement, loc("You are controlling all the active ally units")) |
440 SendStat('siCustomAchievement', loc("The ally units share their ammo")) --11 |
440 SendStat(siCustomAchievement, loc("The ally units share their ammo")) |
441 SendStat('siCustomAchievement', loc("Try to keep as many allies alive as possible")) --11 |
441 SendStat(siCustomAchievement, loc("Try to keep as many allies alive as possible")) |
442 else |
442 else |
443 SendStat('siGameResult', loc("Hog Solo couldn't escape, try again!")) --1 |
443 SendStat(siGameResult, loc("Hog Solo couldn't escape, try again!")) |
444 SendStat('siCustomAchievement', loc("You have to get to the most left land and remove any enemy hog from there")) --11 |
444 SendStat(siCustomAchievement, loc("You have to get to the most left land and remove any enemy hog from there")) |
445 SendStat('siCustomAchievement', loc("You will play every 3 turns")) --11 |
445 SendStat(siCustomAchievement, loc("You will play every 3 turns")) |
446 SendStat('siCustomAchievement', loc("Green hogs won't intenionally hurt you")) --11 |
446 SendStat(siCustomAchievement, loc("Green hogs won't intenionally hurt you")) |
447 end |
447 end |
448 SendStat('siPlayerKills','1',teamC.name) |
448 SendStat(siPlayerKills,'1',teamC.name) |
449 SendStat('siPlayerKills','0',teamA.name) |
449 SendStat(siPlayerKills,'0',teamA.name) |
450 SendStat('siPlayerKills','0',teamB.name) |
450 SendStat(siPlayerKills,'0',teamB.name) |
451 EndGame() |
451 EndGame() |
452 end |
452 end |
453 |
453 |
454 function getNextWave() |
454 function getNextWave() |
455 if TotalRounds == 4 then |
455 if TotalRounds == 4 then |