share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/dragon.lua
changeset 13745 2bb7141496a9
parent 13588 141cdfe0f3ca
child 14490 f37910a73c19
equal deleted inserted replaced
13744:b3b55b03d499 13745:2bb7141496a9
   360     SpawnCrateByID(i)
   360     SpawnCrateByID(i)
   361     cratesNum = cratesNum + 1
   361     cratesNum = cratesNum + 1
   362   end
   362   end
   363   FollowGear(native)
   363   FollowGear(native)
   364   AddNewEvent(CheckGearsDead, {{crates[1], crates[2]}}, PutCrates, {2}, 0) 
   364   AddNewEvent(CheckGearsDead, {{crates[1], crates[2]}}, PutCrates, {2}, 0) 
   365   TurnTimeLeft = TurnTime
   365   SetTurnTimeLeft(TurnTime)
   366   ShowMission(loc("Dragon's Lair"), loc("Obstacle course"), loc("In order to get to the other side, you need to get rid of the crates first.") .. "|" ..
   366   ShowMission(loc("Dragon's Lair"), loc("Obstacle course"), loc("In order to get to the other side, you need to get rid of the crates first.") .. "|" ..
   367                                                   loc("As the ammo is sparse, you might want to reuse ropes while mid-air.") .. "|" ..
   367                                                   loc("As the ammo is sparse, you might want to reuse ropes while mid-air.") .. "|" ..
   368                                                   loc("The enemy can't move but it might be a good idea to stay out of sight!") .. "|" ..
   368                                                   loc("The enemy can't move but it might be a good idea to stay out of sight!") .. "|" ..
   369                                                   loc("Mines time: 5 seconds"), 1, 0)
   369                                                   loc("Mines time: 5 seconds"), 1, 0)
   370 end
   370 end
   379 end
   379 end
   380 
   380 
   381 function AfterKillAnim()
   381 function AfterKillAnim()
   382   if not cyborgsKilledBeforeCrates then
   382   if not cyborgsKilledBeforeCrates then
   383     PutWeaponCrates()
   383     PutWeaponCrates()
   384     TurnTimeLeft = TurnTime
   384     SetTurnTimeLeft(TurnTime)
   385     AddEvent(CheckCyborgsDead, {}, DoCyborgsDead, {}, 0)
   385     AddEvent(CheckCyborgsDead, {}, DoCyborgsDead, {}, 0)
   386     ShowMission(loc("Dragon's Lair"), loc("The Slaughter"), loc("Kill the aliens!").."|"..loc("Mines time: 5 seconds"), 1, 2000)
   386     ShowMission(loc("Dragon's Lair"), loc("The Slaughter"), loc("Kill the aliens!").."|"..loc("Mines time: 5 seconds"), 1, 2000)
   387   end
   387   end
   388 end
   388 end
   389 
   389 
   394 end
   394 end
   395 
   395 
   396 function AfterKilledAnim()
   396 function AfterKilledAnim()
   397   -- Final mission segment with the portal gun
   397   -- Final mission segment with the portal gun
   398   HideHedge(cyborg)
   398   HideHedge(cyborg)
   399   TurnTimeLeft = TurnTime
   399   SetTurnTimeLeft(TurnTime)
   400   SetGearMessage(native, 0)
   400   SetGearMessage(native, 0)
   401   SpawnSupplyCrate(1184, 399, amPortalGun, 100)
   401   SpawnSupplyCrate(1184, 399, amPortalGun, 100)
   402   SpawnSupplyCrate(2259, 755, amTeleport, 2)
   402   SpawnSupplyCrate(2259, 755, amTeleport, 2)
   403   SpawnHealthCrate(secondPos[1][1] + 50, secondPos[1][2] - 20)
   403   SpawnHealthCrate(secondPos[1][1] + 50, secondPos[1][2] - 20)
   404   ShowMission(loc("Dragon's Lair"), loc("The what?!"), loc("Use the portal gun to get to the next crate, then use the new gun to get to the final destination!|")..
   404   ShowMission(loc("Dragon's Lair"), loc("The what?!"), loc("Use the portal gun to get to the next crate, then use the new gun to get to the final destination!|")..
   743   if GetHogTeamName(CurrentHedgehog) == loc("011101000") then
   743   if GetHogTeamName(CurrentHedgehog) == loc("011101000") then
   744     if TotalRounds % 6 == 0 then
   744     if TotalRounds % 6 == 0 then
   745       AddAmmo(CurrentHedgehog, amSniperRifle, 1)
   745       AddAmmo(CurrentHedgehog, amSniperRifle, 1)
   746       AddAmmo(CurrentHedgehog, amDEagle, 1)
   746       AddAmmo(CurrentHedgehog, amDEagle, 1)
   747     end
   747     end
   748     TurnTimeLeft = 30000
   748     SetTurnTimeLeft(30000)
   749   elseif GetHogTeamName(CurrentHedgehog) == loc("011101001") then
   749   elseif GetHogTeamName(CurrentHedgehog) == loc("011101001") then
   750     EndTurn(true)
   750     EndTurn(true)
   751   end
   751   end
   752 end
   752 end
   753 
   753