share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/first_blood.lua
changeset 15068 6f51c75994a4
parent 15067 d59da429d22c
child 15076 527a7414bb44
equal deleted inserted replaced
15067:d59da429d22c 15068:6f51c75994a4
   160     ctrlMissionPanel = loc("Hint: Hold down [M] to review the mission texts.")
   160     ctrlMissionPanel = loc("Hint: Hold down [M] to review the mission texts.")
   161     ctrlAttack = loc("Attack: [Space]")
   161     ctrlAttack = loc("Attack: [Space]")
   162 end
   162 end
   163 
   163 
   164 goals = {
   164 goals = {
   165   [startDialogue] = {loc("First Blood"), loc("First Steps"), loc("Press [Left] or [Right] to move around, [Long Jump] to jump forwards.") .. "| |" .. ctrlJump, 1, 4000},
   165   [startDialogue] = {loc("First Blood"), loc("First Steps"), loc("Press [Left] or [Right] to move around, [Long Jump] to jump forwards.") .. "| |" .. ctrlJump, 2, 4000},
   166   [onShroomAnim] = {loc("First Blood"), loc("A leap in a leap"), loc("Go on top of the flower.") .. "|" .. ctrlMissionPanel, 1, 7000},
   166   [onShroomAnim] = {loc("First Blood"), loc("A leap in a leap"), loc("Go on top of the flower.") .. "|" .. ctrlMissionPanel, 2, 7000},
   167   [onFlowerAnim] = {loc("First Blood"), loc("Hightime"), loc("Collect the crate on the right.") .. "|" .. loc("Hint: Select the rope, [Up] or [Down] to aim, [Attack] to fire, directional keys to move.") .. "|" .. loc("Ropes can be fired again in the air!") .. "| |" .. ctrlAttack, 1, 7000},
   167   [onFlowerAnim] = {loc("First Blood"), loc("Hightime"), loc("Collect the crate on the right.") .. "|" .. loc("Hint: Select the rope, [Up] or [Down] to aim, [Attack] to fire, directional keys to move.") .. "|" .. loc("Ropes can be fired again in the air!") .. "| |" .. ctrlAttack, 2, 7000},
   168   [tookParaAnim] = {loc("First Blood"), loc("Omnivore"), loc("Get on the head of the mole."), 1, 4000},
   168   [tookParaAnim] = {loc("First Blood"), loc("Omnivore"), loc("Get on the head of the mole."), 1, 4000},
   169   [onMoleHeadAnim] = {loc("First Blood"), loc("The Leap of Faith"), loc("Use the parachute to get the next crate.") .. "|" .. loc("Hint: Just select the parachute, it opens automatically when you fall."), 1, 4000},
   169   [onMoleHeadAnim] = {loc("First Blood"), loc("The Leap of Faith"), loc("Use the parachute to get the next crate.") .. "|" .. loc("Hint: Just select the parachute, it opens automatically when you fall."), 2, 4000},
   170   [pastMoleHeadAnim] = {loc("First Blood"), loc("The Leap of Faith"), loc("Get that crate!"), 1, 4000},
   170   [pastMoleHeadAnim] = {loc("First Blood"), loc("The Leap of Faith"), loc("Get that crate!"), 5, 4000},
   171   [tookRope2Anim] = {loc("First Blood"), loc("The Rising"), loc("Get that crate!"), 1, 4000},
   171   [tookRope2Anim] = {loc("First Blood"), loc("The Rising"), loc("Get that crate!"), 7, 4000},
   172   [tookPunchAnim] = {loc("First Blood"), loc("The Slaughter"), loc("Destroy the targets!") .. "|" .. loc("Hint: Select the Shoryuken and hit [Attack].|P.S.: You can use it mid-air.") .. "| |" .. ctrlAttack, 1, 5000},
   172   [tookPunchAnim] = {loc("First Blood"), loc("The Slaughter"), loc("Destroy the targets!") .. "|" .. loc("Hint: Select the Shoryuken and hit [Attack].|P.S.: You can use it mid-air.") .. "| |" .. ctrlAttack, 1, 5000},
   173   [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},
   173   [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."), 7, 5000},
   174   [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},
   174   [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."), 7, 5000},
   175   [challengeCompletedAnim] = {loc("First Blood"), loc("The Ultimate Weapon"), loc("Get that crate!"), 1, 5000},
   175   [challengeCompletedAnim] = {loc("First Blood"), loc("The Ultimate Weapon"), loc("Get that crate!"), 7, 5000},
   176   [beforeKillAnim] = {loc("First Blood"), loc("The First Blood"), loc("Kill the cannibal!"), 1, 5000},
   176   [beforeKillAnim] = {loc("First Blood"), loc("The First Blood"), loc("Kill the cannibal!"), 1, 5000},
   177   [closeCannim] = {loc("First Blood"), loc("The First Blood"), loc("KILL IT!"), 1, 5000},
   177   [closeCannim] = {loc("First Blood"), loc("The First Blood"), loc("KILL IT!"), 1, 5000},
   178 }
   178 }
   179 
   179 
   180 -----------------------------Animations--------------------------------
   180 -----------------------------Animations--------------------------------
   389 function DoDeath()
   389 function DoDeath()
   390   RemoveEventFunc(CheckKilledOthers)
   390   RemoveEventFunc(CheckKilledOthers)
   391   RemoveEventFunc(CheckDamage)
   391   RemoveEventFunc(CheckDamage)
   392   RemoveEventFunc(CheckDamagedOthers)
   392   RemoveEventFunc(CheckDamagedOthers)
   393   FinishThem()
   393   FinishThem()
   394   ShowMission(loc("First Blood"), loc("The wasted youth"), loc("Leaks A Lot gave his life for his tribe! He should have survived!"), 2, 4000)
   394   ShowMission(loc("First Blood"), loc("The wasted youth"), loc("Leaks A Lot gave his life for his tribe! He should have survived!"), -amSkip, 4000)
   395 end
   395 end
   396 
   396 
   397 function CheckDamagedOthers()
   397 function CheckDamagedOthers()
   398   return (princessDamaged and StoppedGear(princess)) or (elderDamaged and StoppedGear(elderh))
   398   return (princessDamaged and StoppedGear(princess)) or (elderDamaged and StoppedGear(elderh))
   399 end
   399 end
   428   if INTERFACE == "touch" then
   428   if INTERFACE == "touch" then
   429      msg = msg .. loc("Backwards jump: Tap the [Curvy Arrow] twice")
   429      msg = msg .. loc("Backwards jump: Tap the [Curvy Arrow] twice")
   430   else
   430   else
   431      msg = msg .. loc("Backwards jump: Press [Backspace] twice")
   431      msg = msg .. loc("Backwards jump: Press [Backspace] twice")
   432   end
   432   end
   433   ShowMission(loc("First Blood"), loc("Step By Step"), msg, 10, 10000)
   433   ShowMission(loc("First Blood"), loc("Step By Step"), msg, 2, 10000)
   434   AddEvent(CheckOnShroom, {}, DoOnShroom, {}, 0)
   434   AddEvent(CheckOnShroom, {}, DoOnShroom, {}, 0)
   435 end
   435 end
   436 
   436 
   437 function CheckOnShroom()
   437 function CheckOnShroom()
   438   return GetHealth(youngh) and GetX(youngh) >= 2461 and StoppedGear(youngh)
   438   return GetHealth(youngh) and GetX(youngh) >= 2461 and StoppedGear(youngh)
   625 function DoDesertColled()
   625 function DoDesertColled()
   626   AddAmmo(youngh, amDEagle, 100)
   626   AddAmmo(youngh, amDEagle, 100)
   627   PutTargets(1)
   627   PutTargets(1)
   628   AddEvent(CheckTargetsKilled, {}, DoTargetsKilled, {}, 1)
   628   AddEvent(CheckTargetsKilled, {}, DoTargetsKilled, {}, 1)
   629   AddEvent(CheckCannibalKilled, {}, DoCannibalKilledEarly, {}, 0)
   629   AddEvent(CheckCannibalKilled, {}, DoCannibalKilledEarly, {}, 0)
   630   ShowMission(loc("First Blood"), loc("The Bull's Eye"), loc("Destroy the targets!") .. "| |" .. ctrlAttack, 1, 5000)
   630   ShowMission(loc("First Blood"), loc("The Bull's Eye"), loc("Destroy the targets!"), 1, 5000)
   631 end
   631 end
   632 
   632 
   633 function CheckTargetsKilled()
   633 function CheckTargetsKilled()
   634   return targetsDestroyed == 3 and StoppedGear(youngh)
   634   return targetsDestroyed == 3 and StoppedGear(youngh)
   635 end
   635 end
   684 -----------------------------Misc--------------------------------------
   684 -----------------------------Misc--------------------------------------
   685 function StartChallenge(time)
   685 function StartChallenge(time)
   686   cratesCollected = 0
   686   cratesCollected = 0
   687   PutCrate(1)
   687   PutCrate(1)
   688   SetTurnTimeLeft(time)
   688   SetTurnTimeLeft(time)
   689   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)
   689   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."), 7, 5000)
   690 end
   690 end
   691 
   691 
   692 function ChoiceDialog()
   692 function ChoiceDialog()
   693   local dstr
   693   local dstr
   694   if difficulty == 2 then
   694   if difficulty == 2 then
   699   ShowMission(loc("First Blood"), loc("The Torment"),
   699   ShowMission(loc("First Blood"), loc("The Torment"),
   700     loc("Your next task is to collect some crates by using the rope!") .. "|" ..
   700     loc("Your next task is to collect some crates by using the rope!") .. "|" ..
   701     loc("Press [Left] and [Right] to change the difficulty.") .. "| |" ..
   701     loc("Press [Left] and [Right] to change the difficulty.") .. "| |" ..
   702     dstr .. "| |" ..
   702     dstr .. "| |" ..
   703     loc("Press [Attack] to begin."),
   703     loc("Press [Attack] to begin."),
   704     0, 9999000, true)
   704     3, 9999000, true)
   705 end
   705 end
   706 
   706 
   707 function SetChoice()
   707 function SetChoice()
   708   AnimSetInputMask(0)
   708   AnimSetInputMask(0)
   709   difficultyChoice = true
   709   difficultyChoice = true