equal
deleted
inserted
replaced
221 SpawnUtilityCrate(girderCrate.x, girderCrate.y, girderCrate.name) |
221 SpawnUtilityCrate(girderCrate.x, girderCrate.y, girderCrate.name) |
222 end |
222 end |
223 if checkPointReached < 5 then |
223 if checkPointReached < 5 then |
224 SpawnAmmoCrate(eagleCrate.x, eagleCrate.y, eagleCrate.name) |
224 SpawnAmmoCrate(eagleCrate.x, eagleCrate.y, eagleCrate.name) |
225 end |
225 end |
226 SpawnAmmoCrate(ropeCrate.x, ropeCrate.y, ropeCrate.name) |
226 SpawnUtilityCrate(ropeCrate.x, ropeCrate.y, ropeCrate.name) |
227 |
227 |
228 if tookPartInBattle then |
228 if tookPartInBattle then |
229 SpawnAmmoCrate(weaponCrate.x, weaponCrate.y, amWatermelon) |
229 SpawnAmmoCrate(weaponCrate.x, weaponCrate.y, amWatermelon) |
230 else |
230 else |
231 SpawnAmmoCrate(weaponCrate.x, weaponCrate.y, amSniperRifle) |
231 SpawnAmmoCrate(weaponCrate.x, weaponCrate.y, amSniperRifle) |
234 SendHealthStatsOff() |
234 SendHealthStatsOff() |
235 end |
235 end |
236 |
236 |
237 function onNewTurn() |
237 function onNewTurn() |
238 if not inBattle and CurrentHedgehog == green1.gear then |
238 if not inBattle and CurrentHedgehog == green1.gear then |
239 TurnTimeLeft = 0 |
239 EndTurn(true) |
240 elseif CurrentHedgehog == green2.gear or CurrentHedgehog == green3.gear then |
240 elseif CurrentHedgehog == green2.gear or CurrentHedgehog == green3.gear then |
241 TurnTimeLeft = 0 |
241 EndTurn(true) |
242 elseif inBattle then |
242 elseif inBattle then |
243 if CurrentHedgehog == green1.gear and previousHog ~= hero.gear then |
243 if CurrentHedgehog == green1.gear and previousHog ~= hero.gear then |
244 TurnTimeLeft = 0 |
244 EndTurn(true) |
245 return |
245 return |
246 end |
246 end |
247 for i=1,table.getn(redHedgehogs) do |
247 for i=1,table.getn(redHedgehogs) do |
248 if CurrentHedgehog == redHedgehogs[i].gear and previousHog ~= hero.gear then |
248 if CurrentHedgehog == redHedgehogs[i].gear and previousHog ~= hero.gear then |
249 TurnTimeLeft = 0 |
249 EndTurn(true) |
250 return |
250 return |
251 end |
251 end |
252 end |
252 end |
253 TurnTimeLeft = 20000 |
253 TurnTimeLeft = 20000 |
254 wind() |
254 wind() |
255 elseif not inBattle and CurrentHedgehog == hero.gear then |
255 elseif not inBattle and CurrentHedgehog == hero.gear then |
256 TurnTimeLeft = -1 |
256 TurnTimeLeft = -1 |
257 wind() |
257 wind() |
258 else |
258 else |
259 TurnTimeLeft = 0 |
259 EndTurn(true) |
260 end |
260 end |
261 previousHog = CurrentHedgehog |
261 previousHog = CurrentHedgehog |
262 end |
262 end |
263 |
263 |
264 function onGameTick() |
264 function onGameTick() |
416 ended = true |
416 ended = true |
417 end |
417 end |
418 end |
418 end |
419 |
419 |
420 function deviceCrates(gear) |
420 function deviceCrates(gear) |
421 TurnTimeLeft = 0 |
421 EndTurn(true) |
422 if not tookPartInBattle then |
422 if not tookPartInBattle then |
423 AddAnim(dialog03) |
423 AddAnim(dialog03) |
424 else |
424 else |
425 for i=1,table.getn(redHedgehogs) do |
425 for i=1,table.getn(redHedgehogs) do |
426 RestoreHog(redHedgehogs[i].gear) |
426 RestoreHog(redHedgehogs[i].gear) |
497 |
497 |
498 function Skipanim(anim) |
498 function Skipanim(anim) |
499 if goals[anim] ~= nil then |
499 if goals[anim] ~= nil then |
500 ShowMission(unpack(goals[anim])) |
500 ShowMission(unpack(goals[anim])) |
501 end |
501 end |
502 TurnTimeLeft = 0 |
502 EndTurn(true) |
503 end |
503 end |
504 |
504 |
505 function AnimationSetup() |
505 function AnimationSetup() |
506 -- DIALOG 01 - Start, Captain Lime helps Hog Solo because he took part in the battle |
506 -- DIALOG 01 - Start, Captain Lime helps Hog Solo because he took part in the battle |
507 AddSkipFunction(dialog01, Skipanim, {dialog01}) |
507 AddSkipFunction(dialog01, Skipanim, {dialog01}) |
547 end |
547 end |
548 |
548 |
549 ------------- OTHER FUNCTIONS --------------- |
549 ------------- OTHER FUNCTIONS --------------- |
550 |
550 |
551 function goToThesurface() |
551 function goToThesurface() |
552 TurnTimeLeft = 0 |
552 EndTurn(true) |
553 end |
553 end |
554 |
554 |
555 function wind() |
555 function wind() |
556 SetWind(GetRandom(201)-100) |
556 SetWind(GetRandom(201)-100) |
557 end |
557 end |