equal
deleted
inserted
replaced
1 |
1 |
2 HedgewarsScriptLoad("/Scripts/Locale.lua") |
2 HedgewarsScriptLoad("/Scripts/Locale.lua") |
3 |
3 |
|
4 local playerTeamName |
4 local player = nil -- This variable will point to the hog's gear |
5 local player = nil -- This variable will point to the hog's gear |
5 local enemy = nil |
6 local enemy = nil |
6 |
7 |
7 local GameOver = false |
8 local GameOver = false |
8 |
9 |
24 |
25 |
25 -- Disable Sudden Death |
26 -- Disable Sudden Death |
26 HealthDecrease = 0 |
27 HealthDecrease = 0 |
27 WaterRise = 0 |
28 WaterRise = 0 |
28 |
29 |
29 AddMissionTeam(-1) |
30 playerTeamName = AddMissionTeam(-1) |
30 player = AddMissionHog(1) |
31 player = AddMissionHog(1) |
31 |
32 |
32 AddTeam(loc("Toxic Team"), -6, "skull", "Island", "Default_qau", "cm_magicskull") |
33 AddTeam(loc("Toxic Team"), -6, "skull", "Island", "Default_qau", "cm_magicskull") |
33 enemy = AddHog(loc("Poison"), 1, 100, "Skull") |
34 enemy = AddHog(loc("Poison"), 1, 100, "Skull") |
34 |
35 |
94 |
95 |
95 end |
96 end |
96 |
97 |
97 function onGameResult(winner) |
98 function onGameResult(winner) |
98 |
99 |
99 if winner == 0 then |
100 if winner == GetTeamClan(playerTeamName) then |
100 ShowMission(loc("Diver"), loc("MISSION SUCCESSFUL"), loc("Congratulations!"), 0, 0) |
101 SendStat(siGameResult, loc("Mission succeeded!")) |
101 SaveMissionVar("Won", "true") |
102 SaveMissionVar("Won", "true") |
102 GameOver = true |
103 GameOver = true |
103 else |
104 else |
104 ShowMission(loc("Diver"), loc("MISSION FAILED"), loc("Oh no! Just try again!"), -amSkip, 0) |
105 SendStat(siGameResult, loc("Mission failed!")) |
105 GameOver = true |
106 GameOver = true |
106 end |
107 end |
107 |
108 |
108 end |
109 end |