Remove "loser" messages in challenges
authorWuzzy <Wuzzy2@mail.ru>
Mon, 14 Jan 2019 21:19:57 +0100
changeset 14590 c5f18710a184
parent 14587 164ec37e9e4b
child 14591 b4089fa16b34
Remove "loser" messages in challenges The point of challenges is not to "win", but to reach a highscore, so we need not to rub failure into the player's face.
share/hedgewars/Data/Locale/de.lua
share/hedgewars/Data/Maps/ClimbHome/map.lua
share/hedgewars/Data/Missions/Challenge/Basic_Training_-_Sniper_Rifle.lua
share/hedgewars/Data/Missions/Challenge/User_Mission_-_Rope_Knock_Challenge.lua
share/hedgewars/Data/Missions/Challenge/User_Mission_-_That_Sinking_Feeling.lua
share/hedgewars/Data/Scripts/TargetPractice.lua
--- a/share/hedgewars/Data/Locale/de.lua	Mon Jan 14 19:26:24 2019 +0100
+++ b/share/hedgewars/Data/Locale/de.lua	Mon Jan 14 21:19:57 2019 +0100
@@ -326,7 +326,7 @@
 ["Challenge"]="Herausforderung",
 ["Challenge Objectives"]="Herausforderungsziele",
 ["Challenge objectives"] = "Herausforderungsziele", -- A_Space_Adventure:death02, A_Space_Adventure:desert03, A_Space_Adventure:final, A_Space_Adventure:fruit03, A_Space_Adventure:ice02, A_Space_Adventure:moon02
-["Challenge over!"] = "Herausforderung beendet!", -- User_Mission_-_Rope_Knock_Challenge
+["Challenge over!"] = "Herausforderung vorbei!", -- User_Mission_-_Rope_Knock_Challenge
 ["Change Content: [Left], [Right]"]="Inhalt ändern: [Links], [Rechts]",
 ["Change detonation timer: Tap the [Clock]"] = "Explosionszeitzünder einstellen: [Uhr] antippen", -- Basic_Training_-_Grenade, A_Classic_Fairytale:shadow
 ["Change direction: [Left]/[Right]"] = "Richtung ändern: [Links]/[Rechts]", -- Basic_Training_-_Grenade
--- a/share/hedgewars/Data/Maps/ClimbHome/map.lua	Mon Jan 14 19:26:24 2019 +0100
+++ b/share/hedgewars/Data/Maps/ClimbHome/map.lua	Mon Jan 14 21:19:57 2019 +0100
@@ -672,7 +672,7 @@
 
 function makeSinglePlayerLoserStats()
     local actualHeight = getActualHeight(RecordHeight)
-    SendStat(siGameResult, loc("You lose!"))
+    SendStat(siGameResult, loc("Challenge over!"))
     SendStat(siGraphTitle, loc("Your height over time"))
     local text
     if actualHeight > 30000 then text = loc("%s was damn close to home.")
--- a/share/hedgewars/Data/Missions/Challenge/Basic_Training_-_Sniper_Rifle.lua	Mon Jan 14 19:26:24 2019 +0100
+++ b/share/hedgewars/Data/Missions/Challenge/Basic_Training_-_Sniper_Rifle.lua	Mon Jan 14 21:19:57 2019 +0100
@@ -176,9 +176,6 @@
 	-- will be at "0 ms" right at the start of the game.
 	if TurnTimeLeft < 40 and TurnTimeLeft > 0 and score < score_goal and game_lost == false then
 		game_lost = true
-		-- ... and show a short message.
-		AddCaption(loc("Time's up!"))
-		ShowMission(loc("Sniper Training"), loc("Aiming Practice"), loc("Oh no! Time's up! Just try again."), -amSkip, 0)
 		-- and generate the stats and go to the stats screen
 		generateStats()
 		EndGame()
@@ -426,7 +423,7 @@
 		SendStat(siCustomAchievement, string.format(loc("Accuracy bonus: +%d points"), end_score_accuracy))
 		SendStat(siCustomAchievement, string.format(loc("You had %.2fs remaining on the clock (+%d points)."), (time_goal/1000), end_score_time))
 	else
-		SendStat(siGameResult, loc("You lose!"))
+		SendStat(siGameResult, loc("Challenge over!"))
 
 		SendStat(siCustomAchievement, string.format(loc("You have destroyed %d of %d targets (+%d points)."), score, score_goal, end_score_targets))
 		SendStat(siCustomAchievement, string.format(loc("You have made %d shots."), shots))
--- a/share/hedgewars/Data/Missions/Challenge/User_Mission_-_Rope_Knock_Challenge.lua	Mon Jan 14 19:26:24 2019 +0100
+++ b/share/hedgewars/Data/Missions/Challenge/User_Mission_-_Rope_Knock_Challenge.lua	Mon Jan 14 21:19:57 2019 +0100
@@ -92,13 +92,11 @@
 	valkyriesTimer = -1
 	missionWon = false
 	ProtectEnemies()
-	ShowMission(loc("Rope-knocking Challenge"), loc("Challenge over!"), loc("Oh no! Just try again!"), -amSkip, 0)
 	SendStat(siGameResult, loc("Challenge over!"))
 	local score = GetKillScore()
 	SendStat(siCustomAchievement, string.format(loc("You have killed %d of 16 hedgehogs (+%d points)."), hogsKilled, score))
 	SendStat(siPointType, "!POINTS")
 	SendStat(siPlayerKills, tostring(score), playerTeamName)
-	PlaySound(sndHellish)
 
 	-- Update highscore
 	updateChallengeRecord("Highscore", score)
@@ -253,8 +251,6 @@
 			if missionWon == true then
 				SaveMissionVar("Won", "true")
 				AddCaption(loc("Victory!"), capcolDefault, capgrpGameState)
-			else
-				AddCaption(loc("Challenge over!"), capcolDefault, capgrpGameState)
 			end
 			missionEndHandled = true
 		end
--- a/share/hedgewars/Data/Missions/Challenge/User_Mission_-_That_Sinking_Feeling.lua	Mon Jan 14 19:26:24 2019 +0100
+++ b/share/hedgewars/Data/Missions/Challenge/User_Mission_-_That_Sinking_Feeling.lua	Mon Jan 14 21:19:57 2019 +0100
@@ -301,7 +301,7 @@
 
 	if ((gear == player) or (hhCount == 0)) and (GameOver == false) then
 		SetHealth(player, 0)
-		AddCaption(loc("Disqualified!"))
+		AddCaption(loc("Challenge failed!"))
 		if gear == player then
 			SendStat(siCustomAchievement, loc("Your hedgehog died!"))
 			SendStat(siCustomAchievement, loc("You must survive the flood in order to score."))
@@ -314,7 +314,7 @@
 		show = (type(highscore) == "number") and (highscore > 0)
 		updateChallengeRecord("Highscore", 0, show)
 
-		SendStat(siGameResult, loc("Disqualified!"))
+		SendStat(siGameResult, loc("Challenge failed!"))
 		GameOver = true
 		EndGame()
 	end
--- a/share/hedgewars/Data/Scripts/TargetPractice.lua	Mon Jan 14 19:26:24 2019 +0100
+++ b/share/hedgewars/Data/Scripts/TargetPractice.lua	Mon Jan 14 21:19:57 2019 +0100
@@ -179,7 +179,6 @@
 		if TurnTimeLeft < 40 and TurnTimeLeft > 0 and scored < total_targets and game_lost == false then
 			game_lost = true
 			AddCaption(loc("Time’s up!"), capcolDefault, capgrpGameState)
-			ShowMission(params.missionTitle, loc("Aiming practice"), loc("Oh no! Time's up! Just try again."), -amSkip, 0)
 			SetHealth(player, 0)
 			time_goal = 1
 		end
@@ -187,8 +186,6 @@
 		if band(GetState(player), gstDrowning) == gstDrowning and game_lost == false and scored < total_targets then
 			game_lost = true
 			time_goal = 1
-			AddCaption(loc("You lose!"), capcolDefault, capgrpGameState)
-			ShowMission(params.missionTitle, loc("Aiming practice"), loc("Oh no! You failed! Just try again."), -amSkip, 0)
 		end
 
 		if scored == total_targets  or game_lost then
@@ -248,8 +245,6 @@
 		if GetGearType(gear) == gtHedgehog then
 			if not game_lost then
 				game_lost = true
-				AddCaption(loc("You lose!"), capcolDefault, capgrpGameState)
-				ShowMission(params.missionTitle, loc("Aiming practice"), loc("Oh no! You failed! Just try again."), -amSkip, 0)
 
 				SetHealth(player, 0)
 				time_goal = 1
@@ -293,7 +288,7 @@
 			SendStat(siCustomAchievement, string.format(loc("Your accuracy was %.1f%% (+%d points)."), accuracy, end_score_accuracy))
 			SendStat(siCustomAchievement, string.format(loc("You had %.1fs remaining on the clock (+%d points)."), (time_goal/1000), end_score_time))
 		else
-			SendStat(siGameResult, loc("You lose!"))
+			SendStat(siGameResult, loc("Challenge over!"))
 
 			SendStat(siCustomAchievement, string.format(loc("You have destroyed %d of %d targets (+%d points)."), scored, total_targets, end_score_targets))
 			SendStat(siCustomAchievement, string.format(params.shootText, shots))