desert planet main mission addition - hwp will be added when fully finished spacecampaign
authorPeriklis Ntanasis <pntanasis@gmail.com>
Wed, 31 Jul 2013 01:40:19 +0300
branchspacecampaign
changeset 9404 4ae9b399fa73
parent 9402 8e9d062f9a48
child 9406 24c29108a5ea
desert planet main mission addition - hwp will be added when fully finished
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/campaign.ini
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/cosmos.lua
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice01.lua
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/campaign.ini	Tue Jul 30 17:32:45 2013 +0300
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/campaign.ini	Wed Jul 31 01:40:19 2013 +0300
@@ -14,8 +14,8 @@
 Script=fruit.lua
 
 [Mission 4]
-Name=DESERT
-Script=desert.lua
+Name=Going Down
+Script=desert01.lua
 
 [Mission 5]
 Name=A White Day
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/cosmos.lua	Tue Jul 30 17:32:45 2013 +0300
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/cosmos.lua	Wed Jul 31 01:40:19 2013 +0300
@@ -339,6 +339,13 @@
 function desertPlanetLanding(gear)
 	if checkPointReached < 5 then
 		AddAnim(dialog06)
+	else		
+		AnimCaption(hero.gear,loc("Welcome to the desert planet!"))
+		SaveCampaignVar("Planet", "desertPlanet")
+		SaveCampaignVar("UnlockedMissions", "2")
+		SaveCampaignVar("Mission1", "4")
+		SaveCampaignVar("Mission2", "1")
+		EndGame()
 	end
 end
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua	Wed Jul 31 01:40:19 2013 +0300
@@ -0,0 +1,68 @@
+------------------- ABOUT ----------------------
+--
+-- In the desert planet Hero will have to explore
+-- the dunes below the surface and find the hidden
+-- crates. It is told that one crate contains the
+-- lost part.
+
+
+HedgewarsScriptLoad("/Scripts/Locale.lua")
+HedgewarsScriptLoad("/Scripts/Animate.lua")
+
+----------------- VARIABLES --------------------
+-- hogs
+local hero = {}
+local bandit1 = {}
+-- teams
+local teamA = {}
+local teamB = {}
+local teamC = {}
+local teamD = {}
+-- hedgehogs values
+hero.name = "Hog Solo"
+hero.x = 340
+hero.y = 200
+bandit1.name = "Thanta"
+bandit1.x = 200
+bandit1.y = 1280
+teamB.name = loc("Frozen Bandits")
+teamB.color = tonumber("0033FF",16) -- blues
+teamC.name = loc("Hog Solo")
+teamC.color = tonumber("38D61C",16) -- green
+
+-------------- LuaAPI EVENT HANDLERS ------------------
+
+function onGameInit()
+	Seed = 1
+	--GameFlags = gfDisableWind
+	TurnTime = 25000
+	CaseFreq = 0
+	MinesNum = 0
+	MinesTime = 1
+	Explosives = 0
+	Delay = 3
+	Map = "desert01_map"
+	Theme = "Desert"
+	
+	-- Hog Solo
+	AddTeam(teamC.name, teamC.color, "Bone", "Island", "HillBilly", "cm_birdy")
+	hero.gear = AddHog(hero.name, 0, 100, "war_desertgrenadier1")
+	AnimSetGearPosition(hero.gear, hero.x, hero.y)
+	HogTurnLeft(hero.gear, true)
+	-- Frozen Bandits
+	AddTeam(teamB.name, teamB.color, "Bone", "Island", "HillBilly", "cm_birdy")
+	bandit1.gear = AddHog(bandit1.name, 1, 120, "tophats")
+	AnimSetGearPosition(bandit1.gear, bandit1.x, bandit1.y)	
+	HogTurnLeft(bandit1.gear, true)
+	
+	
+	--AnimInit()
+	--AnimationSetup()	
+end
+
+function onGameStart()
+	AnimWait(hero.gear, 3000)
+	FollowGear(hero.gear)
+	
+end
+
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice01.lua	Tue Jul 30 17:32:45 2013 +0300
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice01.lua	Wed Jul 31 01:40:19 2013 +0300
@@ -43,7 +43,6 @@
 local teamA = {}
 local teamB = {}
 local teamC = {}
-local teamD = {}
 -- hedgehogs values
 hero.name = "Hog Solo"
 hero.x = 340