share/hedgewars/Data/Missions/Scenario/User_Mission_-_Spooky_Tree.lua
changeset 15015 a1165392c9db
parent 14932 ff4003a90ff8
child 15091 5c8c729a16ce
equal deleted inserted replaced
15014:f877fbeaee6c 15015:a1165392c9db
   144 
   144 
   145 	if GetGearType(gear) == gtCase then
   145 	if GetGearType(gear) == gtCase then
   146 		SetTurnTimeLeft(TurnTimeLeft + 5000)
   146 		SetTurnTimeLeft(TurnTimeLeft + 5000)
   147 	end
   147 	end
   148 
   148 
   149 	if (gear == enemy) and (GameOver == false) then
   149 end
       
   150 
       
   151 function onGameResult(winner)
       
   152 	if winner == 0 then
   150 		ShowMission(loc("Spooky Tree"), loc("MISSION SUCCESSFUL"), loc("Congratulations!"), 0, 0);
   153 		ShowMission(loc("Spooky Tree"), loc("MISSION SUCCESSFUL"), loc("Congratulations!"), 0, 0);
   151 		SaveMissionVar("Won", "true")
   154 		SaveMissionVar("Won", "true")
   152 	elseif gear == player then
   155 		GameOver = true
       
   156 	else
   153 		ShowMission(loc("Spooky Tree"), loc("MISSION FAILED"), loc("Oh no! Just try again!"), -amSkip, 0)
   157 		ShowMission(loc("Spooky Tree"), loc("MISSION FAILED"), loc("Oh no! Just try again!"), -amSkip, 0)
   154 		GameOver = true
   158 		GameOver = true
   155 	end
   159 	end
   156 
       
   157 end
   160 end