share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/shadow.lua
changeset 12933 e65aa3c3d4e6
parent 12901 bdf8e80a97b8
child 13118 1ddb8aac5e30
equal deleted inserted replaced
12932:e0da398805b6 12933:e65aa3c3d4e6
   148 --------------------------Anim skip functions--------------------------
   148 --------------------------Anim skip functions--------------------------
   149 function AfterRefusedAnim()
   149 function AfterRefusedAnim()
   150   if stage == loseStage then
   150   if stage == loseStage then
   151     return
   151     return
   152   end
   152   end
   153   SpawnUtilityCrate(2045, 1575, amSwitch)
   153   SpawnSupplyCrate(2045, 1575, amSwitch)
   154   SpawnAmmoCrate(2365, 1495, amShotgun)
   154   SpawnSupplyCrate(2365, 1495, amShotgun)
   155   SpawnAmmoCrate(2495, 1519, amGrenade)
   155   SpawnSupplyCrate(2495, 1519, amGrenade)
   156   SpawnUtilityCrate(2620, 1524, amRope)
   156   SpawnSupplyCrate(2620, 1524, amRope)
   157   ShowMission(loc("The Shadow Falls"), loc("The Showdown"), loc("Save Leaks A Lot!|Hint: The switch hedgehog utility might be of help to you."), 1, 6000)
   157   ShowMission(loc("The Shadow Falls"), loc("The Showdown"), loc("Save Leaks A Lot!|Hint: The switch hedgehog utility might be of help to you."), 1, 6000)
   158   RemoveEventFunc(CheckDenseDead)
   158   RemoveEventFunc(CheckDenseDead)
   159   AddEvent(CheckStronglingsDead, {}, DoStronglingsDeadRefused, {}, 0)
   159   AddEvent(CheckStronglingsDead, {}, DoStronglingsDeadRefused, {}, 0)
   160   AddAmmo(cannibals[6], amGrenade, 1)
   160   AddAmmo(cannibals[6], amGrenade, 1)
   161   AddAmmo(cannibals[7], amGrenade, 1)
   161   AddAmmo(cannibals[7], amGrenade, 1)
   291 function AfterAcceptedAnim()
   291 function AfterAcceptedAnim()
   292   if stage == loseStage then
   292   if stage == loseStage then
   293     return
   293     return
   294   end
   294   end
   295   stage = acceptedReturnStage
   295   stage = acceptedReturnStage
   296   SpawnUtilityCrate(1370, 810, amGirder)
   296   SpawnSupplyCrate(1370, 810, amGirder)
   297   SpawnUtilityCrate(1300, 810, amParachute)
   297   SpawnSupplyCrate(1300, 810, amParachute)
   298   ShowMission(loc("The Shadow Falls"), loc("The walk of Fame"), loc("Return to Leaks A Lot!"), 1, 6000)
   298   ShowMission(loc("The Shadow Falls"), loc("The walk of Fame"), loc("Return to Leaks A Lot!"), 1, 6000)
   299   AddEvent(CheckReadyForStronglings, {}, DoReadyForStronglings, {}, 0)
   299   AddEvent(CheckReadyForStronglings, {}, DoReadyForStronglings, {}, 0)
   300   AddEvent(CheckNeedGirder, {}, DoNeedGirder, {}, 0)
   300   AddEvent(CheckNeedGirder, {}, DoNeedGirder, {}, 0)
   301   AddEvent(CheckNeedWeapons, {}, DoNeedWeapons, {}, 0)
   301   AddEvent(CheckNeedWeapons, {}, DoNeedWeapons, {}, 0)
   302   RemoveEventFunc(CheckDenseDead)
   302   RemoveEventFunc(CheckDenseDead)
   346     return
   346     return
   347   end
   347   end
   348   if denseDead == false then
   348   if denseDead == false then
   349     DeleteGear(dense)
   349     DeleteGear(dense)
   350   end
   350   end
   351   SpawnAmmoCrate(2551, 994, amGrenade)
   351   SpawnSupplyCrate(2551, 994, amGrenade)
   352   SpawnAmmoCrate(3551, 994, amGrenade)
   352   SpawnSupplyCrate(3551, 994, amGrenade)
   353   SpawnAmmoCrate(3392, 1101, amShotgun)
   353   SpawnSupplyCrate(3392, 1101, amShotgun)
   354   SpawnAmmoCrate(3192, 1101, amShotgun)
   354   SpawnSupplyCrate(3192, 1101, amShotgun)
   355   AnimSetGearPosition(cyborg, unpack(cyborgPos))
   355   AnimSetGearPosition(cyborg, unpack(cyborgPos))
   356   SetState(cyborg, gstInvisible)
   356   SetState(cyborg, gstInvisible)
   357   AnimSwitchHog(leaks)
   357   AnimSwitchHog(leaks)
   358   SetInputMask(0xFFFFFFFF)
   358   SetInputMask(0xFFFFFFFF)
   359 end
   359 end
   360 
   360 
   361   
   361   
   362 -----------------------------Animations--------------------------------
   362 -----------------------------Animations--------------------------------
   363 
   363 
   364 function SpawnCrates()
   364 function SpawnCrates()
   365   SpawnAmmoCrate(2551, 994, amGrenade)
   365   SpawnSupplyCrate(2551, 994, amGrenade)
   366   SpawnAmmoCrate(3551, 994, amGrenade)
   366   SpawnSupplyCrate(3551, 994, amGrenade)
   367   SpawnAmmoCrate(3392, 1101, amShotgun)
   367   SpawnSupplyCrate(3392, 1101, amShotgun)
   368   SpawnAmmoCrate(3192, 1101, amShotgun)
   368   SpawnSupplyCrate(3192, 1101, amShotgun)
   369   return true
   369   return true
   370 end
   370 end
   371 
   371 
   372 function EmitDenseClouds(anim, dir)
   372 function EmitDenseClouds(anim, dir)
   373   if stage == loseStage then
   373   if stage == loseStage then
   861 
   861 
   862 function DoNeedWeapons()
   862 function DoNeedWeapons()
   863   if stage == loseStage then
   863   if stage == loseStage then
   864     return
   864     return
   865   end
   865   end
   866   grenadeCrate = SpawnAmmoCrate(2550, 800, amGrenade)
   866   grenadeCrate = SpawnSupplyCrate(2550, 800, amGrenade)
   867   shotgunCrate = SpawnAmmoCrate(2610, 850, amShotgun)
   867   shotgunCrate = SpawnSupplyCrate(2610, 850, amShotgun)
   868   AddCaption(loc("A little gift from the cyborgs"))
   868   AddCaption(loc("A little gift from the cyborgs"))
   869 end
   869 end
   870 
   870 
   871 function CheckReadyForStronglings()
   871 function CheckReadyForStronglings()
   872   if stage == loseStage then
   872   if stage == loseStage then