share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/journey.lua
changeset 14643 64be9a8087f2
parent 14633 bd15c8551318
child 14682 0bba06a05d52
equal deleted inserted replaced
14642:eb5ed9ead151 14643:64be9a8087f2
   199   AddAmmo(cannibals[5], amDEagle, 0)
   199   AddAmmo(cannibals[5], amDEagle, 0)
   200 
   200 
   201   AddEvent(CheckOnFirstGirder, {}, DoOnFirstGirder, {}, 0)
   201   AddEvent(CheckOnFirstGirder, {}, DoOnFirstGirder, {}, 0)
   202   AddEvent(CheckTookSniper, {}, DoTookSniper, {}, 0)
   202   AddEvent(CheckTookSniper, {}, DoTookSniper, {}, 0)
   203   AddEvent(CheckFailedCourse, {}, DoFailedCourse, {}, 0)
   203   AddEvent(CheckFailedCourse, {}, DoFailedCourse, {}, 0)
   204   SetGearMessage(leaks, 0)
   204   SetGearMessage(leaks, band(GetGearMessage(leaks), bnot(gmAllStoppable)))
   205   TurnsLeft = 12
   205   TurnsLeft = 12
   206   SetTurnTimeLeft(TurnTime)
   206   SetTurnTimeLeft(TurnTime)
   207   ShowMission(loc("The Journey Back"), loc("Collateral Damage"),
   207   ShowMission(loc("The Journey Back"), loc("Collateral Damage"),
   208     loc("Save the princess by collecting the crate in under 12 turns!") .. "|" ..
   208     loc("Save the princess by collecting the crate in under 12 turns!") .. "|" ..
   209     loc("Mines time: 3 seconds"), 0, 6000)
   209     loc("Mines time: 3 seconds"), 0, 6000)
   232   HogTurnLeft(dense, true)
   232   HogTurnLeft(dense, true)
   233 end
   233 end
   234 
   234 
   235 function AfterEndAnimAlone()
   235 function AfterEndAnimAlone()
   236   stage = endStage
   236   stage = endStage
       
   237   SetGearMessage(dense, band(GetGearMessage(dense), bnot(gmAllStoppable)))
   237   AnimSwitchHog(leaks)
   238   AnimSwitchHog(leaks)
   238   SetGearMessage(leaks, 0)
       
   239   SetTurnTimeLeft(MAX_TURN_TIME)
   239   SetTurnTimeLeft(MAX_TURN_TIME)
   240   ShowMission(loc("The Journey Back"), loc("Collateral Damage II"), loc("Save Fell From Heaven!"), 1, 4000)
   240   ShowMission(loc("The Journey Back"), loc("Collateral Damage II"), loc("Save Fell From Heaven!"), 1, 4000)
   241   AddEvent(CheckLost, {}, DoLost, {}, 0)
   241   AddEvent(CheckLost, {}, DoLost, {}, 0)
   242   AddEvent(CheckWon, {}, DoWon, {}, 0)
   242   AddEvent(CheckWon, {}, DoWon, {}, 0)
   243   RemoveEventFunc(CheckFailedCourse)
   243   RemoveEventFunc(CheckFailedCourse)
   244 end
   244 end
   245 
   245 
   246 function AfterEndAnimDuo()
   246 function AfterEndAnimDuo()
   247   stage = endStage
   247   stage = endStage
       
   248   SetGearMessage(dense, band(GetGearMessage(dense), bnot(gmAllStoppable)))
   248   AnimSwitchHog(leaks)
   249   AnimSwitchHog(leaks)
   249   SetGearMessage(leaks, 0)
       
   250   SetGearMessage(dense, 0)
       
   251   SetTurnTimeLeft(MAX_TURN_TIME)
   250   SetTurnTimeLeft(MAX_TURN_TIME)
   252   ShowMission(loc("The Journey Back"), loc("Collateral Damage II"), loc("Save Fell From Heaven!"), 1, 4000)
   251   ShowMission(loc("The Journey Back"), loc("Collateral Damage II"), loc("Save Fell From Heaven!"), 1, 4000)
   253   AddEvent(CheckLost, {}, DoLost, {}, 0)
   252   AddEvent(CheckLost, {}, DoLost, {}, 0)
   254   AddEvent(CheckWon, {}, DoWon, {}, 0)
   253   AddEvent(CheckWon, {}, DoWon, {}, 0)
   255 end
   254 end
   261   AddFunction({func = HideHedge, args = {princess}})
   260   AddFunction({func = HideHedge, args = {princess}})
   262   AddFunction({func = HideHedge, args = {cyborg}})
   261   AddFunction({func = HideHedge, args = {cyborg}})
   263 end
   262 end
   264 
   263 
   265 function AfterStartAnim()
   264 function AfterStartAnim()
   266   SetGearMessage(leaks, 0)
   265   SetGearMessage(leaks, band(GetGearMessage(leaks), bnot(gmAllStoppable)))
   267   SetTurnTimeLeft(TurnTime)
   266   SetTurnTimeLeft(TurnTime)
   268   local goal = loc("Get the crate on the other side of the island.")
   267   local goal = loc("Get the crate on the other side of the island.")
   269   local hint = loc("Hint: You might want to stay out of sight and take all the crates ...")
   268   local hint = loc("Hint: You might want to stay out of sight and take all the crates ...")
   270   local stuck = loc("If you get stuck, use your Desert Eagle or restart the mission!")
   269   local stuck = loc("If you get stuck, use your Desert Eagle or restart the mission!")
   271   local conds = loc("Leaks A Lot must survive!")
   270   local conds = loc("Leaks A Lot must survive!")
   319 end
   318 end
   320 
   319 
   321 function AfterPastFlowerAnim()
   320 function AfterPastFlowerAnim()
   322   PlaceMinesDuo()
   321   PlaceMinesDuo()
   323   AddEvent(CheckDensePit, {}, DoDensePit, {}, 0)
   322   AddEvent(CheckDensePit, {}, DoDensePit, {}, 0)
   324   SetGearMessage(leaks, 0)
   323   SetGearMessage(dense, band(GetGearMessage(dense), bnot(gmAllStoppable)))
   325   SetGearMessage(dense, 0)
   324   SetGearMessage(leaks, band(GetGearMessage(leaks), bnot(gmAllStoppable)))
   326   EndTurn(true)
   325   EndTurn(true)
   327   ShowMission(loc("The Journey Back"), loc("The Savior"), 
   326   ShowMission(loc("The Journey Back"), loc("The Savior"), 
   328     loc("Get Dense Cloud out of the pit!") .. "|" ..
   327     loc("Get Dense Cloud out of the pit!") .. "|" ..
   329     loc("Your hogs must survive!") .. "|" ..
   328     loc("Your hogs must survive!") .. "|" ..
   330     loc("Beware of mines: They explode after 5 seconds."), 1, 5000)
   329     loc("Beware of mines: They explode after 5 seconds."), 1, 5000)
   341   SetupCourseDuo()
   340   SetupCourseDuo()
   342   RestoreHedge(cannibals[5])
   341   RestoreHedge(cannibals[5])
   343   AddAmmo(cannibals[5], amDEagle, 0)
   342   AddAmmo(cannibals[5], amDEagle, 0)
   344   HideHedge(cannibals[5])
   343   HideHedge(cannibals[5])
   345   AddEvent(CheckTookFire, {}, DoTookFire, {}, 0)
   344   AddEvent(CheckTookFire, {}, DoTookFire, {}, 0)
   346   SetGearMessage(leaks, 0)
   345   SetGearMessage(dense, band(GetGearMessage(dense), bnot(gmAllStoppable)))
   347   SetGearMessage(dense, 0)
   346   SetGearMessage(leaks, band(GetGearMessage(leaks), bnot(gmAllStoppable)))
   348   EndTurn(true)
   347   EndTurn(true)
   349   ShowMission(loc("The Journey Back"), loc("They never learn"),
   348   ShowMission(loc("The Journey Back"), loc("They never learn"),
   350     loc("Free Dense Cloud and continue the mission!") .. "|" ..
   349     loc("Free Dense Cloud and continue the mission!") .. "|" ..
   351     loc("Collect the weapon crate at the left coast!") .. "|" ..
   350     loc("Collect the weapon crate at the left coast!") .. "|" ..
   352     loc("Your hogs must survive!") .. "|" ..
   351     loc("Your hogs must survive!") .. "|" ..