310 SpawnAmmoCrate(950, 674, amDynamite) |
310 SpawnAmmoCrate(950, 674, amDynamite) |
311 SpawnUtilityCrate(994, 825, amRope) |
311 SpawnUtilityCrate(994, 825, amRope) |
312 SpawnUtilityCrate(570, 1357, amLowGravity) |
312 SpawnUtilityCrate(570, 1357, amLowGravity) |
313 end |
313 end |
314 |
314 |
|
315 local trackedGears = {} |
|
316 |
|
317 -- Remove mines and crates for the princess cage scene. |
|
318 -- Some annoying gears might get in the way for this scene, like a dropped |
|
319 -- mine, or the crate on the leaf. |
|
320 function ClearTrashForPrincessCage() |
|
321 for gear, _ in pairs(trackedGears) do |
|
322 if GetY(gear) > 1600 and GetX(gear) > 1800 and GetX(gear) < 2700 then |
|
323 DeleteGear(gear) |
|
324 end |
|
325 end |
|
326 end |
|
327 |
|
328 -- Dump mines in princess cage |
315 function DumpMines() |
329 function DumpMines() |
316 AddGear(2261, 1835, gtMine, 0, 0, 0, 0) |
330 AddGear(2261, 1835, gtMine, 0, 0, 0, 0) |
317 AddGear(2280, 1831, gtMine, 0, 0, 0, 0) |
331 AddGear(2280, 1831, gtMine, 0, 0, 0, 0) |
318 AddGear(2272, 1809, gtMine, 0, 0, 0, 0) |
332 AddGear(2272, 1809, gtMine, 0, 0, 0, 0) |
319 AddGear(2290, 1815, gtMine, 0, 0, 0, 0) |
333 AddGear(2290, 1815, gtMine, 0, 0, 0, 0) |
399 table.insert(midAnimAD, {func = AnimTeleportGear, args = {leaks, 2656, 1842}}) |
413 table.insert(midAnimAD, {func = AnimTeleportGear, args = {leaks, 2656, 1842}}) |
400 table.insert(midAnimAD, {func = AnimCustomFunction, args = {cyborg, HideCyborg, {}}, swh = false}) |
414 table.insert(midAnimAD, {func = AnimCustomFunction, args = {cyborg, HideCyborg, {}}, swh = false}) |
401 table.insert(midAnimAD, {func = AnimSay, args = {leaks, loc("Hey! This is cheating!"), SAY_SHOUT, 4000}}) |
415 table.insert(midAnimAD, {func = AnimSay, args = {leaks, loc("Hey! This is cheating!"), SAY_SHOUT, 4000}}) |
402 AddSkipFunction(midAnimAD, SkipMidAnimAlone, {}) |
416 AddSkipFunction(midAnimAD, SkipMidAnimAlone, {}) |
403 |
417 |
|
418 table.insert(failAnimAD, {func = AnimCustomFunction, args = {cyborg, ClearTrashForPrincessCage, {}}}) |
404 table.insert(failAnimAD, {func = AnimCustomFunction, swh = false, args = {leaks, RestoreCyborg, {2299, 1687, 2294, 1841}}}) |
419 table.insert(failAnimAD, {func = AnimCustomFunction, swh = false, args = {leaks, RestoreCyborg, {2299, 1687, 2294, 1841}}}) |
405 table.insert(failAnimAD, {func = AnimTeleportGear, args = {leaks, 2090, 1841}}) |
420 table.insert(failAnimAD, {func = AnimTeleportGear, args = {leaks, 2090, 1841}}) |
406 table.insert(failAnimAD, {func = AnimCustomFunction, swh = false, args = {cyborg, SetupKillRoom, {}}}) |
421 table.insert(failAnimAD, {func = AnimCustomFunction, swh = false, args = {cyborg, SetupKillRoom, {}}}) |
407 table.insert(failAnimAD, {func = AnimTurn, swh = false, args = {cyborg, "Left"}}) |
422 table.insert(failAnimAD, {func = AnimTurn, swh = false, args = {cyborg, "Left"}}) |
408 table.insert(failAnimAD, {func = AnimTurn, swh = false, args = {princess, "Left"}}) |
423 table.insert(failAnimAD, {func = AnimTurn, swh = false, args = {princess, "Left"}}) |
412 table.insert(failAnimAD, {func = AnimSay, args = {cyborg, loc("It's time you learned that your actions have consequences!"), SAY_SAY, 7000}}) |
427 table.insert(failAnimAD, {func = AnimSay, args = {cyborg, loc("It's time you learned that your actions have consequences!"), SAY_SAY, 7000}}) |
413 table.insert(failAnimAD, {func = AnimSay, args = {princess, loc("No! Please, help me!"), SAY_SAY, 4000}}) |
428 table.insert(failAnimAD, {func = AnimSay, args = {princess, loc("No! Please, help me!"), SAY_SAY, 4000}}) |
414 table.insert(failAnimAD, {func = AnimSwitchHog, args = {cyborg}}) |
429 table.insert(failAnimAD, {func = AnimSwitchHog, args = {cyborg}}) |
415 table.insert(failAnimAD, {func = AnimCustomFunction, args = {cyborg, DumpMines, {}}}) |
430 table.insert(failAnimAD, {func = AnimCustomFunction, args = {cyborg, DumpMines, {}}}) |
416 table.insert(failAnimAD, {func = AnimCustomFunction, args = {cyborg, KillPrincess, {}}}) |
431 table.insert(failAnimAD, {func = AnimCustomFunction, args = {cyborg, KillPrincess, {}}}) |
417 table.insert(failAnimAD, {func = AnimWait, args = {cyborg, 12000}}) |
432 table.insert(failAnimAD, {func = AnimWait, args = {cyborg, 500}}) |
418 table.insert(failAnimAD, {func = AnimSay, args = {leaks, loc("No! What have I done?! What have YOU done?!"), SAY_SHOUT, 6000}}) |
433 table.insert(failAnimAD, {func = AnimSay, args = {leaks, loc("No! What have I done?! What have YOU done?!"), SAY_SHOUT, 3000}}) |
|
434 table.insert(failAnimAD, {func = AnimSwitchHog, args = {princess}}) |
419 |
435 |
420 table.insert(endAnimAD, {func = AnimCustomFunction, swh = false, args = {leaks, RestoreCyborg, {437, 1700, 519, 1722}}}) |
436 table.insert(endAnimAD, {func = AnimCustomFunction, swh = false, args = {leaks, RestoreCyborg, {437, 1700, 519, 1722}}}) |
421 table.insert(endAnimAD, {func = AnimTurn, swh = false, args = {cyborg, "Right"}}) |
437 table.insert(endAnimAD, {func = AnimTurn, swh = false, args = {cyborg, "Right"}}) |
422 table.insert(endAnimAD, {func = AnimTurn, swh = false, args = {princess, "Right"}}) |
438 table.insert(endAnimAD, {func = AnimTurn, swh = false, args = {princess, "Right"}}) |
423 table.insert(endAnimAD, {func = AnimSay, args = {princess, loc("Help me, Leaks!"), SAY_SHOUT, 3000}}) |
439 table.insert(endAnimAD, {func = AnimSay, args = {princess, loc("Help me, Leaks!"), SAY_SHOUT, 3000}}) |