# HG changeset patch
# User Periklis Ntanasis <pntanasis@gmail.com>
# Date 1373619630 -10800
# Node ID 4bf3edc244442b4149a38924fb76b9db449c4c33
# Parent  1c98576c3360432e310092c2e147e84ffaf61cb2
custom stats in moon mission

diff -r 1c98576c3360 -r 4bf3edc24444 share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon01.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon01.lua	Thu Jul 11 16:22:36 2013 +0300
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon01.lua	Fri Jul 12 12:00:30 2013 +0300
@@ -211,6 +211,8 @@
 		TurnTimeLeft = 0
 		AddAnim(dialog02)
 	end
+	
+	SendHealthStatsOff()
 end
 
 function onAmmoStoreInit()
@@ -327,7 +329,10 @@
 end
 
 function heroDeath(gear)
-	-- do stats stuff here
+	SendStat('siGameResult', loc("Hog Solo lost, try again!")) --1
+	SendStat('siCustomAchievement', loc("You have to get the weapons and rescue the PAoTH researchers")) --11
+	SendStat('siPlayerKills','1',teamC.name)
+	SendStat('siPlayerKills','0',teamD.name)
 	EndGame()
 end
 
@@ -348,7 +353,6 @@
 end
 
 function professorDeath(gear)
-	-- do stats stuff here
 	if GetHealth(minion1.gear) then
 		AnimSay(minion1.gear, loc("The boss has fallen! Retreat!"), SAY_SHOUT, 6000)
 	elseif GetHealth(minion2.gear) then
@@ -358,7 +362,14 @@
 	end
 	ParseCommand("teamgone " .. teamB.name)
 	AnimCaption(hero.gear, loc("Congrats! You made them run away!"), 6000)
-	AnimWait(hero.gear,5000)
+	AnimWait(hero.gear,5000)	
+	
+	SendStat('siGameResult', loc("Hog Solo win, conrgatulations!")) --1
+	SendStat('siCustomAchievement', loc("Eliminated the professor Hogevil")) --11
+	SendStat('siCustomAchievement', loc("Drove the minions away")) --11
+	SendStat('siPlayerKills','1',teamD.name)
+	SendStat('siPlayerKills','0',teamC.name)
+	
 	EndGame()
 end
 
@@ -368,6 +379,13 @@
 	ParseCommand("teamgone " .. teamC.name)
 	AnimCaption(hero.gear, loc("Congrats! You won!"), 6000)
 	AnimWait(hero.gear,5000)	
+	
+	SendStat('siGameResult', loc("Hog Solo win, conrgatulations!")) --1
+	SendStat('siCustomAchievement', loc("Eliminated the evil minions")) --11
+	SendStat('siCustomAchievement', loc("Drove the professor away")) --11
+	SendStat('siPlayerKills','1',teamD.name)
+	SendStat('siPlayerKills','0',teamC.name)
+	
 	EndGame()
 end