30 local dialog01 = {} |
30 local dialog01 = {} |
31 local dialog02 = {} |
31 local dialog02 = {} |
32 local dialog03 = {} |
32 local dialog03 = {} |
33 -- mission objectives |
33 -- mission objectives |
34 local goals = { |
34 local goals = { |
35 [dialog01] = {missionName, loc("Ready for Battle?"), loc("Walk left if you want to join Captain Lime or right if you want to decline his offer."), 1, 4000}, |
35 [dialog01] = {missionName, loc("Ready for Battle?"), loc("Walk left if you want to join Captain Lime or right if you want to decline his offer."), 1, 7000}, |
36 [dialog02] = {missionName, loc("Battle Starts Now!"), loc("You have chosen to fight! Lead the Green Bananas to battle and eliminate all the enemies!"), 1, 4000}, |
36 [dialog02] = {missionName, loc("Battle Starts Now!"), loc("You have chosen to fight! Lead the Green Bananas to battle and eliminate all the enemies!"), 1, 7000}, |
37 [dialog03] = {missionName, loc("Time to run!"), loc("You have chosen to flee ... Unfortunately, the only place where you can launch your saucer is the left-most place on the map."), 1, 4000}, |
37 [dialog03] = {missionName, loc("Time to run!"), loc("You have chosen to flee ... Unfortunately, the only place where you can launch your saucer is the left-most place on the map."), 1, 7000}, |
38 } |
38 } |
39 -- crates |
39 -- crates |
40 local crateWMX = 2170 |
40 local crateWMX = 2170 |
41 local crateWMY = 1950 |
41 local crateWMY = 1950 |
42 local health1X = 2680 |
42 local health1X = 2680 |
371 -------------- ANIMATIONS ------------------ |
371 -------------- ANIMATIONS ------------------ |
372 |
372 |
373 function Skipanim(anim) |
373 function Skipanim(anim) |
374 if goals[anim] ~= nil then |
374 if goals[anim] ~= nil then |
375 ShowMission(unpack(goals[anim])) |
375 ShowMission(unpack(goals[anim])) |
376 end |
376 end |
377 if anim == dialog01 then |
377 if anim == dialog01 then |
378 AnimSwitchHog(hero.gear) |
378 AnimSwitchHog(hero.gear) |
379 elseif anim == dialog02 or anim == dialog03 then |
379 elseif anim == dialog02 or anim == dialog03 then |
380 startBattle() |
380 startBattle() |
381 end |
381 end |
382 end |
382 end |
383 |
383 |
384 function AnimationSetup() |
384 function AnimationSetup() |
385 -- DIALOG 01 - Start, Captain Lime talks explains to Hog Solo |
385 -- DIALOG 01 - Start, Captain Lime talks explains to Hog Solo |
386 AddSkipFunction(dialog01, Skipanim, {dialog01}) |
386 AddSkipFunction(dialog01, Skipanim, {dialog01}) |
394 table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("Under normal circumstances we could easily defeat them but we have kindly sent most of our men to the Kingdom of Sand to help with the annual dusting of the king's palace."), SAY_SAY, 8000}}) |
394 table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("Under normal circumstances we could easily defeat them but we have kindly sent most of our men to the Kingdom of Sand to help with the annual dusting of the king's palace."), SAY_SAY, 8000}}) |
395 table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("However, the army of Yellow Watermelons is about to attack any moment now."), SAY_SAY, 4000}}) |
395 table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("However, the army of Yellow Watermelons is about to attack any moment now."), SAY_SAY, 4000}}) |
396 table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("I would gladly help you if we won this battle but under these circumstances I'll only help you if you fight for our side."), SAY_SAY, 6000}}) |
396 table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("I would gladly help you if we won this battle but under these circumstances I'll only help you if you fight for our side."), SAY_SAY, 6000}}) |
397 table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("What do you say? Will you fight for us?"), SAY_SAY, 3000}}) |
397 table.insert(dialog01, {func = AnimSay, args = {green1.gear, loc("What do you say? Will you fight for us?"), SAY_SAY, 3000}}) |
398 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) |
398 table.insert(dialog01, {func = AnimWait, args = {hero.gear, 500}}) |
399 table.insert(dialog01, {func = ShowMission, args = {missionName, loc("Ready for Battle?"), loc("Walk left if you want to join Captain Lime or right if you want to decline his offer."), 1, 7000}}) |
399 table.insert(dialog01, {func = ShowMission, args = goals[dialog01]}) |
400 table.insert(dialog01, {func = AnimSwitchHog, args = {hero.gear}}) |
400 table.insert(dialog01, {func = AnimSwitchHog, args = {hero.gear}}) |
401 -- DIALOG 02 - Hero selects to fight |
401 -- DIALOG 02 - Hero selects to fight |
402 AddSkipFunction(dialog02, Skipanim, {dialog02}) |
402 AddSkipFunction(dialog02, Skipanim, {dialog02}) |
403 table.insert(dialog02, {func = AnimWait, args = {green1.gear, 3000}}) |
403 table.insert(dialog02, {func = AnimWait, args = {green1.gear, 3000}}) |
404 table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("You choose well, Hog Solo!"), SAY_SAY, 3000}}) |
404 table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("You choose well, Hog Solo!"), SAY_SAY, 3000}}) |
410 table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("The enemies aren't many anyway, it is going to be easy!"), SAY_SAY, 1}}) |
410 table.insert(dialog02, {func = AnimSay, args = {hero.gear, loc("The enemies aren't many anyway, it is going to be easy!"), SAY_SAY, 1}}) |
411 table.insert(dialog02, {func = AnimWait, args = {green1.gear, 9000}}) |
411 table.insert(dialog02, {func = AnimWait, args = {green1.gear, 9000}}) |
412 table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("Don't be foolish, son, there will be more."), SAY_SAY, 2000}}) |
412 table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("Don't be foolish, son, there will be more."), SAY_SAY, 2000}}) |
413 table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("Try to be smart and eliminate them quickly. This way you might scare off the rest!"), SAY_SAY, 5000}}) |
413 table.insert(dialog02, {func = AnimSay, args = {green1.gear, loc("Try to be smart and eliminate them quickly. This way you might scare off the rest!"), SAY_SAY, 5000}}) |
414 table.insert(dialog02, {func = AnimWait, args = {hero.gear, 5000}}) |
414 table.insert(dialog02, {func = AnimWait, args = {hero.gear, 5000}}) |
|
415 table.insert(dialog02, {func = ShowMission, args = goals[dialog02]}) |
415 table.insert(dialog02, {func = startBattle, args = {hero.gear}}) |
416 table.insert(dialog02, {func = startBattle, args = {hero.gear}}) |
416 -- DIALOG 03 - Hero selects to flee |
417 -- DIALOG 03 - Hero selects to flee |
417 AddSkipFunction(dialog03, Skipanim, {dialog03}) |
418 AddSkipFunction(dialog03, Skipanim, {dialog03}) |
418 table.insert(dialog03, {func = AnimWait, args = {green1.gear, 3000}}) |
419 table.insert(dialog03, {func = AnimWait, args = {green1.gear, 3000}}) |
419 table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Too bad! Then you should really leave!"), SAY_SAY, 3000}}) |
420 table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Too bad! Then you should really leave!"), SAY_SAY, 3000}}) |
420 table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Things are going to get messy around here."), SAY_SAY, 3000}}) |
421 table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Things are going to get messy around here."), SAY_SAY, 3000}}) |
421 table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Also, you should know that the only place where you can fly is the left-most part of this area."), SAY_SAY, 5000}}) |
422 table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Also, you should know that the only place where you can fly is the left-most part of this area."), SAY_SAY, 5000}}) |
422 table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("All the other places are protected by our flight-inhibiting weapons."), SAY_SAY, 4000}}) |
423 table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("All the other places are protected by our flight-inhibiting weapons."), SAY_SAY, 4000}}) |
423 table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Now go and don't waste more of my time, you coward!"), SAY_SAY, 4000}}) |
424 table.insert(dialog03, {func = AnimSay, args = {green1.gear, loc("Now go and don't waste more of my time, you coward!"), SAY_SAY, 4000}}) |
424 table.insert(dialog03, {func = AnimWait, args = {hero.gear, 5000}}) |
425 table.insert(dialog03, {func = AnimWait, args = {hero.gear, 5000}}) |
|
426 table.insert(dialog03, {func = ShowMission, args = goals[dialog03]}) |
425 table.insert(dialog03, {func = startBattle, args = {hero.gear}}) |
427 table.insert(dialog03, {func = startBattle, args = {hero.gear}}) |
426 end |
428 end |
427 |
429 |
428 ------------- OTHER FUNCTIONS --------------- |
430 ------------- OTHER FUNCTIONS --------------- |
429 |
431 |