share/hedgewars/Data/Scripts/TargetPractice.lua
changeset 14654 8bd005067f4a
parent 14648 be8af70adf2c
child 14928 4c5fb1ee75b7
equal deleted inserted replaced
14653:4aec7d17ef7d 14654:8bd005067f4a
   263 			else
   263 			else
   264 				if not game_lost then
   264 				if not game_lost then
   265 					SaveMissionVar("Won", "true")
   265 					SaveMissionVar("Won", "true")
   266 					AddCaption(loc("You have destroyed all targets!"), capcolDefault, capgrpGameState)
   266 					AddCaption(loc("You have destroyed all targets!"), capcolDefault, capgrpGameState)
   267 					ShowMission(params.missionTitle, loc("Aiming practice"), loc("Congratulations! You have destroyed all targets within the time."), 0, 0)
   267 					ShowMission(params.missionTitle, loc("Aiming practice"), loc("Congratulations! You have destroyed all targets within the time."), 0, 0)
   268 					PlaySound(sndVictory, player)
   268 					if shots <= scored then
       
   269 						-- No misses!
       
   270 						PlaySound(sndFlawless, player)
       
   271 					else
       
   272 						PlaySound(sndVictory, player)
       
   273 					end
   269 					SetEffect(player, heInvulnerable, 1)
   274 					SetEffect(player, heInvulnerable, 1)
   270 					SetState(player, bor(GetState(player), gstWinner))
   275 					SetState(player, bor(GetState(player), gstWinner))
   271 					time_goal = TurnTimeLeft
   276 					time_goal = TurnTimeLeft
   272 					-- Disable control
   277 					-- Disable control
   273 					SetInputMask(0)
   278 					SetInputMask(0)