share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua
changeset 14488 7bb7e5e54f70
parent 14401 6c21bd8547dd
child 14490 6ac723d0fcb6
equal deleted inserted replaced
14487:d72fb761aa59 14488:7bb7e5e54f70
     1 ------------------- ABOUT ----------------------
     1 ------------------- ABOUT ----------------------
     2 --
     2 --
     3 -- In the desert planet Hero will have to explore
     3 -- In the desert planet, the hero will have to explore
     4 -- the dunes below the surface and find the hidden
     4 -- the dunes below the surface and find the hidden
     5 -- crates. It is told that one crate contains the
     5 -- crates. It is told that one crate contains the
     6 -- lost part.
     6 -- lost part.
     7 
     7 
     8 -- Idea: game will be successfully end when the 2 lower crates are collected
     8 -- Idea: game will be successfully end when the 2 lower crates are collected
    99 	Theme = "Desert"
    99 	Theme = "Desert"
   100 
   100 
   101 	-- get hero health
   101 	-- get hero health
   102 	local heroHealth = 100
   102 	local heroHealth = 100
   103 
   103 
   104 	-- Hog Solo
   104 	-- Hero
   105 	AddTeam(teamC.name, teamC.color, "Simple", "Island", "Default", "hedgewars")
   105 	teamC.name = AddMissionTeam(teamC.color)
   106 	hero.gear = AddHog(hero.name, 0, heroHealth, "war_desertgrenadier1")
   106 	hero.gear = AddMissionHog(heroHealth)
       
   107 	hero.name = GetHogName(hero.gear)
   107 	AnimSetGearPosition(hero.gear, hero.x, hero.y)
   108 	AnimSetGearPosition(hero.gear, hero.x, hero.y)
   108 	HogTurnLeft(hero.gear, true)
   109 	HogTurnLeft(hero.gear, true)
   109 	-- PAotH undercover scientist and chief Sandologist
   110 	-- PAotH undercover scientist and chief Sandologist
   110 	AddTeam(teamA.name, teamA.color, "Earth", "Island", "Default", "cm_galaxy")
   111 	teamA.name = AddTeam(teamA.name, teamA.color, "Earth", "Island", "Default", "cm_galaxy")
   111 	ally.gear = AddHog(ally.name, 0, 100, "Cowboy")
   112 	ally.gear = AddHog(ally.name, 0, 100, "Cowboy")
   112 	AnimSetGearPosition(ally.gear, ally.x, ally.y)
   113 	AnimSetGearPosition(ally.gear, ally.x, ally.y)
   113 	-- Smugglers
   114 	-- Smugglers
   114 	AddTeam(teamB.name, teamB.color, "chest", "Island", "Default", "cm_bloodyblade")
   115 	teamB.name = AddTeam(teamB.name, teamB.color, "chest", "Island", "Default", "cm_bloodyblade")
   115 	smuggler1.gear = AddHog(smuggler1.name, 1, 100, "hair_orange")
   116 	smuggler1.gear = AddHog(smuggler1.name, 1, 100, "hair_orange")
   116 	AnimSetGearPosition(smuggler1.gear, smuggler1.x, smuggler1.y)
   117 	AnimSetGearPosition(smuggler1.gear, smuggler1.x, smuggler1.y)
   117 	smuggler2.gear = AddHog(smuggler2.name, 1, 100, "lambda")
   118 	smuggler2.gear = AddHog(smuggler2.name, 1, 100, "lambda")
   118 	AnimSetGearPosition(smuggler2.gear, smuggler2.x, smuggler2.y)
   119 	AnimSetGearPosition(smuggler2.gear, smuggler2.x, smuggler2.y)
   119 	smuggler3.gear = AddHog(smuggler3.name, 1, 100, "beefeater")
   120 	smuggler3.gear = AddHog(smuggler3.name, 1, 100, "beefeater")
   538 		EndGame()
   539 		EndGame()
   539 	end
   540 	end
   540 end
   541 end
   541 
   542 
   542 function lose()
   543 function lose()
   543 	SendStat(siGameResult, loc("Hog Solo lost, try again!"))
   544 	SendStat(siGameResult, string.format(loc("%s lost, try again!"), hero.name))
   544 	SendStat(siCustomAchievement, loc("To win the game you have to find the right crate."))
   545 	SendStat(siCustomAchievement, loc("To win the game you have to find the right crate."))
   545 	SendStat(siCustomAchievement, loc("You can avoid some battles."))
   546 	SendStat(siCustomAchievement, loc("You can avoid some battles."))
   546 	SendStat(siCustomAchievement, loc("Use your ammo wisely."))
   547 	SendStat(siCustomAchievement, loc("Use your ammo wisely."))
   547 	SendStat(siCustomAchievement, loc("Don't destroy the device crate!"))
   548 	SendStat(siCustomAchievement, loc("Don't destroy the device crate!"))
   548 	sendSimpleTeamRankings({teamB.name, teamC.name, teamA.name})
   549 	sendSimpleTeamRankings({teamB.name, teamC.name, teamA.name})