share/hedgewars/Data/Missions/Scenario/User_Mission_-_Teamwork.lua
changeset 12357 7f09d01ecb45
parent 12234 04535e6dc15a
child 12591 7510fe66bfbb
equal deleted inserted replaced
12356:62b935bec899 12357:7f09d01ecb45
   105 	end
   105 	end
   106 
   106 
   107 	if GetGearType(gear) == gtCase then
   107 	if GetGearType(gear) == gtCase then
   108 		TurnTimeLeft = TurnTimeLeft + 5000
   108 		TurnTimeLeft = TurnTimeLeft + 5000
   109 	end
   109 	end
   110 
   110 	-- Note: The victory sequence is done automatically by Hedgewars
   111 	if (gear == enemy) and (GameOver == false) then
   111 	if  ( ((gear == player) or (gear == p2)) and (GameOver == false)) then
   112 		ShowMission(loc("Teamwork"), loc("MISSION SUCCESSFUL"), loc("Congratulations!"), 0, 0)
       
   113 		GameOver = true
       
   114 	elseif  ( ((gear == player) or (gear == p2)) and (GameOver == false)) then
       
   115 		ShowMission(loc("Teamwork"), loc("MISSION FAILED"), loc("Oh no! Just try again!"), -amSkip, 0)
   112 		ShowMission(loc("Teamwork"), loc("MISSION FAILED"), loc("Oh no! Just try again!"), -amSkip, 0)
   116 		GameOver = true
   113 		GameOver = true
   117 		SetHealth(p2,0)
   114 		SetHealth(p2,0)
   118 		SetHealth(player,0)
   115 		SetHealth(player,0)
   119 	end
   116 	end