share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/journey.lua
changeset 7245 53f73f4ae203
parent 7243 9ae9178c525e
child 7261 158f8fb74ded
equal deleted inserted replaced
7243:9ae9178c525e 7245:53f73f4ae203
   147 
   147 
   148 function AfterEndAnimDuo()
   148 function AfterEndAnimDuo()
   149   stage = endStage
   149   stage = endStage
   150   SwitchHog(leaks)
   150   SwitchHog(leaks)
   151   SetGearMessage(leaks, 0)
   151   SetGearMessage(leaks, 0)
       
   152   SetGearMessage(dense, 0)
   152   TurnTimeLeft = -1
   153   TurnTimeLeft = -1
   153   ShowMission(loc("The Journey Back"), loc("Collateral Damage II"), loc("Save Fell From Heaven!"), 1, 4000)
   154   ShowMission(loc("The Journey Back"), loc("Collateral Damage II"), loc("Save Fell From Heaven!"), 1, 4000)
   154   AddEvent(CheckLost, {}, DoLost, {}, 0)
   155   AddEvent(CheckLost, {}, DoLost, {}, 0)
   155   AddEvent(CheckWon, {}, DoWon, {}, 0)
   156   AddEvent(CheckWon, {}, DoWon, {}, 0)
   156 end
   157 end
   278 end
   279 end
   279 
   280 
   280 function RestoreCyborgOnly(x, y)
   281 function RestoreCyborgOnly(x, y)
   281   RestoreHog(cyborg)
   282   RestoreHog(cyborg)
   282   cyborgHidden = false
   283   cyborgHidden = false
       
   284   SetState(cyborg, 0)
   283   AnimOutOfNowhere(cyborg, x, y)
   285   AnimOutOfNowhere(cyborg, x, y)
   284   return true
   286   return true
   285 end
   287 end
   286 
   288 
   287 function TargetPrincess()
   289 function TargetPrincess()
   452   table.insert(endAnimAD, {func = AnimSay, args = {leaks, loc("I won't let you kill her!"), SAY_SHOUT, 4000}})
   454   table.insert(endAnimAD, {func = AnimSay, args = {leaks, loc("I won't let you kill her!"), SAY_SHOUT, 4000}})
   453   AddSkipFunction(endAnimAD, SkipEndAnimAlone, {})
   455   AddSkipFunction(endAnimAD, SkipEndAnimAlone, {})
   454   
   456   
   455   table.insert(endFailAnim, {func = AnimCaption, args = {leaks, loc("Leaks A Lot, depressed for killing his loved one, failed to save the village..."), 3000}})
   457   table.insert(endFailAnim, {func = AnimCaption, args = {leaks, loc("Leaks A Lot, depressed for killing his loved one, failed to save the village..."), 3000}})
   456 
   458 
       
   459   table.insert(winAnimAD, {func = AnimCustomFunction, args = {princess, CondNeedToTurn, {leaks, princess}}})
   457   table.insert(winAnimAD, {func = AnimSay, args = {princess, loc("Thank you, oh, thank you, Leaks A Lot!"), SAY_SAY, 5000}})
   460   table.insert(winAnimAD, {func = AnimSay, args = {princess, loc("Thank you, oh, thank you, Leaks A Lot!"), SAY_SAY, 5000}})
   458   table.insert(winAnimAD, {func = AnimSay, args = {princess, loc("How can I ever repay you for saving my life?"), SAY_SAY, 6000}})
   461   table.insert(winAnimAD, {func = AnimSay, args = {princess, loc("How can I ever repay you for saving my life?"), SAY_SAY, 6000}})
   459   table.insert(winAnimAD, {func = AnimSay, args = {leaks, loc("There's nothing more satisfying for me than seeing you share your beauty with the world every morning, my princess!"), SAY_SAY, 10000}})
   462   table.insert(winAnimAD, {func = AnimSay, args = {leaks, loc("There's nothing more satisfying for me than seeing you share your beauty with the world every morning, my princess!"), SAY_SAY, 10000}})
   460   table.insert(winAnimAD, {func = AnimSay, args = {leaks, loc("Let's go home!"), SAY_SAY, 3000}})
   463   table.insert(winAnimAD, {func = AnimSay, args = {leaks, loc("Let's go home!"), SAY_SAY, 3000}})
   461   table.insert(winAnimAD, {func = AnimCaption, args = {leaks, loc("And so they discovered that cyborgs weren't invulnerable..."), 2000}})
   464   table.insert(winAnimAD, {func = AnimCaption, args = {leaks, loc("And so they discovered that cyborgs weren't invulnerable..."), 2000}})
   514   table.insert(endAnim, {func = AnimSay, args = {leaks, loc("We won't let you hurt her!"), SAY_SHOUT, 4000}})
   517   table.insert(endAnim, {func = AnimSay, args = {leaks, loc("We won't let you hurt her!"), SAY_SHOUT, 4000}})
   515   AddSkipFunction(endAnim, SkipEndAnimDuo, {})
   518   AddSkipFunction(endAnim, SkipEndAnimDuo, {})
   516   
   519   
   517   table.insert(endFailAnim, {func = AnimCaption, args = {leaks, loc("Leaks A Lot, depressed for killing his loved one, failed to save the village..."), 3000}})
   520   table.insert(endFailAnim, {func = AnimCaption, args = {leaks, loc("Leaks A Lot, depressed for killing his loved one, failed to save the village..."), 3000}})
   518 
   521 
       
   522   table.insert(winAnim, {func = AnimCustomFunction, args = {princess, CondNeedToTurn, {leaks, princess}}})
   519   table.insert(winAnim, {func = AnimSay, args = {princess, loc("Thank you, oh, thank you, my heroes!"), SAY_SAY, 5000}})
   523   table.insert(winAnim, {func = AnimSay, args = {princess, loc("Thank you, oh, thank you, my heroes!"), SAY_SAY, 5000}})
   520   table.insert(winAnim, {func = AnimSay, args = {princess, loc("How can I ever repay you for saving my life?"), SAY_SAY, 6000}})
   524   table.insert(winAnim, {func = AnimSay, args = {princess, loc("How can I ever repay you for saving my life?"), SAY_SAY, 6000}})
   521   table.insert(winAnim, {func = AnimSay, args = {leaks, loc("There's nothing more satisfying to us than seeing you share your beauty with the world every morning, my princess!"), SAY_SAY, 10000}})
   525   table.insert(winAnim, {func = AnimSay, args = {leaks, loc("There's nothing more satisfying to us than seeing you share your beauty..."), SAY_SAY, 7000}})
       
   526   table.insert(winAnim, {func = AnimSay, args = {leaks, loc("... share your beauty with the world every morning, my princess!"), SAY_SAY, 7000}})
   522   table.insert(winAnim, {func = AnimSay, args = {leaks, loc("Let's go home!"), SAY_SAY, 3000}})
   527   table.insert(winAnim, {func = AnimSay, args = {leaks, loc("Let's go home!"), SAY_SAY, 3000}})
   523   table.insert(winAnim, {func = AnimCaption, args = {leaks, loc("And so they discovered that cyborgs weren't invulnerable..."), 2000}})
   528   table.insert(winAnim, {func = AnimCaption, args = {leaks, loc("And so they discovered that cyborgs weren't invulnerable..."), 2000}})
   524 
   529 
   525   startAnim = startAnimAL
   530   startAnim = startAnimAL
   526   pastFlowerAnim = pastFlowerAnimAL
   531   pastFlowerAnim = pastFlowerAnimAL
   574   table.insert(endAnim, {func = AnimSay, args = {leaks, loc("We won't let you hurt her!"), SAY_SHOUT, 4000}})
   579   table.insert(endAnim, {func = AnimSay, args = {leaks, loc("We won't let you hurt her!"), SAY_SHOUT, 4000}})
   575   AddSkipFunction(endAnim, SkipEndAnimDuo, {})
   580   AddSkipFunction(endAnim, SkipEndAnimDuo, {})
   576   
   581   
   577   table.insert(endFailAnim, {func = AnimCaption, args = {leaks, loc("Leaks A Lot, depressed for killing his loved one, failed to save the village..."), 3000}})
   582   table.insert(endFailAnim, {func = AnimCaption, args = {leaks, loc("Leaks A Lot, depressed for killing his loved one, failed to save the village..."), 3000}})
   578 
   583 
       
   584   table.insert(winAnim, {func = AnimCustomFunction, args = {princess, CondNeedToTurn, {leaks, princess}}})
   579   table.insert(winAnim, {func = AnimSay, args = {princess, loc("Thank you, oh, thank you, my heroes!"), SAY_SAY, 5000}})
   585   table.insert(winAnim, {func = AnimSay, args = {princess, loc("Thank you, oh, thank you, my heroes!"), SAY_SAY, 5000}})
   580   table.insert(winAnim, {func = AnimSay, args = {princess, loc("How can I ever repay you for saving my life?"), SAY_SAY, 6000}})
   586   table.insert(winAnim, {func = AnimSay, args = {princess, loc("How can I ever repay you for saving my life?"), SAY_SAY, 6000}})
   581   table.insert(winAnim, {func = AnimSay, args = {leaks, loc("There's nothing more satisfying to us than seeing you share your beauty with the world every morning, my princess!"), SAY_SAY, 10000}})
   587   table.insert(winAnim, {func = AnimSay, args = {leaks, loc("There's nothing more satisfying to us than seeing you share your beauty with the world every morning, my princess!"), SAY_SAY, 10000}})
   582   table.insert(winAnim, {func = AnimSay, args = {leaks, loc("Let's go home!"), SAY_SAY, 3000}})
   588   table.insert(winAnim, {func = AnimSay, args = {leaks, loc("Let's go home!"), SAY_SAY, 3000}})
   583   table.insert(winAnim, {func = AnimCaption, args = {leaks, loc("And so they discovered that cyborgs weren't invulnerable..."), 2000}})
   589   table.insert(winAnim, {func = AnimCaption, args = {leaks, loc("And so they discovered that cyborgs weren't invulnerable..."), 2000}})
   961 function onGameStart()
   967 function onGameStart()
   962   m2Choice = tonumber(GetCampaignVar("M2Choice"))
   968   m2Choice = tonumber(GetCampaignVar("M2Choice"))
   963   m2DenseDead = tonumber(GetCampaignVar("M2DenseDead"))
   969   m2DenseDead = tonumber(GetCampaignVar("M2DenseDead"))
   964   m2RamonDead = tonumber(GetCampaignVar("M2RamonDead"))
   970   m2RamonDead = tonumber(GetCampaignVar("M2RamonDead"))
   965   m2SpikyDead = tonumber(GetCampaignVar("M2SpikyDead"))
   971   m2SpikyDead = tonumber(GetCampaignVar("M2SpikyDead"))
   966   m2Choice = choiceAttacked
       
   967   m2DenseDead = 1
       
   968   StartMission()
   972   StartMission()
   969 end
   973 end
   970 
   974 
   971 function onGameTick()
   975 function onGameTick()
   972   AnimUnWait()
   976   AnimUnWait()