share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon01.lua
branchspacecampaign
changeset 9336 5f2224dce442
parent 9334 4bf3edc24444
child 9342 51b5fffe3892
equal deleted inserted replaced
9334:4bf3edc24444 9336:5f2224dce442
    75 paoth3.y = 1800
    75 paoth3.y = 1800
    76 paoth4.name = "Boris"
    76 paoth4.name = "Boris"
    77 paoth4.x = 3860
    77 paoth4.x = 3860
    78 paoth4.y = 1800
    78 paoth4.y = 1800
    79 professor.name = "Pr.Hogevil"
    79 professor.name = "Pr.Hogevil"
    80 professor.x = 3710
    80 professor.x = 3800
    81 professor.y = 1650
    81 professor.y = 1600
    82 professor.dead = false
    82 professor.dead = false
    83 professor.health = 100
    83 professor.health = 100
    84 minion1.name = "Minion"
    84 minion1.name = "Minion"
    85 minion1.x = 2460
    85 minion1.x = 2460
    86 minion1.y = 1450
    86 minion1.y = 1450
   112 	Delay = 5 
   112 	Delay = 5 
   113 	Map = "moon01_map"
   113 	Map = "moon01_map"
   114 	Theme = "Cheese" -- Because ofc moon is made of cheese :)
   114 	Theme = "Cheese" -- Because ofc moon is made of cheese :)
   115 	-- Hog Solo
   115 	-- Hog Solo
   116 	AddTeam(teamD.name, teamD.color, "Bone", "Island", "HillBilly", "cm_birdy")
   116 	AddTeam(teamD.name, teamD.color, "Bone", "Island", "HillBilly", "cm_birdy")
   117 	if GetCampaignVar("HeroHealth") then
   117 	if GetCampaignVar("HeroHealth") and string.len(GetCampaignVar("HeroHealth")) > 0 then
   118 		hero.gear = AddHog(hero.name, 0, tonumber(GetCampaignVar("HeroHealth")), "war_desertgrenadier1")
   118 		hero.gear = AddHog(hero.name, 0, tonumber(GetCampaignVar("HeroHealth")), "war_desertgrenadier1")
   119 	else
   119 	else
   120 		hero.gear = AddHog(hero.name, 0, 100, "war_desertgrenadier1")
   120 		hero.gear = AddHog(hero.name, 0, 100, "war_desertgrenadier1")
   121 	end
   121 	end
   122 	AnimSetGearPosition(hero.gear, hero.x, hero.y)
   122 	AnimSetGearPosition(hero.gear, hero.x, hero.y)
   234 	end
   234 	end
   235 end
   235 end
   236 
   236 
   237 function onNewTurn()		
   237 function onNewTurn()		
   238 	-- rounds start if hero got his weapons or got near the enemies
   238 	-- rounds start if hero got his weapons or got near the enemies
       
   239 	WriteLnToConsole(GetX(professor.gear))
   239 	if not weaponsAcquired and not battleZoneReached and CurrentHedgehog ~= hero.gear then
   240 	if not weaponsAcquired and not battleZoneReached and CurrentHedgehog ~= hero.gear then
   240 		TurnTimeLeft = 0
   241 		TurnTimeLeft = 0
   241 	elseif weaponsAcquired and not battleZoneReached and CurrentHedgehog ~= hero.gear then
   242 	elseif weaponsAcquired and not battleZoneReached and CurrentHedgehog ~= hero.gear then
   242 		battleZoneReached = true
   243 		battleZoneReached = true
   243 		AddAnim(dialog04)
   244 		AddAnim(dialog04)