changes about displaying the ice planet mission spacecampaign
authorPeriklis Ntanasis <pntanasis@gmail.com>
Wed, 17 Jul 2013 05:12:00 +0300
branchspacecampaign
changeset 9342 51b5fffe3892
parent 9340 23e40ec30afc
child 9344 f8e7e9858a8c
changes about displaying the ice planet mission
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/cosmos.lua
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon01.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/cosmos.lua	Wed Jul 17 04:30:47 2013 +0300
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/cosmos.lua	Wed Jul 17 05:12:00 2013 +0300
@@ -121,6 +121,15 @@
 		AnimSetGearPosition(hero.gear, 1110, 850)
 	elseif checkPointReached == 5 then
 		-- Hero has visited a planet, he has plenty of fuels and can change planet
+		if GetCampaignVar("Planet") == "moon" then
+			AnimSetGearPosition(hero.gear, 1110, 850)
+		elseif GetCampaignVar("Planet") == "desertPlanet" then
+			AnimSetGearPosition(hero.gear, 3670, 270)
+		elseif GetCampaignVar("Planet") == "fruitPlanet" then
+			AnimSetGearPosition(hero.gear, 2400, 375)
+		elseif GetCampaignVar("Planet") == "icePlanet" then
+			AnimSetGearPosition(hero.gear, 1440, 260)
+		end
 	end
 	
 	AnimInit()
@@ -159,6 +168,7 @@
 		AddAnim(dialog05)
 	elseif checkPointReached == 5 then
 		-- Hero has visited a planet, he has plenty of fuels and can change planet
+		AddAmmo(hero.gear, amJetpack, 99)
 	end
 	
 	AddEvent(onHeroDeath, {hero.gear}, heroDeath, {hero.gear}, 0)
@@ -308,8 +318,8 @@
 end
 
 function moonLanding(gear)
-	WriteLnToConsole("MOON LANDING, HOORAY!")
 	AnimCaption(hero.gear,loc("Welcome to the moon!"))
+	SaveCampaignVar("Planet", "moon")
 	if checkPointReached ~= 5 then
 		SaveCampaignVar("CosmosCheckPoint", "4")
 		SaveCampaignVar("HeroHealth",GetHealth(hero.gear))
@@ -335,6 +345,13 @@
 function icePlanetLanding(gear)
 	if checkPointReached < 5 then
 		AddAnim(dialog06)
+	else
+		AnimCaption(hero.gear,loc("Welcome to the planet of ice!"))
+		SaveCampaignVar("Planet", "icePlanet")
+		SaveCampaignVar("UnlockedMissions", "2")
+		SaveCampaignVar("Mission1", "5")
+		SaveCampaignVar("Mission2", "1")
+		EndGame()
 	end
 end
 
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon01.lua	Wed Jul 17 04:30:47 2013 +0300
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon01.lua	Wed Jul 17 05:12:00 2013 +0300
@@ -370,7 +370,7 @@
 	SendStat('siCustomAchievement', loc("Drove the minions away")) --11
 	SendStat('siPlayerKills','1',teamD.name)
 	SendStat('siPlayerKills','0',teamC.name)
-	
+	SaveCampaignVar("CosmosCheckPoint", "5") -- hero got fuels
 	EndGame()
 end
 
@@ -386,7 +386,7 @@
 	SendStat('siCustomAchievement', loc("Drove the professor away")) --11
 	SendStat('siPlayerKills','1',teamD.name)
 	SendStat('siPlayerKills','0',teamC.name)
-	
+	SaveCampaignVar("CosmosCheckPoint", "5") -- hero got fuels	
 	EndGame()
 end