diff -r 4aec7d17ef7d -r 8bd005067f4a share/hedgewars/Data/Missions/Challenge/Basic_Training_-_Sniper_Rifle.lua --- a/share/hedgewars/Data/Missions/Challenge/Basic_Training_-_Sniper_Rifle.lua Mon Jan 21 21:06:55 2019 +0100 +++ b/share/hedgewars/Data/Missions/Challenge/Basic_Training_-_Sniper_Rifle.lua Mon Jan 21 22:17:29 2019 +0100 @@ -300,6 +300,9 @@ elseif score == 9 then spawnTarget(2930,1500) elseif score == 10 then + -- The "tricky" target. + -- It spawns behind a wall + -- and needs at least 2 shots. AddCaption(loc("This one's tricky.")); spawnTarget(700,720) elseif score == 11 then @@ -383,8 +386,16 @@ SaveMissionVar("Won", "true") AddCaption(loc("Victory!"), capcolDefault, capgrpGameState) ShowMission(loc("Sniper Training"), loc("Aiming Practice"), loc("Congratulations! You've eliminated all targets|within the allowed time frame."), 0, 0) - -- Also let the hogs shout "victory!" - PlaySound(sndVictory, CurrentHedgehog) + -- Play voice + if shots-1 <= score then + -- Flawless victory condition: Only 1 shot more than targets + -- (1 shot per "normal" target + 2 shots for the "tricky" target) + PlaySound(sndFlawless, CurrentHedgehog) + else + -- "Normal" victory + PlaySound(sndVictory, CurrentHedgehog) + end + FollowGear(CurrentHedgehog) -- Unselect sniper rifle and disable hog controls @@ -408,6 +419,7 @@ local accuracy local accuracy_int if shots > 0 then + -- NOTE: 100% accuracy is not possible due to the "tricky" target. accuracy = (score/shots)*100 accuracy_int = div(score*100, shots) end