added custom stats spacecampaign
authorPeriklis Ntanasis <pntanasis@gmail.com>
Thu, 12 Sep 2013 03:19:31 +0300
branchspacecampaign
changeset 9614 7fa70d381c75
parent 9613 142ba1d08205
child 9615 86b82816b222
added custom stats
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon02.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon02.lua	Thu Sep 12 03:11:30 2013 +0300
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon02.lua	Thu Sep 12 03:19:31 2013 +0300
@@ -1,7 +1,7 @@
 ------------------- ABOUT ----------------------
 --
 -- Hog Solo has to catch the other hog in order
--- to get infoormations about the origin of Pr. Hogevil
+-- to get informations about the origin of Pr. Hogevil
 
 HedgewarsScriptLoad("/Scripts/Locale.lua")
 HedgewarsScriptLoad("/Scripts/Animate.lua")
@@ -138,8 +138,7 @@
 -------------- ACTIONS ------------------
 
 function heroDeath(gear)
-	-- game over
-	EndGame()
+	lose()
 end
 
 -------------- ANIMATIONS ------------------
@@ -217,9 +216,18 @@
 end
 
 function lose()
+	SendStat('siGameResult', loc("Too slow! Try again...")) --1
+	SendStat('siCustomAchievement', loc("You have to caught the other hog 3 times")) --11
+	SendStat('siCustomAchievement', loc("The time that you'll have left when you reach the hog will be added to the next turn")) --11
+	SendStat('siCustomAchievement', loc("Each turn you'll have only one rope to use")) --11
+	SendStat('siCustomAchievement', loc("You'll lose if you die or if your time is up")) --11
+	SendStat('siPlayerKills','0',teamA.name)
 	EndGame()
 end
 
 function win()
+	SendStat('siGameResult', loc("Congratulations, you are the fastest!")) --1
+	SendStat('siCustomAchievement', loc("You have managed to caught the other hog in time")) --11
+	SendStat('siPlayerKills','1',teamA.name)
 	EndGame()
 end