share/hedgewars/Data/Missions/Scenario/User_Mission_-_Dangerous_Ducklings.lua
changeset 13745 2bb7141496a9
parent 13588 141cdfe0f3ca
child 13749 4b79bac864be
equal deleted inserted replaced
13744:b3b55b03d499 13745:2bb7141496a9
   112 	if gameLost == true then
   112 	if gameLost == true then
   113 		endTimer = endTimer + 1
   113 		endTimer = endTimer + 1
   114 		if (CurrentHedgehog ~= nil) and (CurrentHedgehog == instructor) then
   114 		if (CurrentHedgehog ~= nil) and (CurrentHedgehog == instructor) then
   115 			if endTimer >= 3000 then
   115 			if endTimer >= 3000 then
   116 				--SetHealth(instructor,0)
   116 				--SetHealth(instructor,0)
   117 				TurnTimeLeft = 1
   117 				SetTurnTimeLeft(1)
   118 				DismissTeam(loc("Bloody Rookies"))
   118 				DismissTeam(loc("Bloody Rookies"))
   119 			end
   119 			end
   120 			ShowMission(loc("Dangerous Ducklings"), loc("MISSION FAILED"), loc("You've failed. Try again."), -amRope, 5000);
   120 			ShowMission(loc("Dangerous Ducklings"), loc("MISSION FAILED"), loc("You've failed. Try again."), -amRope, 5000);
   121 		end
   121 		end
   122 	end
   122 	end
   134 	if GetGearType(gear) == gtHedgehog then
   134 	if GetGearType(gear) == gtHedgehog then
   135 		if gear == player then
   135 		if gear == player then
   136 			gameLost = true
   136 			gameLost = true
   137 		elseif (gear == instructor) and (GetY(gear) > WaterLine) then
   137 		elseif (gear == instructor) and (GetY(gear) > WaterLine) then
   138 			HogSay(player, loc("See ya!"), SAY_THINK)
   138 			HogSay(player, loc("See ya!"), SAY_THINK)
   139 			TurnTimeLeft = 3000
   139 			SetTurnTimeLeft(3000)
   140 			awardAchievement(loc("Naughty Ninja"))
   140 			awardAchievement(loc("Naughty Ninja"))
   141 			DismissTeam(loc("Blue Team"))
   141 			DismissTeam(loc("Blue Team"))
   142 			gameWon = true
   142 			gameWon = true
   143 		elseif gear == enemy then
   143 		elseif gear == enemy then
   144 			HogSay(player, loc("Enjoy the swim..."), SAY_THINK)
   144 			HogSay(player, loc("Enjoy the swim..."), SAY_THINK)
   145 			gameWon = true
   145 			gameWon = true
   146 			TurnTimeLeft = 3000
   146 			SetTurnTimeLeft(3000)
   147 		end
   147 		end
   148 
   148 
   149 	end
   149 	end
   150 end
   150 end