fixed bug in cosmos that permitted user to go to moon without collecting the saucer and removed ammo that was added for debug purposes spacecampaign
authorPeriklis Ntanasis <pntanasis@gmail.com>
Tue, 27 Aug 2013 02:41:28 +0300
branchspacecampaign
changeset 9585 d079e1cc2806
parent 9584 a7bf5464dfb6
child 9586 0b2494d87d99
fixed bug in cosmos that permitted user to go to moon without collecting the saucer and removed ammo that was added for debug purposes
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/cosmos.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/cosmos.lua	Tue Aug 27 02:00:13 2013 +0300
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/cosmos.lua	Tue Aug 27 02:41:28 2013 +0300
@@ -153,9 +153,6 @@
 	-- do checkpoint stuff needed after game starts
 	if checkPointReached == 1 then	
 		AddAnim(dialog01)
-		AddAmmo(hero.gear, amGasBomb, 5)
-		AddAmmo(hero.gear, amRope, 2)
-		-- Added for dev/debug purposes, remove before release
 		AddAmmo(hero.gear, amJetpack, 2)
 		AddAmmo(guard1.gear, amDEagle, 2)
 		AddAmmo(guard2.gear, amDEagle, 2)
@@ -338,6 +335,16 @@
 function moonLanding(gear)
 	AnimCaption(hero.gear,loc("Welcome to the moon!"))
 	SaveCampaignVar("Planet", "moon")
+	if checkPointReached == 1 then
+		-- player climbed the moon with rope
+		FollowGear(doctor.gear)
+		AnimSay(doctor.gear, loc("One cannot simply walk in moon with rope!"), SAY_SHOUT, 4000)
+		SendStat('siGameResult', loc("Hog Solo has to travel to the moon by flying saucer")) --1
+		SendStat('siCustomAchievement', loc("Collect the crate with the flying saucer")) --11
+		SendStat('siCustomAchievement', loc("Fly to the moon")) --11
+		SendStat('siPlayerKills','0',teamC.name)
+		EndGame()
+	end
 	if checkPointReached ~= 5 then
 		SaveCampaignVar("CosmosCheckPoint", "4")
 		SaveCampaignVar("HeroHealth",GetHealth(hero.gear))