win stats spacecampaign
authorPeriklis Ntanasis <pntanasis@gmail.com>
Fri, 06 Sep 2013 07:03:12 +0300
branchspacecampaign
changeset 9610 fabff82cf0b8
parent 9609 70ef35c925d8
child 9611 ef374528a9fb
win stats
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert03.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert03.lua	Fri Sep 06 06:59:54 2013 +0300
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert03.lua	Fri Sep 06 07:03:12 2013 +0300
@@ -107,7 +107,7 @@
 end
 
 function onGameTick20()
-	checkTargetsDestroied()
+	checkTargetsDestroyed()
 end
 
 function onAmmoStoreInit()
@@ -168,7 +168,7 @@
 
 ----------------- Other Functions -----------------
 
-function checkTargetsDestroied()
+function checkTargetsDestroyed()
 	if currentTarget == 1 then
 		if not GetHealth(targets[1].gear) then
 			AddCaption(loc("Level 1 clear!"))
@@ -207,6 +207,10 @@
 end
 
 function win()
+	SendStat('siGameResult', loc("Congratulations, you are the best!")) --1
+	SendStat('siCustomAchievement', loc("You have destroyed all the targets")) --11	
+	SendStat('siCustomAchievement', loc("You are indeed the best PAotH pilot")) --11
+	SendStat('siPlayerKills','1',teamA.name)
 	EndGame()
 end