151 SendStat(siCustomAchievement, loc("Green areas are portal-proof and repel portals.")) |
157 SendStat(siCustomAchievement, loc("Green areas are portal-proof and repel portals.")) |
152 sendSimpleTeamRankings({teamA.name}) |
158 sendSimpleTeamRankings({teamA.name}) |
153 EndGame() |
159 EndGame() |
154 end |
160 end |
155 |
161 |
|
162 function heroBoomReaction(gear) |
|
163 if GetHealth(gear) and GetHealth(gear) > 0 then |
|
164 HogSay(gear, loc("Kaboom! Hahahaha! Take this, stupid meteorite!"), SAY_SHOUT, 2) |
|
165 end |
|
166 end |
|
167 |
156 function heroWin(gear) |
168 function heroWin(gear) |
|
169 AddAnim(dialog01) |
|
170 end |
|
171 |
|
172 function win() |
|
173 SetWeapon(amNothing) |
|
174 AnimSetInputMask(0) |
157 saveCompletedStatus(7) |
175 saveCompletedStatus(7) |
158 SaveCampaignVar("Won", "true") |
176 SaveCampaignVar("Won", "true") |
159 checkAllMissionsCompleted() |
177 checkAllMissionsCompleted() |
160 SendStat(siGameResult, loc("Congratulations, you have saved Hogera!")) |
178 SendStat(siGameResult, loc("Congratulations, you have saved Hogera!")) |
161 SendStat(siCustomAchievement, loc("Hogera is safe!")) |
179 SendStat(siCustomAchievement, loc("Hogera is safe!")) |
162 sendSimpleTeamRankings({teamA.name}) |
180 sendSimpleTeamRankings({teamA.name}) |
163 EndGame() |
181 EndGame() |
164 end |
182 end |
|
183 |
|
184 ------------ ANIMATION STUFF ------------ |
|
185 |
|
186 function Skipanim(anim) |
|
187 if anim == dialog01 then |
|
188 win() |
|
189 end |
|
190 end |
|
191 |
|
192 function onPrecise() |
|
193 if GameTime > 3000 then |
|
194 SetAnimSkip(true) |
|
195 end |
|
196 end |
|
197 |
|
198 function AnimationSetup() |
|
199 -- DIALOG 01 - Start, welcome to moon |
|
200 AddSkipFunction(dialog01, Skipanim, {dialog01}) |
|
201 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 100}}) |
|
202 table.insert(dialog01, {func = FollowGear, args = {hero.gear}}) |
|
203 table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Hooray! I actually did it! Hogera is safe!"), SAY_SHOUT, 3000}}) |
|
204 table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("I'm so glad this is finally over!"), SAY_SAY, 3000}}) |
|
205 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 4000}}) |
|
206 table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Wait a moment …"), SAY_THINK, 2000}}) |
|
207 table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("If some good old explosives were enough to save Hogera …"), SAY_THINK, 5000}}) |
|
208 table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("… why did I risk my life to collect all the parts of the anti-gravity device?"), SAY_THINK, 6000}}) |
|
209 table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("It was completely useless!"), SAY_THINK, 3000}}) |
|
210 table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("We could just have blown up the meteorite from the the beginning!"), SAY_THINK, 5000}}) |
|
211 -- Hogerian = Inhabitant of the planet Hogera |
|
212 table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Stupid, stupid Hogerians!"), SAY_SAY, 5000}}) |
|
213 table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Or maybe this was all part of an evil plan, so evil that even Prof. Hogevil can't think of it!"), SAY_THINK, 9000}}) |
|
214 table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Nah, probably everyone was just stupid."), SAY_THINK, 4000}}) |
|
215 table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Except me, of course! I just saved a whole planet!"), SAY_THINK, 5000}}) |
|
216 table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("But one thing's for sure:"), SAY_THINK, 4000}}) |
|
217 table.insert(dialog01, {func = AnimSay, args = {hero.gear, loc("Hogera is definitely the last planet I saved!"), SAY_THINK, 4000}}) |
|
218 table.insert(dialog01, {func = win, args = {hero.gear}}) |
|
219 end |
|
220 |