share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/first_blood.lua
changeset 12544 77b05be26a6e
parent 12466 72c17eabc497
child 12545 9c3ff4ffd4f3
equal deleted inserted replaced
12543:9fda510f0bc4 12544:77b05be26a6e
    61 princessFace = "Left"
    61 princessFace = "Left"
    62 elderFace = "Left"
    62 elderFace = "Left"
    63 
    63 
    64 goals = {
    64 goals = {
    65   [startDialogue] = {loc("First Blood"), loc("First Steps"), loc("Press [Left] or [Right] to move around, [Enter] to jump"), 1, 4000},
    65   [startDialogue] = {loc("First Blood"), loc("First Steps"), loc("Press [Left] or [Right] to move around, [Enter] to jump"), 1, 4000},
    66   [onShroomAnim] = {loc("First Blood"), loc("A leap in a leap"), loc("Go on top of the flower"), 1, 4000},
    66   [onShroomAnim] = {loc("First Blood"), loc("A leap in a leap"), loc("Go on top of the flower") .. "|" .. loc("Hint: Press [Esc] to review the mission texts."), 1, 7000},
    67   [onFlowerAnim] = {loc("First Blood"), loc("Hightime"), loc("Collect the crate on the right.|Hint: Select the rope, [Up] or [Down] to aim, [Space] to fire, directional keys to move.|Ropes can be fired again in the air!"), 1, 7000},
    67   [onFlowerAnim] = {loc("First Blood"), loc("Hightime"), loc("Collect the crate on the right.|Hint: Select the rope, [Up] or [Down] to aim, [Space] to fire, directional keys to move.|Ropes can be fired again in the air!"), 1, 7000},
    68   [tookParaAnim] = {loc("First Blood"), loc("Omnivore"), loc("Get on the head of the mole"), 1, 4000},
    68   [tookParaAnim] = {loc("First Blood"), loc("Omnivore"), loc("Get on the head of the mole"), 1, 4000},
    69   [onMoleHeadAnim] = {loc("First Blood"), loc("The Leap of Faith"), loc("Use the parachute ([Space] while in air) to get the next crate"), 1, 4000},
    69   [onMoleHeadAnim] = {loc("First Blood"), loc("The Leap of Faith"), loc("Use the parachute ([Space] while in air) to get the next crate"), 1, 4000},
    70   [tookRope2Anim] = {loc("First Blood"), loc("The Rising"), loc("Do the deed"), 1, 4000},
    70   [tookRope2Anim] = {loc("First Blood"), loc("The Rising"), loc("Get that crate!"), 1, 4000},
    71   [tookPunchAnim] = {loc("First Blood"), loc("The Slaughter"), loc("Destroy the targets!|Hint: Select the Shoryuken and hit [Space]|P.S. You can use it mid-air."), 1, 5000},
    71   [tookPunchAnim] = {loc("First Blood"), loc("The Slaughter"), loc("Destroy the targets!|Hint: Select the Shoryuken and hit [Space]|P.S. You can use it mid-air."), 1, 5000},
    72   [challengeAnim] = {loc("First Blood"), loc("The Crate Frenzy"), loc("Collect the crates within the time limit!|If you fail, you'll have to try again."), 1, 5000},
    72   [challengeAnim] = {loc("First Blood"), loc("The Crate Frenzy"), loc("Collect the crates within the time limit!|If you fail, you'll have to try again."), 1, 5000},
    73   [challengeFailedAnim] = {loc("First Blood"), loc("The Crate Frenzy"), loc("Collect the crates within the time limit!|If you fail, you'll have to try again."), 1, 5000},
    73   [challengeFailedAnim] = {loc("First Blood"), loc("The Crate Frenzy"), loc("Collect the crates within the time limit!|If you fail, you'll have to try again."), 1, 5000},
    74   [challengeCompletedAnim] = {loc("First Blood"), loc("The Ultimate Weapon"), loc("Destroy the targets!|Hint: [Up], [Down] to aim, [Space] to shoot"), 1, 5000},
    74   [challengeCompletedAnim] = {loc("First Blood"), loc("The Ultimate Weapon"), loc("Get that crate!"), 1, 5000},
    75   [beforeKillAnim] = {loc("First Blood"), loc("The First Blood"), loc("Kill the cannibal!"), 1, 5000},
    75   [beforeKillAnim] = {loc("First Blood"), loc("The First Blood"), loc("Kill the cannibal!"), 1, 5000},
    76   [closeCannim] = {loc("First Blood"), loc("The First Blood"), loc("KILL IT!"), 1, 5000}
    76   [closeCannim] = {loc("First Blood"), loc("The First Blood"), loc("KILL IT!"), 1, 5000}
    77 }
    77 }
    78 -----------------------------Animations--------------------------------
    78 -----------------------------Animations--------------------------------
    79 function Skipanim(anim)
    79 function Skipanim(anim)
   109 
   109 
   110   AddSkipFunction(elderDamagedAnim, SkipDamageAnim, {elderDamagedAnim})
   110   AddSkipFunction(elderDamagedAnim, SkipDamageAnim, {elderDamagedAnim})
   111   table.insert(elderDamagedAnim, {func = AnimWait, args = {elderh, 500}, skipFunc = Skipanim, skipArgs = elderDamagedAnim})
   111   table.insert(elderDamagedAnim, {func = AnimWait, args = {elderh, 500}, skipFunc = Skipanim, skipArgs = elderDamagedAnim})
   112   table.insert(elderDamagedAnim, {func = AnimSay, args = {elderh, loc("Violence is not the answer to your problems!"), SAY_SAY, 3000}})
   112   table.insert(elderDamagedAnim, {func = AnimSay, args = {elderh, loc("Violence is not the answer to your problems!"), SAY_SAY, 3000}})
   113   table.insert(elderDamagedAnim, {func = AnimGearWait, args = {youngh, 500}})
   113   table.insert(elderDamagedAnim, {func = AnimGearWait, args = {youngh, 500}})
   114   
   114 
   115   AddSkipFunction(startDialogue, Skipanim, {startDialogue})
   115   AddSkipFunction(startDialogue, Skipanim, {startDialogue})
   116   table.insert(startDialogue, {func = AnimWait, args = {youngh, 3500}, skipFunc = Skipanim, skipArgs = startDialogue})
   116   table.insert(startDialogue, {func = AnimWait, args = {youngh, 3500}, skipFunc = Skipanim, skipArgs = startDialogue})
   117   table.insert(startDialogue, {func = AnimCaption, args = {youngh, loc("Once upon a time, on an island with great natural resources, lived two tribes in heated conflict..."),  5000}})
   117   table.insert(startDialogue, {func = AnimCaption, args = {youngh, loc("Once upon a time, on an island with great natural resources, lived two tribes in heated conflict..."),  5000}})
   118   table.insert(startDialogue, {func = AnimCaption, args = {youngh, loc("One tribe was peaceful, spending their time hunting and training, enjoying the small pleasures of life..."), 5000}})
   118   table.insert(startDialogue, {func = AnimCaption, args = {youngh, loc("One tribe was peaceful, spending their time hunting and training, enjoying the small pleasures of life..."), 5000}})
   119   table.insert(startDialogue, {func = AnimCaption, args = {youngh, loc("The other one were all cannibals, spending their time eating the organs of fellow hedgehogs..."), 5000}})
   119   table.insert(startDialogue, {func = AnimCaption, args = {youngh, loc("The other one were all cannibals, spending their time eating the organs of fellow hedgehogs..."), 5000}})
   122   table.insert(startDialogue, {func = AnimSay, args = {elderh, loc("Come closer, so that your training may continue!"), SAY_SHOUT, 6000}})
   122   table.insert(startDialogue, {func = AnimSay, args = {elderh, loc("Come closer, so that your training may continue!"), SAY_SHOUT, 6000}})
   123   table.insert(startDialogue, {func = AnimSay, args = {youngh, loc("This is it! It's time to make Fell From Heaven fall for me..."), SAY_THINK, 6000}})
   123   table.insert(startDialogue, {func = AnimSay, args = {youngh, loc("This is it! It's time to make Fell From Heaven fall for me..."), SAY_THINK, 6000}})
   124   table.insert(startDialogue, {func = AnimJump, args = {youngh, "long"}})
   124   table.insert(startDialogue, {func = AnimJump, args = {youngh, "long"}})
   125   table.insert(startDialogue, {func = AnimTurn, args = {princess, "Right"}})
   125   table.insert(startDialogue, {func = AnimTurn, args = {princess, "Right"}})
   126   table.insert(startDialogue, {func = AnimSwitchHog, args = {youngh}})
   126   table.insert(startDialogue, {func = AnimSwitchHog, args = {youngh}})
   127   table.insert(startDialogue, {func = AnimShowMission, args = {youngh, loc("First Blood"), loc("First Steps"), loc("Press [Left] or [Right] to move around, [Enter] to jump"), 1, 4000}}) 
   127   table.insert(startDialogue, {func = AnimShowMission, args = {youngh, loc("First Blood"), loc("First Steps"), loc("Press [Left] or [Right] to move around, [Enter] to jump"), 1, 4000}})
   128 
   128 
   129   AddSkipFunction(onShroomAnim, SkipOnShroom, {onShroomAnim})
   129   AddSkipFunction(onShroomAnim, SkipOnShroom, {onShroomAnim})
   130   table.insert(onShroomAnim, {func = AnimSay, args = {elderh, loc("I can see you have been training diligently."), SAY_SAY, 4000}, skipFunc = Skipanim, skipArgs = onShroomAnim})
   130   table.insert(onShroomAnim, {func = AnimSay, args = {elderh, loc("I can see you have been training diligently."), SAY_SAY, 4000}, skipFunc = Skipanim, skipArgs = onShroomAnim})
   131   table.insert(onShroomAnim, {func = AnimSay, args = {elderh, loc("The wind whispers that you are ready to become familiar with tools, now..."), SAY_SAY, 4000}})
   131   table.insert(onShroomAnim, {func = AnimSay, args = {elderh, loc("The wind whispers that you are ready to become familiar with tools, now..."), SAY_SAY, 4000}})
   132   table.insert(onShroomAnim, {func = AnimSay, args = {elderh, loc("Open that crate and we will continue!"), SAY_SAY, 5000}})
   132   table.insert(onShroomAnim, {func = AnimSay, args = {elderh, loc("Open that crate and we will continue!"), SAY_SAY, 5000}})
   133   table.insert(onShroomAnim, {func = AnimMove, args = {elderh, "Right", 2700, 0}})
   133   table.insert(onShroomAnim, {func = AnimMove, args = {elderh, "Right", 2700, 0}})
   134   table.insert(onShroomAnim, {func = AnimTurn, args = {elderh, "Left"}})
   134   table.insert(onShroomAnim, {func = AnimTurn, args = {elderh, "Left"}})
   135   table.insert(onShroomAnim, {func = AnimSay, args = {princess, loc("He moves like an eagle in the sky."), SAY_THINK, 4000}})
   135   table.insert(onShroomAnim, {func = AnimSay, args = {princess, loc("He moves like an eagle in the sky."), SAY_THINK, 4000}})
   136   table.insert(onShroomAnim, {func = AnimSwitchHog, args = {youngh}})
   136   table.insert(onShroomAnim, {func = AnimSwitchHog, args = {youngh}})
   137   table.insert(onShroomAnim, {func = AnimShowMission, args = {youngh, loc("First Blood"), loc("A leap in a leap"), loc("Go on top of the flower"), 1, 4000}}) 
   137   table.insert(onShroomAnim, {func = AnimShowMission, args = {youngh, loc("First Blood"), loc("A leap in a leap"), loc("Go on top of the flower") .. "|" .. loc("Hint: Press [Esc] to review the mission texts."), 1, 7000}})
   138 
   138 
   139   AddSkipFunction(onFlowerAnim, Skipanim, {onFlowerAnim})
   139   AddSkipFunction(onFlowerAnim, Skipanim, {onFlowerAnim})
   140   table.insert(onFlowerAnim, {func = AnimSay, args = {elderh, loc("See that crate farther on the right?"), SAY_SAY, 4000}})
   140   table.insert(onFlowerAnim, {func = AnimSay, args = {elderh, loc("See that crate farther on the right?"), SAY_SAY, 4000}})
   141   table.insert(onFlowerAnim, {func = AnimSay, args = {elderh, loc("Swing, Leaks A Lot, on the wings of the wind!"), SAY_SAY, 6000}})
   141   table.insert(onFlowerAnim, {func = AnimSay, args = {elderh, loc("Swing, Leaks A Lot, on the wings of the wind!"), SAY_SAY, 6000}})
   142   table.insert(onFlowerAnim, {func = AnimSay, args = {princess, loc("His arms are so strong!"), SAY_THINK, 4000}})
   142   table.insert(onFlowerAnim, {func = AnimSay, args = {princess, loc("His arms are so strong!"), SAY_THINK, 4000}})
   143   table.insert(onFlowerAnim, {func = AnimSwitchHog, args = {youngh}})
   143   table.insert(onFlowerAnim, {func = AnimSwitchHog, args = {youngh}})
   144   table.insert(onFlowerAnim, {func = AnimShowMission, args = {youngh, loc("First Blood"), loc("Hightime"), loc("Collect the crate on the right.|Hint: Select the rope, [Up] or [Down] to aim, [Space] to fire, directional keys to move.|Ropes can be fired again in the air!"), 1, 7000}}) 
   144   table.insert(onFlowerAnim, {func = AnimShowMission, args = {youngh, loc("First Blood"), loc("Hightime"), loc("Collect the crate on the right.|Hint: Select the rope, [Up] or [Down] to aim, [Space] to fire, directional keys to move.|Ropes can be fired again in the air!"), 1, 7000}})
   145   
   145 
   146   AddSkipFunction(tookParaAnim, Skipanim, {tookParaAnim})
   146   AddSkipFunction(tookParaAnim, Skipanim, {tookParaAnim})
   147   table.insert(tookParaAnim, {func = AnimGearWait, args = {youngh, 1000}, skipFunc = Skipanim, skipArgs = tookParaAnim})
   147   table.insert(tookParaAnim, {func = AnimGearWait, args = {youngh, 1000}, skipFunc = Skipanim, skipArgs = tookParaAnim})
   148   table.insert(tookParaAnim, {func = AnimSay, args = {elderh, loc("Use the rope to get on the head of the mole, young one!"), SAY_SHOUT, 4000}})
   148   table.insert(tookParaAnim, {func = AnimSay, args = {elderh, loc("Use the rope to get on the head of the mole, young one!"), SAY_SHOUT, 4000}})
   149   table.insert(tookParaAnim, {func = AnimSay, args = {elderh, loc("Worry not, for it is a peaceful animal! There is no reason to be afraid..."), SAY_SHOUT, 5000}})
   149   table.insert(tookParaAnim, {func = AnimSay, args = {elderh, loc("Worry not, for it is a peaceful animal! There is no reason to be afraid..."), SAY_SHOUT, 5000}})
   150   table.insert(tookParaAnim, {func = AnimSay, args = {elderh, loc("We all know what happens when you get frightened..."), SAY_SAY, 4000}})
   150   table.insert(tookParaAnim, {func = AnimSay, args = {elderh, loc("We all know what happens when you get frightened..."), SAY_SAY, 4000}})
   151   table.insert(tookParaAnim, {func = AnimSay, args = {youngh, loc("So humiliating..."), SAY_SAY, 4000}})
   151   table.insert(tookParaAnim, {func = AnimSay, args = {youngh, loc("So humiliating..."), SAY_SAY, 4000}})
   152   table.insert(tookParaAnim, {func = AnimShowMission, args = {youngh, loc("First Blood"), loc("Omnivore"), loc("Get on the head of the mole"), 1, 4000}}) 
   152   table.insert(tookParaAnim, {func = AnimShowMission, args = {youngh, loc("First Blood"), loc("Omnivore"), loc("Get on the head of the mole"), 1, 4000}})
   153   table.insert(tookParaAnim, {func = AnimSwitchHog, args = {youngh}})
   153   table.insert(tookParaAnim, {func = AnimSwitchHog, args = {youngh}})
   154 
   154 
   155   AddSkipFunction(onMoleHeadAnim, Skipanim, {onMoleHeadAnim})
   155   AddSkipFunction(onMoleHeadAnim, Skipanim, {onMoleHeadAnim})
   156   table.insert(onMoleHeadAnim, {func = AnimSay, args = {elderh, loc("Perfect! Now try to get the next crate without hurting yourself!"), SAY_SAY, 4000}, skipFunc = Skipanim, skipArgs = onMoleHeadAnim})
   156   table.insert(onMoleHeadAnim, {func = AnimSay, args = {elderh, loc("Perfect! Now try to get the next crate without hurting yourself!"), SAY_SAY, 4000}, skipFunc = Skipanim, skipArgs = onMoleHeadAnim})
   157   table.insert(onMoleHeadAnim, {func = AnimSay, args = {elderh, loc("The giant umbrella from the last crate should help break the fall."), SAY_SAY, 4000}})
   157   table.insert(onMoleHeadAnim, {func = AnimSay, args = {elderh, loc("The giant umbrella from the last crate should help break the fall."), SAY_SAY, 4000}})
   158   table.insert(onMoleHeadAnim, {func = AnimSay, args = {princess, loc("He's so brave..."), SAY_THINK, 4000}})
   158   table.insert(onMoleHeadAnim, {func = AnimSay, args = {princess, loc("He's so brave..."), SAY_THINK, 4000}})
   159   table.insert(onMoleHeadAnim, {func = AnimShowMission, args = {youngh, loc("First Blood"), loc("The Leap of Faith"), loc("Use the parachute ([Space] while in air) to get the next crate"), 1, 4000}}) 
   159   table.insert(onMoleHeadAnim, {func = AnimShowMission, args = {youngh, loc("First Blood"), loc("The Leap of Faith"), loc("Use the parachute ([Space] while in air) to get the next crate"), 1, 4000}})
   160   table.insert(onMoleHeadAnim, {func = AnimSwitchHog, args = {youngh}})
   160   table.insert(onMoleHeadAnim, {func = AnimSwitchHog, args = {youngh}})
   161 
   161 
   162   AddSkipFunction(pastMoleHeadAnim, Skipanim, {pastMoleHeadAnim})
   162   AddSkipFunction(pastMoleHeadAnim, Skipanim, {pastMoleHeadAnim})
   163   table.insert(pastMoleHeadAnim, {func = AnimSay, args = {elderh, loc("I see you have already taken the leap of faith."), SAY_SAY, 4000}, skipFunc = Skipanim, skipArgs = pastMoleHeadAnim})
   163   table.insert(pastMoleHeadAnim, {func = AnimSay, args = {elderh, loc("I see you have already taken the leap of faith."), SAY_SAY, 4000}, skipFunc = Skipanim, skipArgs = pastMoleHeadAnim})
   164   table.insert(pastMoleHeadAnim, {func = AnimSay, args = {elderh, loc("Get that crate!"), SAY_SAY, 4000}})
   164   table.insert(pastMoleHeadAnim, {func = AnimSay, args = {elderh, loc("Get that crate!"), SAY_SAY, 4000}})
   165   table.insert(pastMoleHeadAnim, {func = AnimSwitchHog, args = {youngh}})
   165   table.insert(pastMoleHeadAnim, {func = AnimSwitchHog, args = {youngh}})
   166 
   166 
   167   AddSkipFunction(tookRope2Anim, Skipanim, {tookRope2Anim})
   167   AddSkipFunction(tookRope2Anim, Skipanim, {tookRope2Anim})
   168   table.insert(tookRope2Anim, {func = AnimSay, args = {elderh, loc("Impressive...you are still dry as the corpse of a hawk after a week in the desert..."), SAY_SAY, 5000}, skipFunc = Skipanim, skipArgs = tookRope2Anim})
   168   table.insert(tookRope2Anim, {func = AnimSay, args = {elderh, loc("Impressive...you are still dry as the corpse of a hawk after a week in the desert..."), SAY_SAY, 5000}, skipFunc = Skipanim, skipArgs = tookRope2Anim})
   169   table.insert(tookRope2Anim, {func = AnimSay, args = {elderh, loc("You probably know what to do next..."), SAY_SAY, 4000}})
   169   table.insert(tookRope2Anim, {func = AnimSay, args = {elderh, loc("You probably know what to do next..."), SAY_SAY, 4000}})
   170   table.insert(tookRope2Anim, {func = AnimShowMission, args = {youngh, loc("First Blood"), loc("The Rising"), loc("Do the deed"), 1, 4000}}) 
   170   table.insert(tookRope2Anim, {func = AnimShowMission, args = {youngh, loc("First Blood"), loc("The Rising"), loc("Get that crate!"), 1, 4000}})
   171   table.insert(tookRope2Anim, {func = AnimSwitchHog, args = {youngh}})
   171   table.insert(tookRope2Anim, {func = AnimSwitchHog, args = {youngh}})
   172 
   172 
   173   AddSkipFunction(tookPunchAnim, Skipanim, {tookPunchAnim})
   173   AddSkipFunction(tookPunchAnim, Skipanim, {tookPunchAnim})
   174   table.insert(tookPunchAnim, {func = AnimSay, args = {elderh, loc("It is time to practice your fighting skills."), SAY_SAY, 4000}})
   174   table.insert(tookPunchAnim, {func = AnimSay, args = {elderh, loc("It is time to practice your fighting skills."), SAY_SAY, 4000}})
   175   table.insert(tookPunchAnim, {func = AnimSay, args = {elderh, loc("Imagine those targets are the wolves that killed your parents! Take your anger out on them!"), SAY_SAY, 5000}})
   175   table.insert(tookPunchAnim, {func = AnimSay, args = {elderh, loc("Imagine those targets are the wolves that killed your parents! Take your anger out on them!"), SAY_SAY, 5000}})
   176   table.insert(tookPunchAnim, {func = AnimShowMission, args = {youngh, loc("First Blood"), loc("The Slaughter"), loc("Destroy the targets!|Hint: Select the Shoryuken and hit [Space]|P.S. You can use it mid-air."), 1, 5000}}) 
   176   table.insert(tookPunchAnim, {func = AnimShowMission, args = {youngh, loc("First Blood"), loc("The Slaughter"), loc("Destroy the targets!|Hint: Select the Shoryuken and hit [Space]|P.S. You can use it mid-air."), 1, 5000}})
   177   table.insert(tookPunchAnim, {func = AnimSwitchHog, args = {youngh}})
   177   table.insert(tookPunchAnim, {func = AnimSwitchHog, args = {youngh}})
   178 
   178 
   179   AddSkipFunction(challengeAnim, Skipanim, {challengeAnim})
   179   AddSkipFunction(challengeAnim, Skipanim, {challengeAnim})
   180   table.insert(challengeAnim, {func = AnimSay, args = {elderh, loc("I hope you are prepared for a small challenge, young one."), SAY_SAY, 4000}, skipFunc = Skipanim, skipArgs = challengeAnim})
   180   table.insert(challengeAnim, {func = AnimSay, args = {elderh, loc("I hope you are prepared for a small challenge, young one."), SAY_SAY, 4000}, skipFunc = Skipanim, skipArgs = challengeAnim})
   181   table.insert(challengeAnim, {func = AnimSay, args = {elderh, loc("Your movement skills will be evaluated now."), SAY_SAY, 4000}})
   181   table.insert(challengeAnim, {func = AnimSay, args = {elderh, loc("Your movement skills will be evaluated now."), SAY_SAY, 4000}})
   184   table.insert(challengeAnim, {func = AnimSwitchHog, args = {youngh}})
   184   table.insert(challengeAnim, {func = AnimSwitchHog, args = {youngh}})
   185   table.insert(challengeAnim, {func = AnimWait, args = {youngh, 500}})
   185   table.insert(challengeAnim, {func = AnimWait, args = {youngh, 500}})
   186 
   186 
   187   AddSkipFunction(challengeFailedAnim, Skipanim, {challengeFailedAnim})
   187   AddSkipFunction(challengeFailedAnim, Skipanim, {challengeFailedAnim})
   188   table.insert(challengeFailedAnim, {func = AnimSay, args = {elderh, loc("Hmmm...perhaps a little more time will help."), SAY_SAY, 4000}, skipFunc = Skipanim, skipArgs = challengeFailedAnim})
   188   table.insert(challengeFailedAnim, {func = AnimSay, args = {elderh, loc("Hmmm...perhaps a little more time will help."), SAY_SAY, 4000}, skipFunc = Skipanim, skipArgs = challengeFailedAnim})
   189   table.insert(challengeFailedAnim, {func = AnimShowMission, args = {youngh, loc("First Blood"), loc("The Crate Frenzy"), loc("Collect the crates within the time limit!|If you fail, you'll have to try again."), 1, 5000}}) 
   189   table.insert(challengeFailedAnim, {func = AnimShowMission, args = {youngh, loc("First Blood"), loc("The Crate Frenzy"), loc("Collect the crates within the time limit!|If you fail, you'll have to try again."), 1, 5000}})
   190   table.insert(challengeFailedAnim, {func = AnimSwitchHog, args = {youngh}})
   190   table.insert(challengeFailedAnim, {func = AnimSwitchHog, args = {youngh}})
   191 
   191 
   192   AddSkipFunction(challengeCompletedAnim, Skipanim, {challengeCompletedAnim})
   192   AddSkipFunction(challengeCompletedAnim, Skipanim, {challengeCompletedAnim})
   193   table.insert(challengeCompletedAnim, {func = AnimSay, args = {elderh, loc("The spirits of the ancerstors are surely pleased, Leaks A Lot."), SAY_SAY, 4000}, skipFunc = Skipanim, skipArgs = challengeCompletedAnim})
   193   table.insert(challengeCompletedAnim, {func = AnimSay, args = {elderh, loc("The spirits of the ancerstors are surely pleased, Leaks A Lot."), SAY_SAY, 4000}, skipFunc = Skipanim, skipArgs = challengeCompletedAnim})
   194   table.insert(challengeCompletedAnim, {func = AnimSay, args = {elderh, loc("You have proven yourself worthy to see our most ancient secret!"), SAY_SAY, 4000}})
   194   table.insert(challengeCompletedAnim, {func = AnimSay, args = {elderh, loc("You have proven yourself worthy to see our most ancient secret!"), SAY_SAY, 4000}})
   195   table.insert(challengeCompletedAnim, {func = AnimSay, args = {elderh, loc("The weapon in that last crate was bestowed upon us by the ancients!"), SAY_SAY, 4000}})
   195   table.insert(challengeCompletedAnim, {func = AnimSay, args = {elderh, loc("The weapon in that last crate was bestowed upon us by the ancients!"), SAY_SAY, 4000}})
   196   table.insert(challengeCompletedAnim, {func = AnimSay, args = {elderh, loc("Use it with precaution!"), SAY_SAY, 4000}})
   196   table.insert(challengeCompletedAnim, {func = AnimSay, args = {elderh, loc("Use it with precaution!"), SAY_SAY, 4000}})
   197   table.insert(challengeCompletedAnim, {func = AnimShowMission, args = {youngh, loc("First Blood"), loc("The Ultimate Weapon"), loc("Destroy the targets!|Hint: [Up], [Down] to aim, [Space] to shoot"), 1, 5000}}) 
   197   table.insert(challengeCompletedAnim, {func = AnimShowMission, args = {youngh, loc("First Blood"), loc("The Ultimate Weapon"), loc("Get that crate!"), 1, 5000}})
   198   table.insert(challengeCompletedAnim, {func = AnimSwitchHog, args = {youngh}})
   198   table.insert(challengeCompletedAnim, {func = AnimSwitchHog, args = {youngh}})
   199 
   199 
   200   AddSkipFunction(beforeKillAnim, Skipanim, {beforeKillAnim})
   200   AddSkipFunction(beforeKillAnim, Skipanim, {beforeKillAnim})
   201   table.insert(beforeKillAnim, {func = AnimSay, args = {elderh, loc("What do my faulty eyes observe? A spy!"), SAY_SHOUT, 4000}, skipFunc = Skipanim, skipArgs = beforeKillAnim})
   201   table.insert(beforeKillAnim, {func = AnimSay, args = {elderh, loc("What do my faulty eyes observe? A spy!"), SAY_SHOUT, 4000}, skipFunc = Skipanim, skipArgs = beforeKillAnim})
   202   table.insert(beforeKillAnim, {func = AnimFollowGear, args = {cannibal}})
   202   table.insert(beforeKillAnim, {func = AnimFollowGear, args = {cannibal}})
   203   table.insert(beforeKillAnim, {func = AnimWait, args = {cannibal, 1000}})
   203   table.insert(beforeKillAnim, {func = AnimWait, args = {cannibal, 1000}})
   204   table.insert(beforeKillAnim, {func = AnimSay, args = {elderh, loc("Destroy him, Leaks A Lot! He is responsible for the deaths of many of us!"), SAY_SHOUT, 4000}})
   204   table.insert(beforeKillAnim, {func = AnimSay, args = {elderh, loc("Destroy him, Leaks A Lot! He is responsible for the deaths of many of us!"), SAY_SHOUT, 4000}})
   205   table.insert(beforeKillAnim, {func = AnimSay, args = {cannibal, loc("Oh, my!"), SAY_THINK, 4000}})
   205   table.insert(beforeKillAnim, {func = AnimSay, args = {cannibal, loc("Oh, my!"), SAY_THINK, 4000}})
   206   table.insert(beforeKillAnim, {func = AnimShowMission, args = {youngh, loc("First Blood"), loc("The First Blood"), loc("Kill the cannibal!"), 1, 5000}}) 
   206   table.insert(beforeKillAnim, {func = AnimShowMission, args = {youngh, loc("First Blood"), loc("The First Blood"), loc("Kill the cannibal!"), 1, 5000}})
   207   table.insert(beforeKillAnim, {func = AnimSwitchHog, args = {youngh}})
   207   table.insert(beforeKillAnim, {func = AnimSwitchHog, args = {youngh}})
   208   
   208 
   209   AddSkipFunction(closeCannim, Skipanim, {closeCannim})
   209   AddSkipFunction(closeCannim, Skipanim, {closeCannim})
   210   table.insert(closeCannim, {func = AnimSay, args = {elderh, loc("I see you would like his punishment to be more...personal..."), SAY_SAY, 4000}, skipFunc = Skipanim, skipArgs = closeCannim})
   210   table.insert(closeCannim, {func = AnimSay, args = {elderh, loc("I see you would like his punishment to be more...personal..."), SAY_SAY, 4000}, skipFunc = Skipanim, skipArgs = closeCannim})
   211   table.insert(closeCannim, {func = AnimSay, args = {cannibal, loc("I'm certain that this is a misunderstanding, fellow hedgehogs!"), SAY_SAY, 4000}})
   211   table.insert(closeCannim, {func = AnimSay, args = {cannibal, loc("I'm certain that this is a misunderstanding, fellow hedgehogs!"), SAY_SAY, 4000}})
   212   table.insert(closeCannim, {func = AnimSay, args = {cannibal, loc("If only I were given a chance to explain my being here..."), SAY_SAY, 4000}})
   212   table.insert(closeCannim, {func = AnimSay, args = {cannibal, loc("If only I were given a chance to explain my being here..."), SAY_SAY, 4000}})
   213   table.insert(closeCannim, {func = AnimSay, args = {elderh, loc("Do not let his words fool you, young one! He will stab you in the back as soon as you turn away!"), SAY_SAY, 6000}})
   213   table.insert(closeCannim, {func = AnimSay, args = {elderh, loc("Do not let his words fool you, young one! He will stab you in the back as soon as you turn away!"), SAY_SAY, 6000}})
   214   table.insert(closeCannim, {func = AnimSay, args = {elderh, loc("Here...pick your weapon!"), SAY_SAY, 5000}})
   214   table.insert(closeCannim, {func = AnimSay, args = {elderh, loc("Here...pick your weapon!"), SAY_SAY, 5000}})
   215   table.insert(closeCannim, {func = AnimShowMission, args = {youngh, loc("First Blood"), loc("The First Blood"), loc("KILL IT!"), 1, 5000}}) 
   215   table.insert(closeCannim, {func = AnimShowMission, args = {youngh, loc("First Blood"), loc("The First Blood"), loc("KILL IT!"), 1, 5000}})
   216   table.insert(closeCannim, {func = AnimSwitchHog, args = {youngh}})
   216   table.insert(closeCannim, {func = AnimSwitchHog, args = {youngh}})
   217 
   217 
   218   table.insert(cannKilledAnim, {func = AnimSay, args = {elderh, loc("Yes, yeees! You are now ready to enter the real world!"), SAY_SHOUT, 6000}})
   218   table.insert(cannKilledAnim, {func = AnimSay, args = {elderh, loc("Yes, yeees! You are now ready to enter the real world!"), SAY_SHOUT, 6000}})
   219 
   219 
   220   table.insert(cannKilledEarlyAnim, {func = AnimSay, args = {elderh, loc("What?! A cannibal? Here? There is no time to waste! Come, you are prepared."), SAY_SHOUT, 4000}})
   220   table.insert(cannKilledEarlyAnim, {func = AnimSay, args = {elderh, loc("What?! A cannibal? Here? There is no time to waste! Come, you are prepared."), SAY_SHOUT, 4000}})
   263     end
   263     end
   264   end
   264   end
   265 end
   265 end
   266 
   266 
   267 function CheckDamage()
   267 function CheckDamage()
   268   return youngdamaged and StoppedGear(youngh) 
   268   return youngdamaged and StoppedGear(youngh)
   269 end
   269 end
   270 
   270 
   271 function DoOnDamage()
   271 function DoOnDamage()
   272   AddAnim(damageAnim)
   272   AddAnim(damageAnim)
   273   youngdamaged = false
   273   youngdamaged = false
   361 end
   361 end
   362 
   362 
   363 function CheckPastMoleHead()
   363 function CheckPastMoleHead()
   364   x = GetX(youngh)
   364   x = GetX(youngh)
   365   y = GetY(youngh)
   365   y = GetY(youngh)
   366   return x < 3005 and y > 1500 and StoppedGear(youngh) 
   366   return x < 3005 and y > 1500 and StoppedGear(youngh)
   367 end
   367 end
   368 
   368 
   369 function DoPastMoleHead()
   369 function DoPastMoleHead()
   370   RemoveEventFunc(CheckOnMoleHead)
   370   RemoveEventFunc(CheckOnMoleHead)
   371   ropeCrate2 = SpawnUtilityCrate(2782, 1720, amRope, 100)
   371   ropeCrate2 = SpawnUtilityCrate(2782, 1720, amRope, 100)
   498 function DoDesertColled()
   498 function DoDesertColled()
   499   AddAmmo(youngh, amDEagle, 100)
   499   AddAmmo(youngh, amDEagle, 100)
   500   PutTargets(1)
   500   PutTargets(1)
   501   AddEvent(CheckTargetsKilled, {}, DoTargetsKilled, {}, 1)
   501   AddEvent(CheckTargetsKilled, {}, DoTargetsKilled, {}, 1)
   502   AddEvent(CheckCannibalKilled, {}, DoCannibalKilledEarly, {}, 0)
   502   AddEvent(CheckCannibalKilled, {}, DoCannibalKilledEarly, {}, 0)
   503   ShowMission(loc("First Blood"), loc("The Bull's Eye"), loc("[Up], [Down] to aim, [Space] to shoot!"), 1, 5000)
   503   ShowMission(loc("First Blood"), loc("The Bull's Eye"), loc("Destroy the targets!|Hint: [Up], [Down] to aim, [Space] to shoot"), 1, 5000)
   504 end
   504 end
   505 
   505 
   506 function CheckTargetsKilled()
   506 function CheckTargetsKilled()
   507   return targetsDestroyed == 3 and StoppedGear(youngh)
   507   return targetsDestroyed == 3 and StoppedGear(youngh)
   508 end
   508 end
   557 -----------------------------Misc--------------------------------------
   557 -----------------------------Misc--------------------------------------
   558 function StartChallenge(time)
   558 function StartChallenge(time)
   559   cratesCollected = 0
   559   cratesCollected = 0
   560   PutCrate(1)
   560   PutCrate(1)
   561   TurnTimeLeft = time
   561   TurnTimeLeft = time
   562   ShowMission(loc("First Blood"), loc("The Crate Frenzy"), loc("Collect the crates within the time limit!|If you fail, you'll have to try again."), 1, 5000) 
   562   ShowMission(loc("First Blood"), loc("The Crate Frenzy"), loc("Collect the crates within the time limit!|If you fail, you'll have to try again."), 1, 5000)
   563 end
   563 end
   564 
   564 
   565 function SetChoice()
   565 function SetChoice()
   566   SetInputMask(band(0xFFFFFFFF, bnot(gmAnimate+gmAttack+gmDown+gmHJump+gmLJump+gmSlot+gmSwitch+gmTimer+gmUp+gmWeapon)))
   566   SetInputMask(band(0xFFFFFFFF, bnot(gmAnimate+gmAttack+gmDown+gmHJump+gmLJump+gmSlot+gmSwitch+gmTimer+gmUp+gmWeapon)))
   567   difficultyChoice = true
   567   difficultyChoice = true
   568   ShowMission(loc("First Blood"), loc("The Torment"), loc("Select difficulty: [Left] - easier or [Right] - harder"), 0, 4000)
   568   ShowMission(loc("First Blood"), loc("The Torment"), loc("Select difficulty: [Left] - easier or [Right] - harder"), 0, 300000)
   569   AddEvent(CheckChoice, {}, DoChoice, {}, 0) 
   569   AddEvent(CheckChoice, {}, DoChoice, {}, 0)
   570 end
   570 end
   571 
   571 
   572 function SetTime(time)
   572 function SetTime(time)
   573   TurnTimeLeft = time
   573   TurnTimeLeft = time
   574 end
   574 end
   601   SetHealth(princess, 0)
   601   SetHealth(princess, 0)
   602 end
   602 end
   603 -----------------------------Main Functions----------------------------
   603 -----------------------------Main Functions----------------------------
   604 
   604 
   605 function onGameInit()
   605 function onGameInit()
   606 	Seed = 69 
   606 	Seed = 69
   607 	GameFlags = gfInfAttack + gfSolidLand + gfDisableWind 
   607 	GameFlags = gfInfAttack + gfSolidLand + gfDisableWind
   608 	TurnTime = 100000 
   608 	TurnTime = 100000
   609 	CaseFreq = 0
   609 	CaseFreq = 0
   610 	MinesNum = 0
   610 	MinesNum = 0
   611 	MinesTime = 3000
   611 	MinesTime = 3000
   612 	Explosives = 0
   612 	Explosives = 0
   613 	Delay = 10 
   613 	Delay = 10
   614 	Map = "A_Classic_Fairytale_first_blood"
   614 	Map = "A_Classic_Fairytale_first_blood"
   615 	Theme = "Nature"
   615 	Theme = "Nature"
   616 
   616 
   617 
   617 
   618 	AddTeam(loc("Natives"), 29439, "Bone", "Island", "HillBilly", "cm_birdy")
   618 	AddTeam(loc("Natives"), 29439, "Bone", "Island", "HillBilly", "cm_birdy")
   628 
   628 
   629   AddTeam(loc("Cannibals"), 14483456, "Skull", "Island", "Pirate","cm_vampire")
   629   AddTeam(loc("Cannibals"), 14483456, "Skull", "Island", "Pirate","cm_vampire")
   630   cannibal = AddHog(loc("Brainiac"), 0, 5, "Zombi")
   630   cannibal = AddHog(loc("Brainiac"), 0, 5, "Zombi")
   631   AnimSetGearPosition(cannibal, 525, 1256)
   631   AnimSetGearPosition(cannibal, 525, 1256)
   632   HogTurnLeft(cannibal, false)
   632   HogTurnLeft(cannibal, false)
   633   
   633 
   634   AnimInit()
   634   AnimInit()
   635   AnimationSetup()
   635   AnimationSetup()
   636 end
   636 end
   637 
   637 
   638 function onGameStart()
   638 function onGameStart()
   693     i = 1
   693     i = 1
   694     while targets[i] ~= gear do
   694     while targets[i] ~= gear do
   695       i = i + 1
   695       i = i + 1
   696     end
   696     end
   697     targets[i] = nil
   697     targets[i] = nil
   698     targetsDestroyed = targetsDestroyed + 1 
   698     targetsDestroyed = targetsDestroyed + 1
   699   elseif gear == cannibal then
   699   elseif gear == cannibal then
   700     cannibalKilled = true
   700     cannibalKilled = true
   701   elseif gear == princess then
   701   elseif gear == princess then
   702     princessKilled = true
   702     princessKilled = true
   703   elseif gear == elderh then
   703   elseif gear == elderh then