share/hedgewars/Data/Missions/Scenario/User_Mission_-_Bamboo_Thicket.lua
changeset 15015 a1165392c9db
parent 14932 ff4003a90ff8
child 15091 5c8c729a16ce
equal deleted inserted replaced
15014:f877fbeaee6c 15015:a1165392c9db
    73 		firedShell = true
    73 		firedShell = true
    74 	end
    74 	end
    75 
    75 
    76 end
    76 end
    77 
    77 
    78 function onGearDelete(gear)
    78 function onGameResult(winner)
    79 
    79 
    80 	if (gear == enemy) then
    80 	if (winner == 0) then
    81 		
    81 		
    82 		SaveMissionVar("Won", "true")
    82 		SaveMissionVar("Won", "true")
    83 		ShowMission(loc("Bamboo Thicket"), loc("MISSION SUCCESSFUL"), loc("Congratulations!"), 0, 0)
    83 		ShowMission(loc("Bamboo Thicket"), loc("MISSION SUCCESSFUL"), loc("Congratulations!"), 0, 0)
    84 		
    84 		
    85 		if (turnNumber < 6) and (firedShell == false) then
    85 		if (turnNumber < 6) and (firedShell == false) then
    86 			awardAchievement(loc("Energetic Engineer"))
    86 			awardAchievement(loc("Energetic Engineer"))
    87 		end
    87 		end
    88 
    88 
    89 	elseif gear == player then
    89 	else
    90 		ShowMission(loc("Bamboo Thicket"), loc("MISSION FAILED"), loc("Oh no! Just try again!"), -amSkip, 0)
    90 		ShowMission(loc("Bamboo Thicket"), loc("MISSION FAILED"), loc("Oh no! Just try again!"), -amSkip, 0)
    91 	end
    91 	end
    92 
    92 
    93 end
    93 end