share/hedgewars/Data/Missions/Campaign/A Classic Fairytale/shadow.lua
changeset 7530 0ba32e5412ce
parent 7522 21acf357d7fd
child 7675 58620e9e5ed5
equal deleted inserted replaced
7527:35d154745d7a 7530:0ba32e5412ce
    90   SpawnUtilityCrate(2495, 1519, amGrenade)
    90   SpawnUtilityCrate(2495, 1519, amGrenade)
    91   SpawnUtilityCrate(2620, 1524, amRope)
    91   SpawnUtilityCrate(2620, 1524, amRope)
    92   ShowMission(loc("The Shadow Falls"), loc("The Showdown"), loc("Save Leaks A Lot!|Hint: The Switch utility might be of help to you."), 1, 6000)
    92   ShowMission(loc("The Shadow Falls"), loc("The Showdown"), loc("Save Leaks A Lot!|Hint: The Switch utility might be of help to you."), 1, 6000)
    93   RemoveEventFunc(CheckDenseDead)
    93   RemoveEventFunc(CheckDenseDead)
    94   AddEvent(CheckStronglingsDead, {}, DoStronglingsDeadRefused, {}, 0)
    94   AddEvent(CheckStronglingsDead, {}, DoStronglingsDeadRefused, {}, 0)
    95   AddAmmo(cannibals[6], amGrenade, 5)
    95   AddAmmo(cannibals[6], amGrenade, 1)
       
    96   AddAmmo(cannibals[7], amGrenade, 1)
       
    97   AddAmmo(cannibals[8], amGrenade, 1)
       
    98   AddAmmo(cannibals[9], amGrenade, 1)
    96   stage = ramonStage
    99   stage = ramonStage
    97   SwitchHog(cannibals[9])
   100   SwitchHog(cannibals[9])
    98   FollowGear(ramon)
   101   FollowGear(ramon)
    99   TurnTimeLeft = 0
   102   TurnTimeLeft = 0
   100   SetGearMessage(ramon, 0)
   103   SetGearMessage(ramon, 0)
   123   AnimSwitchHog(leaks)
   126   AnimSwitchHog(leaks)
   124   SetInputMask(0xFFFFFFFF)
   127   SetInputMask(0xFFFFFFFF)
   125 end
   128 end
   126 
   129 
   127 function AfterWeaklingsAnim()
   130 function AfterWeaklingsAnim()
   128   AddAmmo(cannibals[2], amShotgun, 4)
   131   AddAmmo(cannibals[2], amShotgun, 1)
   129   AddAmmo(cannibals[2], amGrenade, 3)
   132   AddAmmo(cannibals[2], amGrenade, 1)
       
   133   AddAmmo(cannibals[3], amShotgun, 1)
       
   134   AddAmmo(cannibals[3], amGrenade, 1)
       
   135   AddAmmo(cannibals[4], amShotgun, 1)
       
   136   AddAmmo(cannibals[4], amGrenade, 1)
       
   137   AddAmmo(cannibals[5], amShotgun, 1)
       
   138   AddAmmo(cannibals[5], amGrenade, 1)
   130   AddAmmo(leaks, amSkip, 4)
   139   AddAmmo(leaks, amSkip, 4)
       
   140   AddAmmo(dense, amSkip, 4)
   131   AddEvent(CheckWeaklingsKilled, {}, DoWeaklingsKilled, {}, 0)
   141   AddEvent(CheckWeaklingsKilled, {}, DoWeaklingsKilled, {}, 0)
   132   SetHealth(SpawnHealthCrate(2757, 1030), 50)
   142   SetHealth(SpawnHealthCrate(2757, 1030), 50)
   133   SetHealth(SpawnHealthCrate(2899, 1009), 50)
   143   SetHealth(SpawnHealthCrate(2899, 1009), 50)
   134   stage = wave1Stage
   144   stage = wave1Stage
   135   SwitchHog(dense)
   145   SwitchHog(dense)
   158   AddEvent(CheckRefuse, {}, DoRefuse, {}, 0)
   168   AddEvent(CheckRefuse, {}, DoRefuse, {}, 0)
   159   AddEvent(CheckAccept, {}, DoAccept, {}, 0)
   169   AddEvent(CheckAccept, {}, DoAccept, {}, 0)
   160   AddEvent(CheckConfront, {}, DoConfront, {}, 0)
   170   AddEvent(CheckConfront, {}, DoConfront, {}, 0)
   161   AddAmmo(dense, amSwitch, 0)
   171   AddAmmo(dense, amSwitch, 0)
   162   AddAmmo(dense, amSkip, 0)
   172   AddAmmo(dense, amSkip, 0)
       
   173   AddAmmo(leaks, amSwitch, 0)
       
   174   AddAmmo(leaks, amSkip, 0)
   163   SetHealth(SpawnHealthCrate(2557, 1030), 50)
   175   SetHealth(SpawnHealthCrate(2557, 1030), 50)
   164   SetHealth(SpawnHealthCrate(3599, 1009), 50)
   176   SetHealth(SpawnHealthCrate(3599, 1009), 50)
   165   TurnTimeLeft = 0
   177   TurnTimeLeft = 0
   166 end
   178 end
   167 
   179 
   178     RestoreHog(cyborg)
   190     RestoreHog(cyborg)
   179     cyborgHidden = false
   191     cyborgHidden = false
   180   end
   192   end
   181   SetState(cyborg, 0)
   193   SetState(cyborg, 0)
   182   SetState(dense, 0)
   194   SetState(dense, 0)
   183   AnimSetGearPosition(dense, 1350, 1310)
   195   AnimSetGearPosition(dense, 1350, 1315)
   184   FollowGear(dense)
   196   FollowGear(dense)
   185   HogTurnLeft(dense, true)
   197   HogTurnLeft(dense, true)
   186   AnimSetGearPosition(cyborg, 1250, 1310)
   198   AnimSetGearPosition(cyborg, 1250, 1315)
   187   SwitchHog(dense)
   199   SwitchHog(dense)
   188   SetInputMask(0xFFFFFFFF)
   200   SetInputMask(0xFFFFFFFF)
   189 end
   201 end
   190 
   202 
   191 function RestartReturnAccepted()
   203 function RestartReturnAccepted()
   224 end
   236 end
   225 
   237 
   226 function AfterAttackedAnim()
   238 function AfterAttackedAnim()
   227   stage = aloneStage
   239   stage = aloneStage
   228   ShowMission(loc("The Shadow Falls"), loc("The Individualist"), loc("Defeat the cannibals!|Grenade hint: set the timer with [1-5], aim with [Up]/[Down] and hold [Space] to set power"), 1, 8000)
   240   ShowMission(loc("The Shadow Falls"), loc("The Individualist"), loc("Defeat the cannibals!|Grenade hint: set the timer with [1-5], aim with [Up]/[Down] and hold [Space] to set power"), 1, 8000)
   229   AddAmmo(cannibals[6], amGrenade, 5)
   241   AddAmmo(cannibals[6], amGrenade, 1)
   230   AddAmmo(cannibals[6], amFirePunch, 0)
   242   AddAmmo(cannibals[6], amFirePunch, 0)
   231   AddAmmo(cannibals[6], amBaseballBat, 0)
   243   AddAmmo(cannibals[6], amBaseballBat, 0)
       
   244   AddAmmo(cannibals[7], amGrenade, 1)
       
   245   AddAmmo(cannibals[7], amFirePunch, 0)
       
   246   AddAmmo(cannibals[7], amBaseballBat, 0)
       
   247   AddAmmo(cannibals[8], amGrenade, 1)
       
   248   AddAmmo(cannibals[8], amFirePunch, 0)
       
   249   AddAmmo(cannibals[8], amBaseballBat, 0)
       
   250   AddAmmo(cannibals[9], amGrenade, 1)
       
   251   AddAmmo(cannibals[9], amFirePunch, 0)
       
   252   AddAmmo(cannibals[9], amBaseballBat, 0)
   232   SetGearMessage(leaks, 0)
   253   SetGearMessage(leaks, 0)
   233   TurnTimeLeft = TurnTime
   254   TurnTimeLeft = TurnTime
   234   AddEvent(CheckStronglingsDead, {}, DoStronglingsDeadAttacked, {}, 0)
   255   AddEvent(CheckStronglingsDead, {}, DoStronglingsDeadAttacked, {}, 0)
   235   SwitchHog(leaks)
   256   SwitchHog(leaks)
   236   AnimWait(dense, 1)
   257   AnimWait(dense, 1)
   705 
   726 
   706 function DoTookWeapons()
   727 function DoTookWeapons()
   707   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"), 1, 8000)
   728   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"), 1, 8000)
   708   AddAmmo(dense, amSkip, 100)
   729   AddAmmo(dense, amSkip, 100)
   709   AddAmmo(dense, amSwitch, 100)
   730   AddAmmo(dense, amSwitch, 100)
       
   731   AddAmmo(leaks, amSkip, 100)
       
   732   AddAmmo(leaks, amSwitch, 100)
   710   stage = duoStage
   733   stage = duoStage
   711   RemoveEventFunc(CheckNeedGirder)
   734   RemoveEventFunc(CheckNeedGirder)
   712   RemoveEventFunc(CheckNeedWeapons)
   735   RemoveEventFunc(CheckNeedWeapons)
   713   RemoveEventFunc(CheckRestartReturnAccepted)
   736   RemoveEventFunc(CheckRestartReturnAccepted)
   714   AddEvent(CheckStronglingsDead, {}, DoStronglingsDead, {}, 0)
   737   AddEvent(CheckStronglingsDead, {}, DoStronglingsDead, {}, 0)
   715   AddAmmo(cannibals[6], amGrenade, 7)
   738   AddAmmo(cannibals[6], amGrenade, 2)
   716   AddAmmo(cannibals[6], amShotgun, 7)
   739   AddAmmo(cannibals[6], amShotgun, 2)
       
   740   AddAmmo(cannibals[7], amGrenade, 2)
       
   741   AddAmmo(cannibals[7], amShotgun, 2)
       
   742   AddAmmo(cannibals[8], amGrenade, 2)
       
   743   AddAmmo(cannibals[8], amShotgun, 2)
       
   744   AddAmmo(cannibals[9], amGrenade, 2)
       
   745   AddAmmo(cannibals[9], amShotgun, 2)
   717   SetGearMessage(leaks, 0)
   746   SetGearMessage(leaks, 0)
   718   SetGearMessage(dense, 0)
   747   SetGearMessage(dense, 0)
   719   TurnTimeLeft = TurnTime
   748   TurnTimeLeft = TurnTime
   720 end
   749 end
   721 
   750 
   825 end
   854 end
   826 
   855 
   827 function onGameStart()
   856 function onGameStart()
   828   HideHogs()
   857   HideHogs()
   829   AddAmmo(leaks, amSwitch, 100)
   858   AddAmmo(leaks, amSwitch, 100)
       
   859   AddAmmo(dense, amSwitch, 100)
   830   AddEvent(CheckLeaksDead, {}, DoDead, {}, 0)
   860   AddEvent(CheckLeaksDead, {}, DoDead, {}, 0)
   831   AddEvent(CheckDenseDead, {}, DoDead, {}, 0)
   861   AddEvent(CheckDenseDead, {}, DoDead, {}, 0)
   832   AddAnim(startDialogue)
   862   AddAnim(startDialogue)
   833   AddFunction({func = AfterStartDialogue, args = {}})
   863   AddFunction({func = AfterStartDialogue, args = {}})
   834   AddEvent(CheckBrainiacDead, {}, DoBrainiacDead, {}, 0)
   864   AddEvent(CheckBrainiacDead, {}, DoBrainiacDead, {}, 0)