share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/cosmos.lua
changeset 15503 7f9d8f574ac9
parent 15087 9b2f52fbf874
equal deleted inserted replaced
15502:7621c6157558 15503:7f9d8f574ac9
   115 	-- Disable Sudden Death
   115 	-- Disable Sudden Death
   116 	WaterRise = 0
   116 	WaterRise = 0
   117 	HealthDecrease = 0
   117 	HealthDecrease = 0
   118 	-- completed main missions
   118 	-- completed main missions
   119 	status = getCompletedStatus()
   119 	status = getCompletedStatus()
   120 	if status.death01 then
   120 	Map = "cosmos_map" -- custom map included in file
   121 		Map = "cosmos2_map"
       
   122 	else
       
   123 		Map = "cosmos_map" -- custom map included in file
       
   124 	end
       
   125 	Theme = "Nature"
   121 	Theme = "Nature"
   126 	-- Hero
   122 	-- Hero
   127 	teamC.name = AddMissionTeam(teamC.color)
   123 	teamC.name = AddMissionTeam(teamC.color)
   128 	hero.gear = AddMissionHog(100)
   124 	hero.gear = AddMissionHog(100)
   129 	hero.name = GetHogName(hero.gear)
   125 	hero.name = GetHogName(hero.gear)
   185 
   181 
   186 	AnimationSetup()
   182 	AnimationSetup()
   187 end
   183 end
   188 
   184 
   189 function onGameStart()
   185 function onGameStart()
       
   186 	-- Place meteorite on map
       
   187 	if status.final then
       
   188 		-- Campaign complete: Blown-up meteorite sprite
       
   189 		PlaceSprite(3171, 909, sprCustom2, 0, nil, false, false, false)
       
   190 	elseif status.death01 then
       
   191 		-- death01 mission complete: Normal meteorite sprite
       
   192 		PlaceSprite(3171, 909, sprCustom1, 0, nil, false, false, false)
       
   193 	end
       
   194 
   190 	-- wait for the first turn to start
   195 	-- wait for the first turn to start
   191 	AnimWait(hero.gear, 3000)
   196 	AnimWait(hero.gear, 3000)
   192 
   197 
   193 	FollowGear(hero.gear)
   198 	FollowGear(hero.gear)
   194 	if GetCampaignVar("Won") == "true" then
   199 	if GetCampaignVar("Won") == "true" then
   624 		if status.death02 then
   629 		if status.death02 then
   625 			vgear = AddVisualGear(444, 380, vgtBeeTrace, 0, false)
   630 			vgear = AddVisualGear(444, 380, vgtBeeTrace, 0, false)
   626 		end
   631 		end
   627 	end
   632 	end
   628 	if status.final then
   633 	if status.final then
   629 		vgear = AddVisualGear(3070, 810, vgtBeeTrace, 0, false)
   634 		vgear = AddVisualGear(3080, 810, vgtBeeTrace, 0, false)
   630 		vgear = AddVisualGear(3070, 790, vgtBeeTrace, 0, false)
   635 		vgear = AddVisualGear(3080, 790, vgtBeeTrace, 0, false)
   631 	end
   636 	end
   632 end
   637 end
   633 
   638 
   634 -------------- ANIMATIONS ------------------
   639 -------------- ANIMATIONS ------------------
   635 
   640