share/hedgewars/Data/Missions/Scenario/Big_Armory.lua
changeset 12231 b4878d6cd96e
parent 12230 f9565e2e0424
child 13056 b1a230d21a48
equal deleted inserted replaced
12230:f9565e2e0424 12231:b4878d6cd96e
    37 	MapFeatureSize = 12
    37 	MapFeatureSize = 12
    38 	-- Disable Sudden Death
    38 	-- Disable Sudden Death
    39 	WaterRise = 0
    39 	WaterRise = 0
    40 	HealthDecrease = 0
    40 	HealthDecrease = 0
    41 	
    41 	
    42 	AddTeam(playerTeamName, 0xFF0000, "Bone", "Island", "Classic", "cm_scout")
    42 	AddTeam(playerTeamName, 0xFF0000, "Bone", "Island", "Default", "cm_scout")
    43 	playerHog = AddHog(loc("Ultrasoldier"), 0, 100, "Terminator_Glasses")
    43 	playerHog = AddHog(loc("Ultrasoldier"), 0, 100, "Terminator_Glasses")
    44 	SetGearPosition(playerHog, 543, 1167)
    44 	SetGearPosition(playerHog, 543, 1167)
    45 
    45 
    46 	AddTeam(enemyTeamName, 0xF5F808, "Earth", "Island", "Classic", "cm_galaxy")
    46 	AddTeam(enemyTeamName, 0xF5F808, "Earth", "Island", "Default", "cm_galaxy")
    47 	for i=1,8 do
    47 	for i=1,8 do
    48 		local hogID = AddHog(enemyTeam1[i].name, 0, 100, "NoHat")
    48 		local hogID = AddHog(enemyTeam1[i].name, 0, 100, "NoHat")
    49 		table.insert(enemyHogs, hogID)
    49 		table.insert(enemyHogs, hogID)
    50 		SetGearPosition(hogID, enemyTeam1[i].x, enemyTeam1[i].y)
    50 		SetGearPosition(hogID, enemyTeam1[i].x, enemyTeam1[i].y)
    51 	end
    51 	end
   154 			end
   154 			end
   155 			if toleranceTimer ~= nil then
   155 			if toleranceTimer ~= nil then
   156 				if toleranceTimer % 1000 == 0 and toleranceTimer > 0 and toleranceTimer <= 5000 then
   156 				if toleranceTimer % 1000 == 0 and toleranceTimer > 0 and toleranceTimer <= 5000 then
   157 					AddCaption(string.format(loc("Mission failure in %d s"), div(toleranceTimer, 1000)), 0xFFFFFFFF, capgrpGameState)
   157 					AddCaption(string.format(loc("Mission failure in %d s"), div(toleranceTimer, 1000)), 0xFFFFFFFF, capgrpGameState)
   158 				end
   158 				end
   159 				if toleranceTimer == 4000 then
       
   160 					PlaySound(sndCountdown4)
       
   161 				elseif toleranceTimer == 3000 then
       
   162 					PlaySound(sndCountdown3)
       
   163 				elseif toleranceTimer == 2000 then
       
   164 					PlaySound(sndCountdown2)
       
   165 				elseif toleranceTimer == 1000 then
       
   166 					PlaySound(sndCountdown1)
       
   167 				end
       
   168 				if waitGears <= 0 then
   159 				if waitGears <= 0 then
   169 					if toleranceTimer <= 0 then
   160 					if toleranceTimer <= 0 then
   170 						lose()
   161 						lose()
   171 						return
   162 						return
   172 					end
   163 					end