8 |
8 |
9 ----------------- VARIABLES -------------------- |
9 ----------------- VARIABLES -------------------- |
10 -- globals |
10 -- globals |
11 local campaignName = loc("A Space Adventure") |
11 local campaignName = loc("A Space Adventure") |
12 local missionName = loc("Desert planet, Journey down below!") |
12 local missionName = loc("Desert planet, Journey down below!") |
|
13 local turnCounter = 0 |
|
14 local startChallenge = false |
13 -- dialogs |
15 -- dialogs |
14 local dialog01 = {} |
16 local dialog01 = {} |
15 -- mission objectives |
17 -- mission objectives |
16 local goals = { |
18 local goals = { |
17 [dialog01] = {missionName, loc("Getting ready"), loc("Use the rope and get asap to the surface!"), 1, 4500}, |
19 [dialog01] = {missionName, loc("Getting ready"), loc("Use the rope and get asap to the surface!"), 1, 4500}, |
123 end |
125 end |
124 return false |
126 return false |
125 end |
127 end |
126 |
128 |
127 function onHeroSafe(gear) |
129 function onHeroSafe(gear) |
128 if not hero.dead and GetY(hero.gear) < 200 and StoppedGear(hero.gear) then |
130 if not hero.dead and GetY(hero.gear) < 170 and StoppedGear(hero.gear) then |
129 return true |
131 return true |
130 end |
132 end |
131 return false |
133 return false |
132 end |
134 end |
133 |
135 |
134 -------------- OUTCOMES ------------------ |
136 -------------- OUTCOMES ------------------ |
135 |
137 |
136 function heroDeath(gear) |
138 function heroDeath(gear) |
137 -- hero lost stuff |
139 SendStat('siGameResult', loc("Hog Solo lost, try again!")) --1 |
|
140 SendStat('siCustomAchievement', loc("To win the game you have to go to the surface")) --11 |
|
141 SendStat('siCustomAchievement', loc("Most mines are not active")) --11 |
|
142 SendStat('siCustomAchievement', loc("From the second turn and beyond the water rises")) --11 |
|
143 SendStat('siPlayerKills','0',teamA.name) |
138 EndGame() |
144 EndGame() |
139 end |
145 end |
140 |
146 |
141 function heroSafe(gear) |
147 function heroSafe(gear) |
142 -- hero win stuff |
148 SendStat('siGameResult', loc("Congratulations, you escaped!")) --1 |
|
149 SendStat('siCustomAchievement', loc("You have escaped successfully")) --11 |
|
150 SendStat('siCustomAchievement', loc("Your escape took you "..turnCounter.." turns")) --11 |
|
151 SendStat('siPlayerKills','1',teamA.name) |
143 EndGame() |
152 EndGame() |
144 end |
153 end |
145 |
154 |
146 -------------- ANIMATIONS ------------------ |
155 -------------- ANIMATIONS ------------------ |
147 |
156 |
148 function Skipanim(anim) |
157 function Skipanim(anim) |
149 if goals[anim] ~= nil then |
158 if goals[anim] ~= nil then |
150 ShowMission(unpack(goals[anim])) |
159 ShowMission(unpack(goals[anim])) |
151 end |
160 end |
152 TurnTimeLeft = 0 |
161 challengeStart() |
153 end |
162 end |
154 |
163 |
155 function AnimationSetup() |
164 function AnimationSetup() |
156 -- DIALOG 01 - Start |
165 -- DIALOG 01 - Start |
157 AddSkipFunction(dialog01, Skipanim, {dialog01}) |
166 AddSkipFunction(dialog01, Skipanim, {dialog01}) |