share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/shadow.lua
changeset 12796 d97fa936778e
parent 12794 bca911f8e804
child 12901 bdf8e80a97b8
equal deleted inserted replaced
12795:36d28428e719 12796:d97fa936778e
    25 - All Weaklings dead
    25 - All Weaklings dead
    26 - Cut scene: stronglingsAnim: Stronglings spawn, hero walks to forest, meets cyborg, cyborg makes offer
    26 - Cut scene: stronglingsAnim: Stronglings spawn, hero walks to forest, meets cyborg, cyborg makes offer
    27 - The cyborg offer is an IMPORTANT decision, it completely changes the next mission, and the rest of the story
    27 - The cyborg offer is an IMPORTANT decision, it completely changes the next mission, and the rest of the story
    28 | Accept: Player walks to cyborg
    28 | Accept: Player walks to cyborg
    29     - Cut scene: acceptAnim
    29     - Cut scene: acceptAnim
    30     - Hero returns to start
    30     - Hero needs to walk all the way back (infinite turn time)
       
    31     - Hero reached tree
       
    32     - Turn time starts
    31     - TBS
    33     - TBS
    32     - Stronglings defeated
    34     - Stronglings defeated
    33     | Stronglings defeated with both hogs survived
    35     | Stronglings defeated with both hogs survived
    34         - Cut scene: acceptedSurvivedFinalAnim
    36         - Cut scene: acceptedSurvivedFinalAnim
    35     | Stronglings deafeated with Dense Cloud dead
    37     | Stronglings deafeated with Dense Cloud dead
    36         - Cut scene: acceptedDiedFinalAnim
    38         - Cut scene: acceptedDiedFinalAnim
    37     > Victory
    39     > Victory
    38 | Reject: Player walks away
    40 | Reject: Player walks away
    39     - Cut scene: refusedAnim
    41     - Cut scene: refusedAnim
    40     - Hero needs to walk all the way back (infinite turn time)
    42     - Leaks a Lot teleports back to tree at the start (automatically)
    41     - Hero reached tree
    43     - Spiky Cheese and Ramon appear together with crates
    42     - Turn time starts
    44     - Spiky Cheese gains control
    43     - TBS
    45     - TBS
    44     - Stronglings defeated
    46     - Stronglings defeated
    45     - Cut scene: refusedFinalAnim
    47     - Cut scene: refusedFinalAnim
    46     > Victory
    48     > Victory
    47 | Attack: Player attacks cyborg
    49 | Attack: Player attacks cyborg
    52     - Stronglings defeated
    54     - Stronglings defeated
    53     - Cut scene: attackedFinalAnim
    55     - Cut scene: attackedFinalAnim
    54     > Victory
    56     > Victory
    55 
    57 
    56 == Non-linear events ==
    58 == Non-linear events ==
    57 | Dense Cloud or Leaks A Lot dead (exceptions: killed by cyborg; or Dense Cloud died in same turn as the Stronglings):
    59 | Dense Cloud or Leaks A Lot dead (exceptions: killed by cyborg; or Leaks A Lot died in the battle against the Stronglings):
    58     > Game over
    60     > Game over
    59 
    61 
    60 ]]
    62 ]]
    61 
    63 
    62 HedgewarsScriptLoad("/Scripts/Locale.lua")
    64 HedgewarsScriptLoad("/Scripts/Locale.lua")
   157   AddEvent(CheckStronglingsDead, {}, DoStronglingsDeadRefused, {}, 0)
   159   AddEvent(CheckStronglingsDead, {}, DoStronglingsDeadRefused, {}, 0)
   158   AddAmmo(cannibals[6], amGrenade, 1)
   160   AddAmmo(cannibals[6], amGrenade, 1)
   159   AddAmmo(cannibals[7], amGrenade, 1)
   161   AddAmmo(cannibals[7], amGrenade, 1)
   160   AddAmmo(cannibals[8], amGrenade, 1)
   162   AddAmmo(cannibals[8], amGrenade, 1)
   161   AddAmmo(cannibals[9], amGrenade, 1)
   163   AddAmmo(cannibals[9], amGrenade, 1)
       
   164   AddAmmo(dense, amSkip, 100)
       
   165   AddAmmo(leaks, amSkip, 100)
   162   stage = ramonStage
   166   stage = ramonStage
   163   SwitchHog(cannibals[9])
   167   SwitchHog(cannibals[9])
   164   FollowGear(ramon)
   168   FollowGear(ramon)
   165   EndTurn(true)
   169   EndTurn(true)
   166   SetGearMessage(ramon, 0)
   170   SetGearMessage(ramon, 0)
   775 
   779 
   776 function DoWeaklingsKilled()
   780 function DoWeaklingsKilled()
   777   if stage == loseStage then
   781   if stage == loseStage then
   778     return
   782     return
   779   end
   783   end
       
   784   if denseDead or GetHealth(dense) == 0 or leaksDead or GetHealth(leaks) == 0 then
       
   785     return
       
   786   end
   780   SetGearMessage(CurrentHedgehog, 0)
   787   SetGearMessage(CurrentHedgehog, 0)
   781   AddAnim(stronglingsAnim)
   788   AddAnim(stronglingsAnim)
   782   AddFunction({func = AfterStronglingsAnim, args = {}})
   789   AddFunction({func = AfterStronglingsAnim, args = {}})
   783   stage = interWeakStage
   790   stage = interWeakStage
   784   DismissTeam(loc("Weaklings"))
   791   DismissTeam(loc("Weaklings"))
   870 
   877 
   871 function DoReadyForStronglings()
   878 function DoReadyForStronglings()
   872   if stage == loseStage then
   879   if stage == loseStage then
   873     return
   880     return
   874   end
   881   end
   875   ShowMission(loc("The Shadow Falls"), loc("The guardian"), loc("Protect yourselves!|Grenade hint: set the timer with [1-5], aim with [Up]/[Down] and hold [Space] to set power").."|"..loc("Both your hedgehogs must survive."), 1, 8000)
   882   ShowMission(loc("The Shadow Falls"), loc("The guardian"), loc("Protect yourselves!|Grenade hint: set the timer with [1-5], aim with [Up]/[Down] and hold [Space] to set power").."|"..loc("Leaks A Lot must survive!"), 1, 8000)
   876   AddAmmo(dense, amSkip, 100)
   883   AddAmmo(dense, amSkip, 100)
   877   AddAmmo(dense, amSwitch, 100)
   884   AddAmmo(dense, amSwitch, 100)
   878   AddAmmo(leaks, amSkip, 100)
   885   AddAmmo(leaks, amSkip, 100)
   879   AddAmmo(leaks, amSwitch, 100)
   886   AddAmmo(leaks, amSwitch, 100)
   880   stage = duoStage
   887   stage = duoStage
   894   TurnTimeLeft = TurnTime
   901   TurnTimeLeft = TurnTime
   895 end
   902 end
   896 
   903 
   897 function DoStronglingsDead()
   904 function DoStronglingsDead()
   898   if stage == loseStage then
   905   if stage == loseStage then
       
   906     return
       
   907   end
       
   908   if leaksDead or GetHealth(leaks) == 0 then
   899     return
   909     return
   900   end
   910   end
   901   SetGearMessage(CurrentHedgehog, 0)
   911   SetGearMessage(CurrentHedgehog, 0)
   902   if denseDead == true then
   912   if denseDead == true then
   903     AddAnim(acceptedDiedFinalAnim)
   913     AddAnim(acceptedDiedFinalAnim)