share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/shadow.lua
changeset 13740 2bb7141496a9
parent 13583 141cdfe0f3ca
child 13750 110d6c1e817f
equal deleted inserted replaced
13739:b3b55b03d499 13740:2bb7141496a9
   187   if stage == loseStage then
   187   if stage == loseStage then
   188     return
   188     return
   189   end
   189   end
   190   stage = spyStage
   190   stage = spyStage
   191   ShowMission(loc("The Shadow Falls"), loc("Play with me!"), loc("Kill the cannibal!").."|"..loc("Both your hedgehogs must survive."), 1, 6000)
   191   ShowMission(loc("The Shadow Falls"), loc("Play with me!"), loc("Kill the cannibal!").."|"..loc("Both your hedgehogs must survive."), 1, 6000)
   192   TurnTimeLeft = TurnTime
   192   SetTurnTimeLeft(TurnTime)
   193 end
   193 end
   194 
   194 
   195 
   195 
   196 function StartSkipFunc()
   196 function StartSkipFunc()
   197   if stage == loseStage then
   197   if stage == loseStage then
   221   SetHealth(SpawnHealthCrate(2899, 1009), 50)
   221   SetHealth(SpawnHealthCrate(2899, 1009), 50)
   222   stage = wave1Stage
   222   stage = wave1Stage
   223   SwitchHog(dense)
   223   SwitchHog(dense)
   224   SetGearMessage(dense, 0)
   224   SetGearMessage(dense, 0)
   225   SetGearMessage(leaks, 0)
   225   SetGearMessage(leaks, 0)
   226   TurnTimeLeft = TurnTime
   226   SetTurnTimeLeft(TurnTime)
   227   ShowMission(loc("The Shadow Falls"), loc("Why do you not like me?"), loc("Obliterate them!|Hint: You might want to take cover...").."|"..loc("Both your hedgehogs must survive."), 1, 6000)
   227   ShowMission(loc("The Shadow Falls"), loc("Why do you not like me?"), loc("Obliterate them!|Hint: You might want to take cover...").."|"..loc("Both your hedgehogs must survive."), 1, 6000)
   228 end
   228 end
   229 
   229 
   230 function SkipWeaklingsAnim()
   230 function SkipWeaklingsAnim()
   231   if stage == loseStage then
   231   if stage == loseStage then
   328   AddAmmo(cannibals[8], amBaseballBat, 0)
   328   AddAmmo(cannibals[8], amBaseballBat, 0)
   329   AddAmmo(cannibals[9], amGrenade, 1)
   329   AddAmmo(cannibals[9], amGrenade, 1)
   330   AddAmmo(cannibals[9], amFirePunch, 0)
   330   AddAmmo(cannibals[9], amFirePunch, 0)
   331   AddAmmo(cannibals[9], amBaseballBat, 0)
   331   AddAmmo(cannibals[9], amBaseballBat, 0)
   332   SetGearMessage(leaks, 0)
   332   SetGearMessage(leaks, 0)
   333   TurnTimeLeft = TurnTime
   333   SetTurnTimeLeft(TurnTime)
   334   AddEvent(CheckStronglingsDead, {}, DoStronglingsDeadAttacked, {}, 0)
   334   AddEvent(CheckStronglingsDead, {}, DoStronglingsDeadAttacked, {}, 0)
   335   SwitchHog(leaks)
   335   SwitchHog(leaks)
   336   AnimWait(dense, 1)
   336   AnimWait(dense, 1)
   337   AddFunction({func = HideHog, args = {cyborg}})
   337   AddFunction({func = HideHog, args = {cyborg}})
   338 end
   338 end
   891   AddAmmo(cannibals[8], amShotgun, 2)
   891   AddAmmo(cannibals[8], amShotgun, 2)
   892   AddAmmo(cannibals[9], amGrenade, 2)
   892   AddAmmo(cannibals[9], amGrenade, 2)
   893   AddAmmo(cannibals[9], amShotgun, 2)
   893   AddAmmo(cannibals[9], amShotgun, 2)
   894   SetGearMessage(leaks, 0)
   894   SetGearMessage(leaks, 0)
   895   SetGearMessage(dense, 0)
   895   SetGearMessage(dense, 0)
   896   TurnTimeLeft = TurnTime
   896   SetTurnTimeLeft(TurnTime)
   897 end
   897 end
   898 
   898 
   899 function DoStronglingsDead()
   899 function DoStronglingsDead()
   900   if stage == loseStage then
   900   if stage == loseStage then
   901     return
   901     return
  1089   SetAmmo(amSkip, 9, 0, 0, 0)
  1089   SetAmmo(amSkip, 9, 0, 0, 0)
  1090 end
  1090 end
  1091 
  1091 
  1092 function onNewTurn()
  1092 function onNewTurn()
  1093   if AnimInProgress() then
  1093   if AnimInProgress() then
  1094     TurnTimeLeft = -1
  1094     SetTurnTimeLeft(cMaxTurnTime)
  1095   elseif stage == cyborgStage then
  1095   elseif stage == cyborgStage then
  1096     if CurrentHedgehog ~= dense then
  1096     if CurrentHedgehog ~= dense then
  1097       EndTurn(true)
  1097       EndTurn(true)
  1098     else
  1098     else
  1099       TurnTimeLeft = -1
  1099       SetTurnTimeLeft(cMaxTurnTime)
  1100     end
  1100     end
  1101   elseif stage == acceptedReturnStage then
  1101   elseif stage == acceptedReturnStage then
  1102     SwitchHog(dense)
  1102     SwitchHog(dense)
  1103     FollowGear(dense)
  1103     FollowGear(dense)
  1104     TurnTimeLeft = -1
  1104     SetTurnTimeLeft(cMaxTurnTime)
  1105   end
  1105   end
  1106 end
  1106 end
  1107 
  1107 
  1108 function onGearDamage(gear, damage)
  1108 function onGearDamage(gear, damage)
  1109   if gear == cyborg and stage == cyborgStage then
  1109   if gear == cyborg and stage == cyborgStage then