equal
deleted
inserted
replaced
1 |
1 |
2 HedgewarsScriptLoad("/Scripts/Locale.lua") |
2 HedgewarsScriptLoad("/Scripts/Locale.lua") |
3 HedgewarsScriptLoad("/Scripts/Achievements.lua") |
3 HedgewarsScriptLoad("/Scripts/Achievements.lua") |
4 |
4 |
|
5 local playerTeamName |
5 local player = nil |
6 local player = nil |
6 local enemy = nil |
7 local enemy = nil |
7 local firedShell = false |
8 local firedShell = false |
8 local turnNumber = 0 |
9 local turnNumber = 0 |
9 |
10 |
22 -- Disable Sudden Death |
23 -- Disable Sudden Death |
23 HealthDecrease = 0 |
24 HealthDecrease = 0 |
24 WaterRise = 0 |
25 WaterRise = 0 |
25 GameFlags = gfDisableWind |
26 GameFlags = gfDisableWind |
26 |
27 |
27 AddMissionTeam(-1) |
28 playerTeamName = AddMissionTeam(-1) |
28 player = AddMissionHog(10) |
29 player = AddMissionHog(10) |
29 |
30 |
30 AddTeam(loc("Cybernetic Empire"), -6, "ring", "Island", "Robot_qau", "cm_cyborg") |
31 AddTeam(loc("Cybernetic Empire"), -6, "ring", "Island", "Robot_qau", "cm_cyborg") |
31 enemy = AddHog(loc("Unit 835"), 1, 10, "cyborg1") |
32 enemy = AddHog(loc("Unit 835"), 1, 10, "cyborg1") |
32 |
33 |
75 |
76 |
76 end |
77 end |
77 |
78 |
78 function onGameResult(winner) |
79 function onGameResult(winner) |
79 |
80 |
80 if (winner == 0) then |
81 if (winner == GetTeamClan(playerTeamName)) then |
81 |
82 |
82 SaveMissionVar("Won", "true") |
83 SaveMissionVar("Won", "true") |
83 ShowMission(loc("Bamboo Thicket"), loc("MISSION SUCCESSFUL"), loc("Congratulations!"), 0, 0) |
84 SendStat(siGameResult, loc("Mission succeeded!")) |
84 |
85 |
85 if (turnNumber < 6) and (firedShell == false) then |
86 if (turnNumber < 6) and (firedShell == false) then |
86 awardAchievement(loc("Energetic Engineer")) |
87 awardAchievement(loc("Energetic Engineer")) |
87 end |
88 end |
88 |
89 |
89 else |
90 else |
90 ShowMission(loc("Bamboo Thicket"), loc("MISSION FAILED"), loc("Oh no! Just try again!"), -amSkip, 0) |
91 SendStat(siGameResult, loc("Mission failed!")) |
91 end |
92 end |
92 |
93 |
93 end |
94 end |